easymod-cvs Mailing List for EasyMOD (Page 12)
Status: Beta
Brought to you by:
wgeric
You can subscribe to this list here.
2005 |
Jan
|
Feb
|
Mar
|
Apr
(16) |
May
(36) |
Jun
(53) |
Jul
(21) |
Aug
|
Sep
(10) |
Oct
(4) |
Nov
(69) |
Dec
(57) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2006 |
Jan
(8) |
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
(2) |
Jul
|
Aug
|
Sep
(5) |
Oct
(3) |
Nov
|
Dec
|
2007 |
Jan
|
Feb
(7) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2008 |
Jan
|
Feb
(12) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Eric F. <wg...@us...> - 2005-05-06 22:23:53
|
Update of /cvsroot/easymod/easymod2/mods/easymod/includes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18339/mods/easymod/includes Modified Files: admin_easymod.php.txt Added Files: mod_diy_body.tpl Log Message: - Added DIY INSTRUCTIONS. I have it displayed after the SQL Processing screen, may want to move to After Post process screen - Also fixed a bug, I should make sure everything works before commiting --- NEW FILE: mod_diy_body.tpl --- <h2>{L_STEP}</h2> <h3>{L_ALTERATIONS}</h3> <p>{L_DIY_INTRO}</p> <form method="post" action="{S_ACTION}"> <table width="100%" cellpadding="4" cellspacing="1" border="0" class="forumline"> <tr> <th height="25" class="thHead" nowrap="nowrap">Notice</th> </tr> <tr> <td class="row1"><table border="0" cellpadding="3" cellspacing="1" width="100%"> <tr> <td align="center"> </td> </tr> <tr> <td width="100%"><span class="gen"> <ul> <!-- BEGIN diyrow --> <li>{diyrow.INSTRUCTIONS}</li> <!-- END diyrow --> </ul> </span></td> </tr> <tr> <td align="center"> </td> </tr> </table> </td> </tr> <tr> <td class="catBottom" align="center" height="28"> {HIDDEN} <input type="hidden" name="mode" value="{MODE}"> <input type="hidden" name="SQL_lines" value="{SQL_LINES}"> <input type="hidden" name="themes" value="{THEMES}"> <input type="hidden" name="languages" value="{LANGUAGES}"> <input type="hidden" name="files" value="{FILES}"> <input type="hidden" name="num_proc" value="{PROCESSED}"> <input type="hidden" name="num_unproc" value="{UNPROCESSED}"> <input type="hidden" name="install_file" value="{MOD_FILE}"> <input type="hidden" name="install_path" value="{MOD_PATH}"> <input type="hidden" name="password" value="{EM_PASS}"> <input type="submit" name="post" class="mainoption" value="{L_COMPLETE}" /></center> </td> </tr> </table> <br /> </form> <br /> Index: admin_easymod.php.txt =================================================================== RCS file: /cvsroot/easymod/easymod2/mods/easymod/includes/admin_easymod.php.txt,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** admin_easymod.php.txt 1 May 2005 12:23:18 -0000 1.4 --- admin_easymod.php.txt 6 May 2005 22:23:44 -0000 1.5 *************** *** 654,658 **** ($mode != 'display_backup') && ($mode != 'download_backup') && ($mode != 'SQL_view') && ($mode != 'SQL_execute') && ! ($mode != 'update') && ($mode != 'process') && ($mode != 'post_process')) { $mode = 'install' ; --- 654,658 ---- ($mode != 'display_backup') && ($mode != 'download_backup') && ($mode != 'SQL_view') && ($mode != 'SQL_execute') && ! ($mode != 'update') && ($mode != 'process') && ($mode != 'post_process') && ($mode != 'diy_process')) { $mode = 'install' ; *************** *** 1394,1397 **** --- 1394,1401 ---- $current_command = 'SQL' ; } + else if ( strstr($buffer, 'DIY INSTRUCTIONS') ) + { + $current_command = 'DIY INSTRUCTIONS'; + } else if (strstr($buffer, 'SAVE/CLOSE')) { *************** *** 1502,1506 **** fclose($f_mod_script); - // load the process mod template unless we are in special case mode if (($mode != 'display_file') && ($mode != 'download_file')) --- 1506,1509 ---- *************** *** 1808,1811 **** --- 1811,1819 ---- } + else if ( $commands[$i]['command'] == 'DIY INSTRUCTIONS') + { + $diy[] = $body[$i]; + } + // // setup the copying of files from the mod directory to core directories *************** *** 2355,2358 **** --- 2363,2376 ---- $hidden .= '<input type="hidden" name="num_sql_steps" value="' . $i . "\">\n" ; + // put DIY INSTRUCTIONS in hidden fields + for($i = 0; $i < count($diy); $i++ ) + { + $line = '' ; + for ($j=0; $j<count($diy[$i]); $j++) + { + $line .= $diy[$i][$j] ; + } + $hidden .= '<input type="hidden" name="diy_array[]" value="' . htmlspecialchars($line) . "\" />\n"; + } $template->assign_block_vars('success', array( *************** *** 2362,2366 **** 'L_NEXT_STEP' => $lang['EM_next_step'], - 'TITLE' => $mod_title, 'INSTALL_PATH' => $print_path, --- 2380,2383 ---- *************** *** 2395,2398 **** --- 2412,2416 ---- $num_proc = (isset($HTTP_POST_VARS['num_proc'])) ? intval($HTTP_POST_VARS['num_proc']) : 0 ; $num_unproc = (isset($HTTP_POST_VARS['num_unproc'])) ? intval($HTTP_POST_VARS['num_unproc']) : 0 ; + $diy = (isset($HTTP_POST_VARS['diy_array'])) ? $HTTP_POST_VARS['diy_array'] : array(); // get the post process operations and prepare to send them to the next step *************** *** 2409,2412 **** --- 2427,2435 ---- $hidden .= '<input type="hidden" name="num_command_steps" value="' . $i . "\">\n" ; + // put DIY instructions in hidden vars + for($i = 0; $i < count($diy); $i++ ) + { + $hidden .= '<input type="hidden" name="diy_array[]" value="' . stripslashes(htmlspecialchars($diy[$i])) . "\" />\n"; + } // get the SQL commands we are going to translate *************** *** 2525,2528 **** --- 2548,2553 ---- // fill the template $template->assign_vars(array( + 'S_ACTION' => append_sid($phpbb_root_path . 'admin/admin_easymod.'.$phpEx), + 'L_STEP' => $lang['EM_sql_step2'], 'L_SQL_ALPHA2' => $lang['EM_SQL_Alpha2'], *************** *** 2554,2558 **** 'MOD_FILE' => $install_file, 'MOD_PATH' => $install_path, ! 'MODE' => ($error == '') ? 'SQL_execute' : 'post_process', 'HIDDEN' => $hidden, 'EM_PASS' => $password) --- 2579,2583 ---- 'MOD_FILE' => $install_file, 'MOD_PATH' => $install_path, ! 'MODE' => ( ($error == '') ? 'SQL_execute' : (( count($diy) ) ? 'diy_process' : 'post_process') ), 'HIDDEN' => $hidden, 'EM_PASS' => $password) *************** *** 2568,2571 **** --- 2593,2597 ---- $num_proc = (isset($HTTP_POST_VARS['num_proc'])) ? intval($HTTP_POST_VARS['num_proc']) : 0 ; $num_unproc = (isset($HTTP_POST_VARS['num_unproc'])) ? intval($HTTP_POST_VARS['num_unproc']) : 0 ; + $diy = (isset($HTTP_POST_VARS['diy_array'])) ? $HTTP_POST_VARS['diy_array'] : array(); // get the post process operations and prepare to send them to the next step *************** *** 2582,2585 **** --- 2608,2616 ---- $hidden .= '<input type="hidden" name="num_command_steps" value="' . $i . "\">\n" ; + // put DIY instructions in hidden vars + for($i = 0; $i < count($diy); $i++ ) + { + $hidden .= '<input type="hidden" name="diy_array[]" value="' . stripslashes(htmlspecialchars($diy[$i])) . "\" />\n"; + } // get the SQL commands we are going to execute *************** *** 2673,2677 **** 'MOD_FILE' => $install_file, 'MOD_PATH' => $install_path, ! 'MODE' => 'post_process', 'HIDDEN' => $hidden, 'EM_PASS' => $password) --- 2704,2708 ---- 'MOD_FILE' => $install_file, 'MOD_PATH' => $install_path, ! 'MODE' => ( count($diy) ) ? 'diy_process' : 'post_process', 'HIDDEN' => $hidden, 'EM_PASS' => $password) *************** *** 2679,2684 **** --- 2710,2784 ---- } + // + // show the DIY instructions + // move below post_process? + // + else if ( $mode == 'diy_process' ) + { + // get the vars we are passing along + $themes = (isset($HTTP_POST_VARS['themes'])) ? htmlspecialchars($HTTP_POST_VARS['themes']) : '' ; + $languages = (isset($HTTP_POST_VARS['languages'])) ? htmlspecialchars($HTTP_POST_VARS['languages']) : '' ; + $files = (isset($HTTP_POST_VARS['files'])) ? intval($HTTP_POST_VARS['files']) : 0 ; + $num_proc = (isset($HTTP_POST_VARS['num_proc'])) ? intval($HTTP_POST_VARS['num_proc']) : 0 ; + $num_unproc = (isset($HTTP_POST_VARS['num_unproc'])) ? intval($HTTP_POST_VARS['num_unproc']) : 0 ; + $diy = (isset($HTTP_POST_VARS['diy_array'])) ? $HTTP_POST_VARS['diy_array'] : array(); + + // get the post process operations and prepare to send them to the next step + $num_command_steps = (isset($HTTP_POST_VARS['num_command_steps'])) ? intval($HTTP_POST_VARS['num_command_steps']) :0; + $hidden = '' ; + for ( $i=0; $i<$num_command_steps; $i++) + { + $var_name = 'command_step' . $i ; + if ( isset($HTTP_POST_VARS[$var_name])) + { + $hidden .= '<input type="hidden" name="command_step'.$i.'" value="' . $HTTP_POST_VARS[$var_name]."\">\n"; + } + } + $hidden .= '<input type="hidden" name="num_command_steps" value="' . $i . "\">\n" ; + // explode each new line so they can have their own bullet + $diy_process = array(); + for( $i = 0; $i < count($diy); $i++ ) + { + $diy_process = array_merge($diy_process, explode("\n", $diy[$i])); + } + for( $i = 0; $i < count($diy_process); $i++ ) + { + $diy_process[$i] = trim($diy_process[$i]); + if ( !empty($diy_process[$i]) ) + { + $template->assign_block_vars('diyrow', array( + 'INSTRUCTIONS' => stripslashes(htmlspecialchars($diy_process[$i]))) + ); + } + } + + // Show the SQL template + $template->set_filenames(array( + 'body' => 'admin/mod_diy_body.tpl') + ); + + // fill the template + $template->assign_vars(array( + 'L_STEP' => $lang['EM_sql_step2'], + 'L_DIY_INTRO' => '\'Do it yourself\' instructions need to be executed by you manually, EasyMOD will not perform these actions', + + 'L_COMPLETE' => $lang['EM_complete_install'], + + 'THEMES' => $themes, + 'LANGUAGES' => $languages, + 'FILES' => $files, + 'PROCESSED' => $num_proc, + 'UNPROCESSED' => $num_unproc, + 'SQL_LINES' => $num_sql_lines, + 'MOD_FILE' => $install_file, + 'MOD_PATH' => $install_path, + 'MODE' => 'post_process', + 'HIDDEN' => $hidden, + 'EM_PASS' => $password) + ); + + } // // last step! move the files into place - force this step if in preview mode |
From: Eric F. <wg...@us...> - 2005-05-06 22:23:52
|
Update of /cvsroot/easymod/easymod2/mods/easymod In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18339/mods/easymod Modified Files: easymod_install.php Log Message: - Added DIY INSTRUCTIONS. I have it displayed after the SQL Processing screen, may want to move to After Post process screen - Also fixed a bug, I should make sure everything works before commiting Index: easymod_install.php =================================================================== RCS file: /cvsroot/easymod/easymod2/mods/easymod/easymod_install.php,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** easymod_install.php 6 May 2005 21:24:10 -0000 1.7 --- easymod_install.php 6 May 2005 22:23:44 -0000 1.8 *************** *** 158,162 **** function find_lang_admin( $find_str, &$fin, $close = false) { ! global $phpEx ; // if we've not opened the file yet, then do so --- 158,162 ---- function find_lang_admin( $find_str, &$fin, $close = false) { ! global $phpEx, $phpbb_root_path ; // if we've not opened the file yet, then do so |
From: Eric F. <wg...@us...> - 2005-05-06 21:24:21
|
Update of /cvsroot/easymod/easymod2/mods/easymod In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4254/mods/easymod Modified Files: easymod_display_functions.php easymod_install.php Log Message: Fixed a couple of parse errors I added in last commit Index: easymod_display_functions.php =================================================================== RCS file: /cvsroot/easymod/easymod2/mods/easymod/easymod_display_functions.php,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** easymod_display_functions.php 2 May 2005 00:22:38 -0000 1.5 --- easymod_display_functions.php 6 May 2005 21:24:10 -0000 1.6 *************** *** 116,120 **** $variables['TEXT'] = $text ; ! isplay_template( $phpbb_root_path . $script_path . 'templates/page_start.tpl', $variables) ; if (!$simple) { --- 116,120 ---- $variables['TEXT'] = $text ; ! display_template( $phpbb_root_path . $script_path . 'templates/page_start.tpl', $variables) ; if (!$simple) { Index: easymod_install.php =================================================================== RCS file: /cvsroot/easymod/easymod2/mods/easymod/easymod_install.php,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** easymod_install.php 2 May 2005 00:22:38 -0000 1.6 --- easymod_install.php 6 May 2005 21:24:10 -0000 1.7 *************** *** 22,26 **** define('IN_PHPBB', 1); $phpbb_root_path = './../../../'; ! $script_path = 'admin/mods/easymod' ; //// $easymod_install_version = '0.1.13' ; --- 22,26 ---- define('IN_PHPBB', 1); $phpbb_root_path = './../../../'; ! $script_path = 'admin/mods/easymod/' ; //// $easymod_install_version = '0.1.13' ; *************** *** 1773,1777 **** // added security starting in 0.0.11, blowfish encrypt the ftp_pass ! include($phpbb_root_path . $script_path . '/em_includes/em_cipher.'.$phpEx) ; $cipher = new Cipher_BlockMode_cbc(); $cipher->blowfish->setKey( $em_pass); --- 1773,1777 ---- // added security starting in 0.0.11, blowfish encrypt the ftp_pass ! include($phpbb_root_path . $script_path . 'em_includes/em_cipher.'.$phpEx) ; $cipher = new Cipher_BlockMode_cbc(); $cipher->blowfish->setKey( $em_pass); |
From: Eric F. <wg...@us...> - 2005-05-02 00:22:48
|
Update of /cvsroot/easymod/easymod2/mods/easymod In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22931/mods/easymod Modified Files: easymod_display_functions.php easymod_install.php lang_easymod.php Log Message: I think I have all of the changes that were removed put back. Remember to update before you commit. Index: easymod_display_functions.php =================================================================== RCS file: /cvsroot/easymod/easymod2/mods/easymod/easymod_display_functions.php,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** easymod_display_functions.php 1 May 2005 07:20:18 -0000 1.4 --- easymod_display_functions.php 2 May 2005 00:22:38 -0000 1.5 *************** *** 109,113 **** function page_header( $text, $simple=false) { ! global $lang, $easymod_install_version; $variables = array() ; --- 109,113 ---- function page_header( $text, $simple=false) { ! global $lang, $easymod_install_version, $phpbb_root_path, $script_path; $variables = array() ; *************** *** 116,123 **** $variables['TEXT'] = $text ; ! display_template( './templates/page_start.tpl', $variables) ; if (!$simple) { ! display_template( './templates/page_header.tpl', $variables) ; } } --- 116,123 ---- $variables['TEXT'] = $text ; ! isplay_template( $phpbb_root_path . $script_path . 'templates/page_start.tpl', $variables) ; if (!$simple) { ! display_template( $phpbb_root_path . $script_path . 'templates/page_header.tpl', $variables) ; } } *************** *** 127,131 **** function page_footer() { ! global $install_step, $write, $move, $ftp_dir, $ftp_user, $ftp_pass, $ftp_host, $ftp_port, $ftp_debug, $ftp_type, $lang, $phpEx ; ///////////////////////// --- 127,131 ---- function page_footer() { ! global $install_step, $write, $move, $ftp_dir, $ftp_user, $ftp_pass, $ftp_host, $ftp_port, $ftp_debug, $ftp_type, $lang, $phpEx, $phpbb_root_path, $script_path ; ///////////////////////// *************** *** 142,146 **** $variables['DEBUG'] = $lang['EM_debug_display'] ; ! display_template( './templates/page_footer.tpl', $variables) ; } --- 142,146 ---- $variables['DEBUG'] = $lang['EM_debug_display'] ; ! display_template( $phpbb_root_path . $script_path . 'templates/page_footer.tpl', $variables) ; } *************** *** 149,157 **** function helpwin( $width=400, $height=200) { $variables = array() ; $variables['WIDTH'] = $width ; $variables['HEIGHT'] = $height ; ! display_template( './templates/helpwin.tpl', $variables) ; } --- 149,159 ---- function helpwin( $width=400, $height=200) { + global $phpbb_root_path, $script_path; + $variables = array() ; $variables['WIDTH'] = $width ; $variables['HEIGHT'] = $height ; ! display_template( $phpbb_root_path . $script_path . 'templates/helpwin.tpl', $variables) ; } *************** *** 160,167 **** function form_settings( $hidden, $step, $main_button, $rescan) { ! global $phpEx, $lang ; $variables = array() ; ! $variables['U_FORM'] = 'easymod_install.'.$phpEx ; $variables['STEP'] = $step ; $variables['HIDDEN'] = $hidden ; --- 162,169 ---- function form_settings( $hidden, $step, $main_button, $rescan) { ! global $phpEx, $lang, $phpbb_root_path, $script_path ; $variables = array() ; ! $variables['U_FORM'] = $phpbb_root_path . $script_path . 'easymod_install.'.$phpEx ; $variables['STEP'] = $step ; $variables['HIDDEN'] = $hidden ; *************** *** 169,173 **** $variables['RESCAN'] = (!$rescan) ? '' : '<input class="mainoption" type="submit" value="' . $lang['Rescan'] . '" name="rescan"/>' ; ! display_template( './templates/form_settings.tpl', $variables) ; } --- 171,175 ---- $variables['RESCAN'] = (!$rescan) ? '' : '<input class="mainoption" type="submit" value="' . $lang['Rescan'] . '" name="rescan"/>' ; ! display_template( $phpbb_root_path . $script_path . 'templates/form_settings.tpl', $variables) ; } *************** *** 176,180 **** function display_debug_html( $variables, $access, $values) { ! global $lang, $easymod_install_version, $install_step, $mode, $write, $move, $ftp_user, $ftp_pass, $ftp_host, $ftp_port, $ftp_dir, $ftp_debug, $ftp_type, $ftp_cache ; // assign template data --- 178,182 ---- function display_debug_html( $variables, $access, $values) { ! global $lang, $easymod_install_version, $install_step, $mode, $write, $move, $ftp_user, $ftp_pass, $ftp_host, $ftp_port, $ftp_dir, $ftp_debug, $ftp_type, $ftp_cache, $phpbb_root_path, $script_path ; // assign template data *************** *** 215,219 **** $variables['EM_VERSION'] = $easymod_install_version ; $variables['PHPBB_VERSION'] = get_phpbb_version() ; ! $variables['CWD'] = getcwd() ; $variables['STEP'] = $install_step ; $variables['MODE'] = $mode ; --- 217,221 ---- $variables['EM_VERSION'] = $easymod_install_version ; $variables['PHPBB_VERSION'] = get_phpbb_version() ; ! $variables['CWD'] = dirname(__FILE__) ; $variables['STEP'] = $install_step ; $variables['MODE'] = $mode ; *************** *** 231,235 **** $variables['FILE_LISTING'] = $values['file_listing'] ; ! display_template( './templates/display_debug.tpl', $variables) ; // check FTP compatiblity --- 233,237 ---- $variables['FILE_LISTING'] = $values['file_listing'] ; ! display_template( $phpbb_root_path . $script_path . 'templates/display_debug.tpl', $variables) ; // check FTP compatiblity *************** *** 237,241 **** { // test the ftp connection ! if (test_ftp( $ftp_user, $ftp_pass, $ftp_dir, $ftp_host, $ftp_port, true, $ftp_type)) { echo '<br>[b]<b>' . $lang['EM_debug_ftp_test'] . '</b>[/b] :: [b][color=green]<b class="ok">' . $lang['EM_debug_success']. "</b>[/color][/b]<br />\n" ; --- 239,243 ---- { // test the ftp connection ! if (test_ftp( $ftp_user, $ftp_pass, $ftp_dir, $ftp_host, true, $ftp_type, $ftp_cache)) { echo '<br>[b]<b>' . $lang['EM_debug_ftp_test'] . '</b>[/b] :: [b][color=green]<b class="ok">' . $lang['EM_debug_success']. "</b>[/color][/b]<br />\n" ; *************** *** 247,251 **** } ! display_template( './templates/display_debug_footer.tpl', $variables) ; } --- 249,253 ---- } ! display_template( $phpbb_root_path . $script_path . 'templates/display_debug_footer.tpl', $variables) ; } *************** *** 287,291 **** $values['file_listing'] = '' ; ! if ($dh = opendir('./')) { while (($file = readdir($dh)) !== false) --- 289,293 ---- $values['file_listing'] = '' ; ! if ($dh = opendir(dirname(__FILE__))) { while (($file = readdir($dh)) !== false) *************** *** 303,307 **** function display_error( $error) { ! global $lang ; // assign template data --- 305,309 ---- function display_error( $error) { ! global $lang, $phpbb_root_path, $script_path ; // assign template data *************** *** 310,314 **** $variables['ERROR'] = $error ; ! display_template( './templates/display_error.tpl', $variables) ; } --- 312,316 ---- $variables['ERROR'] = $error ; ! display_template( $phpbb_root_path . $script_path . 'templates/display_error.tpl', $variables) ; } *************** *** 364,370 **** function get_install_info( &$variables, $prev_em_version) { ! global $phpEx, $lang, $easymod_install_version, $phpBB_version ; ! $variables['U_FORM'] = 'easymod_install.' . $phpEx ; $variables['EM_Install_Info'] = $lang['EM_Install_Info'] ; $variables['EM_Select_Language'] = $lang['EM_Select_Language'] ; --- 366,372 ---- function get_install_info( &$variables, $prev_em_version) { ! global $phpEx, $lang, $easymod_install_version, $phpBB_version, $phpbb_root_path, $script_path ; ! $variables['U_FORM'] = $phpbb_root_path . $script_path . 'easymod_install.' . $phpEx ; $variables['EM_Install_Info'] = $lang['EM_Install_Info'] ; $variables['EM_Select_Language'] = $lang['EM_Select_Language'] ; *************** *** 428,433 **** if ($bbcode) { ! $ok_msg = '[b][color=green]<b class="ok">OK</b>[/b]' ; ! $okparms = '[b][color=green]<b class="ok">%s</b>[/b]' ; $no_msg = '[b]<b>' . $lang['EM_no'] . '</b>[/b]' ; $noparms = '[b]<b>%s</b>[/b]' ; --- 430,435 ---- if ($bbcode) { ! $ok_msg = '[b][color=green]<b class="ok">OK</b>[/color][/b]' ; ! $okparms = '[b][color=green]<b class="ok">%s</b>[/color][/b]' ; $no_msg = '[b]<b>' . $lang['EM_no'] . '</b>[/b]' ; $noparms = '[b]<b>%s</b>[/b]' ; *************** *** 573,580 **** function check_installablity() { ! global $db, $lang, $easymod_install_version ; // make sure we are in the correct directory ! $cwd = getcwd() ; $cwd = str_replace("\\", '/', $cwd) ; $dirs = explode('/', $cwd) ; --- 575,582 ---- function check_installablity() { ! global $db, $lang, $easymod_install_version, $phpbb_root_path ; // make sure we are in the correct directory ! $cwd = dirname(__FILE__) ; $cwd = str_replace("\\", '/', $cwd) ; $dirs = explode('/', $cwd) ; *************** *** 584,595 **** //// make sure EM is in the right directory //// ! // for some odd reason getcwd returns empty on some servers??? (added in 0.0.10a-2) ! if ($cwd == '') ! { ! // do nothing ! } ! ! // otherwise make sure we are in the correct directory for installation ! else if (($dirs[count($dirs)-3] != 'admin') || ($dirs[count($dirs)-2] != 'mods') || (strtolower($dirs[count($dirs)-1]) != 'easymod')) { handle_error( OPEN_FAIL_CRITICAL, $file_list, false, $lang['EM_err_install_dir'] ) ; --- 586,590 ---- //// make sure EM is in the right directory //// ! if (($dirs[count($dirs)-3] != 'admin') || ($dirs[count($dirs)-2] != 'mods') || (strtolower($dirs[count($dirs)-1]) != 'easymod')) { handle_error( OPEN_FAIL_CRITICAL, $file_list, false, $lang['EM_err_install_dir'] ) ; *************** *** 601,605 **** //// // make sure subsilver dir exists ! if (!file_exists('../../../templates/subSilver')) { handle_error( OPEN_FAIL_CRITICAL, $file_list, false, $lang['EM_err_no_subsilver'] ) ; --- 596,600 ---- //// // make sure subsilver dir exists ! if (!file_exists($phpbb_root_path . 'templates/subSilver')) { handle_error( OPEN_FAIL_CRITICAL, $file_list, false, $lang['EM_err_no_subsilver'] ) ; *************** *** 621,625 **** // make sure english exists ! if (!file_exists('../../../language/lang_english')) { handle_error( OPEN_FAIL_CRITICAL, $file_list, false, $lang['EM_err_no_english'] ) ; --- 616,620 ---- // make sure english exists ! if (!file_exists($phpbb_root_path . 'language/lang_english')) { handle_error( OPEN_FAIL_CRITICAL, $file_list, false, $lang['EM_err_no_english'] ) ; *************** *** 695,699 **** function display_step1_classic() { ! global $lang, $db, $easymod_install_version, $phpEx ; $variables = array() ; --- 690,694 ---- function display_step1_classic() { ! global $lang, $db, $easymod_install_version, $phpEx, $phpbb_root_path, $script_path ; $variables = array() ; *************** *** 750,754 **** // assign template data ! $variables['U_FORM'] = 'easymod_install.'.$phpEx ; $variables['EM_support'] = $lang['EM_support'] ; $variables['EM_Settings'] = $lang['EM_Settings'] ; --- 745,749 ---- // assign template data ! $variables['U_FORM'] = $phpbb_root_path . $script_path . 'easymod_install.'.$phpEx ; $variables['EM_support'] = $lang['EM_support'] ; $variables['EM_Settings'] = $lang['EM_Settings'] ; *************** *** 774,778 **** // dispay the page and the footer ! display_template( './templates/step1_classic.tpl', $variables) ; page_footer() ; exit ; --- 769,773 ---- // dispay the page and the footer ! display_template( $phpbb_root_path . $script_path . 'templates/step1_classic.tpl', $variables) ; page_footer() ; exit ; *************** *** 783,787 **** function display_step1_simple() { ! global $lang, $db, $easymod_install_version, $phpEx, $language ; $variables = array() ; --- 778,782 ---- function display_step1_simple() { ! global $lang, $db, $easymod_install_version, $phpEx, $language, $phpbb_root_path, $script_path ; $variables = array() ; *************** *** 798,802 **** // assign template data ! $variables['U_FORM'] = 'easymod_install.'.$phpEx ; $variables['EM_support'] = $lang['EM_support'] ; $variables['EM_Settings'] = $lang['EM_Settings'] ; --- 793,797 ---- // assign template data ! $variables['U_FORM'] = $phpbb_root_path . $script_path . 'easymod_install.'.$phpEx ; $variables['EM_support'] = $lang['EM_support'] ; $variables['EM_Settings'] = $lang['EM_Settings'] ; *************** *** 806,810 **** // dispay the page and the footer ! display_template( './templates/step1_simple.tpl', $variables) ; page_footer() ; exit ; --- 801,805 ---- // dispay the page and the footer ! display_template( $phpbb_root_path . $script_path . 'templates/step1_simple.tpl', $variables) ; page_footer() ; exit ; *************** *** 814,818 **** function display_step1b_idunno() { ! global $lang, $db, $easymod_install_version, $phpEx ; $variables = array() ; --- 809,813 ---- function display_step1b_idunno() { ! global $lang, $db, $easymod_install_version, $phpEx, $phpbb_root_path, $script_path ; $variables = array() ; *************** *** 859,863 **** // assign template data ! $variables['U_FORM'] = 'easymod_install.'.$phpEx ; $variables['EM_support'] = $lang['EM_support'] ; $variables['EM_Settings'] = $lang['EM_Settings'] ; --- 854,858 ---- // assign template data ! $variables['U_FORM'] = $phpbb_root_path . $script_path . 'easymod_install.'.$phpEx ; $variables['EM_support'] = $lang['EM_support'] ; $variables['EM_Settings'] = $lang['EM_Settings'] ; *************** *** 867,871 **** // dispay the page and the footer ! display_template( './templates/step1b_simple.tpl', $variables) ; page_footer() ; exit ; --- 862,866 ---- // dispay the page and the footer ! display_template( $phpbb_root_path . $script_path . 'templates/step1b_simple.tpl', $variables) ; page_footer() ; exit ; *************** *** 875,879 **** function display_step1b_ftp() { ! global $lang, $db, $easymod_install_version, $phpEx, $language ; $variables = array() ; --- 870,874 ---- function display_step1b_ftp() { ! global $lang, $db, $easymod_install_version, $phpEx, $language, $phpbb_root_path, $script_path ; $variables = array() ; *************** *** 887,891 **** // assign template data ! $variables['U_FORM'] = 'easymod_install.'.$phpEx ; $variables['EM_support'] = $lang['EM_support'] ; $variables['EM_Settings'] = $lang['EM_Settings'] ; --- 882,886 ---- // assign template data ! $variables['U_FORM'] = $phpbb_root_path . $script_path . 'easymod_install.'.$phpEx ; $variables['EM_support'] = $lang['EM_support'] ; $variables['EM_Settings'] = $lang['EM_Settings'] ; *************** *** 903,907 **** // dispay the page and the footer ! display_template( './templates/step1b_ftp.tpl', $variables) ; page_footer() ; exit ; --- 898,902 ---- // dispay the page and the footer ! display_template( $phpbb_root_path . $script_path . 'templates/step1b_ftp.tpl', $variables) ; page_footer() ; exit ; *************** *** 911,915 **** function display_step1c_empw() { ! global $lang, $db, $easymod_install_version, $phpEx ; global $read, $write, $move, $ftp_user, $ftp_pass, $ftp_host, $ftp_port, $ftp_dir, $ftp_debug, $ftp_type, $ftp_cache; --- 906,910 ---- function display_step1c_empw() { ! global $lang, $db, $easymod_install_version, $phpEx, $phpbb_root_path, $script_path ; global $read, $write, $move, $ftp_user, $ftp_pass, $ftp_host, $ftp_port, $ftp_dir, $ftp_debug, $ftp_type, $ftp_cache; *************** *** 927,931 **** // assign template data ! $variables['U_FORM'] = 'easymod_install.'.$phpEx ; $variables['EM_support'] = $lang['EM_support'] ; $variables['EM_Settings'] = $lang['EM_Settings'] ; --- 922,926 ---- // assign template data ! $variables['U_FORM'] = $phpbb_root_path . $script_path . 'easymod_install.'.$phpEx ; $variables['EM_support'] = $lang['EM_support'] ; $variables['EM_Settings'] = $lang['EM_Settings'] ; *************** *** 952,956 **** // dispay the page and the footer ! display_template( './templates/step1c_empw.tpl', $variables) ; page_footer() ; exit ; --- 947,951 ---- // dispay the page and the footer ! display_template( $phpbb_root_path . $script_path . 'templates/step1c_empw.tpl', $variables) ; page_footer() ; exit ; Index: lang_easymod.php =================================================================== RCS file: /cvsroot/easymod/easymod2/mods/easymod/lang_easymod.php,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** lang_easymod.php 1 May 2005 07:12:52 -0000 1.4 --- lang_easymod.php 2 May 2005 00:22:38 -0000 1.5 *************** *** 160,164 **** $lang['EM_no_module'] = 'module not loaded' ; $lang['EM_no_problem'] = 'NOTE: there is no problem if some items failed or were not attempted. This is normal.' ; ! $lang['EM_support'] = 'For support, visit <a href="http://area51.phpbb.com/phpBB22/viewforum.php?f=15" target="_blank">EasyMOD Central</a> over at Area51. No emails, IMs, or PMs please.' ; $lang['EM_read_access'] = 'read access' ; --- 160,164 ---- $lang['EM_no_module'] = 'module not loaded' ; $lang['EM_no_problem'] = 'NOTE: there is no problem if some items failed or were not attempted. This is normal.' ; ! $lang['EM_support'] = 'For support, visit <a href="http://easymod.sourceforge.net/" target="_blank">EasyMOD Central</a> over at SourceForge. No emails, IMs, or PMs please.' ; $lang['EM_read_access'] = 'read access' ; Index: easymod_install.php =================================================================== RCS file: /cvsroot/easymod/easymod2/mods/easymod/easymod_install.php,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** easymod_install.php 1 May 2005 07:18:42 -0000 1.5 --- easymod_install.php 2 May 2005 00:22:38 -0000 1.6 *************** *** 27,30 **** --- 27,47 ---- //// + // PHP5 with register_long_arrays off? + if (!isset($HTTP_POST_VARS) && isset($_POST)) + { + $HTTP_POST_VARS = $_POST; + $HTTP_GET_VARS = $_GET; + $HTTP_SERVER_VARS = $_SERVER; + $HTTP_COOKIE_VARS = $_COOKIE; + $HTTP_ENV_VARS = $_ENV; + $HTTP_POST_FILES = $_FILES; + + // _SESSION is the only superglobal which is conditionally set + if (isset($_SESSION)) + { + $HTTP_SESSION_VARS = $_SESSION; + } + } + include($phpbb_root_path . 'extension.inc'); include($phpbb_root_path . 'config.'.$phpEx); *************** *** 34,42 **** include($phpbb_root_path . 'includes/db.'.$phpEx); ! include( './em_includes/em_ftp.'.$phpEx); ! include( './em_includes/em_modio.'.$phpEx); ! include( './em_includes/em_functions.'.$phpEx); ! include( './easymod_display_functions.'.$phpEx); --- 51,59 ---- include($phpbb_root_path . 'includes/db.'.$phpEx); ! include( $phpbb_root_path . $script_path . 'em_includes/em_ftp.'.$phpEx); ! include( $phpbb_root_path . $script_path . 'em_includes/em_modio.'.$phpEx); ! include( $phpbb_root_path . $script_path . 'em_includes/em_functions.'.$phpEx); ! include( $phpbb_root_path . $script_path . 'easymod_display_functions.'.$phpEx); *************** *** 65,69 **** { // make sure the lang file exists ! if (!file_exists('./lang_easymod.'.$phpEx)) { // display error message (obviously we can't use the lang system for this error) ;-) --- 82,86 ---- { // make sure the lang file exists ! if (!file_exists($phpbb_root_path . $script_path . 'lang_easymod.'.$phpEx)) { // display error message (obviously we can't use the lang system for this error) ;-) *************** *** 72,81 **** } ! include( './lang_easymod.'.$phpEx); } else { // make sure the lang file exists ! if (!file_exists('./lang_easymod.'.$phpEx)) { // display error message (obviously we can't use the lang system from this ;-) --- 89,98 ---- } ! include( $phpbb_root_path . $script_path . 'lang_easymod.'.$phpEx); } else { // make sure the lang file exists ! if (!file_exists($phpbb_root_path . $script_path . 'lang_easymod.'.$phpEx)) { // display error message (obviously we can't use the lang system from this ;-) *************** *** 84,88 **** } ! include( './lang_easymod.'.$phpEx); } --- 101,105 ---- } ! include( $phpbb_root_path . $script_path . 'lang_easymod.'.$phpEx); } *************** *** 147,151 **** { // if we can't open the file then we are in trouble, but we'll let the wrapper_find handle it ! if (!($fin = fopen( '../../../language/lang_english/lang_admin.'.$phpEx,'r'))) { return false ; --- 164,168 ---- { // if we can't open the file then we are in trouble, but we'll let the wrapper_find handle it ! if (!($fin = fopen( $phpbb_root_path . 'language/lang_english/lang_admin.'.$phpEx,'r'))) { return false ; *************** *** 984,989 **** case 'mysql4': $sql[] = "CREATE TABLE " . EASYMOD_TABLE . " ( ! mod_id mediumint(8) NOT NULL DEFAULT '0' auto_increment, ! mod_title varchar(50) NULL DEFAULT '', mod_file varchar(255) NULL DEFAULT '', mod_version varchar(15) NULL DEFAULT '', --- 1001,1006 ---- case 'mysql4': $sql[] = "CREATE TABLE " . EASYMOD_TABLE . " ( ! mod_id mediumint(8) NOT NULL auto_increment, ! mod_title varchar(255) NULL DEFAULT '', mod_file varchar(255) NULL DEFAULT '', mod_version varchar(15) NULL DEFAULT '', *************** *** 1010,1014 **** mod_id int4 NOT NULL DEFAULT nextval('phpbb_easymod_mod_id_seq'::text), CONSTRAINT PK_phpbb_easymod PRIMARY KEY (mod_id), ! mod_title varchar(50) NULL DEFAULT '', mod_file varchar(255) NULL DEFAULT '', mod_version varchar(15) NULL DEFAULT '', --- 1027,1031 ---- mod_id int4 NOT NULL DEFAULT nextval('phpbb_easymod_mod_id_seq'::text), CONSTRAINT PK_phpbb_easymod PRIMARY KEY (mod_id), ! mod_title varchar(255) NULL DEFAULT '', mod_file varchar(255) NULL DEFAULT '', mod_version varchar(15) NULL DEFAULT '', *************** *** 1037,1041 **** $sql[] = "CREATE TABLE [" . EASYMOD_TABLE . "] ( [mod_id] [int] IDENTITY (1, 1) NOT NULL, ! [mod_title] [varchar] (50) NULL, [mod_file] [varchar] (255) NULL, [mod_version] [varchar] (15) NULL, --- 1054,1058 ---- $sql[] = "CREATE TABLE [" . EASYMOD_TABLE . "] ( [mod_id] [int] IDENTITY (1, 1) NOT NULL, ! [mod_title] [varchar] (255) NULL, [mod_file] [varchar] (255) NULL, [mod_version] [varchar] (15) NULL, *************** *** 1094,1098 **** $sql[] = "CREATE TABLE " . EASYMOD_TABLE . " ( mod_id COUNTER NOT NULL CONSTRAINT PK_phpbb_easymod PRIMARY KEY, ! mod_title TEXT(50) NULL, mod_file TEXT(255) NULL, mod_version TEXT(15) NULL, --- 1111,1115 ---- $sql[] = "CREATE TABLE " . EASYMOD_TABLE . " ( mod_id COUNTER NOT NULL CONSTRAINT PK_phpbb_easymod PRIMARY KEY, ! mod_title TEXT(255) NULL, mod_file TEXT(255) NULL, mod_version TEXT(15) NULL, *************** *** 1652,1656 **** // let 'em know what we are doing ! echo '<br><br><b>' . $lang['EM_confirm_admin'] . ':</b> admin_easymod.php,v ' . $easymod_install_version . "<br>\n" ; // open admin_easymod.php for reading --- 1669,1673 ---- // let 'em know what we are doing ! echo '<br><br><b>' . $lang['EM_confirm_admin'] . ":</b> admin_easymod.php<br>\n" ; // open admin_easymod.php for reading *************** *** 1663,1667 **** // read a line and see if it contains our key $line = fgets( $fin, 4096) ; ! if (strstr($line, 'admin_easymod.php,v ' . $easymod_install_version)) { // print success and break out --- 1680,1684 ---- // read a line and see if it contains our key $line = fgets( $fin, 4096) ; ! if (strstr($line, 'admin_easymod.php')) { // print success and break out *************** *** 1676,1680 **** if (!$found) { ! $error = $lang['EM_err_find'] . ' <b>admin_easymod.php,v ' . $easymod_install_version . '</b> in [admin/admin_easymod.php].' ; display_error( $error) ; } --- 1693,1697 ---- if (!$found) { ! $error = $lang['EM_err_find'] . ' <b>admin_easymod.php</b> in [admin/admin_easymod.php].' ; display_error( $error) ; } *************** *** 1756,1760 **** // added security starting in 0.0.11, blowfish encrypt the ftp_pass ! include($phpbb_root_path . $script_path . '/em_includes/em_cipher.php') ; $cipher = new Cipher_BlockMode_cbc(); $cipher->blowfish->setKey( $em_pass); --- 1773,1777 ---- // added security starting in 0.0.11, blowfish encrypt the ftp_pass ! include($phpbb_root_path . $script_path . '/em_includes/em_cipher.'.$phpEx) ; $cipher = new Cipher_BlockMode_cbc(); $cipher->blowfish->setKey( $em_pass); |
From: Brendan K. <bk...@us...> - 2005-05-01 12:23:39
|
Update of /cvsroot/easymod/easymod2/mods/easymod/includes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25556/easymod/includes Modified Files: admin_easymod.php.txt Log Message: Redoing some of Erics edits for title length, applying a small fix for the default spaces, and fixing a typo. Index: admin_easymod.php.txt =================================================================== RCS file: /cvsroot/easymod/easymod2/mods/easymod/includes/admin_easymod.php.txt,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** admin_easymod.php.txt 1 May 2005 07:22:50 -0000 1.3 --- admin_easymod.php.txt 1 May 2005 12:23:18 -0000 1.4 *************** *** 176,180 **** $sql = "SELECT * FROM " . EASYMOD_TABLE . " ! WHERE mod_title = '" . substr( $mod_title, 0, 100) . "' AND mod_version = '" . substr( $mod_version, 0, 15) . "' ORDER BY mod_id DESC" ; --- 176,180 ---- $sql = "SELECT * FROM " . EASYMOD_TABLE . " ! WHERE mod_title = '" . substr( $mod_title, 0, 255) . "' AND mod_version = '" . substr( $mod_version, 0, 15) . "' ORDER BY mod_id DESC" ; *************** *** 2876,2880 **** $phpbb_version = get_phpbb_version() ; ! $mod_title = str_replace("'", "''", substr( $mod_title, 0, 50)) ; $mod_author_handle = str_replace("'", "''", substr( $mod_author_handle, 0, 25)) ; $mod_author_email = str_replace("'", "''", substr( $mod_author_email, 0, 100)) ; --- 2876,2880 ---- $phpbb_version = get_phpbb_version() ; ! $mod_title = str_replace("'", "''", substr( $mod_title, 0, 255)) ; $mod_author_handle = str_replace("'", "''", substr( $mod_author_handle, 0, 25)) ; $mod_author_email = str_replace("'", "''", substr( $mod_author_email, 0, 100)) ; |
From: Brendan K. <bk...@us...> - 2005-05-01 12:23:39
|
Update of /cvsroot/easymod/easymod2/mods/easymod/em_includes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25556/easymod/em_includes Modified Files: em_schema.php Log Message: Redoing some of Erics edits for title length, applying a small fix for the default spaces, and fixing a typo. Index: em_schema.php =================================================================== RCS file: /cvsroot/easymod/easymod2/mods/easymod/em_includes/em_schema.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** em_schema.php 29 Apr 2005 23:18:25 -0000 1.2 --- em_schema.php 1 May 2005 12:23:18 -0000 1.3 *************** *** 155,162 **** ! function parse_field_increment( $params, $parmpos, &$error) { // if the array pos isn't set, then get us out of here ! if (!isset( $params[$parmpos])) { return '' ; --- 155,162 ---- ! function parse_field_increment( $params, $parampos, &$error) { // if the array pos isn't set, then get us out of here ! if (!isset( $params[$parampos])) { return '' ; *************** *** 164,168 **** // see if its auto_increment ! else if ( strtolower($params[$parmpos]) == 'auto_increment') { return 'auto_increment' ; --- 164,168 ---- // see if its auto_increment ! else if ( strtolower($params[$parampos]) == 'auto_increment') { return 'auto_increment' ; *************** *** 249,259 **** // this will give us the first occurence of ) and the associated pos ! $parmpos = (strstr($p4, ')')) ? 3 : 0 ; ! $parmpos = (strstr($p3, ')')) ? 2 : $parmpos ; ! $parmpos = (strstr($p2, ')')) ? 1 : $parmpos ; ! $parmpos = (strstr($p1, ')')) ? 0 : $parmpos ; // add 2 to the pos for name and type + whatever we had for the length ! $parmpos += 2 ; --- 249,259 ---- // this will give us the first occurence of ) and the associated pos ! $parampos = (strstr($p4, ')')) ? 3 : 0 ; ! $parampos = (strstr($p3, ')')) ? 2 : $parampos ; ! $parampos = (strstr($p2, ')')) ? 1 : $parampos ; ! $parampos = (strstr($p1, ')')) ? 0 : $parampos ; // add 2 to the pos for name and type + whatever we had for the length ! $parampos += 2 ; *************** *** 311,316 **** // set unsigned if need be ! $signed = ( strtoupper($params[$parmpos]) == 'UNSIGNED') ? 'UNSIGNED' : '' ; ! $parmpos = ( $signed == 'UNSIGNED') ? ($parmpos+1) : $parmpos ; --- 311,316 ---- // set unsigned if need be ! $signed = ( strtoupper($params[$parampos]) == 'UNSIGNED') ? 'UNSIGNED' : '' ; ! $parampos = ( $signed == 'UNSIGNED') ? ($parampos+1) : $parampos ; *************** *** 319,324 **** /* // try "null" or "not null" first ! $null = parse_field_null( $params[$parmpos], $params[$parmpos+1], $error) ; ! $parmpos = ( $null == 'NULL') ? $parmpos+1 : ( ( $null == 'undefined') ? $parmpos : $parmpos+2 ) ; // mysql manual: If neither NULL nor NOT NULL is specified, the column is treated as though NULL had been specified. $null = ($null == 'undefined') ? 'NULL' : $null ; --- 319,324 ---- /* // try "null" or "not null" first ! $null = parse_field_null( $params[$parampos], $params[$parampos+1], $error) ; ! $parampos = ( $null == 'NULL') ? $parampos+1 : ( ( $null == 'undefined') ? $parampos : $parampos+2 ) ; // mysql manual: If neither NULL nor NOT NULL is specified, the column is treated as though NULL had been specified. $null = ($null == 'undefined') ? 'NULL' : $null ; *************** *** 326,330 **** // default value ! $default = parse_field_default( $params[$parmpos], $parmpos, $numparams, $error ) ; if ($default == 'undefined') { --- 326,330 ---- // default value ! $default = parse_field_default( $params[$parampos], $parampos, $numparams, $error ) ; if ($default == 'undefined') { *************** *** 335,344 **** else { ! $default_value = parse_field_default_value( $params[$parmpos+1], $error) ; ! $parmpos = $parmpos+2 ; } */ // try "null" or "not null" first ! $null = parse_field_null( $params[$parmpos], $params[$parmpos+1], $error) ; // if we didn't get a null declaration, then see if the default is coming first --- 335,344 ---- else { ! $default_value = parse_field_default_value( $params[$parampos+1], $error) ; ! $parampos = $parampos+2 ; } */ // try "null" or "not null" first ! $null = parse_field_null( $params[$parampos], $params[$parampos+1], $error) ; // if we didn't get a null declaration, then see if the default is coming first *************** *** 346,350 **** { // default value ! $default = parse_field_default( $params[$parmpos], $parmpos, $numparams, $error ) ; // if we don't get a default then both the default and null are definitely undefined --- 346,350 ---- { // default value ! $default = parse_field_default( $params[$parampos], $parampos, $numparams, $error ) ; // if we don't get a default then both the default and null are definitely undefined *************** *** 361,386 **** { // Make the default string (combine array, split by spaces) ! while($parmpos++) ! { ! if(!isset($default_string)) ! { ! $default_string = $params[$parmpos]; ! } ! elseif($params[$parmpos]{strlen($params[$parmpos])-1} == "'") { ! $default_string .= ' ' . $params[$parmpos]; break; } else { ! $default_string .= ' ' . $params[$parmpos]; } ! } $default_value = parse_field_default_value( $default_string, $error); ! $parmpos = $parmpos+2 ; // try "null" or "not null" first ! $null = parse_field_null( $params[$parmpos], $params[$parmpos+1], $error) ; ! $parmpos = ( $null == 'NULL') ? $parmpos+1 : ( ( $null == 'undefined') ? $parmpos : $parmpos+2 ) ; // mysql manual: If neither NULL nor NOT NULL is specified, the column is treated as though NULL had been specified. $null = ($null == 'undefined') ? 'NULL' : $null ; --- 361,383 ---- { // Make the default string (combine array, split by spaces) ! $default_string = ''; ! while($parampos++ < count( $params )) ! { ! if(substr( $params[$parampos], -1 ) == "'") { ! $default_string .= $params[$parampos]; break; } else { ! $default_string .= $params[$parampos] . ' '; } ! } $default_value = parse_field_default_value( $default_string, $error); ! $parampos = $parampos+2 ; // try "null" or "not null" first ! $null = parse_field_null( $params[$parampos], $params[$parampos+1], $error) ; ! $parampos = ( $null == 'NULL') ? $parampos+1 : ( ( $null == 'undefined') ? $parampos : $parampos+2 ) ; // mysql manual: If neither NULL nor NOT NULL is specified, the column is treated as though NULL had been specified. $null = ($null == 'undefined') ? 'NULL' : $null ; *************** *** 392,399 **** { // will either be NULL or NOT NULL so add either 1 or 2 to the parmpos ! $parmpos = ( $null == 'NULL') ? $parmpos+1 : $parmpos+2 ; // default value ! $default = parse_field_default( $params[$parmpos], $parmpos, $numparams, $error ) ; if ($default == 'undefined') { --- 389,396 ---- { // will either be NULL or NOT NULL so add either 1 or 2 to the parmpos ! $parampos = ( $null == 'NULL') ? $parampos+1 : $parampos+2 ; // default value ! $default = parse_field_default( $params[$parampos], $parampos, $numparams, $error ) ; if ($default == 'undefined') { *************** *** 405,426 **** { // Make the default string (combine array, split by spaces) ! while($parmpos++) ! { ! if(!isset($default_string)) ! { ! $default_string = $params[$parmpos]; ! } ! elseif($params[$parmpos]{strlen($params[$parmpos])-1} == "'") { ! $default_string .= ' ' . $params[$parmpos]; break; } else { ! $default_string .= ' ' . $params[$parmpos]; } ! } $default_value = parse_field_default_value( $default_string, $error); ! $parmpos = $parmpos+2 ; } } --- 402,420 ---- { // Make the default string (combine array, split by spaces) ! $default_string = ''; ! while($parampos++ < count( $params )) ! { ! if(substr( $params[$parampos], -1 ) == "'") { ! $default_string .= $params[$parampos]; break; } else { ! $default_string .= $params[$parampos] . ' '; } ! } $default_value = parse_field_default_value( $default_string, $error); ! $parampos = $parampos+2 ; } } *************** *** 428,432 **** // AUTO_INCREMENT; only do this is there is one more paramater ! $increment = parse_field_increment( $params, $parmpos, $error) ; // create the return array --- 422,426 ---- // AUTO_INCREMENT; only do this is there is one more paramater ! $increment = parse_field_increment( $params, $parampos, $error) ; // create the return array |
From: Jim W. <ter...@us...> - 2005-05-01 07:24:46
|
Update of /cvsroot/easymod/easymod2/mods/easymod/templates In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24830/mods/easymod/templates Modified Files: display_debug.tpl ftp_settings.tpl step1c_empw.tpl Log Message: Can now use arbitrary FTP ports. Index: ftp_settings.tpl =================================================================== RCS file: /cvsroot/easymod/easymod2/mods/easymod/templates/ftp_settings.tpl,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** ftp_settings.tpl 24 Apr 2005 14:59:53 -0000 1.1 --- ftp_settings.tpl 1 May 2005 07:24:36 -0000 1.2 *************** *** 23,26 **** --- 23,30 ---- </tr> <tr> + <td class="row1" align="right"><span class="gen">{{EM_ftp_port}}</span></td> + <td class="row2"><input type="text" size="5" maxlength="5" name="ftp_port" value="21"> <span class="gen">{{EM_ftp_port_info}} (<a href="x" target="_blank">more info</a>)</span></td> + </tr> + <tr> <th colspan="2">{{EM_ftp_titlex}} Advanced FTP Settings (optional!)</th> </tr> Index: step1c_empw.tpl =================================================================== RCS file: /cvsroot/easymod/easymod2/mods/easymod/templates/step1c_empw.tpl,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** step1c_empw.tpl 24 Apr 2005 14:59:53 -0000 1.1 --- step1c_empw.tpl 1 May 2005 07:24:36 -0000 1.2 *************** *** 28,31 **** --- 28,32 ---- <input type="hidden" name="ftp_pass" value="{{FTP_PASS}}"> <input type="hidden" name="ftp_host" value="{{FTP_HOST}}"> + <input type="hidden" name="ftp_port" value="{{FTP_PORT}}"> <input type="hidden" name="ftp_dir" value="{{FTP_DIR}}"> <input type="hidden" name="ftp_debug" value="{{FTP_DEBUG}}"> Index: display_debug.tpl =================================================================== RCS file: /cvsroot/easymod/easymod2/mods/easymod/templates/display_debug.tpl,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** display_debug.tpl 24 Apr 2005 14:59:53 -0000 1.1 --- display_debug.tpl 1 May 2005 07:24:36 -0000 1.2 *************** *** 38,41 **** --- 38,42 ---- [b]<b>{{EM_debug_ftp_dir}}:</b>[/b] {{FTP_DIR}}<br> [b]<b>{{EM_debug_ftp_host}}:</b>[/b] {{FTP_HOST}}<br> + [b]<b>{{EM_debug_ftp_port}}:</b>[/b] {{FTP_PORT}}<br> [b]<b>{{EM_debug_ftp_debug}}:</b>[/b] {{FTP_DEBUG}}<br> [b]<b>{{EM_debug_ftp_ext}}:</b>[/b] {{FTP_EXT}}<br> |
From: Jim W. <ter...@us...> - 2005-05-01 07:23:03
|
Update of /cvsroot/easymod/easymod2/mods/easymod/includes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23804/mods/easymod/includes Modified Files: admin_easymod.php.txt mod_settings.tpl Log Message: Can now use arbitrary ports. Index: admin_easymod.php.txt =================================================================== RCS file: /cvsroot/easymod/easymod2/mods/easymod/includes/admin_easymod.php.txt,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** admin_easymod.php.txt 29 Apr 2005 00:50:26 -0000 1.2 --- admin_easymod.php.txt 1 May 2005 07:22:50 -0000 1.3 *************** *** 176,180 **** $sql = "SELECT * FROM " . EASYMOD_TABLE . " ! WHERE mod_title = '" . substr( $mod_title, 0, 255) . "' AND mod_version = '" . substr( $mod_version, 0, 15) . "' ORDER BY mod_id DESC" ; --- 176,180 ---- $sql = "SELECT * FROM " . EASYMOD_TABLE . " ! WHERE mod_title = '" . substr( $mod_title, 0, 100) . "' AND mod_version = '" . substr( $mod_version, 0, 15) . "' ORDER BY mod_id DESC" ; *************** *** 534,537 **** --- 534,541 ---- $ftp_host = $row['config_value'] ; } + else if ( $row['config_name'] == 'EM_ftp_port') + { + $ftp_port = $row['config_value'] ; + } else if ( $row['config_name'] == 'EM_ftp_type') { *************** *** 559,563 **** // easiest thing to do is return a mod_io object ! return new mod_io( $filename, $path, $read, $write, $move, $ftp_user, $ftp_pass, $ftp_dir, $ftp_host, $ftp_type, $ftp_cache) ; } --- 563,567 ---- // easiest thing to do is return a mod_io object ! return new mod_io( $filename, $path, $read, $write, $move, $ftp_user, $ftp_pass, $ftp_dir, $ftp_host, $ftp_port, $ftp_type, $ftp_cache) ; } *************** *** 886,889 **** --- 890,894 ---- 'L_FTP_PASS' => $lang['EM_ftp_pass'], 'L_FTP_HOST' => $lang['EM_ftp_host'], + 'L_FTP_PORT' => $lang['EM_ftp_port'], 'L_FTP_EXT' => $lang['EM_ftp_use_ext'], 'L_FTP_EXT_WARN' => $lang['EM_ftp_ext_not'], *************** *** 904,907 **** --- 909,913 ---- 'FTP_PATH' => $command_file->ftp_path, 'FTP_HOST' => $command_file->ftp_host, + 'FTP_PORT' => $command_file->ftp_port, 'FTP_EXT' => ($command_file->ftp_type == 'ext') ? 'checked="checked"' : '', 'FTP_FSOCK' => ($command_file->ftp_type == 'fsock') ? 'checked="checked"' : '', *************** *** 933,936 **** --- 939,943 ---- $ftp_pass = (isset($HTTP_POST_VARS['ftp_pass'])) ? htmlspecialchars( $HTTP_POST_VARS['ftp_pass']) : '' ; $ftp_host = (isset($HTTP_POST_VARS['ftp_host'])) ? htmlspecialchars( $HTTP_POST_VARS['ftp_host']) : '' ; + $ftp_port = (isset($HTTP_POST_VARS['ftp_port'])) ? intval( $HTTP_POST_VARS['ftp_port']) : 0 ; $ftp_type = (isset($HTTP_POST_VARS['ftp_type'])) ? htmlspecialchars( $HTTP_POST_VARS['ftp_type']) : 'fsock' ; $ftp_cache = (isset($HTTP_POST_VARS['ftp_cache'])) ? intval( $HTTP_POST_VARS['ftp_cache']) : 0 ; *************** *** 971,974 **** --- 978,982 ---- em_db_update( 'EM_ftp_pass', $ftp_pass) ; em_db_update( 'EM_ftp_host', $ftp_host) ; + em_db_update( 'EM_ftp_port', $ftp_port) ; em_db_update( 'EM_ftp_type', $ftp_type) ; em_db_update( 'EM_ftp_cache', $ftp_cache) ; *************** *** 2706,2710 **** // write the command files $command_file = get_em_settings( 'post_process.sh', '', $password, $preview) ; ! $command_bat = new mod_io( 'post_process.bat', '', $command_file->read_method, $command_file->write_method, $command_file->move_method, $command_file->ftp_user, $command_file->ftp_pass, $command_file->ftp_dir, $command_file->ftp_host, $command_file->ftp_type, $command_file->ftp_cache) ; // open the command file: config=true,command=true --- 2714,2718 ---- // write the command files $command_file = get_em_settings( 'post_process.sh', '', $password, $preview) ; ! $command_bat = new mod_io( 'post_process.bat', '', $command_file->read_method, $command_file->write_method, $command_file->move_method, $command_file->ftp_user, $command_file->ftp_pass, $command_file->ftp_dir, $command_file->ftp_host, $command_file->ftp_port, $command_file->ftp_type, $command_file->ftp_cache) ; // open the command file: config=true,command=true *************** *** 2868,2872 **** $phpbb_version = get_phpbb_version() ; ! $mod_title = str_replace("'", "''", substr( $mod_title, 0, 255)) ; $mod_author_handle = str_replace("'", "''", substr( $mod_author_handle, 0, 25)) ; $mod_author_email = str_replace("'", "''", substr( $mod_author_email, 0, 100)) ; --- 2876,2880 ---- $phpbb_version = get_phpbb_version() ; ! $mod_title = str_replace("'", "''", substr( $mod_title, 0, 50)) ; $mod_author_handle = str_replace("'", "''", substr( $mod_author_handle, 0, 25)) ; $mod_author_email = str_replace("'", "''", substr( $mod_author_email, 0, 100)) ; Index: mod_settings.tpl =================================================================== RCS file: /cvsroot/easymod/easymod2/mods/easymod/includes/mod_settings.tpl,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** mod_settings.tpl 24 Apr 2005 14:59:53 -0000 1.1 --- mod_settings.tpl 1 May 2005 07:22:50 -0000 1.2 *************** *** 61,64 **** --- 61,68 ---- </tr> <tr> + <td class="row1" align="right"><span class="gen">{L_FTP_PORT}</span></td> + <td class="row2"><input type="text" size="5" maxlength="5" name="ftp_port" value="{FTP_PORT}"></td> + </tr> + <tr> <td class="row1" align="right"><span class="gen">{L_FTP_EXT}</span></td> <td class="row2"> |
From: Jim W. <ter...@us...> - 2005-05-01 07:22:25
|
Update of /cvsroot/easymod/easymod2/mods/easymod/em_includes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23281/mods/easymod/em_includes Modified Files: em_functions.php em_modio.php Log Message: Can now use arbitrary ports. Index: em_functions.php =================================================================== RCS file: /cvsroot/easymod/easymod2/mods/easymod/em_includes/em_functions.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** em_functions.php 24 Apr 2005 14:59:53 -0000 1.1 --- em_functions.php 1 May 2005 07:22:01 -0000 1.2 *************** *** 138,142 **** { // prep the file ! $edit = new mod_io( $files[$i]['filename'], $files[$i]['path'], $command_file->read_method, $command_file->write_method, $command_file->move_method, $command_file->ftp_user, $command_file->ftp_pass, $command_file->ftp_path, $command_file->ftp_host, $command_file->ftp_type, $command_file->ftp_cache) ; $edit->emftp = $command_file->emftp ; --- 138,142 ---- { // prep the file ! $edit = new mod_io( $files[$i]['filename'], $files[$i]['path'], $command_file->read_method, $command_file->write_method, $command_file->move_method, $command_file->ftp_user, $command_file->ftp_pass, $command_file->ftp_path, $command_file->ftp_host, $command_file->ftp_port, $command_file->ftp_type, $command_file->ftp_cache) ; $edit->emftp = $command_file->emftp ; *************** *** 180,184 **** { // prep the file ! $edit = new mod_io( $files[$i]['filename'], $files[$i]['path'], $command_file->read_method, $command_file->write_method, $command_file->move_method, $command_file->ftp_user, $command_file->ftp_pass, $command_file->ftp_path, $command_file->ftp_host, $command_file->ftp_type, $command_file->ftp_cache) ; $edit->emftp = $command_file->emftp ; --- 180,184 ---- { // prep the file ! $edit = new mod_io( $files[$i]['filename'], $files[$i]['path'], $command_file->read_method, $command_file->write_method, $command_file->move_method, $command_file->ftp_user, $command_file->ftp_pass, $command_file->ftp_path, $command_file->ftp_host, $command_file->ftp_port, $command_file->ftp_type, $command_file->ftp_cache) ; $edit->emftp = $command_file->emftp ; *************** *** 219,223 **** { // prep the file ! $edit = new mod_io( $filename, $path, $command_file->read_method, $command_file->write_method, $command_file->move_method, $command_file->ftp_user, $command_file->ftp_pass, $command_file->ftp_path, $command_file->ftp_host, $command_file->ftp_type, $command_file->ftp_cache) ; $edit->emftp = $command_file->emftp ; --- 219,223 ---- { // prep the file ! $edit = new mod_io( $filename, $path, $command_file->read_method, $command_file->write_method, $command_file->move_method, $command_file->ftp_user, $command_file->ftp_pass, $command_file->ftp_path, $command_file->ftp_host, $command_file->ftp_port, $command_file->ftp_type, $command_file->ftp_cache) ; $edit->emftp = $command_file->emftp ; Index: em_modio.php =================================================================== RCS file: /cvsroot/easymod/easymod2/mods/easymod/em_includes/em_modio.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** em_modio.php 24 Apr 2005 14:59:53 -0000 1.1 --- em_modio.php 1 May 2005 07:22:01 -0000 1.2 *************** *** 65,68 **** --- 65,69 ---- var $ftp_path ; var $ftp_host ; + var $ftp_port ; var $ftp_type ; // using the PHP FTP extension? var $ftp_cache ; // with ext, writing to /tmp or admin/em_includes/cache? *************** *** 75,79 **** // get sent the method and ftp info (install proggie) ! function mod_io( $filename, $path, $read_method, $write_method, $move_method, $ftp_user, $ftp_pass, $ftp_path, $ftp_host, $ftp_type, $ftp_cache) { $this->filename = $filename ; --- 76,80 ---- // get sent the method and ftp info (install proggie) ! function mod_io( $filename, $path, $read_method, $write_method, $move_method, $ftp_user, $ftp_pass, $ftp_path, $ftp_host, $ftp_port, $ftp_type, $ftp_cache) { $this->filename = $filename ; *************** *** 88,91 **** --- 89,93 ---- $this->ftp_path = $ftp_path ; $this->ftp_host = $ftp_host ; + $this->ftp_port = $ftp_port ; $this->ftp_type = $ftp_type ; $this->ftp_cache = $ftp_cache ; *************** *** 465,469 **** $this->emftp = new emftp( $this->ftp_type, $debug) ; ! if (!$this->emftp->ftp_connect( $this->ftp_host)) { $this->err_msg = 'modio_prep[1]<br><br>' ; --- 467,471 ---- $this->emftp = new emftp( $this->ftp_type, $debug) ; ! if (!$this->emftp->ftp_connect( $this->ftp_host, $this->ftp_port)) { $this->err_msg = 'modio_prep[1]<br><br>' ; |
From: Jim W. <ter...@us...> - 2005-05-01 07:21:23
|
Update of /cvsroot/easymod/easymod2/mods/easymod/em_includes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22901/mods/easymod/em_includes Modified Files: em_ftp.php Log Message: Can now use arbitrary ports. Index: em_ftp.php =================================================================== RCS file: /cvsroot/easymod/easymod2/mods/easymod/em_includes/em_ftp.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** em_ftp.php 24 Apr 2005 14:59:53 -0000 1.1 --- em_ftp.php 1 May 2005 07:21:14 -0000 1.2 *************** *** 32,36 **** // used in step 2 of the installer to test the connection and also used in the debug feature; could be // used in the main proggie to check settings some day; it will need to be de-HTML'ed though ;-) ! function test_ftp( $ftp_user, $ftp_pass, $ftp_dir, $ftp_host, $ftp_debug, $ftp_type, $ftp_cache) { global $lang, $phpbb_root_path, $easymod_install_version ; --- 32,36 ---- // used in step 2 of the installer to test the connection and also used in the debug feature; could be // used in the main proggie to check settings some day; it will need to be de-HTML'ed though ;-) ! function test_ftp( $ftp_user, $ftp_pass, $ftp_dir, $ftp_host, $ftp_port, $ftp_debug, $ftp_type, $ftp_cache) { global $lang, $phpbb_root_path, $easymod_install_version ; *************** *** 42,52 **** // connect to the FTP server ! if (!$emftp->ftp_connect( $ftp_host)) { // failed to connect! echo "<br>\n" ; ! echo '<b>' . sprintf($lang['EM_ftp_fail_conn'], $ftp_host) . "</b><br>\n" ; ! // they made need to specify the host if ($ftp_host == 'localhost') { --- 42,52 ---- // connect to the FTP server ! if (!$emftp->ftp_connect( $ftp_host, $ftp_port)) { // failed to connect! echo "<br>\n" ; ! echo '<b>' . sprintf($lang['EM_ftp_fail_conn'], $ftp_host, $ftp_port) . "</b><br>\n" ; ! // they may need to specify the host if ($ftp_host == 'localhost') { *************** *** 54,57 **** --- 54,63 ---- } + // they may need to specify the port + else if ($ftp_port == 21) + { + echo $lang['EM_ftp_fail_conn_21'] . "<br>\n"; + } + // the host the entered failed to connect else *************** *** 64,67 **** --- 70,79 ---- } + // if they have anything other than an integer in the port then... + else if (intval($ftp_port) == $ftp_port) + { + echo $lang['EM_ftp_fail_conn_invalid2'] . "<br>\n"; + echo "<br>\n"; + } // give them options *************** *** 92,96 **** // check user/pass echo '<li>' . $lang['EM_fail_login_op1'] . "\n" ; ! if ( $ftp_host == 'localhost') { // change from localhost --- 104,108 ---- // check user/pass echo '<li>' . $lang['EM_fail_login_op1'] . "\n" ; ! if ( $ftp_host == 'localhost' || $ftp_port == 21) { // change from localhost *************** *** 151,155 **** echo '<li>' . $lang['EM_fail_cd_op4'] . "\n" ; ! if ($ftp_host == 'localhost') { echo '<li>' . $lang['EM_fail_cd_op5'] . "\n" ; --- 163,167 ---- echo '<li>' . $lang['EM_fail_cd_op4'] . "\n" ; ! if ($ftp_host == 'localhost' || $ftp_port == 21) { echo '<li>' . $lang['EM_fail_cd_op5'] . "\n" ; *************** *** 936,948 **** } ! function ftp_connect( $ftp_host) { if ($this->ftp_type == 'fsock') { ! return $this->ftp->ftp_connect( $ftp_host) ; } else { ! $this->ftp_conn_id = @ftp_connect( $ftp_host); return $this->ftp_conn_id ; } --- 948,960 ---- } ! function ftp_connect( $ftp_host, $ftp_port) { if ($this->ftp_type == 'fsock') { ! return $this->ftp->ftp_connect( $ftp_host, $ftp_port) ; } else { ! $this->ftp_conn_id = @ftp_connect( $ftp_host, $ftp_port); return $this->ftp_conn_id ; } |
From: Jim W. <ter...@us...> - 2005-05-01 07:20:54
|
Update of /cvsroot/easymod/easymod2/mods/easymod In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22395/mods/easymod Modified Files: easymod_display_functions.php Log Message: Added stuff for the new FTP Port option. Index: easymod_display_functions.php =================================================================== RCS file: /cvsroot/easymod/easymod2/mods/easymod/easymod_display_functions.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** easymod_display_functions.php 29 Apr 2005 00:50:26 -0000 1.3 --- easymod_display_functions.php 1 May 2005 07:20:18 -0000 1.4 *************** *** 116,123 **** $variables['TEXT'] = $text ; ! display_template( $phpbb_root_path . $script_path . 'templates/page_start.tpl', $variables) ; if (!$simple) { ! display_template( $phpbb_root_path . $script_path . 'templates/page_header.tpl', $variables) ; } } --- 116,123 ---- $variables['TEXT'] = $text ; ! display_template( './templates/page_start.tpl', $variables) ; if (!$simple) { ! display_template( './templates/page_header.tpl', $variables) ; } } *************** *** 127,131 **** function page_footer() { ! global $install_step, $write, $move, $ftp_dir, $ftp_user, $ftp_pass, $ftp_host, $ftp_debug, $ftp_type, $lang, $phpEx ; ///////////////////////// --- 127,131 ---- function page_footer() { ! global $install_step, $write, $move, $ftp_dir, $ftp_user, $ftp_pass, $ftp_host, $ftp_port, $ftp_debug, $ftp_type, $lang, $phpEx ; ///////////////////////// *************** *** 136,140 **** // we have to fix the password so it does not have a # in it or else the link won't work $ftp_pass = str_replace('#', '~pound~', $ftp_pass) ; ! $link = "easymod_install.$phpEx?mode=debug&install_step=$install_step&write=$write&move=$move&ftp_dir=$ftp_dir&ftp_user=$ftp_user&ftp_pass=$ftp_pass&ftp_host=$ftp_host&ftp_debug=$ftp_debug&ftp_type=$ftp_type" ; $variables = array() ; --- 136,140 ---- // we have to fix the password so it does not have a # in it or else the link won't work $ftp_pass = str_replace('#', '~pound~', $ftp_pass) ; ! $link = "easymod_install.$phpEx?mode=debug&install_step=$install_step&write=$write&move=$move&ftp_dir=$ftp_dir&ftp_user=$ftp_user&ftp_pass=$ftp_pass&ftp_host=$ftp_host&ftp_port=$ftp_port&ftp_debug=$ftp_debug&ftp_type=$ftp_type" ; $variables = array() ; *************** *** 142,146 **** $variables['DEBUG'] = $lang['EM_debug_display'] ; ! display_template( $phpbb_root_path . $script_path . 'templates/page_footer.tpl', $variables) ; } --- 142,146 ---- $variables['DEBUG'] = $lang['EM_debug_display'] ; ! display_template( './templates/page_footer.tpl', $variables) ; } *************** *** 153,157 **** $variables['HEIGHT'] = $height ; ! display_template( $phpbb_root_path . $script_path . 'templates/helpwin.tpl', $variables) ; } --- 153,157 ---- $variables['HEIGHT'] = $height ; ! display_template( './templates/helpwin.tpl', $variables) ; } *************** *** 169,173 **** $variables['RESCAN'] = (!$rescan) ? '' : '<input class="mainoption" type="submit" value="' . $lang['Rescan'] . '" name="rescan"/>' ; ! display_template( $phpbb_root_path . $script_path . 'templates/form_settings.tpl', $variables) ; } --- 169,173 ---- $variables['RESCAN'] = (!$rescan) ? '' : '<input class="mainoption" type="submit" value="' . $lang['Rescan'] . '" name="rescan"/>' ; ! display_template( './templates/form_settings.tpl', $variables) ; } *************** *** 176,182 **** function display_debug_html( $variables, $access, $values) { ! global $lang, $easymod_install_version, $install_step, $mode, $write, $move, $ftp_user, $ftp_pass, $ftp_host, $ftp_dir, $ftp_debug, $ftp_type, $ftp_cache ; // assign template data $variables['EM_debug_info'] = $lang['EM_debug_info'] ; $variables['EM_debug_format'] = $lang['EM_debug_format'] ; --- 176,183 ---- function display_debug_html( $variables, $access, $values) { ! global $lang, $easymod_install_version, $install_step, $mode, $write, $move, $ftp_user, $ftp_pass, $ftp_host, $ftp_port, $ftp_dir, $ftp_debug, $ftp_type, $ftp_cache ; // assign template data + // $variables = array() ; $variables['EM_debug_info'] = $lang['EM_debug_info'] ; $variables['EM_debug_format'] = $lang['EM_debug_format'] ; *************** *** 206,209 **** --- 207,211 ---- $variables['EM_debug_ftp_dir'] = $lang['EM_debug_ftp_dir'] ; $variables['EM_debug_ftp_host'] = 'ftp host' ; + $variables['EM_debug_ftp_port'] = 'ftp port' ; $variables['EM_debug_ftp_debug'] = $lang['EM_debug_ftp_debug'] ; $variables['EM_debug_ftp_ext'] = $lang['EM_debug_ftp_ext'] ; *************** *** 213,217 **** $variables['EM_VERSION'] = $easymod_install_version ; $variables['PHPBB_VERSION'] = get_phpbb_version() ; ! $variables['CWD'] = dirname(__FILE__); $variables['STEP'] = $install_step ; $variables['MODE'] = $mode ; --- 215,219 ---- $variables['EM_VERSION'] = $easymod_install_version ; $variables['PHPBB_VERSION'] = get_phpbb_version() ; ! $variables['CWD'] = getcwd() ; $variables['STEP'] = $install_step ; $variables['MODE'] = $mode ; *************** *** 223,226 **** --- 225,229 ---- $variables['FTP_DIR'] = $ftp_dir ; $variables['FTP_HOST'] = $ftp_host ; + $variables['FTP_PORT'] = $ftp_port ; $variables['FTP_DEBUG'] = ($ftp_debug) ? 'true' : 'false' ; $variables['FTP_EXT'] = $ftp_type ; *************** *** 228,232 **** $variables['FILE_LISTING'] = $values['file_listing'] ; ! display_template( $phpbb_root_path . $script_path . 'templates/display_debug.tpl', $variables) ; // check FTP compatiblity --- 231,235 ---- $variables['FILE_LISTING'] = $values['file_listing'] ; ! display_template( './templates/display_debug.tpl', $variables) ; // check FTP compatiblity *************** *** 234,238 **** { // test the ftp connection ! if (test_ftp( $ftp_user, $ftp_pass, $ftp_dir, $ftp_host, true, $ftp_type, $ftp_cache)) { echo '<br>[b]<b>' . $lang['EM_debug_ftp_test'] . '</b>[/b] :: [b][color=green]<b class="ok">' . $lang['EM_debug_success']. "</b>[/color][/b]<br />\n" ; --- 237,241 ---- { // test the ftp connection ! if (test_ftp( $ftp_user, $ftp_pass, $ftp_dir, $ftp_host, $ftp_port, true, $ftp_type)) { echo '<br>[b]<b>' . $lang['EM_debug_ftp_test'] . '</b>[/b] :: [b][color=green]<b class="ok">' . $lang['EM_debug_success']. "</b>[/color][/b]<br />\n" ; *************** *** 244,248 **** } ! display_template( $phpbb_root_path . $script_path . 'templates/display_debug_footer.tpl', $variables) ; } --- 247,251 ---- } ! display_template( './templates/display_debug_footer.tpl', $variables) ; } *************** *** 284,288 **** $values['file_listing'] = '' ; ! if ($dh = opendir(dirname(__FILE__))) { while (($file = readdir($dh)) !== false) --- 287,291 ---- $values['file_listing'] = '' ; ! if ($dh = opendir('./')) { while (($file = readdir($dh)) !== false) *************** *** 307,311 **** $variables['ERROR'] = $error ; ! display_template( $phpbb_root_path . $script_path . 'templates/display_error.tpl', $variables) ; } --- 310,314 ---- $variables['ERROR'] = $error ; ! display_template( './templates/display_error.tpl', $variables) ; } *************** *** 425,430 **** if ($bbcode) { ! $ok_msg = '[b][color=green]<b class="ok">OK</b>[/color][/b]' ; ! $okparms = '[b][color=green]<b class="ok">%s</b>[/color][/b]' ; $no_msg = '[b]<b>' . $lang['EM_no'] . '</b>[/b]' ; $noparms = '[b]<b>%s</b>[/b]' ; --- 428,433 ---- if ($bbcode) { ! $ok_msg = '[b][color=green]<b class="ok">OK</b>[/b]' ; ! $okparms = '[b][color=green]<b class="ok">%s</b>[/b]' ; $no_msg = '[b]<b>' . $lang['EM_no'] . '</b>[/b]' ; $noparms = '[b]<b>%s</b>[/b]' ; *************** *** 493,496 **** --- 496,501 ---- $variables['EM_ftp_host'] = $lang['EM_ftp_host'] ; $variables['EM_ftp_host_info'] = $lang['EM_ftp_host_info'] ; + $variables['EM_ftp_port'] = $lang['EM_ftp_port'] ; + $variables['EM_ftp_port_info'] = $lang['EM_ftp_port_info'] ; $variables['EM_ftp_debug'] = $lang['EM_ftp_debug'] ; $variables['EM_yes'] = $lang['EM_yes'] ; *************** *** 568,581 **** function check_installablity() { ! global $db, $lang, $easymod_install_version, $phpbb_root_path; // make sure we are in the correct directory ! $cwd = dirname(__FILE__); $cwd = str_replace("\\", '/', $cwd) ; $dirs = explode('/', $cwd) ; $file_list = array() ; ! // check to make sure we are in the correct folder ! if (($dirs[count($dirs)-3] != 'admin') || ($dirs[count($dirs)-2] != 'mods') || (strtolower($dirs[count($dirs)-1]) != 'easymod')) { handle_error( OPEN_FAIL_CRITICAL, $file_list, false, $lang['EM_err_install_dir'] ) ; --- 573,595 ---- function check_installablity() { ! global $db, $lang, $easymod_install_version ; // make sure we are in the correct directory ! $cwd = getcwd() ; $cwd = str_replace("\\", '/', $cwd) ; $dirs = explode('/', $cwd) ; $file_list = array() ; ! //// ! //// make sure EM is in the right directory ! //// ! // for some odd reason getcwd returns empty on some servers??? (added in 0.0.10a-2) ! if ($cwd == '') ! { ! // do nothing ! } ! ! // otherwise make sure we are in the correct directory for installation ! else if (($dirs[count($dirs)-3] != 'admin') || ($dirs[count($dirs)-2] != 'mods') || (strtolower($dirs[count($dirs)-1]) != 'easymod')) { handle_error( OPEN_FAIL_CRITICAL, $file_list, false, $lang['EM_err_install_dir'] ) ; *************** *** 587,591 **** //// // make sure subsilver dir exists ! if (!file_exists($phpbb_root_path . 'templates/subSilver')) { handle_error( OPEN_FAIL_CRITICAL, $file_list, false, $lang['EM_err_no_subsilver'] ) ; --- 601,605 ---- //// // make sure subsilver dir exists ! if (!file_exists('../../../templates/subSilver')) { handle_error( OPEN_FAIL_CRITICAL, $file_list, false, $lang['EM_err_no_subsilver'] ) ; *************** *** 607,611 **** // make sure english exists ! if (!file_exists($phpbb_root_path . 'language/lang_english')) { handle_error( OPEN_FAIL_CRITICAL, $file_list, false, $lang['EM_err_no_english'] ) ; --- 621,625 ---- // make sure english exists ! if (!file_exists('../../../language/lang_english')) { handle_error( OPEN_FAIL_CRITICAL, $file_list, false, $lang['EM_err_no_english'] ) ; *************** *** 736,740 **** // assign template data ! $variables['U_FORM'] = $phpbb_root_path . $script_path . 'easymod_install.'.$phpEx ; $variables['EM_support'] = $lang['EM_support'] ; $variables['EM_Settings'] = $lang['EM_Settings'] ; --- 750,754 ---- // assign template data ! $variables['U_FORM'] = 'easymod_install.'.$phpEx ; $variables['EM_support'] = $lang['EM_support'] ; $variables['EM_Settings'] = $lang['EM_Settings'] ; *************** *** 760,764 **** // dispay the page and the footer ! display_template( $phpbb_root_path . $script_path . 'templates/step1_classic.tpl', $variables) ; page_footer() ; exit ; --- 774,778 ---- // dispay the page and the footer ! display_template( './templates/step1_classic.tpl', $variables) ; page_footer() ; exit ; *************** *** 792,796 **** // dispay the page and the footer ! display_template( $phpbb_root_path . $script_path . 'templates/step1_simple.tpl', $variables) ; page_footer() ; exit ; --- 806,810 ---- // dispay the page and the footer ! display_template( './templates/step1_simple.tpl', $variables) ; page_footer() ; exit ; *************** *** 853,857 **** // dispay the page and the footer ! display_template( $phpbb_root_path . $script_path . 'templates/step1b_simple.tpl', $variables) ; page_footer() ; exit ; --- 867,871 ---- // dispay the page and the footer ! display_template( './templates/step1b_simple.tpl', $variables) ; page_footer() ; exit ; *************** *** 873,877 **** // assign template data ! $variables['U_FORM'] = $phpbb_root_path . $script_path . 'easymod_install.'.$phpEx ; $variables['EM_support'] = $lang['EM_support'] ; $variables['EM_Settings'] = $lang['EM_Settings'] ; --- 887,891 ---- // assign template data ! $variables['U_FORM'] = 'easymod_install.'.$phpEx ; $variables['EM_support'] = $lang['EM_support'] ; $variables['EM_Settings'] = $lang['EM_Settings'] ; *************** *** 889,893 **** // dispay the page and the footer ! display_template( $phpbb_root_path . $script_path . 'templates/step1b_ftp.tpl', $variables) ; page_footer() ; exit ; --- 903,907 ---- // dispay the page and the footer ! display_template( './templates/step1b_ftp.tpl', $variables) ; page_footer() ; exit ; *************** *** 898,902 **** { global $lang, $db, $easymod_install_version, $phpEx ; ! global $read, $write, $move, $ftp_user, $ftp_pass, $ftp_host, $ftp_dir, $ftp_debug, $ftp_type, $ftp_cache; $variables = array() ; --- 912,916 ---- { global $lang, $db, $easymod_install_version, $phpEx ; ! global $read, $write, $move, $ftp_user, $ftp_pass, $ftp_host, $ftp_port, $ftp_dir, $ftp_debug, $ftp_type, $ftp_cache; $variables = array() ; *************** *** 913,917 **** // assign template data ! $variables['U_FORM'] = $phpbb_root_path . $script_path . 'easymod_install.'.$phpEx ; $variables['EM_support'] = $lang['EM_support'] ; $variables['EM_Settings'] = $lang['EM_Settings'] ; --- 927,931 ---- // assign template data ! $variables['U_FORM'] = 'easymod_install.'.$phpEx ; $variables['EM_support'] = $lang['EM_support'] ; $variables['EM_Settings'] = $lang['EM_Settings'] ; *************** *** 926,929 **** --- 940,944 ---- $variables['FTP_PASS'] = $ftp_pass ; $variables['FTP_HOST'] = $ftp_host ; + $variables['FTP_PORT'] = $ftp_port ; $variables['FTP_DIR'] = $ftp_dir ; $variables['FTP_DEBUG'] = $ftp_debug ; *************** *** 937,941 **** // dispay the page and the footer ! display_template( $phpbb_root_path . $script_path . 'templates/step1c_empw.tpl', $variables) ; page_footer() ; exit ; --- 952,956 ---- // dispay the page and the footer ! display_template( './templates/step1c_empw.tpl', $variables) ; page_footer() ; exit ; |
From: Jim W. <ter...@us...> - 2005-05-01 07:18:52
|
Update of /cvsroot/easymod/easymod2/mods/easymod In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21268/mods/easymod Modified Files: easymod_install.php Log Message: Added FTP Port option. Index: easymod_install.php =================================================================== RCS file: /cvsroot/easymod/easymod2/mods/easymod/easymod_install.php,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** easymod_install.php 29 Apr 2005 00:50:26 -0000 1.4 --- easymod_install.php 1 May 2005 07:18:42 -0000 1.5 *************** *** 22,47 **** define('IN_PHPBB', 1); $phpbb_root_path = './../../../'; ! $script_path = 'admin/mods/easymod/' ; //// $easymod_install_version = '0.1.13' ; //// - // PHP5 with register_long_arrays off? - if (!isset($HTTP_POST_VARS) && isset($_POST)) - { - $HTTP_POST_VARS = $_POST; - $HTTP_GET_VARS = $_GET; - $HTTP_SERVER_VARS = $_SERVER; - $HTTP_COOKIE_VARS = $_COOKIE; - $HTTP_ENV_VARS = $_ENV; - $HTTP_POST_FILES = $_FILES; - - // _SESSION is the only superglobal which is conditionally set - if (isset($_SESSION)) - { - $HTTP_SESSION_VARS = $_SESSION; - } - } - include($phpbb_root_path . 'extension.inc'); include($phpbb_root_path . 'config.'.$phpEx); --- 22,30 ---- define('IN_PHPBB', 1); $phpbb_root_path = './../../../'; ! $script_path = 'admin/mods/easymod' ; //// $easymod_install_version = '0.1.13' ; //// include($phpbb_root_path . 'extension.inc'); include($phpbb_root_path . 'config.'.$phpEx); *************** *** 273,276 **** --- 256,260 ---- $ftp_pass = (isset($HTTP_POST_VARS['ftp_pass'])) ? htmlspecialchars( $HTTP_POST_VARS['ftp_pass']) : '' ; $ftp_host = (isset($HTTP_POST_VARS['ftp_host'])) ? htmlspecialchars( $HTTP_POST_VARS['ftp_host']) : 'localhost' ; + $ftp_port = (isset($HTTP_POST_VARS['ftp_port'])) ? htmlspecialchars( $HTTP_POST_VARS['ftp_port']) : 21 ; $ftp_debug = (isset($HTTP_POST_VARS['ftp_debug'])) ? intval( $HTTP_POST_VARS['ftp_debug']) : false ; $ftp_type = (isset($HTTP_POST_VARS['ftp_type'])) ? htmlspecialchars( $HTTP_POST_VARS['ftp_type']) : 'fsock' ; *************** *** 336,339 **** --- 320,324 ---- $ftp_pass = (isset($HTTP_GET_VARS['ftp_pass'])) ? htmlspecialchars( $HTTP_GET_VARS['ftp_pass']) : $ftp_pass ; $ftp_host = (isset($HTTP_GET_VARS['ftp_host'])) ? htmlspecialchars( $HTTP_GET_VARS['ftp_host']) : $ftp_host ; + $ftp_port = (isset($HTTP_GET_VARS['ftp_port'])) ? htmlspecialchars( $HTTP_GET_VARS['ftp_port']) : $ftp_port ; $ftp_debug = (isset($HTTP_GET_VARS['ftp_debug'])) ? intval( $HTTP_GET_VARS['ftp_debug']) : $ftp_debug ; $ftp_type = (isset($HTTP_GET_VARS['ftp_type'])) ? htmlspecialchars( $HTTP_GET_VARS['ftp_type']) : $ftp_type ; *************** *** 542,546 **** { // test the FTP connection ! if (!test_ftp( $ftp_user, $ftp_pass, $ftp_dir, $ftp_host, $ftp_debug, $ftp_type, $ftp_cache)) { // FTP failed; print RESCAN button and then exit --- 527,531 ---- { // test the FTP connection ! if (!test_ftp( $ftp_user, $ftp_pass, $ftp_dir, $ftp_host, $ftp_port, $ftp_debug, $ftp_type, $ftp_cache)) { // FTP failed; print RESCAN button and then exit *************** *** 626,630 **** { // test the FTP connection ! if (!test_ftp( $ftp_user, $ftp_pass, $ftp_dir, $ftp_host, $ftp_debug, $ftp_type, $ftp_cache)) { // FTP failed; print RESCAN button and then exit --- 611,615 ---- { // test the FTP connection ! if (!test_ftp( $ftp_user, $ftp_pass, $ftp_dir, $ftp_host, $ftp_port, $ftp_debug, $ftp_type, $ftp_cache)) { // FTP failed; print RESCAN button and then exit *************** *** 692,695 **** --- 677,681 ---- $hidden .= "<input type=\"hidden\" name=\"ftp_pass\" value=\"$ftp_pass\">\n" ; $hidden .= "<input type=\"hidden\" name=\"ftp_host\" value=\"$ftp_host\">\n" ; + $hidden .= "<input type=\"hidden\" name=\"ftp_port\" value=\"$ftp_port\">\n" ; $hidden .= "<input type=\"hidden\" name=\"ftp_dir\" value=\"$ftp_dir\">\n" ; $hidden .= "<input type=\"hidden\" name=\"ftp_debug\" value=\"$ftp_debug\">\n" ; *************** *** 721,725 **** // we will keep the command file as an array for now and then write it out later; we will reuse the settings data ! $command_file = new mod_io( 'post_process.sh', '', $read, $write, $move, $ftp_user, $ftp_pass, $ftp_dir, $ftp_host, $ftp_type, $ftp_cache) ; --- 707,711 ---- // we will keep the command file as an array for now and then write it out later; we will reuse the settings data ! $command_file = new mod_io( 'post_process.sh', '', $read, $write, $move, $ftp_user, $ftp_pass, $ftp_dir, $ftp_host, $ftp_port, $ftp_type, $ftp_cache) ; *************** *** 945,948 **** --- 931,935 ---- $hidden .= "<input type=\"hidden\" name=\"ftp_dir\" value=\"$ftp_dir\">\n" ; $hidden .= "<input type=\"hidden\" name=\"ftp_host\" value=\"$ftp_host\">\n" ; + $hidden .= "<input type=\"hidden\" name=\"ftp_port\" value=\"$ftp_port\">\n" ; $hidden .= "<input type=\"hidden\" name=\"ftp_debug\" value=\"$ftp_debug\">\n" ; $hidden .= "<input type=\"hidden\" name=\"ftp_type\" value=\"$ftp_type\">\n" ; *************** *** 997,1002 **** case 'mysql4': $sql[] = "CREATE TABLE " . EASYMOD_TABLE . " ( ! mod_id mediumint(8) NOT NULL auto_increment, ! mod_title varchar(255) NULL DEFAULT '', mod_file varchar(255) NULL DEFAULT '', mod_version varchar(15) NULL DEFAULT '', --- 984,989 ---- case 'mysql4': $sql[] = "CREATE TABLE " . EASYMOD_TABLE . " ( ! mod_id mediumint(8) NOT NULL DEFAULT '0' auto_increment, ! mod_title varchar(50) NULL DEFAULT '', mod_file varchar(255) NULL DEFAULT '', mod_version varchar(15) NULL DEFAULT '', *************** *** 1190,1195 **** // we will keep the command file as an array for now and then write it out later; we will reuse the settings data ! $command_file = new mod_io( 'post_process.sh', '', $read, $write, $move, $ftp_user, $ftp_pass, $ftp_dir, $ftp_host, $ftp_type, $ftp_cache) ; ! $command_bat = new mod_io( 'post_process.bat', '', $read, $write, $move, $ftp_user, $ftp_pass, $ftp_dir, $ftp_host, $ftp_type, $ftp_cache) ; // open the command file: config=true,command=true --- 1177,1182 ---- // we will keep the command file as an array for now and then write it out later; we will reuse the settings data ! $command_file = new mod_io( 'post_process.sh', '', $read, $write, $move, $ftp_user, $ftp_pass, $ftp_dir, $ftp_host, $ftp_port, $ftp_type, $ftp_cache) ; ! $command_bat = new mod_io( 'post_process.bat', '', $read, $write, $move, $ftp_user, $ftp_pass, $ftp_dir, $ftp_host, $ftp_port, $ftp_type, $ftp_cache) ; // open the command file: config=true,command=true *************** *** 1362,1365 **** --- 1349,1353 ---- $hidden .= "<input type=\"hidden\" name=\"ftp_dir\" value=\"$ftp_dir\">\n" ; $hidden .= "<input type=\"hidden\" name=\"ftp_host\" value=\"$ftp_host\">\n" ; + $hidden .= "<input type=\"hidden\" name=\"ftp_port\" value=\"$ftp_port\">\n" ; $hidden .= "<input type=\"hidden\" name=\"ftp_debug\" value=\"$ftp_debug\">\n" ; $hidden .= "<input type=\"hidden\" name=\"ftp_type\" value=\"$ftp_type\">\n" ; *************** *** 1388,1392 **** header('Content-disposition: attachment; filename="privmsg.'.$phpEx . '"'); ! $file_test = new mod_io( 'privmsg.'.$phpEx, '', 'server', 'local', 'ftpm', '', '', '', $ftp_host, $ftp_type, $ftp_cache) ; $file_test->modio_open() ; --- 1376,1380 ---- header('Content-disposition: attachment; filename="privmsg.'.$phpEx . '"'); ! $file_test = new mod_io( 'privmsg.'.$phpEx, '', 'server', 'local', 'ftpm', '', '', '', $ftp_host, $ftp_port, $ftp_type, $ftp_cache) ; $file_test->modio_open() ; *************** *** 1519,1523 **** else { ! $command_file = new mod_io( 'temp.sh', '', 'server', 'local', 'ftpm', '', '', '', $ftp_host, $ftp_type, $ftp_cache) ; --- 1507,1511 ---- else { ! $command_file = new mod_io( 'temp.sh', '', 'server', 'local', 'ftpm', '', '', '', $ftp_host, $ftp_port, $ftp_type, $ftp_cache) ; *************** *** 1664,1668 **** // let 'em know what we are doing ! echo '<br><br><b>' . $lang['EM_confirm_admin'] . ":</b> admin_easymod.php<br>\n" ; // open admin_easymod.php for reading --- 1652,1656 ---- // let 'em know what we are doing ! echo '<br><br><b>' . $lang['EM_confirm_admin'] . ':</b> admin_easymod.php,v ' . $easymod_install_version . "<br>\n" ; // open admin_easymod.php for reading *************** *** 1675,1679 **** // read a line and see if it contains our key $line = fgets( $fin, 4096) ; ! if (strstr($line, 'admin_easymod.php')) { // print success and break out --- 1663,1667 ---- // read a line and see if it contains our key $line = fgets( $fin, 4096) ; ! if (strstr($line, 'admin_easymod.php,v ' . $easymod_install_version)) { // print success and break out *************** *** 1688,1692 **** if (!$found) { ! $error = $lang['EM_err_find'] . ' <b>admin_easymod.php</b> in [admin/admin_easymod.php].' ; display_error( $error) ; } --- 1676,1680 ---- if (!$found) { ! $error = $lang['EM_err_find'] . ' <b>admin_easymod.php,v ' . $easymod_install_version . '</b> in [admin/admin_easymod.php].' ; display_error( $error) ; } *************** *** 1768,1772 **** // added security starting in 0.0.11, blowfish encrypt the ftp_pass ! include($phpbb_root_path . $script_path . 'em_includes/em_cipher.php') ; $cipher = new Cipher_BlockMode_cbc(); $cipher->blowfish->setKey( $em_pass); --- 1756,1760 ---- // added security starting in 0.0.11, blowfish encrypt the ftp_pass ! include($phpbb_root_path . $script_path . '/em_includes/em_cipher.php') ; $cipher = new Cipher_BlockMode_cbc(); $cipher->blowfish->setKey( $em_pass); *************** *** 1785,1788 **** --- 1773,1777 ---- em_db_insert( 'EM_ftp_pass', $ftp_cipher) ; em_db_insert( 'EM_ftp_host', $ftp_host) ; + em_db_insert( 'EM_ftp_port', $ftp_port) ; em_db_insert( 'EM_ftp_type', $ftp_type) ; em_db_insert( 'EM_ftp_cache', $ftp_cache) ; *************** *** 1807,1810 **** --- 1796,1805 ---- } + // 0.0.14 and later see if we have already made the EM_ftp_port field + if (!add_new_config('EM_ftp_port', $ftp_port)) + { + handle_error( OPEN_FAIL_CRITICAL, $file_list, false, $lang['EM_err_config_table']) ; + } + // 0.0.10c and later see if we have already made the EM_ftp_type field if (!add_new_config('EM_ftp_type', $ftp_type)) |
From: Jim W. <ter...@us...> - 2005-05-01 07:13:03
|
Update of /cvsroot/easymod/easymod2/mods/easymod In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18331/mods/easymod Modified Files: lang_easymod.php Log Message: modified and added a few strings to reflect the new ftp port option. Index: lang_easymod.php =================================================================== RCS file: /cvsroot/easymod/easymod2/mods/easymod/lang_easymod.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** lang_easymod.php 27 Apr 2005 22:17:10 -0000 1.3 --- lang_easymod.php 1 May 2005 07:12:52 -0000 1.4 *************** *** 160,164 **** $lang['EM_no_module'] = 'module not loaded' ; $lang['EM_no_problem'] = 'NOTE: there is no problem if some items failed or were not attempted. This is normal.' ; ! $lang['EM_support'] = 'For support, visit <a href="http://easymod.sourceforge.net/" target="_blank">EasyMOD Central</a> over at SourceForge. No emails, IMs, or PMs please.' ; $lang['EM_read_access'] = 'read access' ; --- 160,164 ---- $lang['EM_no_module'] = 'module not loaded' ; $lang['EM_no_problem'] = 'NOTE: there is no problem if some items failed or were not attempted. This is normal.' ; ! $lang['EM_support'] = 'For support, visit <a href="http://area51.phpbb.com/phpBB22/viewforum.php?f=15" target="_blank">EasyMOD Central</a> over at Area51. No emails, IMs, or PMs please.' ; $lang['EM_read_access'] = 'read access' ; *************** *** 190,193 **** --- 190,196 ---- $lang['EM_ftp_host'] = 'FTP Server' ; $lang['EM_ftp_host_info'] = '(localhost should be fine)' ; + $lang['EM_ftp_port'] = 'FTP Port' ; + $lang['EM_ftp_port_info'] = '(21 should be fine)' ; + $lang['EM_ftp_debug'] = 'FTP Debug Mode' ; $lang['EM_ftp_debug_not'] = '(only use if there is a problem)' ; *************** *** 224,232 **** // step 2 ftp test $lang['EM_ftp_testing'] = 'Testing FTP access...' ; ! $lang['EM_ftp_fail_conn'] = 'FTP ERROR: connection to %s failed.' ; $lang['EM_ftp_fail_conn_lh'] = "This error occurs frequently, particularly on hosts like Lycos. Back on step 1 you should try changing the FTP Server from 'localhost' to whatever hostname you typically use when you FTP." ; $lang['EM_ftp_fail_conn_invalid'] = "The connection failed because it appears you have provided an invalid FTP Server hostname. Hostnames cannot have slashes (/ or \\) or colons (:) in the name. Try reentering the FTP Server field." ; $lang['EM_fail_conn_info'] = 'The FTP Server you have specified could not be connected to. The following is recommended:'; ! $lang['EM_fail_conn_op1'] = 'Have you tried the default setting of <b>localhost</b>? This should be tried first.' ; $lang['EM_fail_conn_op2'] = 'Did you correctly enter the hostname? Try reentering.' ; $lang['EM_fail_conn_op3'] = 'Are you sure you have FTP access to the phpBB2 files? Obviously this is a requirement.' ; --- 227,237 ---- // step 2 ftp test $lang['EM_ftp_testing'] = 'Testing FTP access...' ; ! $lang['EM_ftp_fail_conn'] = 'FTP ERROR: connection to %s:%s failed.' ; $lang['EM_ftp_fail_conn_lh'] = "This error occurs frequently, particularly on hosts like Lycos. Back on step 1 you should try changing the FTP Server from 'localhost' to whatever hostname you typically use when you FTP." ; + $lang['EM_ftp_fail_conn_21'] = 'This error occurs frequently when the port number is incorrect. Back on step 1 you should try changing the FTP Port from 21 to whatever port you typically use when you FTP.' ; $lang['EM_ftp_fail_conn_invalid'] = "The connection failed because it appears you have provided an invalid FTP Server hostname. Hostnames cannot have slashes (/ or \\) or colons (:) in the name. Try reentering the FTP Server field." ; + $lang['EM_ftp_fail_conn_invalid2'] = "The connection failed because it appears you have provided an invalid FTP Server port. Ports must only contain the numbers 0 through 9. Try reentering the FTP Port field." ; $lang['EM_fail_conn_info'] = 'The FTP Server you have specified could not be connected to. The following is recommended:'; ! $lang['EM_fail_conn_op1'] = 'Have you tried the default settings of <b>localhost</b> for the hostname and <b>21</b> for the port? These should be tried first.' ; $lang['EM_fail_conn_op2'] = 'Did you correctly enter the hostname? Try reentering.' ; $lang['EM_fail_conn_op3'] = 'Are you sure you have FTP access to the phpBB2 files? Obviously this is a requirement.' ; *************** *** 235,239 **** $lang['EM_fail_login_info'] = 'The FTP Server was connected to, but the username and password were rejected. The following is recommended:' ; $lang['EM_fail_login_op1'] = 'Did you correctly type the username and password? Make sure your CAPS LOCK key is off and try again.' ; ! $lang['EM_fail_login_op2a'] = 'If you are 100% certain your user/pass is correct, then perhaps you are not connecting to the correct host. Try changing your FTP Server entry from localhost to the actual ftp host name.' ; $lang['EM_fail_login_op2b'] = 'Perhaps you are not connecting to the correct host. Try changing your FTP Server entry back to localhost or verify you have correctly entered the ftp host name.' ; $lang['EM_fail_pwd'] = 'FTP ERROR: pwd failed' ; --- 240,244 ---- $lang['EM_fail_login_info'] = 'The FTP Server was connected to, but the username and password were rejected. The following is recommended:' ; $lang['EM_fail_login_op1'] = 'Did you correctly type the username and password? Make sure your CAPS LOCK key is off and try again.' ; ! $lang['EM_fail_login_op2a'] = 'If you are 100% certain your user/pass is correct, then perhaps you are not connecting to the correct host or on the correct port. Try changing your FTP Server entry from localhost to the actual ftp host name and your FTP Port entry from 21 to the actual ftp port.' ; $lang['EM_fail_login_op2b'] = 'Perhaps you are not connecting to the correct host. Try changing your FTP Server entry back to localhost or verify you have correctly entered the ftp host name.' ; $lang['EM_fail_pwd'] = 'FTP ERROR: pwd failed' ; *************** *** 245,249 **** $lang['EM_fail_cd_op3'] = 'Are you sure you entered the correct path? Below is a directory listing of the files in the FTP root directory. The FTP root directory is simply the starting point when you connect. The path to the phpBB2 installation should begin with one of the directory names listed below.' ; $lang['EM_fail_cd_op4'] = 'Directory names are case sensitive. Be sure the easymod directory is all lowercase.' ; ! $lang['EM_fail_cd_op5'] = "In some *very rare* cases it's possible that you are not connecting to the proper FTP Server. Try specifying the hostname in the FTP Server field." ; $lang['EM_fail_cd_op6'] = "Some servers have issues with the passive mode that EasyMOD attempts to use by default. If you have the PHP FTP extension loaded, then enable that option in step 1." ; $lang['EM_fail_cd_pwd'] = 'FTP Error: Directory info could not be obtained. This usually indicates solution 4 listed above.' ; --- 250,254 ---- $lang['EM_fail_cd_op3'] = 'Are you sure you entered the correct path? Below is a directory listing of the files in the FTP root directory. The FTP root directory is simply the starting point when you connect. The path to the phpBB2 installation should begin with one of the directory names listed below.' ; $lang['EM_fail_cd_op4'] = 'Directory names are case sensitive. Be sure the easymod directory is all lowercase.' ; ! $lang['EM_fail_cd_op5'] = "In some *very rare* cases it's possible that you are not connecting to the proper FTP Server. Try specifying the hostname in the FTP Server field and the port in the FTP Port field." ; $lang['EM_fail_cd_op6'] = "Some servers have issues with the passive mode that EasyMOD attempts to use by default. If you have the PHP FTP extension loaded, then enable that option in step 1." ; $lang['EM_fail_cd_pwd'] = 'FTP Error: Directory info could not be obtained. This usually indicates solution 4 listed above.' ; |
From: Brendan K. <bk...@us...> - 2005-04-29 23:18:41
|
Update of /cvsroot/easymod/easymod2/mods/easymod/em_includes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12796/easymod/em_includes Modified Files: em_schema.php Log Message: Fixing DEFAULT spaces bug. Bit of bodging, but _should_ work fine, without changing the method of parsing SQL strings Index: em_schema.php =================================================================== RCS file: /cvsroot/easymod/easymod2/mods/easymod/em_includes/em_schema.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** em_schema.php 24 Apr 2005 14:59:53 -0000 1.1 --- em_schema.php 29 Apr 2005 23:18:25 -0000 1.2 *************** *** 360,364 **** else { ! $default_value = parse_field_default_value( $params[$parmpos+1], $error) ; $parmpos = $parmpos+2 ; --- 360,381 ---- else { ! // Make the default string (combine array, split by spaces) ! while($parmpos++) ! { ! if(!isset($default_string)) ! { ! $default_string = $params[$parmpos]; ! } ! elseif($params[$parmpos]{strlen($params[$parmpos])-1} == "'") ! { ! $default_string .= ' ' . $params[$parmpos]; ! break; ! } ! else ! { ! $default_string .= ' ' . $params[$parmpos]; ! } ! } ! $default_value = parse_field_default_value( $default_string, $error); $parmpos = $parmpos+2 ; *************** *** 387,391 **** else { ! $default_value = parse_field_default_value( $params[$parmpos+1], $error) ; $parmpos = $parmpos+2 ; } --- 404,425 ---- else { ! // Make the default string (combine array, split by spaces) ! while($parmpos++) ! { ! if(!isset($default_string)) ! { ! $default_string = $params[$parmpos]; ! } ! elseif($params[$parmpos]{strlen($params[$parmpos])-1} == "'") ! { ! $default_string .= ' ' . $params[$parmpos]; ! break; ! } ! else ! { ! $default_string .= ' ' . $params[$parmpos]; ! } ! } ! $default_value = parse_field_default_value( $default_string, $error); $parmpos = $parmpos+2 ; } |
From: Eric F. <wg...@us...> - 2005-04-29 00:50:39
|
Update of /cvsroot/easymod/easymod2/mods/easymod In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17618/mods/easymod Modified Files: easymod_display_functions.php easymod_install.php Log Message: - Fixed $ftp_cache not in function test_ftp when in debug mode - Rasied the character limit for MOD titles to 255 - Fixed the bbcode output, missing a couple of [/color]s Index: easymod_display_functions.php =================================================================== RCS file: /cvsroot/easymod/easymod2/mods/easymod/easymod_display_functions.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** easymod_display_functions.php 27 Apr 2005 22:12:39 -0000 1.2 --- easymod_display_functions.php 29 Apr 2005 00:50:26 -0000 1.3 *************** *** 234,238 **** { // test the ftp connection ! if (test_ftp( $ftp_user, $ftp_pass, $ftp_dir, $ftp_host, true, $ftp_type)) { echo '<br>[b]<b>' . $lang['EM_debug_ftp_test'] . '</b>[/b] :: [b][color=green]<b class="ok">' . $lang['EM_debug_success']. "</b>[/color][/b]<br />\n" ; --- 234,238 ---- { // test the ftp connection ! if (test_ftp( $ftp_user, $ftp_pass, $ftp_dir, $ftp_host, true, $ftp_type, $ftp_cache)) { echo '<br>[b]<b>' . $lang['EM_debug_ftp_test'] . '</b>[/b] :: [b][color=green]<b class="ok">' . $lang['EM_debug_success']. "</b>[/color][/b]<br />\n" ; *************** *** 425,430 **** if ($bbcode) { ! $ok_msg = '[b][color=green]<b class="ok">OK</b>[/b]' ; ! $okparms = '[b][color=green]<b class="ok">%s</b>[/b]' ; $no_msg = '[b]<b>' . $lang['EM_no'] . '</b>[/b]' ; $noparms = '[b]<b>%s</b>[/b]' ; --- 425,430 ---- if ($bbcode) { ! $ok_msg = '[b][color=green]<b class="ok">OK</b>[/color][/b]' ; ! $okparms = '[b][color=green]<b class="ok">%s</b>[/color][/b]' ; $no_msg = '[b]<b>' . $lang['EM_no'] . '</b>[/b]' ; $noparms = '[b]<b>%s</b>[/b]' ; Index: easymod_install.php =================================================================== RCS file: /cvsroot/easymod/easymod2/mods/easymod/easymod_install.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** easymod_install.php 27 Apr 2005 22:12:39 -0000 1.3 --- easymod_install.php 29 Apr 2005 00:50:26 -0000 1.4 *************** *** 998,1002 **** $sql[] = "CREATE TABLE " . EASYMOD_TABLE . " ( mod_id mediumint(8) NOT NULL auto_increment, ! mod_title varchar(50) NULL DEFAULT '', mod_file varchar(255) NULL DEFAULT '', mod_version varchar(15) NULL DEFAULT '', --- 998,1002 ---- $sql[] = "CREATE TABLE " . EASYMOD_TABLE . " ( mod_id mediumint(8) NOT NULL auto_increment, ! mod_title varchar(255) NULL DEFAULT '', mod_file varchar(255) NULL DEFAULT '', mod_version varchar(15) NULL DEFAULT '', |
From: Eric F. <wg...@us...> - 2005-04-29 00:50:39
|
Update of /cvsroot/easymod/easymod2/mods/easymod/includes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17618/mods/easymod/includes Modified Files: admin_easymod.php.txt Log Message: - Fixed $ftp_cache not in function test_ftp when in debug mode - Rasied the character limit for MOD titles to 255 - Fixed the bbcode output, missing a couple of [/color]s Index: admin_easymod.php.txt =================================================================== RCS file: /cvsroot/easymod/easymod2/mods/easymod/includes/admin_easymod.php.txt,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** admin_easymod.php.txt 24 Apr 2005 14:59:53 -0000 1.1 --- admin_easymod.php.txt 29 Apr 2005 00:50:26 -0000 1.2 *************** *** 176,180 **** $sql = "SELECT * FROM " . EASYMOD_TABLE . " ! WHERE mod_title = '" . substr( $mod_title, 0, 100) . "' AND mod_version = '" . substr( $mod_version, 0, 15) . "' ORDER BY mod_id DESC" ; --- 176,180 ---- $sql = "SELECT * FROM " . EASYMOD_TABLE . " ! WHERE mod_title = '" . substr( $mod_title, 0, 255) . "' AND mod_version = '" . substr( $mod_version, 0, 15) . "' ORDER BY mod_id DESC" ; *************** *** 2868,2872 **** $phpbb_version = get_phpbb_version() ; ! $mod_title = str_replace("'", "''", substr( $mod_title, 0, 50)) ; $mod_author_handle = str_replace("'", "''", substr( $mod_author_handle, 0, 25)) ; $mod_author_email = str_replace("'", "''", substr( $mod_author_email, 0, 100)) ; --- 2868,2872 ---- $phpbb_version = get_phpbb_version() ; ! $mod_title = str_replace("'", "''", substr( $mod_title, 0, 255)) ; $mod_author_handle = str_replace("'", "''", substr( $mod_author_handle, 0, 25)) ; $mod_author_email = str_replace("'", "''", substr( $mod_author_email, 0, 100)) ; |
From: Eric F. <wg...@us...> - 2005-04-27 22:17:20
|
Update of /cvsroot/easymod/easymod2/mods/easymod In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv507/mods/easymod Modified Files: lang_easymod.php Log Message: Forgot trailing slash on link Index: lang_easymod.php =================================================================== RCS file: /cvsroot/easymod/easymod2/mods/easymod/lang_easymod.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** lang_easymod.php 27 Apr 2005 22:03:47 -0000 1.2 --- lang_easymod.php 27 Apr 2005 22:17:10 -0000 1.3 *************** *** 160,164 **** $lang['EM_no_module'] = 'module not loaded' ; $lang['EM_no_problem'] = 'NOTE: there is no problem if some items failed or were not attempted. This is normal.' ; ! $lang['EM_support'] = 'For support, visit <a href="http://easymod.sourceforge.net" target="_blank">EasyMOD Central</a> over at SourceForge. No emails, IMs, or PMs please.' ; $lang['EM_read_access'] = 'read access' ; --- 160,164 ---- $lang['EM_no_module'] = 'module not loaded' ; $lang['EM_no_problem'] = 'NOTE: there is no problem if some items failed or were not attempted. This is normal.' ; ! $lang['EM_support'] = 'For support, visit <a href="http://easymod.sourceforge.net/" target="_blank">EasyMOD Central</a> over at SourceForge. No emails, IMs, or PMs please.' ; $lang['EM_read_access'] = 'read access' ; |
From: Eric F. <wg...@us...> - 2005-04-27 22:12:50
|
Update of /cvsroot/easymod/easymod2/mods/easymod In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30776/mods/easymod Modified Files: easymod_display_functions.php easymod_install.php Log Message: - Fixed getcwd() returns blank bug. Hopefully I didn't break it - $phpbb_root_path and $script_path are used instead of hardcoding paths Index: easymod_display_functions.php =================================================================== RCS file: /cvsroot/easymod/easymod2/mods/easymod/easymod_display_functions.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** easymod_display_functions.php 24 Apr 2005 14:59:52 -0000 1.1 --- easymod_display_functions.php 27 Apr 2005 22:12:39 -0000 1.2 *************** *** 116,123 **** $variables['TEXT'] = $text ; ! display_template( './templates/page_start.tpl', $variables) ; if (!$simple) { ! display_template( './templates/page_header.tpl', $variables) ; } } --- 116,123 ---- $variables['TEXT'] = $text ; ! display_template( $phpbb_root_path . $script_path . 'templates/page_start.tpl', $variables) ; if (!$simple) { ! display_template( $phpbb_root_path . $script_path . 'templates/page_header.tpl', $variables) ; } } *************** *** 142,146 **** $variables['DEBUG'] = $lang['EM_debug_display'] ; ! display_template( './templates/page_footer.tpl', $variables) ; } --- 142,146 ---- $variables['DEBUG'] = $lang['EM_debug_display'] ; ! display_template( $phpbb_root_path . $script_path . 'templates/page_footer.tpl', $variables) ; } *************** *** 153,157 **** $variables['HEIGHT'] = $height ; ! display_template( './templates/helpwin.tpl', $variables) ; } --- 153,157 ---- $variables['HEIGHT'] = $height ; ! display_template( $phpbb_root_path . $script_path . 'templates/helpwin.tpl', $variables) ; } *************** *** 169,173 **** $variables['RESCAN'] = (!$rescan) ? '' : '<input class="mainoption" type="submit" value="' . $lang['Rescan'] . '" name="rescan"/>' ; ! display_template( './templates/form_settings.tpl', $variables) ; } --- 169,173 ---- $variables['RESCAN'] = (!$rescan) ? '' : '<input class="mainoption" type="submit" value="' . $lang['Rescan'] . '" name="rescan"/>' ; ! display_template( $phpbb_root_path . $script_path . 'templates/form_settings.tpl', $variables) ; } *************** *** 179,183 **** // assign template data - // $variables = array() ; $variables['EM_debug_info'] = $lang['EM_debug_info'] ; $variables['EM_debug_format'] = $lang['EM_debug_format'] ; --- 179,182 ---- *************** *** 214,218 **** $variables['EM_VERSION'] = $easymod_install_version ; $variables['PHPBB_VERSION'] = get_phpbb_version() ; ! $variables['CWD'] = getcwd() ; $variables['STEP'] = $install_step ; $variables['MODE'] = $mode ; --- 213,217 ---- $variables['EM_VERSION'] = $easymod_install_version ; $variables['PHPBB_VERSION'] = get_phpbb_version() ; ! $variables['CWD'] = dirname(__FILE__); $variables['STEP'] = $install_step ; $variables['MODE'] = $mode ; *************** *** 229,233 **** $variables['FILE_LISTING'] = $values['file_listing'] ; ! display_template( './templates/display_debug.tpl', $variables) ; // check FTP compatiblity --- 228,232 ---- $variables['FILE_LISTING'] = $values['file_listing'] ; ! display_template( $phpbb_root_path . $script_path . 'templates/display_debug.tpl', $variables) ; // check FTP compatiblity *************** *** 245,249 **** } ! display_template( './templates/display_debug_footer.tpl', $variables) ; } --- 244,248 ---- } ! display_template( $phpbb_root_path . $script_path . 'templates/display_debug_footer.tpl', $variables) ; } *************** *** 285,289 **** $values['file_listing'] = '' ; ! if ($dh = opendir('./')) { while (($file = readdir($dh)) !== false) --- 284,288 ---- $values['file_listing'] = '' ; ! if ($dh = opendir(dirname(__FILE__))) { while (($file = readdir($dh)) !== false) *************** *** 308,312 **** $variables['ERROR'] = $error ; ! display_template( './templates/display_error.tpl', $variables) ; } --- 307,311 ---- $variables['ERROR'] = $error ; ! display_template( $phpbb_root_path . $script_path . 'templates/display_error.tpl', $variables) ; } *************** *** 569,591 **** function check_installablity() { ! global $db, $lang, $easymod_install_version ; // make sure we are in the correct directory ! $cwd = getcwd() ; $cwd = str_replace("\\", '/', $cwd) ; $dirs = explode('/', $cwd) ; $file_list = array() ; ! //// ! //// make sure EM is in the right directory ! //// ! // for some odd reason getcwd returns empty on some servers??? (added in 0.0.10a-2) ! if ($cwd == '') ! { ! // do nothing ! } ! ! // otherwise make sure we are in the correct directory for installation ! else if (($dirs[count($dirs)-3] != 'admin') || ($dirs[count($dirs)-2] != 'mods') || (strtolower($dirs[count($dirs)-1]) != 'easymod')) { handle_error( OPEN_FAIL_CRITICAL, $file_list, false, $lang['EM_err_install_dir'] ) ; --- 568,581 ---- function check_installablity() { ! global $db, $lang, $easymod_install_version, $phpbb_root_path; // make sure we are in the correct directory ! $cwd = dirname(__FILE__); $cwd = str_replace("\\", '/', $cwd) ; $dirs = explode('/', $cwd) ; $file_list = array() ; ! // check to make sure we are in the correct folder ! if (($dirs[count($dirs)-3] != 'admin') || ($dirs[count($dirs)-2] != 'mods') || (strtolower($dirs[count($dirs)-1]) != 'easymod')) { handle_error( OPEN_FAIL_CRITICAL, $file_list, false, $lang['EM_err_install_dir'] ) ; *************** *** 597,601 **** //// // make sure subsilver dir exists ! if (!file_exists('../../../templates/subSilver')) { handle_error( OPEN_FAIL_CRITICAL, $file_list, false, $lang['EM_err_no_subsilver'] ) ; --- 587,591 ---- //// // make sure subsilver dir exists ! if (!file_exists($phpbb_root_path . 'templates/subSilver')) { handle_error( OPEN_FAIL_CRITICAL, $file_list, false, $lang['EM_err_no_subsilver'] ) ; *************** *** 617,621 **** // make sure english exists ! if (!file_exists('../../../language/lang_english')) { handle_error( OPEN_FAIL_CRITICAL, $file_list, false, $lang['EM_err_no_english'] ) ; --- 607,611 ---- // make sure english exists ! if (!file_exists($phpbb_root_path . 'language/lang_english')) { handle_error( OPEN_FAIL_CRITICAL, $file_list, false, $lang['EM_err_no_english'] ) ; *************** *** 746,750 **** // assign template data ! $variables['U_FORM'] = 'easymod_install.'.$phpEx ; $variables['EM_support'] = $lang['EM_support'] ; $variables['EM_Settings'] = $lang['EM_Settings'] ; --- 736,740 ---- // assign template data ! $variables['U_FORM'] = $phpbb_root_path . $script_path . 'easymod_install.'.$phpEx ; $variables['EM_support'] = $lang['EM_support'] ; $variables['EM_Settings'] = $lang['EM_Settings'] ; *************** *** 770,774 **** // dispay the page and the footer ! display_template( './templates/step1_classic.tpl', $variables) ; page_footer() ; exit ; --- 760,764 ---- // dispay the page and the footer ! display_template( $phpbb_root_path . $script_path . 'templates/step1_classic.tpl', $variables) ; page_footer() ; exit ; *************** *** 802,806 **** // dispay the page and the footer ! display_template( './templates/step1_simple.tpl', $variables) ; page_footer() ; exit ; --- 792,796 ---- // dispay the page and the footer ! display_template( $phpbb_root_path . $script_path . 'templates/step1_simple.tpl', $variables) ; page_footer() ; exit ; *************** *** 863,867 **** // dispay the page and the footer ! display_template( './templates/step1b_simple.tpl', $variables) ; page_footer() ; exit ; --- 853,857 ---- // dispay the page and the footer ! display_template( $phpbb_root_path . $script_path . 'templates/step1b_simple.tpl', $variables) ; page_footer() ; exit ; *************** *** 883,887 **** // assign template data ! $variables['U_FORM'] = 'easymod_install.'.$phpEx ; $variables['EM_support'] = $lang['EM_support'] ; $variables['EM_Settings'] = $lang['EM_Settings'] ; --- 873,877 ---- // assign template data ! $variables['U_FORM'] = $phpbb_root_path . $script_path . 'easymod_install.'.$phpEx ; $variables['EM_support'] = $lang['EM_support'] ; $variables['EM_Settings'] = $lang['EM_Settings'] ; *************** *** 899,903 **** // dispay the page and the footer ! display_template( './templates/step1b_ftp.tpl', $variables) ; page_footer() ; exit ; --- 889,893 ---- // dispay the page and the footer ! display_template( $phpbb_root_path . $script_path . 'templates/step1b_ftp.tpl', $variables) ; page_footer() ; exit ; *************** *** 923,927 **** // assign template data ! $variables['U_FORM'] = 'easymod_install.'.$phpEx ; $variables['EM_support'] = $lang['EM_support'] ; $variables['EM_Settings'] = $lang['EM_Settings'] ; --- 913,917 ---- // assign template data ! $variables['U_FORM'] = $phpbb_root_path . $script_path . 'easymod_install.'.$phpEx ; $variables['EM_support'] = $lang['EM_support'] ; $variables['EM_Settings'] = $lang['EM_Settings'] ; *************** *** 947,951 **** // dispay the page and the footer ! display_template( './templates/step1c_empw.tpl', $variables) ; page_footer() ; exit ; --- 937,941 ---- // dispay the page and the footer ! display_template( $phpbb_root_path . $script_path . 'templates/step1c_empw.tpl', $variables) ; page_footer() ; exit ; Index: easymod_install.php =================================================================== RCS file: /cvsroot/easymod/easymod2/mods/easymod/easymod_install.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** easymod_install.php 26 Apr 2005 12:35:15 -0000 1.2 --- easymod_install.php 27 Apr 2005 22:12:39 -0000 1.3 *************** *** 22,26 **** define('IN_PHPBB', 1); $phpbb_root_path = './../../../'; ! $script_path = 'admin/mods/easymod' ; //// $easymod_install_version = '0.1.13' ; --- 22,26 ---- define('IN_PHPBB', 1); $phpbb_root_path = './../../../'; ! $script_path = 'admin/mods/easymod/' ; //// $easymod_install_version = '0.1.13' ; *************** *** 1768,1772 **** // added security starting in 0.0.11, blowfish encrypt the ftp_pass ! include($phpbb_root_path . $script_path . '/em_includes/em_cipher.php') ; $cipher = new Cipher_BlockMode_cbc(); $cipher->blowfish->setKey( $em_pass); --- 1768,1772 ---- // added security starting in 0.0.11, blowfish encrypt the ftp_pass ! include($phpbb_root_path . $script_path . 'em_includes/em_cipher.php') ; $cipher = new Cipher_BlockMode_cbc(); $cipher->blowfish->setKey( $em_pass); |
From: Eric F. <wg...@us...> - 2005-04-27 22:03:55
|
Update of /cvsroot/easymod/easymod2/mods/easymod In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26611/mods/easymod Modified Files: lang_easymod.php Log Message: Links to Sourceforge instead of Area51 for support Index: lang_easymod.php =================================================================== RCS file: /cvsroot/easymod/easymod2/mods/easymod/lang_easymod.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** lang_easymod.php 24 Apr 2005 14:59:52 -0000 1.1 --- lang_easymod.php 27 Apr 2005 22:03:47 -0000 1.2 *************** *** 160,164 **** $lang['EM_no_module'] = 'module not loaded' ; $lang['EM_no_problem'] = 'NOTE: there is no problem if some items failed or were not attempted. This is normal.' ; ! $lang['EM_support'] = 'For support, visit <a href="http://area51.phpbb.com/phpBB22/viewforum.php?f=15" target="_blank">EasyMOD Central</a> over at Area51. No emails, IMs, or PMs please.' ; $lang['EM_read_access'] = 'read access' ; --- 160,164 ---- $lang['EM_no_module'] = 'module not loaded' ; $lang['EM_no_problem'] = 'NOTE: there is no problem if some items failed or were not attempted. This is normal.' ; ! $lang['EM_support'] = 'For support, visit <a href="http://easymod.sourceforge.net" target="_blank">EasyMOD Central</a> over at SourceForge. No emails, IMs, or PMs please.' ; $lang['EM_read_access'] = 'read access' ; |
From: Brendan K. <bk...@us...> - 2005-04-26 12:35:41
|
Update of /cvsroot/easymod/easymod2/mods/easymod In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3300/easymod Modified Files: easymod_install.php Log Message: Fixing some install errors: php5 long arrays off, MySQL 4.1.x default fix, and admin_easmod.php copy checking, after CVS updates. Index: easymod_install.php =================================================================== RCS file: /cvsroot/easymod/easymod2/mods/easymod/easymod_install.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** easymod_install.php 24 Apr 2005 14:59:52 -0000 1.1 --- easymod_install.php 26 Apr 2005 12:35:15 -0000 1.2 *************** *** 27,30 **** --- 27,47 ---- //// + // PHP5 with register_long_arrays off? + if (!isset($HTTP_POST_VARS) && isset($_POST)) + { + $HTTP_POST_VARS = $_POST; + $HTTP_GET_VARS = $_GET; + $HTTP_SERVER_VARS = $_SERVER; + $HTTP_COOKIE_VARS = $_COOKIE; + $HTTP_ENV_VARS = $_ENV; + $HTTP_POST_FILES = $_FILES; + + // _SESSION is the only superglobal which is conditionally set + if (isset($_SESSION)) + { + $HTTP_SESSION_VARS = $_SESSION; + } + } + include($phpbb_root_path . 'extension.inc'); include($phpbb_root_path . 'config.'.$phpEx); *************** *** 980,984 **** case 'mysql4': $sql[] = "CREATE TABLE " . EASYMOD_TABLE . " ( ! mod_id mediumint(8) NOT NULL DEFAULT '0' auto_increment, mod_title varchar(50) NULL DEFAULT '', mod_file varchar(255) NULL DEFAULT '', --- 997,1001 ---- case 'mysql4': $sql[] = "CREATE TABLE " . EASYMOD_TABLE . " ( ! mod_id mediumint(8) NOT NULL auto_increment, mod_title varchar(50) NULL DEFAULT '', mod_file varchar(255) NULL DEFAULT '', *************** *** 1647,1651 **** // let 'em know what we are doing ! echo '<br><br><b>' . $lang['EM_confirm_admin'] . ':</b> admin_easymod.php,v ' . $easymod_install_version . "<br>\n" ; // open admin_easymod.php for reading --- 1664,1668 ---- // let 'em know what we are doing ! echo '<br><br><b>' . $lang['EM_confirm_admin'] . ":</b> admin_easymod.php<br>\n" ; // open admin_easymod.php for reading *************** *** 1658,1662 **** // read a line and see if it contains our key $line = fgets( $fin, 4096) ; ! if (strstr($line, 'admin_easymod.php,v ' . $easymod_install_version)) { // print success and break out --- 1675,1679 ---- // read a line and see if it contains our key $line = fgets( $fin, 4096) ; ! if (strstr($line, 'admin_easymod.php')) { // print success and break out *************** *** 1671,1675 **** if (!$found) { ! $error = $lang['EM_err_find'] . ' <b>admin_easymod.php,v ' . $easymod_install_version . '</b> in [admin/admin_easymod.php].' ; display_error( $error) ; } --- 1688,1692 ---- if (!$found) { ! $error = $lang['EM_err_find'] . ' <b>admin_easymod.php</b> in [admin/admin_easymod.php].' ; display_error( $error) ; } |
From: Brendan K. <bk...@us...> - 2005-04-24 15:00:04
|
Update of /cvsroot/easymod/easymod2/mods/easymod/includes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13181/mods/easymod/includes Added Files: EM_Version_Changer_1-3.zip admin_easymod.php.txt emc.gif empw.php.txt emver.php mod_complete.tpl mod_header.tpl mod_history.tpl mod_install.tpl mod_login.tpl mod_preview.tpl mod_process.tpl mod_settings.tpl mod_sql_body.tpl Log Message: Just checking in a vanilla 0.1.13. Work shall commence soon :) --- NEW FILE: EM_Version_Changer_1-3.zip --- (This appears to be a binary file; contents omitted.) --- NEW FILE: emver.php --- <?php /*************************************************************************** * empw.php * ------------------- * begin : Saturday, Dec 13, 2003 * copyright : (C) 2003 thru 2004 by Nuttzy - Craig Nuttall * email : nu...@bl... * * $Id: emver.php,v 1.1 2005/04/24 14:59:53 bkettle Exp $ * * ***************************************************************************/ /*************************************************************************** * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * ***************************************************************************/ /* NOTE: I CAN'T REMEMBER IF I FINISHED THIS OR IF IT EVEN WORKS! - 2004/08/08 */ // once moved to the admin dir, don't interfer with building the index if (!empty($setmodules)) { return; } define('IN_PHPBB', 1); // // Let's set the root dir for phpBB // $phpbb_root_path = './../'; require($phpbb_root_path . 'extension.inc'); include($phpbb_root_path . 'config.'.$phpEx); include($phpbb_root_path . 'includes/constants.'.$phpEx); include($phpbb_root_path . 'includes/functions.'.$phpEx); include($phpbb_root_path . 'includes/functions_admin.'.$phpEx); include($phpbb_root_path . 'includes/db.'.$phpEx); // look in the config table to get the EM version function get_em_version() { global $db ; // grab the EM version $sql = "SELECT * FROM " . CONFIG_TABLE . " WHERE config_name = 'EM_version'" ; if( !$result = $db->sql_query($sql) ) { message_die(GENERAL_ERROR, $lang['EM_err_config_info'], '', __LINE__, __FILE__, $sql); } // return the version or nothing if ( $row = $db->sql_fetchrow($result)) { return $row['config_value'] ; } else { return '' ; } } // get our values $version = ( !empty($HTTP_POST_VARS['version']) ) ? htmlspecialchars($HTTP_POST_VARS['version']) : '' ; $mode = ( !empty($HTTP_POST_VARS['mode']) ) ? htmlspecialchars($HTTP_POST_VARS['mode']) : '' ; // use the SS css file to pretty things up; should work fine even if the css file is not found echo '<link rel="stylesheet" href="../templates/subSilver/subSilver.css" type="text/css">' . "\n" ; // // update the EM settings; they already filled out the settings page and hit submit // if ($mode == 'update') { // password settings $em_version = (isset($HTTP_POST_VARS['em_version'])) ? htmlspecialchars( $HTTP_POST_VARS['em_version']) : '' ; // update the version em_db_update( 'EM_password', md5($em_pass)) ; $pass_msg = ($em_pass == '') ? '(EM password disabled)' : '(EM password updated)' ; ?> <table cellpadding="2" cellspacing="1" border="0" class="forumline" align="center"> <tr> <th>Success</th> </tr> <tr> <td class="row1" align="center"><span class="gen"> <br> Your EasyMOD settings have been updated successfully. <?php echo $pass_msg ; ?> <br> <br> <b>You should now rename or delete empw.php to prevent unauthorized use.</b> <br> <br></span></td> </tr> </table> <?php } // passwords do not match so throw an error; reset mode so that we ask for settings again else { echo "<h1>The EasyMOD passwords do not match. Settings not updated.</h1><br>\n" ; $mode = '' ; } } // // display the settings page // if ($mode == '') { ?> <br> <h3>Change EasyMOD version</h3> <p><span class="gen">This proggie is typically used if you need to reinstall the current version of EasyMOD.</span></p> <form action="emver.php" name="settings" method="post"> <table width="100%" cellpadding="2" cellspacing="1" border="0" class="forumline"> <tr> <th colspan="2">EasyMOD Version</th> </tr> <tr> <td class="row2" align="center" colspan="2"><span class="gen">The EasyMOD Version setting serves no real purpose other than to prevent duplicate installations of EM. You should only change it if you need to reinstall the same version of EasyMOD.</span></td> </tr> <tr> <td class="row1" align="right"><span class="gen">Current Version</span></td> <td class="row2"><input type="textbox" name="em_version" value="<?php echo get_em_version(); ?>"></td> </tr> <tr> <td class="catbottom" align="center" colspan="2"> <input type="hidden" name="mode" value="update"> <input class="mainoption" type="submit" value="Submit" /> </td> </tr> </table> </form> <?php } ?> --- NEW FILE: mod_process.tpl --- <!-- BEGIN fail --> <h2>{fail.L_FAILED}</h2> <p>{fail.L_FAILED_DESC}</p> <!-- END fail --> <!-- BEGIN error --> <br> <table class="forumline" width="100%" cellspacing="1" cellpadding="4" border="0"> <tr> <th>{error.L_TITLE}</th> </tr> <tr> <td class="row1"><table width="100%" cellspacing="0" cellpadding="1" border="0"> <tr> <td> </td> </tr> <tr> <td align="center"><span class="gen">{error.ERROR_MESSAGE}</span></td> </tr> <tr> <td> </td> </tr> </table></td> </tr> </table> <!-- END error --> <!-- BEGIN success --> <h2>{success.L_STEP}</h2> <h3>{success.L_COMPLETE}</h3> <p>{success.L_DESC}</p> <!-- END success --> <form action="{S_ACTION}" name="install" method="post"> <table cellspacing="1" cellpadding="4" border="0" align="center" class="forumline" width="100%"> <tr> <th class="thCornerL" colspan="2" width="100%">{L_MOD_DATA}</th> </tr> <tr> <td class="row1" align="left" width="25%"><span class="gen">{L_MOD_TITLE}:</span></td> <td class="row2" align="left" width="75%"><span class="gen">{TITLE} {VERSION} {MOD_FILE}</span></td> </tr> <tr> <td class="row1" align="left" width="25%"><span class="gen">{L_AUTHOR}:</span></td> <td class="row2" align="left" width="75%"><span class="gen">{AUTHOR} {EMAIL} {REAL_NAME} <a href="{URL}" target="_blank">{URL}</a></span></td> </tr> <tr> <td class="row1" align="left" width="25%"><span class="gen">{L_THEMES}:</span></td> <td class="row2" align="left" width="75%"><span class="gen">{THEMES}</span></td> </tr> <tr> <td class="row1" align="left" width="25%"><span class="gen">{L_LANGUAGES}:</span></td> <td class="row2" align="left" width="75%"><span class="gen">{LANGUAGES}</span></td> </tr> <tr> <td class="row1" align="left" width="25%"><span class="gen">{L_FILES}:</span></td> <td class="row2" align="left" width="75%"><span class="gen">{FILES}</span></td> </tr> <tr> <td class="row1" align="left" width="25%"><span class="gen">{L_PROCESSED}:</span></td> <td class="row2" align="left" width="75%"><span class="gen">{PROCESSED}</span></td> </tr> <tr> <td class="row1" align="left" width="25%"><span class="gen">{L_UNPROCESSED}:</span></td> <td class="row2" align="left" width="75%"><span class="gen">{UNPROCESSED}</span></td> </tr> <!-- BEGIN success --> <tr> <td class="catBottom" align="center" width="100%" colspan="2"> <input type="hidden" name="mode" value="SQL_view" /> {success.HIDDEN} <input type="hidden" name="themes" value="{THEMES}"> <input type="hidden" name="languages" value="{LANGUAGES}"> <input type="hidden" name="files" value="{FILES}"> <input type="hidden" name="num_proc" value="{PROCESSED}"> <input type="hidden" name="num_unproc" value="{UNPROCESSED}"> <input type="hidden" name="install_file" value="{success.MOD_FILE}"> <input type="hidden" name="install_path" value="{success.MOD_PATH}"> <input type="hidden" name="password" value="{EM_PASS}"> <input class="mainoption" type="submit" value="{success.L_NEXT_STEP}" /> </td> </tr> <!-- END success --> </table> </form> <br /> <table width="100%"> <tr><td><span class="gen">{L_UNPROCESSED_DESC}</span></td></tr> <tr><td> <table cellspacing="1" cellpadding="4" border="0" align="center" class="forumline" width="100%"> <tr> <th class="thCornerL">{L_UNPROCESSED}</th> </tr> <!-- BEGIN unprocessed --> <tr> <td class="{unprocessed.ROW_CLASS}" align="left" height=25><span class="gen">{unprocessed.LINE}</span></td> </tr> <!-- END unprocessed --> </table> </td></tr></table> <br /> <table width="100%"> <tr><td><span class="gen">{L_PROCESSED_DESC}</span></td></tr> <tr><td> <table cellspacing="1" cellpadding="4" border="0" align="center" class="forumline" width="100%"> <tr> <th class="thCornerL">{L_PROCESSED}</th> </tr> <!-- BEGIN processed --> <tr> <td class="{processed.ROW_CLASS}" align="left" height=25><span class="gen">{processed.LINE}</span></td> </tr> <!-- END processed --> </table> </td></tr></table> <br> --- NEW FILE: mod_sql_body.tpl --- <h2>{L_STEP}</h2> <h3>{L_ALTERATIONS}</h3> <p>{L_SQL_INTRO}</p> <!-- BEGIN drop_warning --> <table width="100%" cellpadding="4" cellspacing="1" border="0" class="forumline" align="center"> <tr> <th height="25" class="thHead" nowrap="nowrap">URGENT WARNING</th> </tr> <tr> <td class="row1"><table border="0" cellpadding="3" cellspacing="1" width="100%"> <tr> <td align="center"> </td> </tr> <tr> <td width="100%" align="center"><span class="gen">SQL commands for dropping either a column or an entire table have been detected. Although these commands may be legitamate, you should double check that you want this. Dropping a table or column is irreversable. You are strongly urged to backup your database before proceeding even if the commands are legitamate!</span></td> </tr> <tr> <td align="center"> </td> </tr> </table> </td> </tr> </table> <br> <!-- END drop_warning --> <!-- BEGIN msaccess --> <table width="100%" cellpadding="4" cellspacing="1" border="0" class="forumline" align="center"> <tr> <th height="25" class="thHead" nowrap="nowrap">Notice</th> </tr> <tr> <td class="row1"><table border="0" cellpadding="3" cellspacing="1" width="100%"> <tr> <td align="center"> </td> </tr> <tr> <td width="100%" align="center"><span class="gen">You have a MS Access database. EM should perform most SQL properly for Access. However, when creating tables or adding columns there is no way to assign default values. You will have to do this manually in Access. Without default values, the MOD may not function as intended and the consequences could be severe. If you know how to automate this, be sure to contact me (Nuttzy)!</span></td> </tr> <tr> <td align="center"> </td> </tr> </table> </td> </tr> </table> <br> <!-- END msaccess --> <!-- BEGIN sql_error --> <table width="100%" cellpadding="4" cellspacing="1" border="0" class="forumline" align="center"> <tr> <th height="25" class="thHead" nowrap="nowrap">SQL ERROR</th> </tr> <tr> <td class="row1"><table border="0" cellpadding="3" cellspacing="1" width="100%"> <tr> <td align="center"> </td> </tr> <tr> <td width="100%" align="center"><span class="gen"><b>SQL PROCESSING HALTED</b><br> <br> An error was encountered while processing the SQL commands. Further SQL processing has been halted. You may choose to complete the MOD installation anyway and perform the SQL commands manually yourself. However, at this point EM cannot guarantee the MOD will work correctly so you are best off seeking support from the Author before continuing further.<br> <br> The failed line was:<br> {sql_error.LINE}<br> <br> SQL Error: {sql_error.ERROR_CODE}<br> {sql_error.ERROR_MSG}</span></td> </tr> <tr> <td align="center"> </td> </tr> </table> </td> </tr> </table> <br> <!-- END sql_error --> <!-- BEGIN experimental --> <table width="100%" cellpadding="4" cellspacing="1" border="0" class="forumline" align="center"> <tr> <th height="25" class="thHead" nowrap="nowrap">Notice</th> </tr> <tr> <td class="row1"><table border="0" cellpadding="3" cellspacing="1" width="100%"> <tr> <td align="center"> </td> </tr> <tr> <td width="100%" align="center"><span class="gen">You have a {experimental.DB_TYPE} database. Most likely EM isn't generating the SQL properly. The reason is simply because I (Nuttzy) don't know what it is supposed to look like. If you know what the SQL should look like, please let me know on <a href="{experimental.DB_LINK}" target="_sql">this topic</a>. Otherwise just expect that maybe this won't work so well ;-)</span></td> </tr> <tr> <td align="center"> </td> </tr> </table> </td> </tr> </table> <!-- END experimental --> <form method="post" action="{S_ACTION}"> <table width="100%" cellpadding="4" cellspacing="1" border="0" class="forumline"> <tr> <th width="90%" class="thCornerL" height="25">{L_PSEUDO}</th> <th width="10%" height="25" class="thCornerR">{L_ALLOW}</th> </tr> <!-- BEGIN error --> <tr> <td class="row1" colspan="2"> <table border="0" cellpadding="3" cellspacing="1" width="100%"> <tr> <td align="center"> </td> </tr> <tr> <td width="100%" align="center"><span class="gen"> <b>SQL PROCESSING ERROR:</b><br> <b>No SQL alterations will be performed.</b> However, you may skip SQL processing, continue installing the MOD, and deal with the SQL manually.<br> <br> The following error occured:<br> <br> {error.ERROR_MSG} </span></td> </tr> <tr> <td align="center"> </td> </tr> </table> </td> </tr> <!-- END error --> <!-- BEGIN no_sql --> <tr> <td class="row1" colspan="2"> <table border="0" cellpadding="3" cellspacing="1" width="100%"> <tr> <td align="center"> </td> </tr> <tr> <td width="100%" align="center"><span class="gen"> No SQL to process. Click 'Complete Installation' to proceed. </span></td> </tr> <tr> <td align="center"> </td> </tr> </table> </td> </tr> <!-- END no_sql --> <!-- BEGIN sql_row --> <tr> <td width="90%" class="{sql_row.ROW_CLASS}"> <span class="gen">{sql_row.DISPLAY_SQL}</span> </td> <td width="10%" align="center" class="{sql_row.ROW_CLASS}"> {sql_row.HIDDEN_SQL} {sql_row.CHECK} </td> </tr> <!-- END sql_row --> <tr> <td class="catBottom" colspan="2" align="center" height="28"> {HIDDEN} <input type="hidden" name="mode" value="{MODE}"> <input type="hidden" name="SQL_lines" value="{SQL_LINES}"> <input type="hidden" name="themes" value="{THEMES}"> <input type="hidden" name="languages" value="{LANGUAGES}"> <input type="hidden" name="files" value="{FILES}"> <input type="hidden" name="num_proc" value="{PROCESSED}"> <input type="hidden" name="num_unproc" value="{UNPROCESSED}"> <input type="hidden" name="install_file" value="{MOD_FILE}"> <input type="hidden" name="install_path" value="{MOD_PATH}"> <input type="hidden" name="password" value="{EM_PASS}"> <input type="submit" name="post" class="mainoption" value="{L_COMPLETE}" /></center> </td> </tr> </table> <br /> </form> <br /> --- NEW FILE: mod_history.tpl --- <h2>{L_INSTALLED}</h2> <p>{L_INSTALLED_DESC}</p> <table width="100%" cellpadding="4" cellspacing="1" border="0" class="forumline"> <tr> <th width="10%" height="25" class="thCornerL">{L_INSTALL_DATE}</th> <th width="20%" height="25" class="thTop">{L_MOD_NAME}</th> <th width="5%" height="25" class="thTop">{L_VERSION}</th> <th width="10%" height="25" class="thTop">{L_AUTHOR}</th> <th width="10%" height="25" class="thTop">{L_PHPBB_VER}</th> <th width="20%" height="25" class="thTop">{L_THEMES}</th> <th width="15%" height="25" class="thTop">{L_LANGUAGES}</th> <th width="10%" height="25" class="thCornerR"> </th> </tr> <!-- BEGIN install --> <tr> <td width="15%" class="{install.ROW_CLASS}" align="left"><span class="gen">{install.INSTALL_DATE}</span></td> <td width="20%" class="{install.ROW_CLASS}" align="left"><span class="gen">{install.TITLE}</span></td> <td width="5%" class="{install.ROW_CLASS}" align="center"><span class="gen">{install.VERSION}</span></td> <td width="10%" class="{install.ROW_CLASS}" align="center"><span class="gen"><a href="{install.URL}" class="gen">{install.AUTHOR}</a></span></td> <td width="10%" class="{install.ROW_CLASS}" align="center"><span class="gen">{install.PHPBB_VER}</span></td> <td width="20%" class="{install.ROW_CLASS}" align="left"><span class="gen">{install.THEMES}</span></td> <td width="15%" class="{install.ROW_CLASS}" align="left"><span class="gen">{install.LANGS}</span></td> <td width="5%" class="{install.ROW_CLASS}" align="center"><span class="gensmall">details</span></td> </tr> <!-- END install --> <!-- BEGIN no_install --> <tr> <td colspan="6" align="center" class="row1"><span class="gen">{L_NONE_INSTALLED}</span></td> </tr> <!-- END no_install --> </table> <br /> --- NEW FILE: mod_login.tpl --- <p>{L_ACCESS_WARNING}</p> {L_MESSAGE} <form method="post" action="{S_ACTION}"> <table width="100%" cellpadding="4" cellspacing="1" border="0" class="forumline" align="center"> <tr> <th height="25" class="thHead" nowrap="nowrap">{L_PASSWORD_TITLE}</th> </tr> <tr> <td class="row1"><table border="0" cellpadding="3" cellspacing="1" width="100%"> <tr> <td colspan="2" align="center"> </td> </tr> <tr> <td width="45%" align="right"><span class="gen">{L_PASSWORD}:</span></td> <td> <input type="password" name="password" size="25" maxlength="40" value="" /> </td> </tr> <tr align="center"> <td colspan="2"> <input type="hidden" name="mode" value="{MODE}"> <input type="submit" name="login" class="mainoption" value="{L_ACCESS_EM}" /> </td> </tr> <tr> <td colspan="2" align="center"> </td> </tr> </table> </td> </tr> </table> </form> <br /> <br /> --- NEW FILE: mod_settings.tpl --- <br> <h2>{L_SETTINGS}</h2> <p>{L_DESC}</p> <form action="{S_ACTION}" name="settings" method="post"> <table width="100%" cellpadding="2" cellspacing="1" border="0" class="forumline"> <tr> <th colspan="2">{L_PW_TITLE}</th> </tr> <tr> <td class="row2" align="center" colspan="2"><span class="gen">{L_PW_DESC}</span></td> </tr> <tr> <td class="row1" align="right"><span class="gen">{L_PW_SET}</span></td> <td class="row2"><input type="password" name="em_pass" value="{EM_PASS}"></td> </tr> <tr> <td class="row1" align="right"><span class="gen">{L_PW_CONFIRM}</span></td> <td class="row2"><input type="password" name="em_pass_confirm" value=""></td> </tr> <tr> <th colspan="2">{L_FILE_TITLE}</th> </tr> <tr> <td class="row2" align="center" colspan="2"><span class="gen">{L_FILE_DESC}</span></td> </tr> <tr> <td class="row1" align="right"><span class="gen">{L_FILE_READ}</span></td> <td class="row2"><select style="width:140px" name="sel_read">{SELECT_READ}</select></td> </tr> <tr> <td class="row1" align="right"><span class="gen">{L_FILE_WRITE}</span></td> <td class="row2"><select style="width:140px" name="sel_write">{SELECT_WRITE}</select></td> </tr> <tr> <td class="row1" align="right"><span class="gen">{L_FILE_MOVE}</span></td> <td class="row2"><select style="width:140px" name="sel_move">{SELECT_MOVE}</select></td> </tr> <tr> <th colspan="2">{L_FTP_TITLE}</th> </tr> <tr> <td class="row2" align="center" colspan="2"><span class="gen">{L_FTP_DESC}</span></td> </tr> <tr> <td class="row1" align="right"><span class="gen">{L_FTP_DIR}</span></td> <td class="row2"><input type="text" name="ftp_dir" value="{FTP_PATH}"> (ex: public_html/phpBB2)</td> </tr> <tr> <td class="row1" align="right"><span class="gen">{L_FTP_USER}</span></td> <td class="row2"><input type="text" name="ftp_user" value="{FTP_USER}"></td> </tr> <tr> <td class="row1" align="right"><span class="gen">{L_FTP_PASS}</span></td> <td class="row2"><input type="password" name="ftp_pass" value="{FTP_PASS}"></td> </tr> <tr> <td class="row1" align="right"><span class="gen">{L_FTP_HOST}</span></td> <td class="row2"><input type="text" name="ftp_host" value="{FTP_HOST}"></td> </tr> <tr> <td class="row1" align="right"><span class="gen">{L_FTP_EXT}</span></td> <td class="row2"> <input type="radio" name="ftp_type" value="ext" {FTP_EXT}><span class="gen">{L_YES}</span> <input type="radio" name="ftp_type" value="fsock" {FTP_FSOCK}>{L_NO}</span> <span class="gen">{L_FTP_EXT_WARN}</span> </td> </tr> <tr> <td class="row1" align="right"><span class="gen">{L_FTP_CACHE}</span></td> <td class="row2"> <input type="radio" name="ftp_cache" value="ext" {FTP_CACHE_YES}><span class="gen">{L_YES}</span> <input type="radio" name="ftp_cache" value="fsock" {FTP_CACHE_NO}>{L_NO}</span> <span class="gen">{L_FTP_EXT_WARN}</span> </td> </tr> <tr> <th colspan="2">{L_EM_VERSION}</th> </tr> <tr> <td class="row2" align="center" colspan="2"><span class="gen">{L_EMV_DESC}</span></td> </tr> <tr> <td class="row1" align="right"><span class="gen">{L_EM_VERSION}</span></td> <td class="row2"><input type="text" name="em_version" value="{EM_VERSION}"></td> </tr> <tr> <td class="catbottom" align="center" colspan="2"> <input type="hidden" name="mode" value="{MODE}"> <input class="mainoption" type="submit" value="{L_SUBMIT}" /> </td> </tr> </table> </form> --- NEW FILE: mod_preview.tpl --- <h2>{L_HEADER}</h2> <p>{L_PREVIEW_DESC}</p> <table cellspacing="1" cellpadding="4" border="0" align="center" class="forumline"> <tr> <th class="thCornerL">{L_FILENAME}</th> <th class="thCornerR"> </th> </tr> <!-- BEGIN files --> <tr> <td class="row1" align="left" height=25><span class="gen">{files.NAME}</span> </td> <td class="row2" align="left" height=25><span class="gen"> <a href="{files.URL}" target="_blank">{L_VIEW}</a> </span></td> </tr> <!-- END files --> <!-- BEGIN nofiles --> <tr> <td class="row1" align="center" colspan="2" width="300"> <br> <span class="gen">{files.L_NO_FILES}</span><br> <br> </td> </tr> <!-- END nofiles --> </table> <br> --- NEW FILE: mod_complete.tpl --- <script language="JavaScript" type="text/javascript"> <!-- function helpwin(mylink) { if (! window.focus)return true; var href; if (typeof(mylink) == 'string') href=mylink; else href=mylink.href; window.open(href, 'easymod_help', 'width=800,height=600,scrollbars=yes'); return false; } //--> </script> <h2>{L_STEP}</h2> <h3>{L_COMPLETE}</h3> <p>{L_COMP_DESC}</p> <form action="{S_ACTION}" name="install" method="post"> <table cellspacing="1" cellpadding="4" border="0" align="center" class="forumline" width="100%"> <tr> <th class="thCornerL" colspan="2" width="100%">{L_MOD_DATA}</th> </tr> <tr> <td class="row1" align="left" width="25%"><span class="gen">{L_MOD_TITLE}:</span></td> <td class="row2" align="left" width="75%"><span class="gen">{TITLE} {VERSION} {MOD_FILE}</span></td> </tr> <tr> <td class="row1" align="left" width="25%"><span class="gen">{L_AUTHOR}:</span></td> <td class="row2" align="left" width="75%"><span class="gen">{AUTHOR} {EMAIL} {REAL_NAME} <a href="{URL}" target="_blank">{URL}</a></span></td> </tr> <tr> <td class="row1" align="left" width="25%"><span class="gen">{L_THEMES}:</span></td> <td class="row2" align="left" width="75%"><span class="gen">{THEMES}</span></td> </tr> <tr> <td class="row1" align="left" width="25%"><span class="gen">{L_LANGUAGES}:</span></td> <td class="row2" align="left" width="75%"><span class="gen">{LANGUAGES}</span></td> </tr> <tr> <td class="row1" align="left" width="25%"><span class="gen">{L_FILES}:</span></td> <td class="row2" align="left" width="75%"><span class="gen">{FILES}</span></td> </tr> <tr> <td class="row1" align="left" width="25%"><span class="gen">{L_PROCESSED}:</span></td> <td class="row2" align="left" width="75%"><span class="gen">{PROCESSED}</span></td> </tr> <tr> <td class="row1" align="left" width="25%"><span class="gen">{L_UNPROCESSED}:</span></td> <td class="row2" align="left" width="75%"><span class="gen">{UNPROCESSED}</span></td> </tr> <tr> <td class="row1" align="left" width="25%"><span class="gen">Database Alterations:</span></td> <td class="row2" align="left" width="75%"><span class="gen">Tables Added: N/A Tables Altered: N/A Rows Added: N/A</span></td> </tr> </table> </form> <br /> <form action="{S_ACTION}" method="post"> <input type="hidden" name="mode" value="download_backup"> <input type="hidden" name="install_file" value="{MOD_FILE}"> <input type="hidden" name="install_path" value="{MOD_PATH}"> <input type="hidden" name="mod_count" value="{MOD_COUNT}"> <table cellspacing="1" cellpadding="4" border="0" align="center" class="forumline" width="100%"> <tr> <th class="thCornerL" colspan="2">{L_MAKING_BACKUPS}</th> </tr> <!-- BEGIN backups --> <tr> <td class="row1" align="left" height=25 width="50%"><span class="gen">{backups.FROM}</span></td> <td class="row2" align="left" height=25 width="50%"><span class="gen">{backups.TO}</span></td> </tr> <!-- END backups --> </table> </form> <br /> <table width="100%"> <tr><td><span class="gen">THIS TEXT WILL DEPEND ON MOVE METHOD:</span></td></tr> <tr><td> <form action="{S_ACTION}" method="post"> <input type="hidden" name="mode" value="download_file"> <input type="hidden" name="install_file" value="{MOD_FILE}"> <input type="hidden" name="install_path" value="{MOD_PATH}"> <input type="hidden" name="mod_count" value="{MOD_COUNT}"> <table cellspacing="1" cellpadding="4" border="0" align="center" class="forumline" width="100%"> <tr> <th class="thCornerL">{L_COPY_FROM}</th> <th class="thCornerR">{L_COPY_TO}</th> <th class="thCornerR">{L_COPY_STATUS}</th> </tr> <!-- BEGIN files --> <tr> <td class="row1" align="left" height=25 width="50%"><span class="gen">{files.FROM}</span></td> <td class="row2" align="left" height=25 width="50%"><span class="gen">{files.TO}</span></td> <td class="row2" align="left" height=25 width="*"><span class="gen">{files.COMPLETED}</span></td> </tr> <!-- END files --> </table> </form> </td></tr></table> --- NEW FILE: admin_easymod.php.txt --- <?php /*************************************************************************** * admin_easymod.php * ------------------- * begin : Sunday Mar 31, 2002 * copyright : (C) 2002-2004 by Nuttzy - Craig Nuttall * email : nu...@bl... * * $Id: admin_easymod.php.txt,v 1.1 2005/04/24 14:59:53 bkettle Exp $ * * ***************************************************************************/ /*************************************************************************** * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. [...2860 lines suppressed...] if ($preview) { // do not update the DB while in preview mode } else if ( !($result = $db->sql_query($sql)) ) { message_die(GENERAL_ERROR, $lang['EM_err_em_info'], '', __LINE__, __FILE__, $sql); } } // actually outputs the template date we've built $template->pparse('body'); // output the footer include('page_footer_admin.'.$phpEx); ?> --- NEW FILE: emc.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: empw.php.txt --- <?php /*************************************************************************** * empw.php * ------------------- * begin : Saturday, Dec 13, 2003 * copyright : (C) 2003 thru 2004 by Nuttzy - Craig Nuttall * email : nu...@bl... * * $Id: empw.php.txt,v 1.1 2005/04/24 14:59:53 bkettle Exp $ * * ***************************************************************************/ /*************************************************************************** * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * ***************************************************************************/ /* NOTE: I CAN'T REMEMBER IF I FINISHED THIS OR IF IT EVEN WORKS! - 2004/08/08 */ // once moved to the admin dir, don't interfer with building the index if (!empty($setmodules)) { return; } define('IN_PHPBB', 1); // // Let's set the root dir for phpBB // $phpbb_root_path = './../'; require($phpbb_root_path . 'extension.inc'); include($phpbb_root_path . 'config.'.$phpEx); include($phpbb_root_path . 'includes/constants.'.$phpEx); include($phpbb_root_path . 'includes/functions.'.$phpEx); include($phpbb_root_path . 'includes/functions_admin.'.$phpEx); include($phpbb_root_path . 'includes/db.'.$phpEx); include($phpbb_root_path . '/admin/em_includes/em_ftp.' . $phpEx) ; include($phpbb_root_path . '/admin/em_includes/em_modio.' . $phpEx) ; include($phpbb_root_path . '/admin/em_includes/em_functions.' . $phpEx) ; // look in the config table to get the EM settings function get_em_settings( $filename, $path, $em_pass, $preview = false) { global $db, $phpbb_root_path ; // // grab the EM settings // $sql = "SELECT * FROM " . CONFIG_TABLE ; if( !$result = $db->sql_query($sql) ) { message_die(GENERAL_ERROR, $lang['EM_err_config_info'], '', __LINE__, __FILE__, $sql); } // loop through all the settings and assign the EM ones as appropriate while ( $row = $db->sql_fetchrow($result)) { if ( $row['config_name'] == 'EM_read') { $read = $row['config_value'] ; } else if ( $row['config_name'] == 'EM_write') { $write = $row['config_value'] ; } else if ( $row['config_name'] == 'EM_move') { $move = $row['config_value'] ; } else if ( $row['config_name'] == 'EM_ftp_dir') { $ftp_dir = $row['config_value'] ; } else if ( $row['config_name'] == 'EM_ftp_user') { $ftp_user = $row['config_value'] ; } else if ( $row['config_name'] == 'EM_ftp_pass') { $ftp_pass = $row['config_value'] ; } else if ( $row['config_name'] == 'EM_ftp_host') { $ftp_host = $row['config_value'] ; } else if ( $row['config_name'] == 'EM_ftp_type') { $ftp_type = $row['config_value'] ; } } // decrypt the FTP password include($phpbb_root_path . 'admin/em_includes/em_cipher.php') ; $cipher = new Cipher_BlockMode_cbc(); $cipher->blowfish->setKey( $em_pass); $ftp_pass = $cipher->decrypt($ftp_pass) ; // if we are in preview mode, then no matter what we will set to display to screen if ($preview) { $write = 'screen' ; $move = 'ftpm' ; } // easiest thing to do is return a mod_io object return new mod_io( $filename, $path, $read, $write, $move, $ftp_user, $ftp_pass, $ftp_dir, $ftp_host, $ftp_type) ; } // get our values $password = ( !empty($HTTP_POST_VARS['password']) ) ? htmlspecialchars($HTTP_POST_VARS['password']) : '' ; $mode = ( !empty($HTTP_POST_VARS['mode']) ) ? htmlspecialchars($HTTP_POST_VARS['mode']) : '' ; // use the SS css file to pretty things up; should work fine even if the css file is not found echo '<link rel="stylesheet" href="../templates/subSilver/subSilver.css" type="text/css">' . "\n" ; // // update the EM settings; they already filled out the settings page and hit submit // if ($mode == 'update') { // password settings $em_pass = (isset($HTTP_POST_VARS['em_pass'])) ? htmlspecialchars( $HTTP_POST_VARS['em_pass']) : '' ; $em_pass_confirm = (isset($HTTP_POST_VARS['em_pass_confirm'])) ? htmlspecialchars( $HTTP_POST_VARS['em_pass_confirm']) : '' ; // ftp settings $ftp_pass = (isset($HTTP_POST_VARS['ftp_pass'])) ? htmlspecialchars( $HTTP_POST_VARS['ftp_pass']) : '' ; // confirm passwords match and update pw if needed if ( $em_pass == $em_pass_confirm) { // update the password; starting with 0.0.11 store as MD5 hash em_db_update( 'EM_password', md5($em_pass)) ; $pass_msg = ($em_pass == '') ? '(EM password disabled)' : '(EM password updated)' ; // decrypt the FTP password include($phpbb_root_path . '/admin/em_includes/em_cipher.php') ; $cipher = new Cipher_BlockMode_cbc(); $cipher->blowfish->setKey( $em_pass); $ftp_pass = $cipher->encrypt( $ftp_pass) ; // update the settings em_db_update( 'EM_ftp_pass', $ftp_pass) ; ?> <table cellpadding="2" cellspacing="1" border="0" class="forumline" align="center"> <tr> <th>Success</th> </tr> <tr> <td class="row1" align="center"><span class="gen"> <br> Your EasyMOD settings have been updated successfully. <?php echo $pass_msg ; ?> <br> <br> <b>You should now rename or delete empw.php to prevent unauthorized use.</b> <br> <br></span></td> </tr> </table> <?php } // passwords do not match so throw an error; reset mode so that we ask for settings again else { echo "<h1>The EasyMOD passwords do not match. Settings not updated.</h1><br>\n" ; $mode = '' ; } } // // display the settings page // if ($mode == '') { $command_file = get_em_settings( '6E7574747A79.72756C657321', '', $password) ; ?> <br> <h3>Change EasyMOD password</h3> <p>Try to remember it next time, ok? ;-)</p> <form action="empw.php" name="settings" method="post"> <table width="100%" cellpadding="2" cellspacing="1" border="0" class="forumline"> <tr> <th colspan="2">EasyMOD Password Protection</th> </tr> <tr> <td class="row2" align="center" colspan="2"><span class="gen">The EasyMOD password will allow you to restrict which admins can use EasyMOD. By having access to EasyMOD an admin could covertly obtain your database user/pass and FTP info. Leave both the password and the confirm password empty to have no password set. Leave the confirm empty to not change the password.</span></td> </tr> <tr> <td class="row1" align="right"><span class="gen">Set EM password</span></td> <td class="row2"><input type="password" name="em_pass" value=""></td> </tr> <tr> <td class="row1" align="right"><span class="gen">Confirm EM password</span></td> <td class="row2"><input type="password" name="em_pass_confirm" value=""></td> </tr> <tr> <th colspan="2">FTP Password</th> </tr> <tr> <td class="row2" align="center" colspan="2"><span class="gen">Whenever you change the EM password you must also reenter your FTP password. The two are linked together to increase security.</span></td> </tr> <tr> <td class="row1" align="right"><span class="gen">FTP Username</span></td> <td class="row2"><span class="gen"> <?php echo $command_file->ftp_user ?></span></td> </tr> <tr> <td class="row1" align="right"><span class="gen">FTP Password</span></td> <td class="row2"><input type="password" name="ftp_pass" value=""></td> </tr> <tr> <td class="catbottom" align="center" colspan="2"> <input type="hidden" name="mode" value="update"> <input class="mainoption" type="submit" value="Submit" /> </td> </tr> </table> </form> <?php } ?> --- NEW FILE: mod_header.tpl --- <table width="100%"><tr> <td><img src="../templates/subSilver/images/easymod.gif"></td> <td align="center" width="100%"> <h1>{L_TITLE}</h1> <span class="gen">{L_EM_VERSION} by {NUTTZY}</span> </td> </tr></table> --- NEW FILE: mod_install.tpl --- <p>{L_EM_INTRO}</p> <br> <h2>{L_UNPROCESSED}</h2> <p>{L_UNPROCESSED_DESC}</p> <table width="100%" cellpadding="4" cellspacing="1" border="0" class="forumline"> <tr> <th width="20%" class="thCornerL" height="25">MOD</th> <th width="10%" class="thTop" height="25">{L_AUTHOR}</th> <th width="35%" class="thTop" height="25">{L_DESCRIPTION}</th> <th width="10%" class="thTop" height="25">{L_EMC}</th> <th width="5%" class="thCornerR" height="25"> </th> </tr> <!-- BEGIN unprocessed --> <tr> <td class="{unprocessed.ROW_CLASS}" align="center"> <table width="100%"> <tr> <td align="center"><span class="gen"><b>{unprocessed.MOD_TITLE}</b></span></td> </tr> <tr> <td align="center"><span class="gen">{unprocessed.MOD_VERSION}</span></td> </tr> <tr> <td align="center"><span class="gen"><a href="{unprocessed.MOD_FILE_URL}" class="gen" target="_blank">{unprocessed.MOD_FILE}</a></span></td> </tr> </table> </td> <td class="{unprocessed.ROW_CLASS}" align="center"> <table width="100%"> <tr> <td align="center"><span class="gen"><b>{unprocessed.MOD_AUTHOR}</b></span></td> </tr> <tr> <td align="center"><span class="gen"><a href="{unprocessed.MOD_URL}" class="gen" target="_blank">{unprocessed.MOD_URL}</a></span></td> </tr> <tr> <td align="center"><span class="gen"> <!-- <a href="{unprocessed.MOD_URL}" class="gen">{L_SUPPORT}</a></span> --> </td> </tr> </table> </td> <td class="{unprocessed.ROW_CLASS}" align="left"><span class="gen">{unprocessed.MOD_DESC}</span></td> <td class="{unprocessed.ROW_CLASS}" align="center"><span class="gen">{unprocessed.MOD_EMC}<span></td> <td class="{unprocessed.ROW_CLASS}" align="center" valign="bottom"> <form method="post" action="{S_ACTION}"> <input type="hidden" name="mode" value="process"> <input type="hidden" name="install_file" value="{unprocessed.MOD_FILE}"> <input type="hidden" name="install_path" value="{unprocessed.MOD_PATH}"> <input type="hidden" name="password" value="{EM_PASS}"> <input type="submit" name="post" class="mainoption" value="{L_PROCESS}" /><br> {L_PREVIEW}: <input type="checkbox" name="preview" value="0" /> </form> </td> </tr> <!-- END unprocessed --> <!-- BEGIN no_unprocessed --> <tr> <td colspan="6" align="center" class="row1"><span class="gen"><br>{L_ALL_PROCESSED}<br><br></span></td> </tr> <!-- END no_unprocessed --> </table> <br> |
Update of /cvsroot/easymod/easymod2/mods/easymod/templates In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13181/mods/easymod/templates Added Files: display_debug.tpl display_debug_footer.tpl display_error.tpl empw_settings.tpl error.tpl file_access.tpl form_settings.tpl ftp_settings.tpl helpwin.tpl hidden_access.tpl install_info.tpl nuttzy.jpg page_footer.tpl page_header.tpl page_start.tpl step1_classic.tpl step1_simple.tpl step1b_ftp.tpl step1b_nowrite_nocopy.tpl step1b_simple.tpl step1b_write_copy.tpl step1b_write_nocopy.tpl step1c_empw.tpl Log Message: Just checking in a vanilla 0.1.13. Work shall commence soon :) --- NEW FILE: step1b_write_copy.tpl --- {{WRITE_COPY_START}} <tr> <td class="row1" align="center" colspan="2"><span class="gen">{{EM_password_descX}} <br> Good news! EasyMOD has detected that it has the necessary access to automatically install MODs. You should select yes below.<br> <br> </span></td> </tr> <tr> <td class="row1" align="left"><input type="radio" name="option" value="write_copy" checked="checked"></td> <td class="row1" align="left" width="100%"><span class="gen">{{EM_yesX}} Yes, use this automated method. (<a href="http://www.phpbb.com" target="_blank">learn more</a>)</span></td> </tr> <tr> <td class="row1" align="left"><input type="radio" name="option" value="advanced"></td> <td class="row1" align="left" width="100%"><span class="gen">{{EM_yesX}} No, I'd like to select something else. (advanced mode)</span></td> </tr> <tr> <td class="row1" align="center" colspan="2"><br></td> </tr> {{WRITE_COPY_END}} --- NEW FILE: step1b_write_nocopy.tpl --- {{WRITE_NOCOPY_START}} <tr> <td class="row1" align="left" colspan="2"><span class="gen">{{EM_password_descX}} <br> Problem. EasyMOD has permission to create new files, but does not have permission to replace the old files with the new ones. There are several things you can do:<br> <ol> <li>If you have FTP access, then use the FTP option.</li> {{SAFE_MODE}}<li>Your server has "safe mode" enabled which means EasyMOD cannot automaticly replace your phpBB files. You might consider using <a href="z" target="_blank">chmod</a> or <a href="z" target="_blank">chown</a> to allow access.</li> <li>You might consider using <a href="z" target="_blank">chmod</a> to allow access. However, this is not advised in a shared server environment.</li> <li>Otherwise you have to use the <a href="x" target="_blank">post_process script</a> or manually move files into place.</li> </ol> <br> </span></td> </tr> <tr> <td class="row1" align="left"><input type="radio" name="option" value="ftp" checked="checked"></td> <td class="row1" align="left" width="*"><span class="gen">{{EM_yesX}} I'll try using the FTP option. (requires FTP access)</span></td> </tr> <tr> <td class="row1" align="left"><input type="radio" name="option" value="idunno"></td> <td class="row1" align="left" width="*"><span class="gen">{{EM_yesX}} I have now modified my file permissions, try rescanning to see if EasyMOD has access.</span></td> </tr> <tr> <td class="row1" align="left"><input type="radio" name="option" value="post_process"></td> <td class="row1" align="left" width="*"><span class="gen">{{EM_yesX}} I will use the post_process script to automatically move files into place. (requires knowledge of how to execute a script)</span></td> </tr> <tr> <td class="row1" align="left"><input type="radio" name="option" value="manual"></td> <td class="row1" align="left" width="*"><span class="gen">{{EM_yesX}} I will have to manually move files into place :(</span></td> </tr> <td class="row1" align="left"><input type="radio" name="option" value="advanced"></td> <td class="row1" align="left" width="*"><span class="gen">{{EM_yesX}} I'd like to select something else. (advanced mode)</span></td> <tr> <td class="row1" align="center" colspan="2"><br></td> </tr> {{WRITE_NOCOPY_END}} --- NEW FILE: page_header.tpl --- <table width="100%" border="0" cellspacing="0" cellpadding="10" align="center"> <tr> <td class="bodyline" width="100%"><table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td><table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td><img src="easymod.gif" border="0" alt="EasyMOD" vspace="1" /></td> <td align="center" width="100%" valign="middle"><span class="maintitle">{{TITLE}}</span><br>{{BY}}</td> </tr> </table></td> </tr> <tr> <td><br /><br /></td> </tr> <tr> <td colspan="2"><table width="90%" border="0" align="center" cellspacing="0" cellpadding="0"> <tr> <td><span class="gen">{{TEXT}}</span></tsd> </tr> </table></td> </tr> <tr> <td><br /><br /></td> </tr> <tr><td width="100%"> <!-- END OF HEADER --> --- NEW FILE: helpwin.tpl --- <!-- START OF HELPWIN --> <script language="JavaScript" type="text/javascript"> <!-- function helpwin(mylink) { if (! window.focus)return true; var href; if (typeof(mylink) == 'string') href=mylink; else href=mylink.href; window.open(href, 'easymod_help', 'width={{WIDTH}},height={{HEIGHT}},scrollbars=yes'); return false; } //--> </script> <!-- END OF HELPWIN --> --- NEW FILE: step1_simple.tpl --- <span class="gen">Simple Mode :: <a href="easymod_install.php?setup=advanced">Advanced Mode</a></span><br> <table width="100%" border="1" cellpadding="5"> <tr> <td valign="top" class="row1" width="290"> <!-- INSTALL INFO --> {{[./templates/install_info.tpl]}} <!-- INSTALL INFO --> <br /> <span class="gen">{{EM_support}}</class><br> </td><td valign="top" class="row2"> <h2>{{EM_SettingsX}}Server Style</h2> <form action="{{U_FORM}}" name="install" method="post"> <table width="100%" cellpadding="2" cellspacing="0" border="0" class="forumline"> <tr> <th>{{EM_password_titleX}}About your server</th> </tr> <tr> <td class="row2" align="center"><span class="gen">{{EM_password_descX}}<b>Which of the following choices best describes your phpBB server:</b></span></td> </tr> <tr> <td class="row1" align="left"><span class="gen"><input type="radio" name="option" value="ftp" checked="checked"><span class="gen">{{EM_yesX}} I have FTP access to my phpBB files on the server.</span> </span></td> </tr> <tr> <td class="row1" align="left"><span class="gen"><input type="radio" name="option" value="windoze"><span class="gen">{{EM_yesX}} This is a Windows server and I don't have to worry about file permissions.</span> </span></td> </tr> <tr> <td class="row1" align="left"><span class="gen"><input type="radio" name="option" value="idunno"><span class="gen">{{EM_yesX}} I don't have FTP access. Have EasyMOD suggest what to do please!</span> </span></td> </tr> <tr> <td class="row1" align="left"><br></td> </tr> <tr> <td class="catbottom" align="center" colspan="2"> <input type="hidden" name="language" value="{{LANGUAGE}}"> <input type="hidden" name="install_step" value="1"> <input type="hidden" name="substep" value="a"> <input class="mainoption" type="submit" value="{{Submit}}" /> </td> </tr> </table> </form> </td></tr> </table> <br> <br> --- NEW FILE: form_settings.tpl --- <form action="{{U_FORM}}" name="install" method="post"> {{HIDDEN}} <input type="hidden" name="install_step" value="{{STEP}}"> {{MAIN}} {{RESCAN}} </form> --- NEW FILE: file_access.tpl --- <h2>{{EM_File_Access}}</h2> <span class="gen">{{EM_no_problem}}</span> <table width="100%"> <tr> <td class="gen" nowrap="nowrap">{{EM_read_access}}</td> <td class="gen"> :: </td> <td class="gen" width="100%">{{ACCESS_READ}}</td> </tr> <tr> <td class="gen" nowrap="nowrap">{{EM_write_access}}</td> <td class="gen"> :: </td> <td class="gen" width="100%">{{ACCESS_WRITE}}</td> </tr> <tr> <td class="gen" nowrap="nowrap">{{EM_root_write}}</td> <td class="gen"> :: </td> <td class="gen" width="100%">{{ACCESS_ROOT}}</td> </tr> <tr> <td class="gen" nowrap="nowrap">{{EM_chmod_access}}</td> <td class="gen"> :: </td> <td class="gen" width="100%">{{ACCESS_CHMOD}}</td> </tr> <tr> <td class="gen" nowrap="nowrap">{{EM_unlink_access}}</td> <td class="gen"> :: </td> <td class="gen" width="100%">{{ACCESS_UNLINK}}</td> </tr> <tr> <td class="gen" nowrap="nowrap">{{EM_mkdir_access}}</td> <td class="gen"> :: </td> <td class="gen" width="100%">{{ACCESS_MKDIR}}</td> </tr> <tr> <td class="gen" nowrap="nowrap">{{EM_tmp_write}}</td> <td class="gen"> :: </td> <td class="gen" width="100%">{{ACCESS_TMP}}</td> </tr> <tr> <td class="gen" nowrap="nowrap">{{EM_ftp_ext}}</td> <td class="gen"> :: </td> <td class="gen" width="100%">{{ACCESS_FTP}}</td> </tr> <tr> <td class="gen" nowrap="nowrap">{{EM_safe_mode}}</td> <td class="gen"> :: </td> <td class="gen" width="100%">{{ACCESS_SAFE}}</td> </tr> <tr> <td class="gen" nowrap="nowrap">{{EM_copy_access}}</td> <td class="gen"> :: </td> <td class="gen" width="100%">{{ACCESS_COPY}}</td> </tr> </table> --- NEW FILE: nuttzy.jpg --- (This appears to be a binary file; contents omitted.) --- NEW FILE: install_info.tpl --- <h2>{{EM_Install_Info}}</h2> <form method="post" name="lang" action="{{U_FORM}}"> <table width="100%"> <tr> <td class="gen" nowrap="nowrap">{{EM_Select_Language}}</td> <td class="gen"> :: </td> <td class="gen" width="100%"><select name="language"> {{LANG_OPTIONS}} </select> <input type="submit" value="{{GO}}" class="liteoption" /><td> </tr> <tr> <td class="gen" nowrap="nowrap">{{EM_Database_type}}</td> <td class="gen"> :: </td> <td class="gen" width="100%"><b>{{SQL_LAYER}}</b></td> </tr> <tr> <td class="gen" nowrap="nowrap">{{EM_phpBB_version}}</td> <td class="gen"> :: </td> <td class="gen" width="100%"><b>{{PHPBB_VERSION}}</b></td> </tr> <tr> <td class="gen" nowrap="nowrap">{{EM_EasyMOD_version}}</td> <td class="gen"> :: </td> <td class="gen" width="100%"><b>{{EM_VERSION}}</b></td> </tr> <tr> <td class="gen" nowrap="nowrap">{{L_EM_STATUS}}</td> <td class="gen"> :: </td> <td class="gen" width="100%"><b>{{STATUS}}</td> </tr> </table> </form> --- NEW FILE: step1b_simple.tpl --- <table width="100%" border="1" cellpadding="5"> <tr> <td valign="top" class="row1" width="290"> <!-- FILE ACCESS --> {{[./templates/file_access.tpl]}} <!-- FILE ACCESS --> <br> <span class="gen">{{EM_support}}</class><br> </td><td valign="top" class="row2"> <h2>{{EM_SettingsX}}Diagnosis</h2> <form action="{{U_FORM}}" name="install" method="post"> <table width="100%" cellpadding="2" cellspacing="0" border="0" class="forumline"> <tr> <th colspan="2">{{EM_password_titleX}}Automation Technique detected!</th> </tr> <!-- WRITE AND COPY --> {{[./templates/step1b_write_copy.tpl]}} <!-- WRITE AND COPY --> <!-- WRITE AND noCOPY --> {{[./templates/step1b_write_nocopy.tpl]}} <!-- WRITE AND noCOPY --> <!-- noWRITE AND noCOPY --> {{[./templates/step1b_nowrite_nocopy.tpl]}} <!-- noWRITE AND noCOPY --> <tr> <td class="catbottom" align="center" colspan="2"> {{[./templates/hidden_access.tpl]}} <input type="hidden" name="install_step" value="1"> <input type="hidden" name="substep" value="b"> <input class="mainoption" type="submit" value="{{Submit}}" /> <input class="mainoption" type="submit" value="{{Rescan}}" name="rescan"/> </td> </tr> </table> </form> </td></tr> </table> <br> <br> --- NEW FILE: step1b_ftp.tpl --- <table width="100%" border="1" cellpadding="5"> <tr> <td valign="top" class="row1" width="290"> <!-- FILE ACCESS --> {{[./templates/file_access.tpl]}} <!-- FILE ACCESS --> <br /> <br> <span class="gen">{{EM_support}}</class><br> </td><td valign="top" class="row2"> <h2>{{EM_Settings}}</h2> <form action="{{U_FORM}}" name="install" method="post"> <table width="100%" cellpadding="2" cellspacing="1" border="0" class="forumline"> {{[./templates/ftp_settings.tpl]}} <tr> <td class="catbottom" align="center" colspan="2"> <input type="hidden" name="sel_read" value="{{SEL_READ}}"> <input type="hidden" name="sel_write" value="{{SEL_WRITE}}"> <input type="hidden" name="sel_move" value="{{SEL_MOVE}}"> <input type="hidden" name="language" value="{{LANGUAGE}}"> <input type="hidden" name="install_step" value="1"> <input type="hidden" name="substep" value="c"> <input class="mainoption" type="submit" value="{{Submit}}" /> <input class="mainoption" type="submit" value="{{Rescan}}" name="rescan"/> </td> </tr> </table> </form> </td></tr> </table> <br> <br> --- NEW FILE: step1c_empw.tpl --- <table width="100%" border="1" cellpadding="5"> <tr> <td valign="top" class="row1" width="290"> <br> <img src="./templates/nuttzy.jpg"> <br> <span class="gen">{{EM_support}}</class><br> </td><td valign="top" class="row2"> <h2>{{EM_Settings}}</h2> <form action="{{U_FORM}}" name="install" method="post"> <table width="100%" cellpadding="2" cellspacing="1" border="0" class="forumline"> {{[./templates/empw_settings.tpl]}} <tr> <td class="catbottom" align="center" colspan="2"> {{[./templates/hidden_access.tpl]}} <input type="hidden" name="sel_read" value="{{SEL_READ}}"> <input type="hidden" name="sel_write" value="{{SEL_WRITE}}"> <input type="hidden" name="sel_move" value="{{SEL_MOVE}}"> <input type="hidden" name="ftp_user" value="{{FTP_USER}}"> <input type="hidden" name="ftp_pass" value="{{FTP_PASS}}"> <input type="hidden" name="ftp_host" value="{{FTP_HOST}}"> <input type="hidden" name="ftp_dir" value="{{FTP_DIR}}"> <input type="hidden" name="ftp_debug" value="{{FTP_DEBUG}}"> <input type="hidden" name="ftp_type" value="{{FTP_TYPE}}"> <input type="hidden" name="ftp_cache" value="{{FTP_CACHE}}"> <input type="hidden" name="install_step" value="2"> <input class="mainoption" type="submit" value="{{Submit}}" /> <input class="mainoption" type="submit" value="{{Rescan}}" name="rescan"/> </td> </tr> </table> </form> </td></tr> </table> <br> <br> --- NEW FILE: display_debug.tpl --- <table class="forumline" width="100%" cellspacing="1" cellpadding="4" border="0"> <tr> <th>{{EM_debug_info}}</th> </tr> <tr> <td class="row1"><table width="100%" cellspacing="0" cellpadding="1" border="0"> <tr> <td align="left"><span class="gen"> ({{EM_debug_format}})<br> <br> [quote="{{EM_debug_installer}} v{{EM_VERSION}}"]<br> [b]<b>{{EM_phpBB_version}}:</b>[/b] {{PHPBB_VERSION}}<br> [b]<b>{{EM_debug_work_dir}}:</b>[/b] {{CWD}}<br> [b]<b>{{EM_debug_step}}:</b>[/b] {{STEP}}<br> [b]<b>{{EM_debug_mode}}:</b>[/b] {{MODE}}<br> <br> [quote="{{EM_debug_the_error}}"]<br> {{ERROR}}<?php echo ?><br> [/quote]<br> <br> [b]<b>{{EM_debug_permissions}}:</b>[/b] ({{EM_debug_sys_errors}})<br> <!-- FILE ACCESS --> {{[./templates/file_access.tpl]}} <!-- FILE ACCESS --> <br> <br> <br> [b]<b>{{EM_debug_recommend}}:</b>[/b]<br> [b]<b>{{EM_debug_write}}:</b>[/b] {{WRITE_REC}}<br> [b]<b>{{EM_debug_move}}:</b>[/b] {{MOVE_REC}}<br> <br> [b]<b>{{EM_debug_selected}}:</b>[/b]<br> [b]<b>{{EM_debug_write}}:</b>[/b] {{WRITE_SEL}}<br> [b]<b>{{EM_debug_move}}:</b>[/b] {{MOVE_SEL}}<br> [b]<b>{{EM_debug_ftp_dir}}:</b>[/b] {{FTP_DIR}}<br> [b]<b>{{EM_debug_ftp_host}}:</b>[/b] {{FTP_HOST}}<br> [b]<b>{{EM_debug_ftp_debug}}:</b>[/b] {{FTP_DEBUG}}<br> [b]<b>{{EM_debug_ftp_ext}}:</b>[/b] {{FTP_EXT}}<br> [b]<b>{{EM_debug_ftp_cache}}:</b>[/b] {{FTP_CACHE}}<br> <br> [b]<b>{{EM_debug_listing}}:</b>[/b]<br> [code]<br> {{FILE_LISTING}} [/code]<br> --- NEW FILE: empw_settings.tpl --- <tr> <th colspan="2">{{EM_password_title}}</th> </tr> <tr> <td class="row2" align="center" colspan="2"><span class="gen">{{EM_password_desc}}</span></td> </tr> <tr> <td class="row1" align="right"><span class="gen">{{EM_password_set}}</span></td> <td class="row2"><input type="password" name="em_pass"></td> </tr> <tr> <td class="row1" align="right"><span class="gen">{{EM_password_confirm}}</span></td> <td class="row2"><input type="password" name="em_pass_confirm"></td> </tr> --- NEW FILE: page_start.tpl --- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta http-equiv="Content-Type" content="text/html;"> <meta http-equiv="Content-Style-Type" content="text/css"> <link rel="stylesheet" href="../../../templates/subSilver/subSilver.css" type="text/css"> <style type="text/css"> <!-- /* The majority of this header was ripped from the phpBB 2.0.x installer ;-) */ font,th,td,p,body { font-family: "Courier New", courier; font-size: 11pt } a:link,a:active,a:visited { color : #006699; } a:hover { text-decoration: underline; color : #DD6900;} hr { height: 0px; border: solid #D1D7DC 0px; border-top-width: 1px;} .maintitle,h1,h2 {font-weight: bold; font-size: 22px; font-family: "Trebuchet MS",Verdana, Arial, Helvetica, sans-serif; text-decoration: none; line-height : 120%; color : #000000;} .ok {color:green} th { background-image: url('../../../templates/subSilver/images/cellpic3.gif') } td.cat { background-image: url('../../../templates/subSilver/images/cellpic1.gif') } td.rowpic { background-image: url('../../../templates/subSilver/images/cellpic2.jpg'); background-repeat: repeat-y } td.catHead,td.catSides,td.catLeft,td.catRight,td.catBottom { background-image: url('../../../templates/subSilver/images/cellpic1.gif') } /* Import the fancy styles for IE only (NS4.x doesn't use the @import function) */ @import url("../../../templates/subSilver/formIE.css"); --> </style> </head> <body bgcolor="#FFFFFF" text="#000000" link="#006699" vlink="#5584AA"> --- NEW FILE: hidden_access.tpl --- <input type="hidden" name="read_access" value="{{READ_ACCESS}}"> <input type="hidden" name="write_access" value="{{WRITE_ACCESS}}"> <input type="hidden" name="root_write" value="{{ROOT_WRITE}}"> <input type="hidden" name="tmp_write" value="{{TMP_WRITE}}"> <input type="hidden" name="chmod_access" value="{{CHMOD_ACCESS}}"> <input type="hidden" name="unlink_access" value="{{UNLINK_ACCESS}}"> <input type="hidden" name="mkdir_access" value="{{MKDIR_ACCESS}}"> <input type="hidden" name="copy_access" value="{{COPY_ACCESS}}"> <input type="hidden" name="language" value="{{LANGUAGE}}"> --- NEW FILE: display_error.tpl --- <br> <table class="forumline" width="100%" cellspacing="1" cellpadding="4" border="0"> <tr> <th>{{EM_err_error}}</th> </tr> <tr> <td class="row1"><table width="100%" cellspacing="0" cellpadding="1" border="0"> <tr> <td> </td> </tr> <tr> <td align="center"><span class="gen"> {{ERROR}}<br> </span></td> </tr> <tr> <td> </td> </tr> </table></td> </tr> </table> <br> --- NEW FILE: ftp_settings.tpl --- <tr> <th colspan="2">{{EM_ftp_title}}</th> </tr> <tr> <td class="row2" align="center" colspan="2"><span class="gen">{{EM_ftp_desc}}</span></td> </tr> <tr> <td class="row1" align="right"><span class="gen">{{EM_ftp_dir}}</span></td> <td class="row2"><input type="text" name="ftp_dir"> <span class="gen">({{DIR_EX}}) (<a href="x" target="_blank">more info</a>)</span></td> </tr> <tr> <td class="row1" align="right"><span class="gen">{{EM_ftp_user}}</span></td> <td class="row2"><input type="text" name="ftp_user"></td> </tr> <tr> <td class="row1" align="right"><span class="gen">{{EM_ftp_pass}}</span></td> <td class="row2"><input type="password" name="ftp_pass"></td> </tr> <tr> <td class="row1" align="right"><span class="gen">{{EM_ftp_host}}</span></td> <td class="row2"><input type="text" name="ftp_host" value="localhost"> <span class="gen">{{EM_ftp_host_info}} (<a href="x" target="_blank">more info</a>)</span></td> </tr> <tr> <th colspan="2">{{EM_ftp_titlex}} Advanced FTP Settings (optional!)</th> </tr> <tr> <td class="row1" align="right"><span class="gen">{{EM_ftp_debug}}</span></td> <td class="row2"> <input type="radio" name="ftp_debug" value="1"><span class="gen">{{EM_yes}}</span> <input type="radio" name="ftp_debug" value="0" checked="checked">{{EM_no}}</span> <span class="gen">{{EM_ftp_debug_not}}</span> </td> </tr> <tr> <td class="row1" align="right"><span class="gen">{{EM_ftp_use_ext}}</span></td> <td class="row2">{{FTP_EXT_MSG}} <input type="radio" name="ftp_type" value="ext" {{EXT_YES}}><span class="gen">{{EM_yes}}</span> <input type="radio" name="ftp_type" value="fsock" {{EXT_NO}}>{{EM_no}}</span> <span class="gen">{{EM_ftp_ext_not}} (<a href="x" target="_blank">more info</a>)</span> {{FTP_EXT_CLOSE}} </td> </tr> <tr> <td class="row1" align="right"><span class="gen">{{EM_ftp_use_extX}} Use Cache</span></td> <td class="row2">{{FTP_CACHE_MSG}} <input type="radio" name="ftp_cache" value="1" {{CACHE_YES}}><span class="gen">{{EM_yes}}</span> <input type="radio" name="ftp_cache" value="0" {{CACHE_NO}}>{{EM_no}}</span> <span class="gen">{{EM_ftp_ext_notX}}(only change if instructed to) (<a href="x" target="_blank">more info</a>)</span> {{FTP_CACHE_CLOSE}} </td> </tr> --- NEW FILE: step1_classic.tpl --- <span class="gen"><a href="easymod_install.php?setup=simple">Simple Mode</a> :: Advanced Mode</span><br> <table width="100%" border="1" cellpadding="5"> <tr> <td valign="top" class="row1" width="290"> <!-- INSTALL INFO --> {{[./templates/install_info.tpl]}} <!-- INSTALL INFO --> <br /> <!-- FILE ACCESS --> {{[./templates/file_access.tpl]}} <!-- FILE ACCESS --> <br> <span class="gen">{{EM_support}}</class><br> </td><td valign="top" class="row2"> <h2>{{EM_Settings}}</h2> <form action="{{U_FORM}}" name="install" method="post"> <table width="100%" cellpadding="2" cellspacing="1" border="0" class="forumline"> <!-- EM PASS --> {{[./templates/empw_settings.tpl]}} <!-- EM PASS --> <tr> <th colspan="2">{{EM_file_title}}</th> </tr> <tr> <td class="row2" align="center" colspan="2"><span class="gen">{{EM_file_desc}}</span></td> </tr> <!-- ////////// REMOVING READ METHOD UNTIL THERE IS MORE THAN ONE OPTION (if ever) ;-) <tr> <td class="row1" align="right"><span class="gen"><a href="{{U_FORM}}?mode=help#topic1" onClick="return helpwin(this)">{{EM_file_reading}}</a></span></td> <td class="row2"><select style="width:140px" name="sel_read">{{SELECT_READ}}</select> <span class="gen">(only option for now)</span></td> </tr> --> <tr> <td class="row1" align="right"><span class="gen"><a href="{{U_FORM}}?mode=help#topic1" onClick="return helpwin(this)">{{EM_file_writing}}</a></span></td> <td class="row2"><select style="width:140px" name="sel_write">{{SELECT_WRITE}}</select> <span class="gen">{{EM_file_alt}}: <a href="{{U_FORM}}?mode=help#topic1" onClick="return helpwin(this)">{{WRITE_REC}}</a></span></td> </tr> <tr> <td class="row1" align="right"><span class="gen"><a href="{{U_FORM}}?mode=help#topic1" onClick="return helpwin(this)">{{EM_file_moving}}</a></span></td> <td class="row2"><select style="width:140px" name="sel_move">{{SELECT_MOVE}}</select> <span class="gen">{{EM_file_alt}}: <a href="{{U_FORM}}?mode=help#topic1" onClick="return helpwin(this)">{{MOVE_REC}}</a></span></td> </tr> <!-- FTP SETTINGS --> {{[./templates/ftp_settings.tpl]}} <!-- FTP SETTINGS --> <tr> <td class="catbottom" align="center" colspan="2"> <!-- HIDDEN ACCESS --> {{[./templates/hidden_access.tpl]}} <!-- HIDDEN ACCESS --> <input type="hidden" name="sel_read" value="server"> <input type="hidden" name="install_step" value="2"> <input class="mainoption" type="submit" value="{{Submit}}" /> <input class="mainoption" type="submit" value="{{Rescan}}" name="rescan"/> </td> </tr> </table> </form> </td></tr> </table> <br> <br> --- NEW FILE: page_footer.tpl --- <!-- START OF FOOTER --> </td></tr> </table> <center><a href="{{LINK}}">{{DEBUG}}</a></center> </td> </tr> </table> </body> </html> --- NEW FILE: display_debug_footer.tpl --- [/quote] </span></td> </tr> <tr> <td> </td> </tr> </table></td> </tr> </table> --- NEW FILE: error.tpl --- {{NO_ERROR_START}} <br> <table class="forumline" width="100%" cellspacing="1" cellpadding="4" border="0"> <tr> <th>{{EM_err_error}}</th> </tr> <tr> <td class="row1"><table width="100%" cellspacing="0" cellpadding="1" border="0"> <tr> <td> </td> </tr> <tr> <td align="center"><span class="gen"> {{ERROR}}<br> </span></td> </tr> <tr> <td> </td> </tr> </table></td> </tr> </table> <br> {{NO_ERROR_END}} --- NEW FILE: step1b_nowrite_nocopy.tpl --- {{NOWRITE_NOCOPY_START}} <tr> <td class="row1" align="left" colspan="2"><span class="gen">{{EM_password_descX}} <br> This is the worst case scenario. EasyMOD does not have permission to either create new files or to replace the old files with the new ones. There are several things you can do:<br> <ol> <li>If you have FTP access, then use the FTP option.</li> {{SAFE_MODE}}<li>Your server has "safe mode" enabled which means EasyMOD cannot automaticly replace your phpBB files. You might consider using <a href="z" target="_blank">chmod</a> or <a href="z" target="_blank">chown</a> to allow access.</li> <li>You might consider using <a href="z" target="_blank">chmod</a> to allow access. However, this is not advised in a shared server environment.</li> <li>Otherwise you will have to download the files and then manually move them into place.</li> </ol> <br> <b>Select One:</b><br> </span></td> </tr> <tr> <td class="row1" align="left"><input type="radio" name="option" value="ftp"></td> <td class="row1" align="left" width="*"><span class="gen">{{EM_yesX}} I'll try using the FTP option. (requires FTP access)</span></td> </tr> <tr> <td class="row1" align="left"><input type="radio" name="option" value="idunno"></td> <td class="row1" align="left" width="*"><span class="gen">{{EM_yesX}} I have now modified my file permissions, try rescanning to see if EasyMOD has access.</span></td> </tr> <tr> <td class="row1" align="left"><input type="radio" name="option" value="download"></td> <td class="row1" align="left" width="*"><span class="gen">{{EM_yesX}} I will have to download the files and manually move them into place :(</span></td> </tr> </tr> <td class="row1" align="left"><input type="radio" name="option" value="advanced"></td> <td class="row1" align="left" width="*"><span class="gen">{{EM_yesX}} I'd like to select something else. (advanced mode)</span></td> <tr> <tr> <td class="row1" align="center" colspan="2"><br></td> </tr> {{NOWRITE_NOCOPY_END}} |
From: Brendan K. <bk...@us...> - 2005-04-24 15:00:02
|
Update of /cvsroot/easymod/easymod2/mods/easymod/em_includes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13181/mods/easymod/em_includes Added Files: em_cipher.php em_ftp.php em_functions.php em_modio.php em_schema.php emver.php index.htm Log Message: Just checking in a vanilla 0.1.13. Work shall commence soon :) --- NEW FILE: emver.php --- <?php /*************************************************************************** * empw.php * ------------------- * begin : Saturday, Dec 13, 2003 * copyright : (C) 2003 thru 2004 by Nuttzy - Craig Nuttall * email : nu...@bl... * * $Id: emver.php,v 1.1 2005/04/24 14:59:53 bkettle Exp $ * * ***************************************************************************/ /*************************************************************************** * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * ***************************************************************************/ /* NOTE: I CAN'T REMEMBER IF I FINISHED THIS OR IF IT EVEN WORKS! - 2004/08/08 */ // once moved to the admin dir, don't interfer with building the index if (!empty($setmodules)) { return; } define('IN_PHPBB', 1); // // Let's set the root dir for phpBB // $phpbb_root_path = './../../'; require($phpbb_root_path . 'extension.inc'); include($phpbb_root_path . 'config.'.$phpEx); include($phpbb_root_path . 'includes/constants.'.$phpEx); include($phpbb_root_path . 'includes/functions.'.$phpEx); include($phpbb_root_path . 'includes/functions_admin.'.$phpEx); include($phpbb_root_path . 'includes/db.'.$phpEx); include($phpbb_root_path . '/admin/em_includes/em_ftp.' . $phpEx) ; include($phpbb_root_path . '/admin/em_includes/em_modio.' . $phpEx) ; include($phpbb_root_path . '/admin/em_includes/em_functions.' . $phpEx) ; // look in the config table to get the EM version function get_em_version() { global $db ; // grab the EM version $sql = "SELECT * FROM " . CONFIG_TABLE . " WHERE config_name = 'EM_version'" ; if( !$result = $db->sql_query($sql) ) { message_die(GENERAL_ERROR, $lang['EM_err_config_info'], '', __LINE__, __FILE__, $sql); } // return the version or nothing if ( $row = $db->sql_fetchrow($result)) { return $row['config_value'] ; } else { return '' ; } } // get our values $version = ( !empty($HTTP_POST_VARS['version']) ) ? htmlspecialchars($HTTP_POST_VARS['version']) : '' ; $mode = ( !empty($HTTP_POST_VARS['mode']) ) ? htmlspecialchars($HTTP_POST_VARS['mode']) : '' ; // use the SS css file to pretty things up; should work fine even if the css file is not found echo '<link rel="stylesheet" href="../../templates/subSilver/subSilver.css" type="text/css">' . "\n" ; // // update the EM settings; they already filled out the settings page and hit submit // if ($mode == 'update') { // password settings $em_version = (isset($HTTP_POST_VARS['em_version'])) ? htmlspecialchars( $HTTP_POST_VARS['em_version']) : '' ; // update the version em_db_update( 'EM_version', $em_version) ; ?> <table cellpadding="2" cellspacing="1" border="0" class="forumline" align="center"> <tr> <th>Success</th> </tr> <tr> <td class="row1" align="center"><span class="gen"> <br> Your EasyMOD Version has been updated successfully. <br> <br> <b>You should now rename or delete emver.php to prevent unauthorized use.</b> <br> <br></span></td> </tr> </table> <?php } // // display the settings page // if ($mode == '') { ?> <br> <h3>Change EasyMOD version</h3> <p><span class="gen">This proggie is typically used if you need to reinstall the current version of EasyMOD.</span></p> <form action="emver.php" name="settings" method="post"> <table width="100%" cellpadding="2" cellspacing="1" border="0" class="forumline"> <tr> <th colspan="2">EasyMOD Version</th> </tr> <tr> <td class="row2" align="center" colspan="2"><span class="gen">The EasyMOD Version setting serves no real purpose other than to prevent duplicate installations of EM. You should only change it if you need to reinstall the same version of EasyMOD.</span></td> </tr> <tr> <td class="row1" align="right"><span class="gen">Current Version</span></td> <td class="row2"><input type="textbox" name="em_version" value="<?php echo get_em_version(); ?>"></td> </tr> <tr> <td class="catbottom" align="center" colspan="2"> <input type="hidden" name="mode" value="update"> <input class="mainoption" type="submit" value="Submit" /> </td> </tr> </table> </form> <?php } ?> --- NEW FILE: em_schema.php --- <?php /*************************************************************************** * em_schema.php * ------------------- * begin : Wednesday, May 16, 2002 * copyright : (C) 2002-2004 by Nuttzy - Craig Nuttall * email : nu...@bl... * * $Id: em_schema.php,v 1.1 2005/04/24 14:59:53 bkettle Exp $ * * ***************************************************************************/ /*************************************************************************** * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. [...1207 lines suppressed...] // if we've got an error, then make like a baby and head out if ($error != '') { $error .= "<br><br>SQL Line:<br>$message" ; return ; } // add the sql lines for this command into the overall list for ($i=0; $i<count($sql); $i++) { $return_sql[] = $sql[$i] ; } } return $return_sql ; } ?> --- NEW FILE: em_modio.php --- <?php /*************************************************************************** * em_modio.php * ------------------- * begin : Tuesday, Dec 10, 2003 * copyright : (C) 2002 - 2004 Nuttzy - Craig Nuttall * email : nu...@bl... * * $Id: em_modio.php,v 1.1 2005/04/24 14:59:53 bkettle Exp $ * * ***************************************************************************/ /*************************************************************************** * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * ***************************************************************************/ // // THE PURPOSE of this module is to handle all the file i/o for EM. Files are always read // using fopen. They are written and moved using fopen, PHP copy command, /tmp file, FTP using // fsockopen, FTP using the PHP Extension, file download to client, display file to screen, and // generating a sh or bat file to execute moves after processing. // /*************************************************************************** * mod_io class * ------------------- * begin : Sunday, Mar 31, 2002 * copyright : (C) 2002 thru 2004 Nuttzy * email : pkt...@bl... * ***************************************************************************/ class mod_io { // file and filepath to MOD var $filename ; // name of the phpBB core file being edited var $path ; // path of the phpBB core file being edited // MOD'ing methods var $read_method ; var $write_method ; var $move_method ; // write method tools var $pfile ; // file pointer var $afile = array() ; // array of strings to make a file // read method tools var $pread_file ; // file pointer to the phpBB core file being read (readonly) // error handling var $err_msg ; // ftp info (if needed) var $ftp_user ; var $ftp_pass ; var $ftp_path ; var $ftp_host ; var $ftp_type ; // using the PHP FTP extension? var $ftp_cache ; // with ext, writing to /tmp or admin/em_includes/cache? var $emftp ; // // member functions // // get sent the method and ftp info (install proggie) function mod_io( $filename, $path, $read_method, $write_method, $move_method, $ftp_user, $ftp_pass, $ftp_path, $ftp_host, $ftp_type, $ftp_cache) { $this->filename = $filename ; $this->path = $path ; $this->read_method = $read_method ; $this->write_method = $write_method ; $this->move_method = $move_method ; $this->ftp_user = $ftp_user ; $this->ftp_pass = $ftp_pass ; $this->ftp_path = $ftp_path ; $this->ftp_host = $ftp_host ; $this->ftp_type = $ftp_type ; $this->ftp_cache = $ftp_cache ; $this->emftp = NULL ; } // make appropriate dirs for the COPY command function modio_mkdirs_copy( $path) { global $phpbb_root_path ; // we only create actually dirs if we are writing to server, so bail if that is not the method if (( $this->move_method != 'copy') && ( $this->move_method != 'ftpa')) { return true ; } // make sure we have something to create! else if ($path == '') { return true ; } // set up the path; relative to EM execution point, starting at root $root_path = ( substr($phpbb_root_path, 0, 2) == './') ? substr($phpbb_root_path, 2) : $phpbb_root_path ; $copy_path = $root_path . $path ; // create dirs for processing the file (server) if ( $this->move_method == 'copy') { $dir_path = '' ; $splitarray = explode('/', $copy_path) ; for ($idir=0; $idir<count($splitarray)-1; $idir++) { $dir_path .= trim($splitarray[$idir]) ; // don't bother making ../ ;-) if ($splitarray[$idir] == '..') { // do nothing } else if (!file_exists($dir_path)) { // use the mkdir command mkdir($dir_path, 0777); chmod($dir_path, 0777); } $dir_path .= '/' ; } } // create dirs for processing the file (buffer+ftp) else if ( $this->move_method == 'ftpa') { // $path = ( substr($path, 0, 3) == '../') ? substr($path, 3) : $path ; // make the dir tree (its a bit complex); all error handling occurs in the function if (!$this->emftp->ftp_mkdir_struct_copy( $path, $this->err_msg)) { $this->err_msg = 'modio_mkdirs_copy()->' . $this->err_msg ; return false ; } } return true ; } // make appropriate dirs using the appropriate method function modio_mkdirs( $process) { global $install_path ; // we only create actually dirs if we are writing to server, so bail if that is not the method if (( $this->write_method != 'server') && ( $this->write_method != 'ftpb')) { return true ; } // we may or may not add 'process/' in the path depending on if it is a post_process.sh(.bat) file $new_path = $install_path . $process . $this->path ; $backup_path = $install_path . (($process == '') ? '' : 'backups/') . $this->path ; // create dirs for processing the file (server) if ( $this->write_method == 'server') { $dir_path = '' ; $splitarray = explode('/', $new_path) ; for ($idir=0; $idir<count($splitarray)-1; $idir++) { $dir_path .= trim($splitarray[$idir]) ; if (!file_exists($dir_path)) { // use the mkdir command mkdir($dir_path, 0777); chmod($dir_path, 0777); } $dir_path .= '/' ; } } // create dirs for processing the file (buffer+ftp) else if ( $this->write_method == 'ftpb') { // make the dir tree (its a bit complex); all error handling occurs in the function if (!$this->emftp->ftp_mkdir_struct( $new_path, $this->err_msg)) { $this->err_msg = 'modio_mkdirs[1]->' . $this->err_msg ; return false ; } } // create dirs for backing up the file if ( $this->write_method == 'server') { $dir_path = '' ; $splitarray = explode('/', $backup_path) ; for ($idir=0; $idir<count($splitarray)-1; $idir++) { $dir_path .= trim($splitarray[$idir]) ; if (!file_exists($dir_path)) { mkdir($dir_path, 0777); chmod($dir_path, 0777); } $dir_path .= '/' ; } } // create dirs for backing up the file (buffer+ftp) else if ( $this->write_method == 'ftpb') { // make the dir tree (its a bit complex); all error handling occurs in the function if (!$this->emftp->ftp_mkdir_struct( $backup_path, $this->err_msg)) { $this->err_msg = 'modio_mkdirs[2]->' . $this->err_msg ; return false ; } } return true ; } // open the designated stream for writing function modio_open( $create_command = false) { global $lang, $phpbb_root_path, $install_path ; // we'll handle our on errors $old_error_reporting = error_reporting(0) ; ////////// NOT WORRYING ABOUT READ LOCAL YET!!! // open file on server for readonly access (if not making a config file) if (!$create_command) { if (!$this->pread_file = fopen ( $phpbb_root_path . $this->path . trim($this->filename), 'r')) { // restore error handling error_reporting($old_error_reporting); $this->err_msg = 'modio_open[1]<br><br>' ; $this->err_msg .= sprintf( $lang['EM_modio_open_read'], $this->path . trim($this->filename)) ; return false ; } } // restore error handling error_reporting($old_error_reporting); $ext = ($create_command) ? '' : '.txt' ; $process = ($create_command) ? '' : 'processed/' ; // setup dirs if necessary if (!$create_command) { if (!$this->modio_mkdirs( $process)) { $this->err_msg = 'modio_open[2]->' . $this->err_msg ; return false ; } } // writing on the server if ( $this->write_method == 'server') { // we'll handle our on errors $old_error_reporting = error_reporting(0) ; // open the file on the server if ( $this->pfile = fopen( $install_path . $process . $this->path . trim($this->filename) . $ext, 'w')) { // restore error handling error_reporting($old_error_reporting); return true ; } // open failed else { // restore error handling error_reporting($old_error_reporting); $this->err_msg = 'modio_open[3]<br><br>' ; $this->err_msg .= sprintf( $lang['EM_modio_open_write'], $install_path . $process . $this->path . trim($this->filename). $ext); return false ; } } // writing to an array buffer and then ftping on the server else if ( $this->write_method == 'ftpb') { $this->afile = array() ; return true ; } // assembling for download or for screen display else if ( ($this->write_method == 'local') || ($this->write_method == 'screen')) { $this->afile = array() ; return true ; } // what the heck is going on! else { $this->err_msg = $lang['EM_modio_open_none'] ; return false ; } } // add text line(s) to stream function modio_write( $text) { // writing on the server in mods dir if ($this->write_method == 'server') { fwrite( $this->pfile, $text ) ; } // assembling for ftp buffer, download, or for screen display else { $this->afile[] = $text ; } } // close it down and take care of business function modio_close( $create_command = false) { global $lang, $script_path, $install_path ; // close the read file on the server if (!$create_command) { fclose( $this->pread_file) ; } // writing on the server if ( $this->write_method == 'server') { fclose( $this->pfile) ; // if it is a command file, then we don't have processed/ in the dir path, and we don't append .txt if ($create_command) { chmod( $install_path . $this->path . trim($this->filename), 0777 ) ; } // normal files: written in the processed/ dir; add .txt on the end for security (not executable) else { chmod( $install_path . 'processed/' . $this->path . trim($this->filename) . '.txt', 0777 ) ; } } // write the array buffer to a file via ftp else if ( $this->write_method == 'ftpb') { // determing the destination path and filename if ($create_command) { $to_dir = $script_path . '/' . $install_path . $this->path ; $to_file = $this->filename ; } else { $to_dir = $script_path . '/' . $install_path . 'processed/' . $this->path ; $to_file = $this->filename . '.txt' ; } // leave some breadcrumbs so we can cd back to phpbb_root $return_path = '' ; $split_array = explode('/', $to_dir) ; for ($count=0; $count<count($split_array); $count++) { if (($split_array[$count] != '.') && ($split_array[$count] != '')) { $return_path .= '../' ; } } // we must first CD to the dir before putting the file (found in 0.0.9) if (!$this->emftp->ftp_chdir( $to_dir)) { // we failed; don't close the connection though, assume it will be cleaned up later $err_msg = sprintf( $lang['EM_modio_close_chdir'], $to_dir) ; // we do not wish to overwrite a pre-existing error message. close is often called after handling // another error. If this is the case then append this message on the end of that one. $this->err_msg = ($this->err_msg == '') ? "modio_close[1]<br><br>$err_msg" : 'modio_close[1]->' . $this->err_msg . '<br><br><b>' . $lang['EM_err_secondary'] . '<b><br>' . $err_msg ; return false ; } // assume the ftp connection has already been prepped; dump the array to a file if (!$this->emftp->ftp_put_array( $to_file, $this->afile, $this->ftp_cache)) { // we failed; don't close the connection though, assume it will be cleaned up later $err_msg = sprintf( $lang['EM_modio_close_ftp'], $to_dir . $to_file) ; // we do not wish to overwrite a pre-existing error message. close is often called after handling // another error. If this is the case then append this message on the end of that one. $this->err_msg = ($this->err_msg == '') ? "modio_close[2]<br><br>$err_msg" : 'modio_close[2]->' . $this->err_msg . '<br><br><b>' . $lang['EM_err_secondary'] . '<b><br>' . $err_msg ; return false ; } // we must now cd back from whence we came ;-) (found in 0.0.9) if (!$this->emftp->ftp_chdir( $return_path)) { // we failed; don't close the connection though, assume it will be cleaned up later $err_msg = sprintf( $lang['EM_modio_close_chdir'], $return_path) ; // we do not wish to overwrite a pre-existing error message. close is often called after handling // another error. If this is the case then append this message on the end of that one. $this->err_msg = ($this->err_msg == '') ? "modio_close[3]<br><br>$err_msg" : 'modio_close[3]->' . $this->err_msg . '<br><br><b>' . $lang['EM_err_secondary'] . '<b><br>' . $err_msg ; return false ; } } // assembling for download or for screen display else if ( $this->write_method == 'local') { // do nothing } // display on screen else { // do nothing } return true ; } // make ftp connection if needed; generally this will be called by the command file mod_io object // before batch processing function modio_prep( $action, $debug=false) { global $lang ; // called when moving a file into its final place, or when writing the buffer via ftp // using the FTP class if ((($action == 'move') && ($this->move_method == 'ftpa')) || (($action == 'write') && ($this->write_method == 'ftpb'))) { $this->emftp = new emftp( $this->ftp_type, $debug) ; if (!$this->emftp->ftp_connect( $this->ftp_host)) { $this->err_msg = 'modio_prep[1]<br><br>' ; $this->err_msg .= $lang['EM_modio_prep_conn'] ; return false ; } else if (!$this->emftp->ftp_login( $this->ftp_user, $this->ftp_pass)) { $this->emftp->ftp_quit(); $this->err_msg = 'modio_prep[2]<br><br>' ; $this->err_msg .= $lang['EM_modio_prep_login'] ; return false ; } // CD to the phpBB root then we will always know the relative dir we are in (added 0.0.9c) else if (!$this->emftp->ftp_chdir( $this->ftp_path)) { $this->emftp->ftp_quit(); $this->err_msg = 'modio_prep[3]<br><br>' ; $this->err_msg .= $lang['EM_modio_prep_chdir'] ; return false ; } } return true ; } // close ftp connection if needed; generall this will be called by the command file mod_io object // before batch processing function modio_cleanup( $action) { if ((($action == 'move') && ($this->move_method == 'ftpa')) || (($action == 'write') && ($this->write_method == 'ftpb'))) { $this->emftp->ftp_quit(); } } // close it down and take care of business function modio_move( $to, $from, $mod_count, $link, $type) { global $lang, $script_path, $phpbb_root_path, $install_path ; $this->err_msg = '' ; // everything enters relative to the exec script directory; cleanup some vars $root = ( substr($phpbb_root_path, 0, 2) == './') ? substr($phpbb_root_path, 2) : $phpbb_root_path ; $ipath = ( substr($install_path, 0, 2) == './') ? substr($install_path, 2) : $install_path ; // // copy access on the server // if ( $this->move_method == 'copy') { // make file paths relative to the EM or installer execution point $to = ( substr($to, 0, 9) == '../../../') ? $root . substr($to, 9) : $ipath . $to ; $from = ( substr($from, 0, 9) == '../../../') ? $root . substr($from, 9) : $ipath . $from ; ////////////////////// ////////////////////// ////////////////////// BUG! should be able to do *.* and should also make new dirs if needed ////////////////////// ////////////////////// $split=explode('/', $from) ; if ($split[count($split)-1] == '*.*') { return '<b>' . $lang['EM_pp_manual'] . '</b>' ; } // return a success message if the copy works if ( copy( $from, $to)) { return '<b>' . $lang['EM_pp_complete'] . '</b>' ; } // we failed, oh dear else { $this->err_msg = 'modio_move[1]<br><br>' ; $this->err_msg .= sprintf( $lang['EM_modio_move_copy'], $from, $to) ; return '' ; } } // // FTP access to the server // else if ( $this->move_method == 'ftpa') { // make the "to" file path relative to the phpBB root and the "from" relative to EM runtime $to = ( substr($to, 0, 9) == '../../../') ? substr($to, 9) : $script_path . '/' . $ipath . $to ; $from = ( substr($from, 0, 9) == '../../../') ? substr($from, 9) : $script_path . '/' . $ipath . $from ; ////////////////////// ////////////////////// ////////////////////// BUG! should be able to do *.* and should also make new dirs if needed ////////////////////// ////////////////////// $split=explode('/', $from) ; if ($split[count($split)-1] == '*.*') { return '<b>' . $lang['EM_pp_manual'] . '</b>' ; } // leave some breadcrumbs so we can cd back to phpbb_root $return_path = '' ; $to_dir = '' ; $split_array = explode('/', $to) ; for ($count=0; $count<count($split_array)-1; $count++) { if ($split_array[$count] != '') { $return_path .= '../' ; $to_dir .= $split_array[$count] . '/' ; } } $to_dir = substr($to_dir, 0, strlen($to_dir)-1) ; // remove trailing slash $to_file = $split_array[count($split_array)-1] ; // get the file extension $file_extension = substr( $to_file, strpos($to_file, '.')+1) ; // I lifted this list from the attachment MOD and it saved me a lot of time. Thank you Acyd Burn! $extensions = array('ace', 'ai', 'aif', 'aifc', 'aiff', 'ar', 'asf', 'asx', 'au', 'avi', 'doc', 'dot', 'gif', 'gtar', 'gz', 'ivf', 'jpeg', 'jpg', 'm3u', 'mid', 'midi', 'mlv', 'mp2', 'mp3', 'mp2v', 'mpa', 'mpe', 'mpeg', 'mpg', 'mpv2', 'pdf', 'png', 'ppt', 'ps', 'rar', 'rm', 'rmi', 'snd', 'swf', 'tga', 'tif', 'wav', 'wax', 'wm', 'wma', 'wmv', 'wmx', 'wvx', 'xls', 'zip') ; $is_binary = false ; // see if the extension is in our list of binary types // damn! i wanted to use array_key_exists, but that is a PHP 4 function :( for ($count=0; $count<count($extensions); $count++) { // its a binary so mark it as such if ($file_extension == $extensions[$count]) { $is_binary = true ; break ; } } // we must first CD to the dir before putting the file (found in 0.0.9) if ( $to_dir == '') { // do nothing } else if (!$this->emftp->ftp_chdir( $to_dir)) { // we failed; don't close the connection though, assume it will be cleaned up later $this->err_msg = 'modio_move[2]<br><br>' ; $this->err_msg .= sprintf( $lang['EM_modio_mkdir_chdir'], $to_dir, $this->emftp->ftp_pwd()) ; return '' ; } // move the file into place, throw an error if we fail // bases on the extension, move as binary or ascii (0.0.10) if (!$this->emftp->ftp_put( $to_file, $root . $from, $is_binary)) { $this->err_msg = 'modio_move[3]<br><br>' ; $this->err_msg .= sprintf( $lang['EM_modio_move_ftpa'], $from, $to_file) ; return '' ; } // CD back from whence we came ;-) if ( $return_path == '') { // do nothing } else if (!$this->emftp->ftp_chdir( $return_path)) { // we failed; don't close the connection though, assume it will be cleaned up later $this->err_msg = 'modio_move[4]<br><br>' ; $this->err_msg = sprintf( $lang['EM_modio_mkdir_chdir'], $return_path, $this->emftp->ftp_pwd()) ; return '' ; } return '<b>' . $lang['EM_pp_complete'] . '</b>' ; } // they be running the script, so nothing to do except return that it is ready to go else if ( $this->move_method == 'exec') { return '<b>' . $lang['EM_pp_ready'] . '</b>' ; } /////////////////////////// /////////////////////////// /////////////////////////// there should really be a case to handle write_method is unknown /////////////////////////// /////////////////////////// // manually loading, so either writing to screen or downloading locally depending upon write method else { // downloading; return a form button that will activate the download of the file from the server if ($this->write_method == 'local') { // a backup file is the "from" and a download file is the "to" $button = '<input type="hidden" name="file' . $mod_count . '" value="' . $to . '">' . "\n" ; if ($type == $lang['EM_pp_backup']) { $button = '<input type="hidden" name="file' . $mod_count . '" value="'. $from .'">' . "\n" ; } $button .= '<input class="mainoption" type="submit" name="submitfile' . $mod_count . '" value="' . $type . '" />' . "\n" ; return $button ; } // writing to screen; return a link that will pop open a new window with the file contents else if ($this->write_method == 'screen') { $link = '<a href="' . $link . '" target="_blank">' . $type . '</a>' ; return $link ; } } } } ?> --- NEW FILE: em_functions.php --- <?php /*************************************************************************** * em_functions.php * ------------------- * begin : Sunday, Mar 31, 2002 * copyright : (C) 2002-2004 by Nuttzy - Craig Nuttall * email : nu...@bl... * * $Id: em_functions.php,v 1.1 2005/04/24 14:59:53 bkettle Exp $ * * ***************************************************************************/ /*************************************************************************** * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. [...1233 lines suppressed...] 'to_path' => $files[$x]['path'], 'to_file' => $files[$x]['filename']) ; } } // everything else else { // make any dirs we may need $result_files[] = array('from_path' => $tmp_from_dir, 'from_file' => $tmp_file, 'to_path' => $tmp_to_dir, 'to_file' => $tmp_to_file) ; } return $result_files ; } ?> --- NEW FILE: em_cipher.php --- <?php /*************************************************************************** * em_cipher.php * ------------------- * begin : Tuesday, Dec 10, 2003 * copyright : (C) 2002 - 2004 by Nuttzy - Craig Nuttall * email : nu...@bl... * * $Id: em_cipher.php,v 1.1 2005/04/24 14:59:53 bkettle Exp $ * * ***************************************************************************/ /*************************************************************************** * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * ***************************************************************************/ // // THE PURPOSE of this module is purely to encrypt the FTP password. Since I can't // be sure what PHP libraries are installed, I cannot use mcrypt. Thus the addition // of this 29k file just to make a password safe. Oh well, EM spares no expense ;-) // /** * The Cipher_blowfish class implements the Cipher interface enryption data * using the Blowfish algorithm. * * Copyright 2002-2003 Mike Cochrane <mi...@gr...> * * See the enclosed file COPYING for license information (LGPL). If you * did not receive this file, see http://www.fsf.org/copyleft/lgpl.html. * * @author Mike Cochrane <mi...@gr...> * @version $Revision: 1.1 $ * //// //// NOTE: a few small cosmetic changes made by Nuttzy //// * */ class Cipher_blowfish { /* Pi Array */ var $p = array( 0x243F6A88, 0x85A308D3, 0x13198A2E, 0x03707344, 0xA4093822, 0x299F31D0, 0x082EFA98, 0xEC4E6C89, 0x452821E6, 0x38D01377, 0xBE5466CF, 0x34E90C6C, 0xC0AC29B7, 0xC97C50DD, 0x3F84D5B5, 0xB5470917, 0x9216D5D9, 0x8979FB1B); /* S Boxes */ var $s1 = array( 0xD1310BA6, 0x98DFB5AC, 0x2FFD72DB, 0xD01ADFB7, 0xB8E1AFED, 0x6A267E96, 0xBA7C9045, 0xF12C7F99, 0x24A19947, 0xB3916CF7, 0x0801F2E2, 0x858EFC16, 0x636920D8, 0x71574E69, 0xA458FEA3, 0xF4933D7E, 0x0D95748F, 0x728EB658, 0x718BCD58, 0x82154AEE, 0x7B54A41D, 0xC25A59B5, 0x9C30D539, 0x2AF26013, 0xC5D1B023, 0x286085F0, 0xCA417918, 0xB8DB38EF, 0x8E79DCB0, 0x603A180E, 0x6C9E0E8B, 0xB01E8A3E, 0xD71577C1, 0xBD314B27, 0x78AF2FDA, 0x55605C60, 0xE65525F3, 0xAA55AB94, 0x57489862, 0x63E81440, 0x55CA396A, 0x2AAB10B6, 0xB4CC5C34, 0x1141E8CE, 0xA15486AF, 0x7C72E993, 0xB3EE1411, 0x636FBC2A, 0x2BA9C55D, 0x741831F6, 0xCE5C3E16, 0x9B87931E, 0xAFD6BA33, 0x6C24CF5C, 0x7A325381, 0x28958677, 0x3B8F4898, 0x6B4BB9AF, 0xC4BFE81B, 0x66282193, 0x61D809CC, 0xFB21A991, 0x487CAC60, 0x5DEC8032, 0xEF845D5D, 0xE98575B1, 0xDC262302, 0xEB651B88, 0x23893E81, 0xD396ACC5, 0x0F6D6FF3, 0x83F44239, 0x2E0B4482, 0xA4842004, 0x69C8F04A, 0x9E1F9B5E, 0x21C66842, 0xF6E96C9A, 0x670C9C61, 0xABD388F0, 0x6A51A0D2, 0xD8542F68, 0x960FA728, 0xAB5133A3, 0x6EEF0B6C, 0x137A3BE4, 0xBA3BF050, 0x7EFB2A98, 0xA1F1651D, 0x39AF0176, 0x66CA593E, 0x82430E88, 0x8CEE8619, 0x456F9FB4, 0x7D84A5C3, 0x3B8B5EBE, 0xE06F75D8, 0x85C12073, 0x401A449F, 0x56C16AA6, 0x4ED3AA62, 0x363F7706, 0x1BFEDF72, 0x429B023D, 0x37D0D724, 0xD00A1248, 0xDB0FEAD3, 0x49F1C09B, 0x075372C9, 0x80991B7B, 0x25D479D8, 0xF6E8DEF7, 0xE3FE501A, 0xB6794C3B, 0x976CE0BD, 0x04C006BA, 0xC1A94FB6, 0x409F60C4, 0x5E5C9EC2, 0x196A2463, 0x68FB6FAF, 0x3E6C53B5, 0x1339B2EB, 0x3B52EC6F, 0x6DFC511F, 0x9B30952C, 0xCC814544, 0xAF5EBD09, 0xBEE3D004, 0xDE334AFD, 0x660F2807, 0x192E4BB3, 0xC0CBA857, 0x45C8740F, 0xD20B5F39, 0xB9D3FBDB, 0x5579C0BD, 0x1A60320A, 0xD6A100C6, 0x402C7279, 0x679F25FE, 0xFB1FA3CC, 0x8EA5E9F8, 0xDB3222F8, 0x3C7516DF, 0xFD616B15, 0x2F501EC8, 0xAD0552AB, 0x323DB5FA, 0xFD238760, 0x53317B48, 0x3E00DF82, 0x9E5C57BB, 0xCA6F8CA0, 0x1A87562E, 0xDF1769DB, 0xD542A8F6, 0x287EFFC3, 0xAC6732C6, 0x8C4F5573, 0x695B27B0, 0xBBCA58C8, 0xE1FFA35D, 0xB8F011A0, 0x10FA3D98, 0xFD2183B8, 0x4AFCB56C, 0x2DD1D35B, 0x9A53E479, 0xB6F84565, 0xD28E49BC, 0x4BFB9790, 0xE1DDF2DA, 0xA4CB7E33, 0x62FB1341, 0xCEE4C6E8, 0xEF20CADA, 0x36774C01, 0xD07E9EFE, 0x2BF11FB4, 0x95DBDA4D, 0xAE909198, 0xEAAD8E71, 0x6B93D5A0, 0xD08ED1D0, 0xAFC725E0, 0x8E3C5B2F, 0x8E7594B7, 0x8FF6E2FB, 0xF2122B64, 0x8888B812, 0x900DF01C, 0x4FAD5EA0, 0x688FC31C, 0xD1CFF191, 0xB3A8C1AD, 0x2F2F2218, 0xBE0E1777, 0xEA752DFE, 0x8B021FA1, 0xE5A0CC0F, 0xB56F74E8, 0x18ACF3D6, 0xCE89E299, 0xB4A84FE0, 0xFD13E0B7, 0x7CC43B81, 0xD2ADA8D9, 0x165FA266, 0x80957705, 0x93CC7314, 0x211A1477, 0xE6AD2065, 0x77B5FA86, 0xC75442F5, 0xFB9D35CF, 0xEBCDAF0C, 0x7B3E89A0, 0xD6411BD3, 0xAE1E7E49, 0x00250E2D, 0x2071B35E, 0x226800BB, 0x57B8E0AF, 0x2464369B, 0xF009B91E, 0x5563911D, 0x59DFA6AA, 0x78C14389, 0xD95A537F, 0x207D5BA2, 0x02E5B9C5, 0x83260376, 0x6295CFA9, 0x11C81968, 0x4E734A41, 0xB3472DCA, 0x7B14A94A, 0x1B510052, 0x9A532915, 0xD60F573F, 0xBC9BC6E4, 0x2B60A476, 0x81E67400, 0x08BA6FB5, 0x571BE91F, 0xF296EC6B, 0x2A0DD915, 0xB6636521, 0xE7B9F9B6, 0xFF34052E, 0xC5855664, 0x53B02D5D, 0xA99F8FA1, 0x08BA4799, 0x6E85076A); var $s2 = array( 0x4B7A70E9, 0xB5B32944, 0xDB75092E, 0xC4192623, 0xAD6EA6B0, 0x49A7DF7D, 0x9CEE60B8, 0x8FEDB266, 0xECAA8C71, 0x699A17FF, 0x5664526C, 0xC2B19EE1, 0x193602A5, 0x75094C29, 0xA0591340, 0xE4183A3E, 0x3F54989A, 0x5B429D65, 0x6B8FE4D6, 0x99F73FD6, 0xA1D29C07, 0xEFE830F5, 0x4D2D38E6, 0xF0255DC1, 0x4CDD2086, 0x8470EB26, 0x6382E9C6, 0x021ECC5E, 0x09686B3F, 0x3EBAEFC9, 0x3C971814, 0x6B6A70A1, 0x687F3584, 0x52A0E286, 0xB79C5305, 0xAA500737, 0x3E07841C, 0x7FDEAE5C, 0x8E7D44EC, 0x5716F2B8, 0xB03ADA37, 0xF0500C0D, 0xF01C1F04, 0x0200B3FF, 0xAE0CF51A, 0x3CB574B2, 0x25837A58, 0xDC0921BD, 0xD19113F9, 0x7CA92FF6, 0x94324773, 0x22F54701, 0x3AE5E581, 0x37C2DADC, 0xC8B57634, 0x9AF3DDA7, 0xA9446146, 0x0FD0030E, 0xECC8C73E, 0xA4751E41, 0xE238CD99, 0x3BEA0E2F, 0x3280BBA1, 0x183EB331, 0x4E548B38, 0x4F6DB908, 0x6F420D03, 0xF60A04BF, 0x2CB81290, 0x24977C79, 0x5679B072, 0xBCAF89AF, 0xDE9A771F, 0xD9930810, 0xB38BAE12, 0xDCCF3F2E, 0x5512721F, 0x2E6B7124, 0x501ADDE6, 0x9F84CD87, 0x7A584718, 0x7408DA17, 0xBC9F9ABC, 0xE94B7D8C, 0xEC7AEC3A, 0xDB851DFA, 0x63094366, 0xC464C3D2, 0xEF1C1847, 0x3215D908, 0xDD433B37, 0x24C2BA16, 0x12A14D43, 0x2A65C451, 0x50940002, 0x133AE4DD, 0x71DFF89E, 0x10314E55, 0x81AC77D6, 0x5F11199B, 0x043556F1, 0xD7A3C76B, 0x3C11183B, 0x5924A509, 0xF28FE6ED, 0x97F1FBFA, 0x9EBABF2C, 0x1E153C6E, 0x86E34570, 0xEAE96FB1, 0x860E5E0A, 0x5A3E2AB3, 0x771FE71C, 0x4E3D06FA, 0x2965DCB9, 0x99E71D0F, 0x803E89D6, 0x5266C825, 0x2E4CC978, 0x9C10B36A, 0xC6150EBA, 0x94E2EA78, 0xA5FC3C53, 0x1E0A2DF4, 0xF2F74EA7, 0x361D2B3D, 0x1939260F, 0x19C27960, 0x5223A708, 0xF71312B6, 0xEBADFE6E, 0xEAC31F66, 0xE3BC4595, 0xA67BC883, 0xB17F37D1, 0x018CFF28, 0xC332DDEF, 0xBE6C5AA5, 0x65582185, 0x68AB9802, 0xEECEA50F, 0xDB2F953B, 0x2AEF7DAD, 0x5B6E2F84, 0x1521B628, 0x29076170, 0xECDD4775, 0x619F1510, 0x13CCA830, 0xEB61BD96, 0x0334FE1E, 0xAA0363CF, 0xB5735C90, 0x4C70A239, 0xD59E9E0B, 0xCBAADE14, 0xEECC86BC, 0x60622CA7, 0x9CAB5CAB, 0xB2F3846E, 0x648B1EAF, 0x19BDF0CA, 0xA02369B9, 0x655ABB50, 0x40685A32, 0x3C2AB4B3, 0x319EE9D5, 0xC021B8F7, 0x9B540B19, 0x875FA099, 0x95F7997E, 0x623D7DA8, 0xF837889A, 0x97E32D77, 0x11ED935F, 0x16681281, 0x0E358829, 0xC7E61FD6, 0x96DEDFA1, 0x7858BA99, 0x57F584A5, 0x1B227263, 0x9B83C3FF, 0x1AC24696, 0xCDB30AEB, 0x532E3054, 0x8FD948E4, 0x6DBC3128, 0x58EBF2EF, 0x34C6FFEA, 0xFE28ED61, 0xEE7C3C73, 0x5D4A14D9, 0xE864B7E3, 0x42105D14, 0x203E13E0, 0x45EEE2B6, 0xA3AAABEA, 0xDB6C4F15, 0xFACB4FD0, 0xC742F442, 0xEF6ABBB5, 0x654F3B1D, 0x41CD2105, 0xD81E799E, 0x86854DC7, 0xE44B476A, 0x3D816250, 0xCF62A1F2, 0x5B8D2646, 0xFC8883A0, 0xC1C7B6A3, 0x7F1524C3, 0x69CB7492, 0x47848A0B, 0x5692B285, 0x095BBF00, 0xAD19489D, 0x1462B174, 0x23820E00, 0x58428D2A, 0x0C55F5EA, 0x1DADF43E, 0x233F7061, 0x3372F092, 0x8D937E41, 0xD65FECF1, 0x6C223BDB, 0x7CDE3759, 0xCBEE7460, 0x4085F2A7, 0xCE77326E, 0xA6078084, 0x19F8509E, 0xE8EFD855, 0x61D99735, 0xA969A7AA, 0xC50C06C2, 0x5A04ABFC, 0x800BCADC, 0x9E447A2E, 0xC3453484, 0xFDD56705, 0x0E1E9EC9, 0xDB73DBD3, 0x105588CD, 0x675FDA79, 0xE3674340, 0xC5C43465, 0x713E38D8, 0x3D28F89E, 0xF16DFF20, 0x153E21E7, 0x8FB03D4A, 0xE6E39F2B, 0xDB83ADF7); var $s3 = array( 0xE93D5A68, 0x948140F7, 0xF64C261C, 0x94692934, 0x411520F7, 0x7602D4F7, 0xBCF46B2E, 0xD4A20068, 0xD4082471, 0x3320F46A, 0x43B7D4B7, 0x500061AF, 0x1E39F62E, 0x97244546, 0x14214F74, 0xBF8B8840, 0x4D95FC1D, 0x96B591AF, 0x70F4DDD3, 0x66A02F45, 0xBFBC09EC, 0x03BD9785, 0x7FAC6DD0, 0x31CB8504, 0x96EB27B3, 0x55FD3941, 0xDA2547E6, 0xABCA0A9A, 0x28507825, 0x530429F4, 0x0A2C86DA, 0xE9B66DFB, 0x68DC1462, 0xD7486900, 0x680EC0A4, 0x27A18DEE, 0x4F3FFEA2, 0xE887AD8C, 0xB58CE006, 0x7AF4D6B6, 0xAACE1E7C, 0xD3375FEC, 0xCE78A399, 0x406B2A42, 0x20FE9E35, 0xD9F385B9, 0xEE39D7AB, 0x3B124E8B, 0x1DC9FAF7, 0x4B6D1856, 0x26A36631, 0xEAE397B2, 0x3A6EFA74, 0xDD5B4332, 0x6841E7F7, 0xCA7820FB, 0xFB0AF54E, 0xD8FEB397, 0x454056AC, 0xBA489527, 0x55533A3A, 0x20838D87, 0xFE6BA9B7, 0xD096954B, 0x55A867BC, 0xA1159A58, 0xCCA92963, 0x99E1DB33, 0xA62A4A56, 0x3F3125F9, 0x5EF47E1C, 0x9029317C, 0xFDF8E802, 0x04272F70, 0x80BB155C, 0x05282CE3, 0x95C11548, 0xE4C66D22, 0x48C1133F, 0xC70F86DC, 0x07F9C9EE, 0x41041F0F, 0x404779A4, 0x5D886E17, 0x325F51EB, 0xD59BC0D1, 0xF2BCC18F, 0x41113564, 0x257B7834, 0x602A9C60, 0xDFF8E8A3, 0x1F636C1B, 0x0E12B4C2, 0x02E1329E, 0xAF664FD1, 0xCAD18115, 0x6B2395E0, 0x333E92E1, 0x3B240B62, 0xEEBEB922, 0x85B2A20E, 0xE6BA0D99, 0xDE720C8C, 0x2DA2F728, 0xD0127845, 0x95B794FD, 0x647D0862, 0xE7CCF5F0, 0x5449A36F, 0x877D48FA, 0xC39DFD27, 0xF33E8D1E, 0x0A476341, 0x992EFF74, 0x3A6F6EAB, 0xF4F8FD37, 0xA812DC60, 0xA1EBDDF8, 0x991BE14C, 0xDB6E6B0D, 0xC67B5510, 0x6D672C37, 0x2765D43B, 0xDCD0E804, 0xF1290DC7, 0xCC00FFA3, 0xB5390F92, 0x690FED0B, 0x667B9FFB, 0xCEDB7D9C, 0xA091CF0B, 0xD9155EA3, 0xBB132F88, 0x515BAD24, 0x7B9479BF, 0x763BD6EB, 0x37392EB3, 0xCC115979, 0x8026E297, 0xF42E312D, 0x6842ADA7, 0xC66A2B3B, 0x12754CCC, 0x782EF11C, 0x6A124237, 0xB79251E7, 0x06A1BBE6, 0x4BFB6350, 0x1A6B1018, 0x11CAEDFA, 0x3D25BDD8, 0xE2E1C3C9, 0x44421659, 0x0A121386, 0xD90CEC6E, 0xD5ABEA2A, 0x64AF674E, 0xDA86A85F, 0xBEBFE988, 0x64E4C3FE, 0x9DBC8057, 0xF0F7C086, 0x60787BF8, 0x6003604D, 0xD1FD8346, 0xF6381FB0, 0x7745AE04, 0xD736FCCC, 0x83426B33, 0xF01EAB71, 0xB0804187, 0x3C005E5F, 0x77A057BE, 0xBDE8AE24, 0x55464299, 0xBF582E61, 0x4E58F48F, 0xF2DDFDA2, 0xF474EF38, 0x8789BDC2, 0x5366F9C3, 0xC8B38E74, 0xB475F255, 0x46FCD9B9, 0x7AEB2661, 0x8B1DDF84, 0x846A0E79, 0x915F95E2, 0x466E598E, 0x20B45770, 0x8CD55591, 0xC902DE4C, 0xB90BACE1, 0xBB8205D0, 0x11A86248, 0x7574A99E, 0xB77F19B6, 0xE0A9DC09, 0x662D09A1, 0xC4324633, 0xE85A1F02, 0x09F0BE8C, 0x4A99A025, 0x1D6EFE10, 0x1AB93D1D, 0x0BA5A4DF, 0xA186F20F, 0x2868F169, 0xDCB7DA83, 0x573906FE, 0xA1E2CE9B, 0x4FCD7F52, 0x50115E01, 0xA70683FA, 0xA002B5C4, 0x0DE6D027, 0x9AF88C27, 0x773F8641, 0xC3604C06, 0x61A806B5, 0xF0177A28, 0xC0F586E0, 0x006058AA, 0x30DC7D62, 0x11E69ED7, 0x2338EA63, 0x53C2DD94, 0xC2C21634, 0xBBCBEE56, 0x90BCB6DE, 0xEBFC7DA1, 0xCE591D76, 0x6F05E409, 0x4B7C0188, 0x39720A3D, 0x7C927C24, 0x86E3725F, 0x724D9DB9, 0x1AC15BB4, 0xD39EB8FC, 0xED545578, 0x08FCA5B5, 0xD83D7CD3, 0x4DAD0FC4, 0x1E50EF5E, 0xB161E6F8, 0xA28514D9, 0x6C51133C, 0x6FD5C7E7, 0x56E14EC4, 0x362ABFCE, 0xDDC6C837, 0xD79A3234, 0x92638212, 0x670EFA8E, 0x406000E0); var $s4 = array( 0x3A39CE37, 0xD3FAF5CF, 0xABC27737, 0x5AC52D1B, 0x5CB0679E, 0x4FA33742, 0xD3822740, 0x99BC9BBE, 0xD5118E9D, 0xBF0F7315, 0xD62D1C7E, 0xC700C47B, 0xB78C1B6B, 0x21A19045, 0xB26EB1BE, 0x6A366EB4, 0x5748AB2F, 0xBC946E79, 0xC6A376D2, 0x6549C2C8, 0x530FF8EE, 0x468DDE7D, 0xD5730A1D, 0x4CD04DC6, 0x2939BBDB, 0xA9BA4650, 0xAC9526E8, 0xBE5EE304, 0xA1FAD5F0, 0x6A2D519A, 0x63EF8CE2, 0x9A86EE22, 0xC089C2B8, 0x43242EF6, 0xA51E03AA, 0x9CF2D0A4, 0x83C061BA, 0x9BE96A4D, 0x8FE51550, 0xBA645BD6, 0x2826A2F9, 0xA73A3AE1, 0x4BA99586, 0xEF5562E9, 0xC72FEFD3, 0xF752F7DA, 0x3F046F69, 0x77FA0A59, 0x80E4A915, 0x87B08601, 0x9B09E6AD, 0x3B3EE593, 0xE990FD5A, 0x9E34D797, 0x2CF0B7D9, 0x022B8B51, 0x96D5AC3A, 0x017DA67D, 0xD1CF3ED6, 0x7C7D2D28, 0x1F9F25CF, 0xADF2B89B, 0x5AD6B472, 0x5A88F54C, 0xE029AC71, 0xE019A5E6, 0x47B0ACFD, 0xED93FA9B, 0xE8D3C48D, 0x283B57CC, 0xF8D56629, 0x79132E28, 0x785F0191, 0xED756055, 0xF7960E44, 0xE3D35E8C, 0x15056DD4, 0x88F46DBA, 0x03A16125, 0x0564F0BD, 0xC3EB9E15, 0x3C9057A2, 0x97271AEC, 0xA93A072A, 0x1B3F6D9B, 0x1E6321F5, 0xF59C66FB, 0x26DCF319, 0x7533D928, 0xB155FDF5, 0x03563482, 0x8ABA3CBB, 0x28517711, 0xC20AD9F8, 0xABCC5167, 0xCCAD925F, 0x4DE81751, 0x3830DC8E, 0x379D5862, 0x9320F991, 0xEA7A90C2, 0xFB3E7BCE, 0x5121CE64, 0x774FBE32, 0xA8B6E37E, 0xC3293D46, 0x48DE5369, 0x6413E680, 0xA2AE0810, 0xDD6DB224, 0x69852DFD, 0x09072166, 0xB39A460A, 0x6445C0DD, 0x586CDECF, 0x1C20C8AE, 0x5BBEF7DD, 0x1B588D40, 0xCCD2017F, 0x6BB4E3BB, 0xDDA26A7E, 0x3A59FF45, 0x3E350A44, 0xBCB4CDD5, 0x72EACEA8, 0xFA6484BB, 0x8D6612AE, 0xBF3C6F47, 0xD29BE463, 0x542F5D9E, 0xAEC2771B, 0xF64E6370, 0x740E0D8D, 0xE75B1357, 0xF8721671, 0xAF537D5D, 0x4040CB08, 0x4EB4E2CC, 0x34D2466A, 0x0115AF84, 0xE1B00428, 0x95983A1D, 0x06B89FB4, 0xCE6EA048, 0x6F3F3B82, 0x3520AB82, 0x011A1D4B, 0x277227F8, 0x611560B1, 0xE7933FDC, 0xBB3A792B, 0x344525BD, 0xA08839E1, 0x51CE794B, 0x2F32C9B7, 0xA01FBAC9, 0xE01CC87E, 0xBCC7D1F6, 0xCF0111C3, 0xA1E8AAC7, 0x1A908749, 0xD44FBD9A, 0xD0DADECB, 0xD50ADA38, 0x0339C32A, 0xC6913667, 0x8DF9317C, 0xE0B12B4F, 0xF79E59B7, 0x43F5BB3A, 0xF2D519FF, 0x27D9459C, 0xBF97222C, 0x15E6FC2A, 0x0F91FC71, 0x9B941525, 0xFAE59361, 0xCEB69CEB, 0xC2A86459, 0x12BAA8D1, 0xB6C1075E, 0xE3056A0C, 0x10D25065, 0xCB03A442, 0xE0EC6E0E, 0x1698DB3B, 0x4C98A0BE, 0x3278E964, 0x9F1F9532, 0xE0D392DF, 0xD3A0342B, 0x8971F21E, 0x1B0A7441, 0x4BA3348C, 0xC5BE7120, 0xC37632D8, 0xDF359F8D, 0x9B992F2E, 0xE60B6F47, 0x0FE3F11D, 0xE54CDA54, 0x1EDAD891, 0xCE6279CF, 0xCD3E7E6F, 0x1618B166, 0xFD2C1D05, 0x848FD2C5, 0xF6FB2299, 0xF523F357, 0xA6327623, 0x93A83531, 0x56CCCD02, 0xACF08162, 0x5A75EBB5, 0x6E163697, 0x88D273CC, 0xDE966292, 0x81B949D0, 0x4C50901B, 0x71C65614, 0xE6C6C7BD, 0x327A140A, 0x45E1D006, 0xC3F27B9A, 0xC9AA53FD, 0x62A80F00, 0xBB25BFE2, 0x35BDD2F6, 0x71126905, 0xB2040222, 0xB6CBCF7C, 0xCD769C2B, 0x53113EC0, 0x1640E3D3, 0x38ABBD60, 0x2547ADF0, 0xBA38209C, 0xF746CE76, 0x77AFA1C5, 0x20756060, 0x85CBFE4E, 0x8AE88DD8, 0x7AAAF9B0, 0x4CF9AA7E, 0x1948C25C, 0x02FB8A8C, 0x01C36AE4, 0xD6EBE1F9, 0x90D4F869, 0xA65CDEA0, 0x3F09252D, 0xC208E69F, 0xB74E6132, 0xCE77E25B, 0x578FDFE3, 0x3AC372E6); /* The number of rounds to do */ var $_rounds = 16; /* Constructor */ function Cipher_blowfish() { } /** * Set the key to be used for en/decryption * * @param String $key The key to use */ function setKey($key) { // we want a minimum length for our key $key .= '12345678' ; $key = $this->_formatKey($key); $keyPos = 0; $keyXor = 0; $iMax = count($this->p); $keyLen = count($key); for ($i = 0; $i < $iMax; $i++) { for ($t = 0; $t < 4; $t++) { $keyXor = ($keyXor << 8) | (($key[$keyPos]) & 0x0ff); if (++$keyPos == $keyLen) { $keyPos = 0; } } $this->p[$i] = $this->p[$i] ^ $keyXor; } $encZero = array('L' => 0, 'R' => 0); for ($i = 0; $i + 1 < $iMax; $i+=2) { $encZero = $this->_encryptBlock($encZero['L'], $encZero['R']); $this->p[$i] = $encZero['L']; $this->p[$i + 1] = $encZero['R']; } $iMax = count($this->s1); for ($i = 0; $i < $iMax; $i+=2) { $encZero = $this->_encryptBlock($encZero['L'], $encZero['R']); $this->s1[$i] = $encZero['L']; $this->s1[$i + 1] = $encZero['R']; } $iMax = count($this->s2); for ($i = 0; $i < $iMax; $i+=2) { $encZero = $this->_encryptBlock($encZero['L'], $encZero['R']); $this->s2[$i] = $encZero['L']; $this->s2[$i + 1] = $encZero['R']; } $iMax = count($this->s3); for ($i = 0; $i < $iMax; $i+=2) { $encZero = $this->_encryptBlock($encZero['L'], $encZero['R']); $this->s3[$i] = $encZero['L']; $this->s3[$i + 1] = $encZero['R']; } $iMax = count($this->s4); for ($i = 0; $i < $iMax; $i+=2) { $encZero = $this->_encryptBlock($encZero['L'], $encZero['R']); $this->s4[$i] = $encZero['L']; $this->s4[$i + 1] = $encZero['R']; } } /** * Return the size of the blocks that this cipher needs * * @return Integer The number of characters per block */ function getBlockSize() { return 8; } /** * Encrypt a block on data. * * @param String $block The data to encrypt * @param optional String $key The key to use * @param optional boolean $allparts Return an array containing the two * 32bit ints also. * * @return String the encrypted output */ function encryptBlock($block, $key = null, $allparts = false) { if (!is_null($key)) { $this->setKey($key); } list($L, $R) = array_values(unpack('N*', $block)); $parts = $this->_encryptBlock($L, $R); return pack("NN", $parts['L'], $parts['R']); } /** * Encrypt a block on data. * * @param String $block The data to encrypt * * @return String the encrypted output */ function _encryptBlock($L, $R) { $L ^= $this->p[0]; $R ^= ((($this->s1[($L >> 24) & 0xFF] + $this->s2[($L >> 16) & 0x0ff]) ^ $this->s3[($L >> 8) & 0x0ff]) + $this->s4[$L & 0x0ff]) ^ $this->p[1]; $L ^= ((($this->s1[($R >> 24) & 0xFF] + $this->s2[($R >> 16) & 0x0ff]) ^ $this->s3[($R >> 8) & 0x0ff]) + $this->s4[$R & 0x0ff]) ^ $this->p[2]; $R ^= ((($this->s1[($L >> 24) & 0xFF] + $this->s2[($L >> 16) & 0x0ff]) ^ $this->s3[($L >> 8) & 0x0ff]) + $this->s4[$L & 0x0ff]) ^ $this->p[3]; $L ^= ((($this->s1[($R >> 24) & 0xFF] + $this->s2[($R >> 16) & 0x0ff]) ^ $this->s3[($R >> 8) & 0x0ff]) + $this->s4[$R & 0x0ff]) ^ $this->p[4]; $R ^= ((($this->s1[($L >> 24) & 0xFF] + $this->s2[($L >> 16) & 0x0ff]) ^ $this->s3[($L >> 8) & 0x0ff]) + $this->s4[$L & 0x0ff]) ^ $this->p[5]; $L ^= ((($this->s1[($R >> 24) & 0xFF] + $this->s2[($R >> 16) & 0x0ff]) ^ $this->s3[($R >> 8) & 0x0ff]) + $this->s4[$R & 0x0ff]) ^ $this->p[6]; $R ^= ((($this->s1[($L >> 24) & 0xFF] + $this->s2[($L >> 16) & 0x0ff]) ^ $this->s3[($L >> 8) & 0x0ff]) + $this->s4[$L & 0x0ff]) ^ $this->p[7]; $L ^= ((($this->s1[($R >> 24) & 0xFF] + $this->s2[($R >> 16) & 0x0ff]) ^ $this->s3[($R >> 8) & 0x0ff]) + $this->s4[$R & 0x0ff]) ^ $this->p[8]; $R ^= ((($this->s1[($L >> 24) & 0xFF] + $this->s2[($L >> 16) & 0x0ff]) ^ $this->s3[($L >> 8) & 0x0ff]) + $this->s4[$L & 0x0ff]) ^ $this->p[9]; $L ^= ((($this->s1[($R >> 24) & 0xFF] + $this->s2[($R >> 16) & 0x0ff]) ^ $this->s3[($R >> 8) & 0x0ff]) + $this->s4[$R & 0x0ff]) ^ $this->p[10]; $R ^= ((($this->s1[($L >> 24) & 0xFF] + $this->s2[($L >> 16) & 0x0ff]) ^ $this->s3[($L >> 8) & 0x0ff]) + $this->s4[$L & 0x0ff]) ^ $this->p[11]; $L ^= ((($this->s1[($R >> 24) & 0xFF] + $this->s2[($R >> 16) & 0x0ff]) ^ $this->s3[($R >> 8) & 0x0ff]) + $this->s4[$R & 0x0ff]) ^ $this->p[12]; $R ^= ((($this->s1[($L >> 24) & 0xFF] + $this->s2[($L >> 16) & 0x0ff]) ^ $this->s3[($L >> 8) & 0x0ff]) + $this->s4[$L & 0x0ff]) ^ $this->p[13]; $L ^= ((($this->s1[($R >> 24) & 0xFF] + $this->s2[($R >> 16) & 0x0ff]) ^ $this->s3[($R >> 8) & 0x0ff]) + $this->s4[$R & 0x0ff]) ^ $this->p[14]; $R ^= ((($this->s1[($L >> 24) & 0xFF] + $this->s2[($L >> 16) & 0x0ff]) ^ $this->s3[($L >> 8) & 0x0ff]) + $this->s4[$L & 0x0ff]) ^ $this->p[15]; $L ^= ((($this->s1[($R >> 24) & 0xFF] + $this->s2[($R >> 16) & 0x0ff]) ^ $this->s3[($R >> 8) & 0x0ff]) + $this->s4[$R & 0x0ff]) ^ $this->p[16]; $R ^= $this->p[17]; return array('L' => $R, 'R' => $L); } /** * Decrypt a block on data. * * @param String $block The data to decrypt * @param optional String $key The key to use * * @return String the decrypted output */ function decryptBlock($block, $key = null) { if (!is_null($key)) { $this->setKey($key); } list($L, $R) = array_values(unpack('N*', $block)); $L ^= $this->p[17]; $R ^= ((($this->s1[($L >> 24) & 0xFF] + $this->s2[($L >> 16) & 0x0ff]) ^ $this->s3[($L >> 8) & 0x0ff]) + $this->s4[$L & 0x0ff]) ^ $this->p[16]; $L ^= ((($this->s1[($R >> 24) & 0xFF] + $this->s2[($R >> 16) & 0x0ff]) ^ $this->s3[($R >> 8) & 0x0ff]) + $this->s4[$R & 0x0ff]) ^ $this->p[15]; $R ^= ((($this->s1[($L >> 24) & 0xFF] + $this->s2[($L >> 16) & 0x0ff]) ^ $this->s3[($L >> 8) & 0x0ff]) + $this->s4[$L & 0x0ff]) ^ $this->p[14]; $L ^= ((($this->s1[($R >> 24) & 0xFF] + $this->s2[($R >> 16) & 0x0ff]) ^ $this->s3[($R >> 8) & 0x0ff]) + $this->s4[$R & 0x0ff]) ^ $this->p[13]; $R ^= ((($this->s1[($L >> 24) & 0xFF] + $this->s2[($L >> 16) & 0x0ff]) ^ $this->s3[($L >> 8) & 0x0ff]) + $this->s4[$L & 0x0ff]) ^ $this->p[12]; $L ^= ((($this->s1[($R >> 24) & 0xFF] + $this->s2[($R >> 16) & 0x0ff]) ^ $this->s3[($R >> 8) & 0x0ff]) + $this->s4[$R & 0x0ff]) ^ $this->p[11]; $R ^= ((($this->s1[($L >> 24) & 0xFF] + $this->s2[($L >> 16) & 0x0ff]) ^ $this->s3[($L >> 8) & 0x0ff]) + $this->s4[$L & 0x0ff]) ^ $this->p[10]; $L ^= ((($this->s1[($R >> 24) & 0xFF] + $this->s2[($R >> 16) & 0x0ff]) ^ $this->s3[($R >> 8) & 0x0ff]) + $this->s4[$R & 0x0ff]) ^ $this->p[9]; $R ^= ((($this->s1[($L >> 24) & 0xFF] + $this->s2[($L >> 16) & 0x0ff]) ^ $this->s3[($L >> 8) & 0x0ff]) + $this->s4[$L & 0x0ff]) ^ $this->p[8]; $L ^= ((($this->s1[($R >> 24) & 0xFF] + $this->s2[($R >> 16) & 0x0ff]) ^ $this->s3[($R >> 8) & 0x0ff]) + $this->s4[$R & 0x0ff]) ^ $this->p[7]; $R ^= ((($this->s1[($L >> 24) & 0xFF] + $this->s2[($L >> 16) & 0x0ff]) ^ $this->s3[($L >> 8) & 0x0ff]) + $this->s4[$L & 0x0ff]) ^ $this->p[6]; $L ^= ((($this->s1[($R >> 24) & 0xFF] + $this->s2[($R >> 16) & 0x0ff]) ^ $this->s3[($R >> 8) & 0x0ff]) + $this->s4[$R & 0x0ff]) ^ $this->p[5]; $R ^= ((($this->s1[($L >> 24) & 0xFF] + $this->s2[($L >> 16) & 0x0ff]) ^ $this->s3[($L >> 8) & 0x0ff]) + $this->s4[$L & 0x0ff]) ^ $this->p[4]; $L ^= ((($this->s1[($R >> 24) & 0xFF] + $this->s2[($R >> 16) & 0x0ff]) ^ $this->s3[($R >> 8) & 0x0ff]) + $this->s4[$R & 0x0ff]) ^ $this->p[3]; $R ^= ((($this->s1[($L >> 24) & 0xFF] + $this->s2[($L >> 16) & 0x0ff]) ^ $this->s3[($L >> 8) & 0x0ff]) + $this->s4[$L & 0x0ff]) ^ $this->p[2]; $L ^= ((($this->s1[($R >> 24) & 0xFF] + $this->s2[($R >> 16) & 0x0ff]) ^ $this->s3[($R >> 8) & 0x0ff]) + $this->s4[$R & 0x0ff]) ^ $this->p[1]; $decrypted = pack("NN", $R ^ $this->p[0], $L); return $decrypted; } /** * Converts a text key into an array * * @return array The key */ function _formatKey($key) { return array_values(unpack('C*', $key)); } } /** * The Cipher_BlockMode_cbc class implements the Cipher Block Chaininng method of * encrypting blocks of data. * * Copyright 2002-2003 Mike Cochrane <mi...@gr...> * * See the enclosed file COPYING for license information (LGPL). If you * did not receive this file, see http://www.fsf.org/copyleft/lgpl.html. * * @author Mike Cochrane <mi...@gr...> * //// //// NOTE: Some changes by Nuttzy here. This class is the melding of several classes //// but I reduced the others down to only what I needed and this is the result. //// * */ class Cipher_BlockMode_cbc { var $_iv = "\0\0\0\0\0\0\0\0"; // String containing the initilization vector. var $blowfish ; // will contain a blowfish class var $filler ; // constructor function Cipher_BlockMode_cbc() { $this->blowfish = new Cipher_blowfish() ; $this->filler = 'nuttzy=1337' ; } // encrypts the text a chunk at a time and then strings them all together and returns the value function encrypt($plaintext) { $encrypted = ''; // added by Nuttzy, we want to make sure the password is nice and long so brute forcers won't know if this // is a really short pw $plaintext .= $this->filler ; $blocksize = $this->blowfish->getBlockSize(); $previousCipher = $this->_iv; $jMax = strlen($plaintext); for ($j = 0; $j < $jMax; $j += $blocksize) { $plain = substr($plaintext, $j, $blocksize); if (strlen($plain) < $blocksize) { // pad the block with \0's if it's not long enough $plain = str_pad($plain, 8, "\0"); } $plain = $plain ^ $previousCipher; $previousCipher = $this->blowfish->encryptBlock($plain); $encrypted .= $previousCipher; } // added by Nuttzy - we'll be storing the result in a DB so we need to replace ' with \' $encrypted = addslashes( $encrypted) ; // TAKE TWO: the way General Config settings work in phpBB, this isn't sufficient, get rid of the ' all together // $encrypted = str_replace( "\'", "''", $encrypted) ; $encrypted = str_replace( "\'", "NUTTICK", $encrypted) ; // NOTE: a cipher of "single'quote" (the cipher is the stuff between the double quotes) has the ' changed // to \' and again to ''. So the SQL string we generate for the DB looks like "single''quote". But this is // all just so the string is formed properly and what actually gets stored in the DB is "single'quote". The // same is true for any slashes that get added. The slashes won't actually show up when viewing the DB ;-) return $encrypted ; } // decrypts the cipher a chunk at a time and returns the plaintext function decrypt($ciphertext) { // TAKE TWO: the way General Config settings work in phpBB, this isn't sufficient, get rid of the ' all together $ciphertext = str_replace( 'NUTTICK', "'", $ciphertext) ; $decrypted = ''; $blocksize = $this->blowfish->getBlockSize(); $previousCipher = $this->_iv; $jMax = strlen($ciphertext); for ($j = 0; $j < $jMax; $j += $blocksize) { $plain = substr($ciphertext, $j, $blocksize); $decrypted .= $this->blowfish->decryptBlock($plain) ^ $previousCipher; $previousCipher = $plain; } // remove trailing \0's used to pad the last block while (substr($decrypted, -1, 1) == "\0") { $decrypted = substr($decrypted, 0, -1); } // added by nuttzy, we need strip off the extra characters we added $decrypted = substr( $decrypted, 0, strlen($decrypted) - strlen($this->filler)) ; return $decrypted; } } ?> --- NEW FILE: index.htm --- <html> <head> <title></title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> </head> <body bgcolor="#FFFFFF" text="#000000"> </body> </html> --- NEW FILE: em_ftp.php --- <?php /*************************************************************************** * em_ftp.php * ------------------- * begin : Tuesday, Dec 10, 2003 * copyright : (C) 2002-2004 Nuttzy - Craig Nuttall * email : nu...@bl... * * $Id: em_ftp.php,v 1.1 2005/04/24 14:59:53 bkettle Exp $ * * ***************************************************************************/ /*************************************************************************** * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. [...1300 lines suppressed...] // return us to phpbb root if (!$this->ftp_cdup_home( $num_return_cdup)) { $return_path = '' ; for ($i=0; $i<$num_return_cdup; $i++) { $return_path .= '../' ; } $err_msg = 'ftp_mkdir_struct_copy[3]<br><br>' ; $err_msg .= sprintf( $lang['EM_modio_mkdir_chdir'], $return_path, $this->ftp_pwd()); return false ; } return true ; } } ?> |
From: Brendan K. <bk...@us...> - 2005-04-24 15:00:02
|
Update of /cvsroot/easymod/easymod2/mods/easymod In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13181/mods/easymod Added Files: easymod.gif easymod_display_functions.php easymod_install.php lang_easymod.php Log Message: Just checking in a vanilla 0.1.13. Work shall commence soon :) --- NEW FILE: easymod_display_functions.php --- <?php /*************************************************************************** * easymod_display_functions.php * ------------------------------- * begin : Wednesday, November 26, 2003 * copyright : (C) 2002-2004 by Nuttzy - Craig Nuttall * email : nu...@bl... * * $Id: easymod_display_functions.php,v 1.1 2005/04/24 14:59:52 bkettle Exp $ * ***************************************************************************/ /*************************************************************************** * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * ***************************************************************************/ // --------- // FUNCTIONS // // my own cheese-o-matic template system // anthing within {{}} is a template variable // anything within {{[]}} is an include tpl to be further processed // error handling is completely lacking so don't use this outside of EM ;-) function display_template( $template_file, $variables) { // make sure the tpl file exists if (!file_exists( $template_file)) { echo "<h1><span class=\"ok\">A required file [$template_file] is missing. Aborting install.</span></h1>\n" ; exit ; } // open the template file for readin $template = fopen( $template_file, 'r') ; // look through the file, displaying each line to the screen while (!feof( $template)) { // get a line from the file $line = fgets( $template, 4096) ; // see if there is a template variable on this line $prev_endpos = 0 ; $pos = strpos( $line, '{{')+2 ; $endpos = (strlen($line) > 2 ) ? strpos( $line, '}}', $pos)-1 : $pos ; // for some reason I couldn't get strpos to work correctly for me (even using === syntax) $start_var = (substr( $line, 0, 2) == '{{') ? true : false ; // if we found a varibale, then fill it in and see if there are more on this line as well; // pos will always be at least 2; if so then this means we either have no variable, or a variable starting // at the beginning of the line if (($pos > 2) || ($start_var)) { // check the entire line until we don't find more vars while (($pos > 2) || ($start_var)) { // display the line up to and including the variable $start_var = false ; $var = substr($line, $pos, $endpos-$pos+1) ; // see if this is an included file (will start with [ and stop with ]) if ((substr($var, 0, 1) == '[') && (substr($var, strlen($var)-1, 1) == ']')) { // print the portion of the line up to this point echo substr( $line, $prev_endpos, (($pos-2)-$prev_endpos)) ; // welcome to the wonderful world of recursion :D display_template( substr($var, 1, strlen($var)-2), $variables) ; } // a normal variable else { $display_var = (isset($variables[$var])) ? $variables[$var] : '' ; echo substr( $line, $prev_endpos, (($pos-2)-$prev_endpos)) . $display_var ; } // get the next variable, if there is one $prev_endpos = $endpos+3 ; $pos = strpos( $line, '{{', $prev_endpos)+2 ; $endpos = strpos( $line, '}}', $pos)-1 ; } // display the rest of the line echo substr( $line, $prev_endpos) ; } // no template variable on this line, so just right it out else { echo $line ; } } // clean up ;-) fclose( $template) ; } // write the top of the page function page_header( $text, $simple=false) { global $lang, $easymod_install_version; $variables = array() ; $variables['TITLE'] = "Installing EasyMOD beta 1 ($easymod_install_version)" ; // hard coded $variables['BY'] = 'by Nuttzy' ; // hard coded $variables['TEXT'] = $text ; display_template( './templates/page_start.tpl', $variables) ; if (!$simple) { display_template( './templates/page_header.tpl', $variables) ; } } // write the footer HTML function page_footer() { global $install_step, $write, $move, $ftp_dir, $ftp_user, $ftp_pass, $ftp_host, $ftp_debug, $ftp_type, $lang, $phpEx ; ///////////////////////// ///////////////////////// ///////////////////////// what about ? and & ???? - i really think there is a better way to do this ///////////////////////// ///////////////////////// // we have to fix the password so it does not have a # in it or else the link won't work $ftp_pass = str_replace('#', '~pound~', $ftp_pass) ; $link = "easymod_install.$phpEx?mode=debug&install_step=$install_step&write=$write&move=$move&ftp_dir=$ftp_dir&ftp_user=$ftp_user&ftp_pass=$ftp_pass&ftp_host=$ftp_host&ftp_debug=$ftp_debug&ftp_type=$ftp_type" ; $variables = array() ; $variables['LINK'] = $link ; $variables['DEBUG'] = $lang['EM_debug_display'] ; display_template( './templates/page_footer.tpl', $variables) ; } // allow for the ability to pop open a sub window function helpwin( $width=400, $height=200) { $variables = array() ; $variables['WIDTH'] = $width ; $variables['HEIGHT'] = $height ; display_template( './templates/helpwin.tpl', $variables) ; } // the files access and ftp data form function form_settings( $hidden, $step, $main_button, $rescan) { global $phpEx, $lang ; $variables = array() ; $variables['U_FORM'] = 'easymod_install.'.$phpEx ; $variables['STEP'] = $step ; $variables['HIDDEN'] = $hidden ; $variables['MAIN'] = ($main_button == '') ? '' : '<input class="mainoption" type="submit" value="' . "$main_button\" /> " ; $variables['RESCAN'] = (!$rescan) ? '' : '<input class="mainoption" type="submit" value="' . $lang['Rescan'] . '" name="rescan"/>' ; display_template( './templates/form_settings.tpl', $variables) ; } // neatly format the debug info we've gathered function display_debug_html( $variables, $access, $values) { global $lang, $easymod_install_version, $install_step, $mode, $write, $move, $ftp_user, $ftp_pass, $ftp_host, $ftp_dir, $ftp_debug, $ftp_type, $ftp_cache ; // assign template data // $variables = array() ; $variables['EM_debug_info'] = $lang['EM_debug_info'] ; $variables['EM_debug_format'] = $lang['EM_debug_format'] ; $variables['EM_debug_installer'] = $lang['EM_debug_installer'] ; $variables['EM_phpBB_version'] = $lang['EM_phpBB_version'] ; $variables['EM_debug_work_dir'] = $lang['EM_debug_work_dir'] ; $variables['EM_debug_step'] = $lang['EM_debug_step'] ; $variables['EM_debug_mode'] = $lang['EM_debug_mode'] ; $variables['EM_debug_the_error'] = $lang['EM_debug_the_error'] ; $variables['EM_debug_permissions'] = $lang['EM_debug_permissions'] ; $variables['EM_debug_sys_errors'] = $lang['EM_debug_sys_errors'] ; $variables['EM_read_access'] = $lang['EM_read_access'] ; $variables['EM_write_access'] = $lang['EM_write_access'] ; $variables['EM_root_write'] = $lang['EM_root_write'] ; $variables['EM_chmod_access'] = $lang['EM_chmod_access'] ; $variables['EM_unlink_access'] = $lang['EM_unlink_access'] ; $variables['EM_mkdir_access'] = $lang['EM_mkdir_access'] ; $variables['EM_tmp_write'] = $lang['EM_tmp_write'] ; $variables['EM_ftp_ext'] = $lang['EM_ftp_ext'] ; $variables['EM_copy_access'] = $lang['EM_copy_access'] ; $variables['EM_debug_recommend'] = $lang['EM_debug_recommend'] ; $variables['EM_debug_write'] = $lang['EM_debug_write'] ; $variables['EM_debug_move'] = $lang['EM_debug_move'] ; $variables['EM_debug_selected'] = $lang['EM_debug_selected'] ; $variables['EM_debug_write'] = $lang['EM_debug_write'] ; $variables['EM_debug_move'] = $lang['EM_debug_move'] ; $variables['EM_debug_ftp_dir'] = $lang['EM_debug_ftp_dir'] ; $variables['EM_debug_ftp_host'] = 'ftp host' ; $variables['EM_debug_ftp_debug'] = $lang['EM_debug_ftp_debug'] ; $variables['EM_debug_ftp_ext'] = $lang['EM_debug_ftp_ext'] ; $variables['EM_debug_ftp_cache'] = 'ftp cache' ; $variables['EM_debug_listing'] = $lang['EM_debug_listing'] ; $variables['EM_VERSION'] = $easymod_install_version ; $variables['PHPBB_VERSION'] = get_phpbb_version() ; $variables['CWD'] = getcwd() ; $variables['STEP'] = $install_step ; $variables['MODE'] = $mode ; $variables['ERROR'] = $values['error'] ; $variables['WRITE_REC'] = $values['write_rec'] ; $variables['MOVE_REC'] = $values['move_rec'] ; $variables['WRITE_SEL'] = $write ; $variables['MOVE_SEL'] = $move ; $variables['FTP_DIR'] = $ftp_dir ; $variables['FTP_HOST'] = $ftp_host ; $variables['FTP_DEBUG'] = ($ftp_debug) ? 'true' : 'false' ; $variables['FTP_EXT'] = $ftp_type ; $variables['FTP_CACHE'] = ($ftp_cache) ? 'true' : 'false' ; $variables['FILE_LISTING'] = $values['file_listing'] ; display_template( './templates/display_debug.tpl', $variables) ; // check FTP compatiblity if (( $write == 'ftpb') || ($move == 'ftpa')) { // test the ftp connection if (test_ftp( $ftp_user, $ftp_pass, $ftp_dir, $ftp_host, true, $ftp_type)) { echo '<br>[b]<b>' . $lang['EM_debug_ftp_test'] . '</b>[/b] :: [b][color=green]<b class="ok">' . $lang['EM_debug_success']. "</b>[/color][/b]<br />\n" ; } } else { echo '<br><br>[b]<b>' . $lang['EM_debug_ftp_notest'] . "</b>[/b]<br>\n" ; } display_template( './templates/display_debug_footer.tpl', $variables) ; } // display the debug info; can be called from handle error or from any page just to get info function display_debug_info( $err_msg = '') { global $lang, $write, $move ; $values = array() ; if ($err_msg == '') { $values['error'] = '[color=green][b]' . $lang['EM_debug_no_error'] . '[/b][/color]' ; } else { $values['error'] = '[color=red]' . $err_msg . '[/color]' ; } $variables = array() ; $access = array() ; get_file_access_info( $variables, $access, true) ; // choose the best selection as default $can_write = (($access['write_access']) && ($access['mkdir_access'])) ? true : false ; $values['write_rec'] = ($can_write) ? $lang['EM_write_server'] : $lang['EM_write_ftp'] ; // choose the best selection as default if (($values['write_rec'] != $lang['EM_write_server']) && ($values['write_rec'] != $lang['EM_write_ftp'])) { // can't write on the server, so must manually move $values['move_rec'] = $lang['EM_move_manual'] ; } else { // either copy or suggest FTP; never suggest exec b/c i don't want to explain it tp dumbasses ;-) $values['move_rec'] = (($access['root_write']) && ($access['copy_access'])) ? $lang['EM_move_copy'] : $lang['EM_move_ftp'] ; } $values['file_listing'] = '' ; if ($dh = opendir('./')) { while (($file = readdir($dh)) !== false) { $values['file_listing'] .= mfunGetPerms(fileperms( $file)) . " $file <br>\n"; } closedir($dh); } display_debug_html( $variables, $access, $values) ; } // display the error message in a nicely formatted box function display_error( $error) { global $lang ; // assign template data $variables = array() ; $variables['EM_err_error'] = $lang['EM_err_error'] ; $variables['ERROR'] = $error ; display_template( './templates/display_error.tpl', $variables) ; } // used for error reporting on OPEN and FIND function handle_error($result, $file_list, $close_files, $error = '', $skip_debug = false) { // if we didn't get an OK, then we are automatically aborting if ( $result != OPEN_OK) { // close up files, just to be neat if ($close_files) { // don't worry if a problem with close since we are definitely bailing anyway complete_file_reproduction( $file_list) ; } // handle case where we are sending a non-file specific error if ($error != '') { display_error( $error) ; } // loop through all files; print errors for ($err=0; $err<count($file_list); $err++) { // if there is an error message for this file then print it if ($file_list[$err]->err_msg != '') { $error = $file_list[$err]->err_msg ; display_error( $error) ; } } // display debug info unless told otherwise if (!$skip_debug) { display_debug_info( $error) ; echo "<br>\n" ; } // no printing debug do print the footer else { page_footer() ; } // get us out of here! exit ; } } function get_install_info( &$variables, $prev_em_version) { global $phpEx, $lang, $easymod_install_version, $phpBB_version ; $variables['U_FORM'] = 'easymod_install.' . $phpEx ; $variables['EM_Install_Info'] = $lang['EM_Install_Info'] ; $variables['EM_Select_Language'] = $lang['EM_Select_Language'] ; $variables['EM_Database_type'] = $lang['EM_Database_type'] ; $variables['EM_phpBB_version'] = $lang['EM_phpBB_version'] ; $variables['EM_EasyMOD_version'] = $lang['EM_EasyMOD_version'] ; $variables['LANG_OPTIONS'] = '<option value="english" selected="selected">English</option>' ; // HARD CODED $variables['GO'] = 'Go' ; // HARD CODED $variables['SQL_LAYER'] = SQL_LAYER ; $variables['PHPBB_VERSION'] = $phpBB_version ; $variables['EM_VERSION'] = $easymod_install_version ; if ($prev_em_version == '') { $variables['L_EM_STATUS'] = $lang['EM_EM_status'] ; $variables['STATUS'] = $lang['EM_new_install'] ; } else { $variables['L_EM_STATUS'] = $lang['EM_update_from'] ; $variables['STATUS'] = $prev_em_version ; } } function get_file_access_info( &$variables, &$access, $bbcode=false) { global $lang ; // we'll handle our on errors $old_error_reporting = error_reporting(0) ; $access_msg = '' ; $read_failure = '' ; $ftp_msg = '' ; $safe_msg = '' ; $access = array( 'read_access', 'write_access', 'root_write', 'tmp_write', 'ftp_ext', 'copy_access', 'chmod_access', 'unlink_access', 'mkdir_access', 'safe_mode') ; $variables['EM_File_Access'] = ($bbcode) ? '' : $lang['EM_File_Access'] ; $variables['EM_no_problem'] = ($bbcode) ? '' : "Let's see what you have for file access. You do not need everything to read 'ok'.<br><br>" ; $variables['EM_read_access'] = $lang['EM_read_access'] ; $variables['EM_write_access'] = $lang['EM_write_access'] ; $variables['EM_root_write'] = $lang['EM_root_write'] ; $variables['EM_chmod_access'] = $lang['EM_chmod_access'] ; $variables['EM_unlink_access'] = $lang['EM_unlink_access'] ; $variables['EM_mkdir_access'] = $lang['EM_mkdir_access'] ; $variables['EM_tmp_write'] = $lang['EM_tmp_write'] ; $variables['EM_ftp_ext'] = $lang['EM_ftp_ext'] ; $variables['EM_safe_mode'] = 'Safe Mode' ; $variables['EM_copy_access'] = $lang['EM_copy_access'] ; // check for basic access permissions $access['read_access'] = check_access_read( $read_failure) ; $access['write_access'] = check_access_write( $access_msg) ; $access['root_write'] = check_access_write_root( $access_msg) ; $access['tmp_write'] = check_access_write_tmp( $access_msg) ; $access['ftp_ext'] = check_access_ftp_ext( $ftp_msg) ; $access['safe_mode'] = check_access_safe_mode( $safe_msg) ; $access['copy_access'] = check_access_copy( $access_msg) ; // get ready to display bbcode tags if desired if ($bbcode) { $ok_msg = '[b][color=green]<b class="ok">OK</b>[/b]' ; $okparms = '[b][color=green]<b class="ok">%s</b>[/b]' ; $no_msg = '[b]<b>' . $lang['EM_no'] . '</b>[/b]' ; $noparms = '[b]<b>%s</b>[/b]' ; } else { $ok_msg = '<b class="ok">OK</b>' ; $okparms = '<b class="ok">%s</b>' ; $no_msg = '<b>' . $lang['EM_no'] . '</b>' ; $noparms = '<b>%s</b>' ; } // define template variables $variables['ACCESS_READ'] = ($access['read_access']) ? $ok_msg : $no_msg ; $variables['ACCESS_WRITE'] = ($access['write_access']) ? $ok_msg : $no_msg ; $variables['ACCESS_ROOT'] = ($access['root_write']) ? $ok_msg : $no_msg ; $variables['ACCESS_TMP'] = ($access['tmp_write']) ? $ok_msg : $no_msg ; $variables['ACCESS_FTP'] = ($access['ftp_ext']) ? sprintf( $okparms, $ftp_msg) : sprintf( $noparms, $ftp_msg) ; $variables['ACCESS_SAFE'] = ($access['safe_mode']) ? sprintf( $okparms, $safe_msg) : sprintf( $noparms, $safe_msg) ; $variables['ACCESS_COPY'] = ($access['copy_access']) ? $ok_msg : $no_msg ; // don't even try chmod and unlink if we can't even write if (!$access['write_access']) { $access['chmod_access'] = false ; $access['unlink_access'] = false ; $access['mkdir_access'] = false ; $variables['ACCESS_CHMOD'] = $lang['EM_unattempted'] ; $variables['ACCESS_UNLINK'] = $lang['EM_unattempted'] ; $variables['ACCESS_MKDIR'] = $lang['EM_unattempted'] ; } // check for chmod, unlink, and mkdir access (if we have write access) else { // check for server chmod access $access['chmod_access'] = check_access_chmod( $access_msg) ; $variables['ACCESS_CHMOD'] = ($access['copy_access']) ? $ok_msg : $no_msg ; // check for server unlink access $access['unlink_access'] = check_access_unlink( $access_msg) ; $variables['ACCESS_UNLINK'] = ($access['copy_access']) ? $ok_msg : $no_msg ; // check for server mkdir access $access['mkdir_access'] = check_access_mkdir( $access_msg) ; $variables['ACCESS_MKDIR'] = ($access['copy_access']) ? $ok_msg : $no_msg ; } // restore error handling error_reporting($old_error_reporting); return $read_failure ; } function get_ftp_settings( &$variables, $access) { global $lang ; $variables['EM_ftp_title'] = $lang['EM_ftp_title'] ; $variables['EM_ftp_desc'] = $lang['EM_ftp_desc'] ; $variables['EM_ftp_dir'] = $lang['EM_ftp_dir'] ; $variables['DIR_EX'] = 'ex: public_html/phpBB2' ; // hard coded $variables['EM_ftp_user'] = $lang['EM_ftp_user'] ; $variables['EM_ftp_pass'] = $lang['EM_ftp_pass'] ; $variables['EM_ftp_host'] = $lang['EM_ftp_host'] ; $variables['EM_ftp_host_info'] = $lang['EM_ftp_host_info'] ; $variables['EM_ftp_debug'] = $lang['EM_ftp_debug'] ; $variables['EM_yes'] = $lang['EM_yes'] ; $variables['EM_no'] = $lang['EM_no'] ; $variables['EM_ftp_debug_not'] = $lang['EM_ftp_debug_not'] ; $variables['EM_ftp_use_ext'] = $lang['EM_ftp_use_ext'] ; $variables['EM_ftp_ext_not'] = $lang['EM_ftp_ext_not'] ; $ftp_ext_message = '' ; $ftp_ext_close = '' ; $ftp_cache_message = '' ; $ftp_cache_close = '' ; $ext_yes = '' ; $ext_no = 'checked="checked"' ; $cache_yes = '' ; $cache_no = 'checked="checked"' ; // we only want to display the FTP Ext option if their server can handle it if (!$access['ftp_ext']) { $ftp_ext_message = " " . $lang['EM_ftp_ext_noext'] . "\n<!-- \n" ; $ftp_ext_close = "-->\n" ; $ftp_cache_message = " " . $lang['EM_ftp_ext_noext'] . "\n<!-- \n" ; $ftp_cache_close = "-->\n" ; } else if (!$access['tmp_write']) { $cache_yes = 'checked="checked"' ; $cache_no = '' ; } else if (($access['ftp_ext']) && ($access['tmp_write'])) { $ext_yes = 'checked="checked"' ; $ext_no = '' ; } $variables['FTP_EXT_MSG'] = $ftp_ext_message ; $variables['FTP_EXT_CLOSE'] = $ftp_ext_close ; $variables['FTP_CACHE_MSG'] = $ftp_ext_message ; $variables['FTP_CACHE_CLOSE'] = $ftp_ext_close ; $variables['EXT_YES'] = $ext_yes ; $variables['EXT_NO'] = $ext_no ; $variables['CACHE_YES'] = $cache_yes ; $variables['CACHE_NO'] = $cache_no ; } function get_empw_settings( &$variables) { global $lang ; $variables['EM_password_title'] = $lang['EM_password_title'] ; $variables['EM_password_desc'] = $lang['EM_password_desc'] ; $variables['EM_password_set'] = $lang['EM_password_set'] ; $variables['EM_password_confirm'] = $lang['EM_password_confirm'] ; } function get_hidden_data( &$variables, $access) { global $language ; $variables['READ_ACCESS'] = $access['read_access'] ; $variables['WRITE_ACCESS'] = $access['write_access'] ; $variables['ROOT_WRITE'] = $access['root_write'] ; $variables['TMP_WRITE'] = $access['tmp_write'] ; $variables['CHMOD_ACCESS'] = $access['chmod_access'] ; $variables['UNLINK_ACCESS'] = $access['unlink_access'] ; $variables['MKDIR_ACCESS'] = $access['mkdir_access'] ; $variables['COPY_ACCESS'] = $access['copy_access'] ; $variables['LANGUAGE'] = $language ; } function check_installablity() { global $db, $lang, $easymod_install_version ; // make sure we are in the correct directory $cwd = getcwd() ; $cwd = str_replace("\\", '/', $cwd) ; $dirs = explode('/', $cwd) ; $file_list = array() ; //// //// make sure EM is in the right directory //// // for some odd reason getcwd returns empty on some servers??? (added in 0.0.10a-2) if ($cwd == '') { // do nothing } // otherwise make sure we are in the correct directory for installation else if (($dirs[count($dirs)-3] != 'admin') || ($dirs[count($dirs)-2] != 'mods') || (strtolower($dirs[count($dirs)-1]) != 'easymod')) { handle_error( OPEN_FAIL_CRITICAL, $file_list, false, $lang['EM_err_install_dir'] ) ; } //// //// make sure subsilver and english exists //// // make sure subsilver dir exists if (!file_exists('../../../templates/subSilver')) { handle_error( OPEN_FAIL_CRITICAL, $file_list, false, $lang['EM_err_no_subsilver'] ) ; } // make sure subSilver is installed in the DB // make sure SS is in the DB $sql = "SELECT * FROM " . THEMES_TABLE . " WHERE template_name = 'subSilver'" ; if ( !($result = $db->sql_query($sql)) ) { handle_error( OPEN_FAIL_CRITICAL, $file_list, false, 'Could not get theme info.' ) ; } if ( !$db->sql_fetchrow($result) ) { handle_error( OPEN_FAIL_CRITICAL, $file_list, false, $lang['EM_err_no_subsilver'] ) ; } // make sure english exists if (!file_exists('../../../language/lang_english')) { handle_error( OPEN_FAIL_CRITICAL, $file_list, false, $lang['EM_err_no_english'] ) ; } // get the version of the previous EM install, if there is one $prev_em_version = '' ; $sql = "SELECT * FROM " . CONFIG_TABLE . " WHERE config_name = 'EM_version'" ; if ( !($result = $db->sql_query($sql)) ) { handle_error( OPEN_FAIL_CRITICAL, $file_list, false, $lang['EM_err_config_info']) ; } if ( $row = $db->sql_fetchrow($result)) { $prev_em_version = $row['config_value'] ; } $db->sql_freeresult($result); // // the settings section // $variables['EM_Settings'] = $lang['EM_Settings'] ; // make sure this version of EM is not already installed // see if we have already made the EM entries $sql = "SELECT * FROM " . CONFIG_TABLE . " WHERE config_name = 'EM_version'" ; if ( !($result = $db->sql_query($sql)) ) { handle_error( OPEN_FAIL_CRITICAL, $file_list, false, $lang['EM_err_config_info']) ; } if ( $row = $db->sql_fetchrow($result)) { // if this version matches the one in the DB, then throw an error if ( $row['config_value'] == $easymod_install_version) { $error_msg = '<b>' . $lang['EM_err_critical_error'] . ':</b> ' . $lang['EM_err_dupe_install'] ; $error_msg .= '<br><br>If you are trying to reinstall this version, change the EM version number from the Admin Control Panel under EasyMOD Settings. Or you could also use the EM Version Changer (by GPHemsley) found in the admin/mods/easymod/includes directory.' ; handle_error( OPEN_FAIL_CRITICAL, $file_list, false, $error_msg) ; } } $db->sql_freeresult($result); $read_failure = '' ; $read_access = check_access_read( $read_failure) ; ////////// ////////// no read access is going to be a major pain! but it would also be nice to read local anyway ////////// if ( !$read_access) { // ask them WTF?? handle_error( OPEN_FAIL_CRITICAL, $file_list, false, "No server read access. Check your permission settings. Read access from a local file not implemented in this version.<br><br>" . $read_failure ) ; } // return the previously installed EM version return $prev_em_version ; } // the "advanced mode" openning screen; it's pretty pathetic that this fairly simply form is being called "advanced mode" // but people really are that dumb! function display_step1_classic() { global $lang, $db, $easymod_install_version, $phpEx ; $variables = array() ; $access = array() ; // display header info, like the welcome message and pic page_header( $lang['EM_step1']) ; // add the helpwin javascript and then options form helpwin() ; // do the checks to make sure things are where we are expecting them $prev_em_version = check_installablity() ; // display install and file access info get_install_info( $variables, $prev_em_version) ; get_file_access_info( $variables, $access) ; // read selections (there is only one option ;-) ) $select_read = '<option value="server" selected="selected">' . $lang['EM_read_server'] . '</option>' ; // recommend FTP as default and then choose the best alternate selection $can_write = (($access['write_access']) && ($access['mkdir_access'])) ? true : false ; $write_rec = ($can_write) ? $lang['EM_write_server'] : $lang['EM_write_download'] ; // write selections $select_write = '<option value="server">' . $lang['EM_write_server'] . '</option>' ; $select_write .= '<option value="ftpb" selected="selected">' . $lang['EM_write_ftp'] . '</option>' ; $select_write .= '<option value="local">' . $lang['EM_write_download'] . '</option>' ; $select_write .= '<option value="screen">' . $lang['EM_write_screen'] . '</option>' ; // recommend FTP as default and then choose the best alternate selection if ($write_rec != $lang['EM_write_server']) { // can't write on the server, so must manually move $move_rec = $lang['EM_move_manual'] ; } else { // either copy or suggest FTP; never suggest exec b/c i don't want to explain it tp dumbasses ;-) $move_rec = (($access['root_write']) && ($access['copy_access'])) ? $lang['EM_move_copy'] : $lang['EM_move_manual'] ; } // write selections $select_move = '<option value="copy">' . $lang['EM_move_copy'] . '</option>' ; $select_move .= '<option value="ftpa" selected="selected">' . $lang['EM_move_ftp'] . '</option>' ; $select_move .= '<option value="exec">' . $lang['EM_move_exec'] . '</option>' ; $select_move .= '<option value="ftpm">' . $lang['EM_move_manual'] . '</option>' ; // assign template data $variables['U_FORM'] = 'easymod_install.'.$phpEx ; $variables['EM_support'] = $lang['EM_support'] ; $variables['EM_Settings'] = $lang['EM_Settings'] ; $variables['EM_file_title'] = $lang['EM_file_title'] ; $variables['EM_file_desc'] = $lang['EM_file_desc'] ; $variables['EM_file_alt'] = $lang['EM_file_alt'] ; $variables['EM_file_reading'] = $lang['EM_file_reading'] ; $variables['EM_file_writing'] = $lang['EM_file_writing'] ; $variables['EM_file_moving'] = $lang['EM_file_moving'] ; $variables['Submit'] = $lang['Submit'] ; $variables['Rescan'] = $lang['Rescan'] ; $variables['SELECT_READ'] = $select_read ; $variables['SELECT_WRITE'] = $select_write ; $variables['SELECT_MOVE'] = $select_move ; $variables['WRITE_REC'] = $write_rec ; $variables['MOVE_REC'] = $move_rec ; // fill the template info get_empw_settings( $variables) ; get_ftp_settings( $variables, $access) ; get_hidden_data( $variables, $access) ; // dispay the page and the footer display_template( './templates/step1_classic.tpl', $variables) ; page_footer() ; exit ; } // the unbelievably simple setup screen function display_step1_simple() { global $lang, $db, $easymod_install_version, $phpEx, $language ; $variables = array() ; // display header info, like the welcome message and pic page_header( '<b>Step 1 (gathering settings):</b> Welcome to the EasyMOD installer. EasyMOD will try to guide you every step of the way. First, we need to know a little about your server.') ; // do the checks to make sure things are where we are expecting them $prev_em_version = check_installablity() ; // display install info get_install_info( $variables, $prev_em_version) ; // assign template data $variables['U_FORM'] = 'easymod_install.'.$phpEx ; $variables['EM_support'] = $lang['EM_support'] ; $variables['EM_Settings'] = $lang['EM_Settings'] ; $variables['Submit'] = $lang['Submit'] ; $variables['LANGUAGE'] = $language ; // dispay the page and the footer display_template( './templates/step1_simple.tpl', $variables) ; page_footer() ; exit ; } function display_step1b_idunno() { global $lang, $db, $easymod_install_version, $phpEx ; $variables = array() ; $access = array() ; // file access info get_file_access_info( $variables, $access) ; // comment out all 3 sections and then we'll reanble the one we want; based of off the file acces info, // determine which form to display $variables['WRITE_COPY_START'] = '<!--' ; $variables['WRITE_COPY_END'] = '-->' ; $variables['WRITE_NOCOPY_START'] = '<!--' ; $variables['WRITE_NOCOPY_END'] = '-->' ; $variables['NOWRITE_NOCOPY_START'] = '<!--' ; $variables['NOWRITE_NOCOPY_END'] = '-->' ; // golden! complete automation if (( $access['write_access']) && ( $access['copy_access'])) { $variables['WRITE_COPY_START'] = '' ; $variables['WRITE_COPY_END'] = '' ; } // write only else if ( $access['write_access']) { $variables['WRITE_NOCOPY_START'] = '' ; $variables['WRITE_NOCOPY_END'] = '' ; } // nada else { $variables['NOWRITE_NOCOPY_START'] = '' ; $variables['NOWRITE_NOCOPY_END'] = '' ; } // display header info, like the welcome message and pic page_header( 'auto detection') ; // assign template data $variables['U_FORM'] = 'easymod_install.'.$phpEx ; $variables['EM_support'] = $lang['EM_support'] ; $variables['EM_Settings'] = $lang['EM_Settings'] ; $variables['Submit'] = $lang['Submit'] ; $variables['Rescan'] = $lang['Rescan'] ; // dispay the page and the footer display_template( './templates/step1b_simple.tpl', $variables) ; page_footer() ; exit ; } function display_step1b_ftp() { global $lang, $db, $easymod_install_version, $phpEx, $language ; $variables = array() ; $access = array() ; // display header info, like the welcome message and pic page_header( '<b>Step 1 (gathering settings):</b> You have specified that you have FTP access. Enter your FTP information below.') ; // display the file access info get_file_access_info( $variables, $access) ; // assign template data $variables['U_FORM'] = 'easymod_install.'.$phpEx ; $variables['EM_support'] = $lang['EM_support'] ; $variables['EM_Settings'] = $lang['EM_Settings'] ; $variables['Submit'] = $lang['Submit'] ; $variables['Rescan'] = $lang['Rescan'] ; $variables['SEL_READ'] = 'server' ; $variables['SEL_WRITE'] = 'ftpb' ; $variables['SEL_MOVE'] = 'ftpa' ; $variables['LANGUAGE'] = $language ; get_ftp_settings( $variables, $access) ; $variables['EM_ftp_desc'] = 'Enter the information you would normally need to access your phpBB files via FTP.' ; // dispay the page and the footer display_template( './templates/step1b_ftp.tpl', $variables) ; page_footer() ; exit ; } function display_step1c_empw() { global $lang, $db, $easymod_install_version, $phpEx ; global $read, $write, $move, $ftp_user, $ftp_pass, $ftp_host, $ftp_dir, $ftp_debug, $ftp_type, $ftp_cache; $variables = array() ; $access = array() ; // display header info, like the welcome message and pic page_header( '<b>Step 1 (gathering settings):</b> EasyMOD takes security very seriously. A password will further restict who has access. If you are using FTP, then a password is required so that your FTP information can safely be crypted into the database.') ; // file access info get_file_access_info( $variables, $access) ; // assign template data $variables['U_FORM'] = 'easymod_install.'.$phpEx ; $variables['EM_support'] = $lang['EM_support'] ; $variables['EM_Settings'] = $lang['EM_Settings'] ; $variables['Submit'] = $lang['Submit'] ; $variables['Rescan'] = $lang['Rescan'] ; $variables['SEL_READ'] = $read ; $variables['SEL_WRITE'] = $write ; $variables['SEL_MOVE'] = $move ; $variables['FTP_USER'] = $ftp_user ; $variables['FTP_PASS'] = $ftp_pass ; $variables['FTP_HOST'] = $ftp_host ; $variables['FTP_DIR'] = $ftp_dir ; $variables['FTP_DEBUG'] = $ftp_debug ; $variables['FTP_TYPE'] = $ftp_type ; $variables['FTP_CACHE'] = $ftp_cache ; // fill the template info get_empw_settings( $variables) ; get_hidden_data( $variables, $access) ; // dispay the page and the footer display_template( './templates/step1c_empw.tpl', $variables) ; page_footer() ; exit ; } ?> --- NEW FILE: lang_easymod.php --- <?php /*************************************************************************** * lang_easymod.php [English] * ------------------- * begin : Saturday, Mar 22 2003 * copyright : (C) 2002-2004 by Nuttzy - Craig Nuttall * email : nu...@bl... * * $Id: lang_easymod.php,v 1.1 2005/04/24 14:59:52 bkettle Exp $ * ****************************************************************************/ /*************************************************************************** * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * ***************************************************************************/ // // EasyMOD // // EasyMOD alpha specific" ; //$lang['EM_SQL_Alpha2'] = '<b>NOTE:</b> SQL processing has been disabled in Alpha 3 and no alterations to your database will actually be preformed. It will be implemented in Beta 1. Press "Complete Installation" to continue.' ; // header $lang['EM_Title'] = 'EasyMOD - Automatic MOD Installer' ; // login $lang['EM_access_warning'] = 'A password is required to access the EasyMOD automatic MOD installer. Anyone with access could potentially access the database and FTP login information without the board owner knowing.' ; $lang['EM_password_title'] = 'Please enter the EasyMOD access password.' ; $lang['EM_password'] = 'Password' ; $lang['EM_access_EM'] = 'Access EasyMOD' ; // history (installed MODs) $lang['EM_Installed'] = 'Installed MODs' ; $lang['EM_installed_desc'] = 'All of these MODs have been installed at one time or another on your board. In later versions you will be able to get more details or uninstall the MODs from here.' ; $lang['EM_install_date'] = 'Installed' ; // settings $lang['EM_settings_pw'] = 'The EasyMOD password will allow you to restrict which admins can use EasyMOD. By having access to EasyMOD an admin could covertly obtain your database user/pass and FTP info. Leave both the password and the confirm password empty to have no password set. Leave the confirm empty to not change the password.' ; $lang['EM_read_server'] = 'server' ; $lang['EM_write_server'] = 'server' ; $lang['EM_write_ftp'] = 'buffer & ftp' ; $lang['EM_write_download'] = 'download' ; $lang['EM_write_screen'] = 'on screen' ; $lang['EM_move_copy'] = 'copy' ; $lang['EM_move_ftp'] = 'automated FTP' ; $lang['EM_move_exec'] = 'execute script' ; $lang['EM_move_manual'] = 'manually load' ; $lang['EM_settings'] = 'Settings'; $lang['EM_settings_desc'] = 'Set the settings here. <b>This page still needs work.</b> I do not validate what you enter yet so be careful not to mess it up!' ; $lang['EM_settings_update'] = 'Update Settings' ; $lang['EM_settings_success'] = 'Your EasyMOD settings have been updated successfully.' ; $lang['EM_pass_disabled'] = '(EM password disabled)' ; $lang['EM_pass_updated'] = '(EM password updated)' ; $lang['EM_pass_not_updated'] = '(EM password not updated)' ; // EasyMOD install $lang['EM_Intro'] = 'EasyMOD does in seconds what formally was a tedious process of manually editing files to install phpBB MODs. EasyMOD will attempt to install any phpBB MOD. However, approved EasyMOD Compliant MODs have the best chance to install successfully.' ; $lang['EM_none_installed'] = 'No MODs have been installed.' ; $lang['EM_All_Processed'] = 'All MODs have been processed.' ; $lang['EM_unprocessed_mods'] = 'These MODs appear in your MODs directory and have not been processed for your current version of phpBB. Clicking "Process" initiates a multi-step installation. Your current phpBB files will not be overwritten until the final step. MODs that are EasyMOD Compliant (EMC) are more likely to install than other MODs. More info on how to have EM install MODs is <a href="http://www.phpbb.com/phpBB/viewtopic.php?p=689082#689082">here</a>.' ; $lang['EM_Unprocessed'] = 'Unprocessed MODs' ; $lang['EM_process'] = 'Process' ; $lang['EM_support_thread'] = 'Support' ; $lang['EM_EMC'] = 'EMC' ; // Preview $lang['EM_preview'] = 'Preview' ; $lang['EM_preview_mode'] = 'Preview Mode' ; $lang['EM_preview_desc'] = 'The following is a list of files that the MOD specifies to be modified. Click "View" to view what changes will take place. The changes that EasyMOD will make to the files are bolded in red. Unfortunately, becasue of HTML formatting, some extra carriage returns are occasionally added, but they will not appear when the file is actually written.' ; $lang['EM_preview_filename'] = 'Filename' ; $lang['EM_preview_view'] = 'View' ; $lang['EM_preview_nofile'] = 'This MOD will not modify any files. Nothing to preview.' ; // History + Install $lang['EM_Mod'] = 'MOD' ; $lang['EM_File'] = 'File' ; $lang['EM_Version'] = 'Version' ; $lang['EM_Author'] = 'Author' ; $lang['EM_Description'] = 'Description' ; $lang['EM_phpBB_Version'] = 'phpBB ver' ; $lang['EM_Themes'] = 'Themes' ; $lang['EM_Languages'] = 'Languages' ; // process $lang['EM_proc_step1'] = 'Step 1 of 3' ; $lang['EM_proc_complete'] = 'Processing completed successfully!' ; $lang['EM_proc_desc'] = 'EasyMOD has completed processing of this MOD. Your original phpBB files remain unaltered. The next step will update your DB and replace your phpBB files with the newly altered ones. Your original phpBB files will automatically be backed up. However, <b>this is beta quality software and you are urged to make your own backups!!</b> Press the "Next Step" button to continue.' ; $lang['EM_unprocessed_commands'] = 'Unprocessed Commands' ; $lang['EM_unprocessed_desc'] = 'The following commands were not recognized by EasyMOD and were ignored. The MOD script line number is displayed.' ; $lang['EM_processed_commands'] = 'Commands Processed' ; $lang['EM_processed_desc'] = 'EasyMOD successfully processed the following commands:'; $lang['EM_proc_failed'] = 'Installation Failed' ; $lang['EM_proc_failed_desc'] = 'EasyMOD encountered the following error(s). A general error could be ABC. A critical error means D and you should do XYZ.' ; // process + post process $lang['EM_Mod_Data'] = 'MOD Data' ; $lang['EM_Mod_Title'] = 'MOD Title' ; $lang['EM_Proc_Themes'] = 'Processed Themes' ; $lang['EM_Proc_Languages'] = 'Processed Languages' ; $lang['EM_Files'] = 'Files Edited' ; // EasyMOD sql $lang['EM_sql_step2'] = 'Step 2 of 3' ; $lang['EM_SQL_Intro'] = '<b>Database Alterations</b> - DISABLED' ; $lang['EM_Alterations'] = 'Proposed Database Alterations' ; $lang['EM_Pseudo'] = 'Pseudo SQL' ; $lang['EM_Allow'] = 'Allow' ; $lang['EM_Perform'] = 'Perform DB alterations' ; $lang['EM_complete_install'] = 'Complete Installation' ; // post process $lang['EM_pp_step3'] = 'Step 3 of 3' ; $lang['EM_pp_install_comp'] = 'Installation Complete!' ; $lang['EM_pp_comp_desc'] = 'Installation of this MOD is now complete! You should verify that the MOD is now functioning properly for all installed themes and languages.' ; $lang['EM_pp_complete'] = 'completed' ; $lang['EM_pp_ready'] = 'ready' ; $lang['EM_pp_manual'] = 'MANUAL' ; $lang['EM_pp_from'] = 'Copy From [%s]' ; $lang['EM_pp_backups'] = 'Making Backups in [%s]' ; $lang['EM_pp_backup'] = 'Backup' ; $lang['EM_pp_download'] = 'Download' ; $lang['EM_pp_to'] = 'To' ; $lang['EM_pp_status'] = 'Status' ; // general use $lang['EM_next_step'] = 'Next Step' ; // // installer // // translate this and I'll hardcode the message into easymod_install.php $lang['EM_no_lang'] = '<b>CRITICAL ERROR:</b> the lang_easymod.$phpEx file could not be found in the easymod directory. EasyMOD cannot be installed without this file present.' ; // step 1 $lang['EM_step1'] = '<b>Step 1 (of 5):</b> Welcome to the EasyMOD installer. In this step EasyMOD has scanned the server to see what file access is available for the key steps of reading, writing, and moving files. EasyMOD has recommended what settings seem to best fit your configuration.' ; $lang['EM_Install_Info'] = 'Install Info' ; $lang['EM_Select_Language'] = 'Select Language' ; $lang['EM_Database_type'] = 'Database type' ; $lang['EM_phpBB_version'] = 'phpBB version' ; $lang['EM_EasyMOD_version'] = 'EasyMOD version' ; $lang['EM_EM_status'] = 'EM status' ; $lang['EM_new_install'] = 'New Install' ; $lang['EM_update_from'] = 'Update EM from' ; $lang['EM_File_Access'] = 'File Access Info' ; $lang['EM_failed'] = 'failed' ; $lang['EM_unattempted'] = 'unattempted' ; $lang['EM_no_module'] = 'module not loaded' ; $lang['EM_no_problem'] = 'NOTE: there is no problem if some items failed or were not attempted. This is normal.' ; $lang['EM_support'] = 'For support, visit <a href="http://area51.phpbb.com/phpBB22/viewforum.php?f=15" target="_blank">EasyMOD Central</a> over at Area51. No emails, IMs, or PMs please.' ; $lang['EM_read_access'] = 'read access' ; $lang['EM_write_access'] = 'write access' ; $lang['EM_root_write'] = 'root path write' ; $lang['EM_chmod_access'] = 'chmod access' ; $lang['EM_unlink_access'] = 'unlink access' ; $lang['EM_mkdir_access'] = 'mkdir access' ; $lang['EM_tmp_write'] = 'tmp path write' ; $lang['EM_ftp_ext'] = 'FTP extension' ; $lang['EM_copy_access'] = 'copy access' ; $lang['EM_Settings'] = 'Settings' ; $lang['EM_password_title'] = 'EasyMOD Password Protection' ; $lang['EM_password_desc'] = 'The EasyMOD password will allow you to restrict which admins can use EasyMOD. By having access to EasyMOD an admin could covertly obtain your database user/pass and FTP info.' ; $lang['EM_password_set'] = 'Set EM password' ; $lang['EM_password_confirm'] = 'Confirm EM password' ; $lang['EM_file_title'] = 'File Access' ; $lang['EM_file_desc'] = 'FTP access is the perferred method for file access. If you do not have FTP access, EasyMOD has recommended alternate settings.' ; $lang['EM_file_reading'] = 'Reading' ; $lang['EM_file_writing'] = 'Writing' ; $lang['EM_file_moving'] = 'Moving' ; $lang['EM_file_alt'] = 'alternate' ; $lang['EM_ftp_title'] = 'FTP Information' ; $lang['EM_ftp_desc'] = 'If you have FTP access to the web server, enter it below. The info will be stored fairly securely in the phpBB database. It will only be accessible through EasyMOD.' ; $lang['EM_ftp_dir'] = 'FTP path to phpBB2' ; $lang['EM_ftp_user'] = 'FTP Username' ; $lang['EM_ftp_pass'] = 'FTP Password' ; $lang['EM_ftp_host'] = 'FTP Server' ; $lang['EM_ftp_host_info'] = '(localhost should be fine)' ; $lang['EM_ftp_debug'] = 'FTP Debug Mode' ; $lang['EM_ftp_debug_not'] = '(only use if there is a problem)' ; $lang['EM_ftp_use_ext'] = 'PHP FTP Extension' ; $lang['EM_ftp_ext_not'] = '(only change if instructed to)' ; $lang['EM_ftp_ext_noext'] = 'Not an option. PHP FTP module not loaded.' ; $lang['EM_ftp_ext_notmp'] = 'Not an option. No /tmp write access.' ; $lang['EM_ftp_cache'] = 'Use FTP cache' ; $lang['EM_yes'] = 'Yes' ; $lang['EM_no'] = 'No' ; // step 2 $lang['EM_step2'] = '<b>Step 2 (of 5):</b> EasyMOD is now confirming your file access settings.' ; $lang['EM_test_write'] = 'Testing selected write method' ; $lang['EM_confirm_write'] = 'Write access method confirmed!'; $lang['EM_confirm_write_server'] = 'The modified files will be written on the server.' ; $lang['EM_confirm_write_ftp'] = "The modified files will be written to a buffer and then FTP'd into place." ; $lang['EM_confirm_write_local'] = 'The modified files will be downloaded locally through your web browser.' ; $lang['EM_confirm_write_screen'] = 'The modified file contents will be displayed on screen.' ; $lang['EM_test_move'] = 'Testing selected move method' ; $lang['EM_test_ftp1'] = '1) Logged in successfully' ; $lang['EM_test_ftp2'] = '2) CD to EasyMOD path successfully' ; $lang['EM_test_ftp3'] = '3) wrote to phpBB root successfully' ; $lang['EM_ftp_sync1'] = 'You have selected FTP for writing files but not for moving them. You must set both write and move to use FTP or else you cannot use FTP.' ; $lang['EM_ftp_sync2'] = 'You have selected FTP for moving files but not for writing them. You must set both write and move to use FTP or else you cannot use FTP.' ; $lang['EM_confirm_move'] = 'Move access method confirmed!' ; $lang['EM_confirm_move_ftp'] = 'The core phpBB files will automatically be replaced by modified files via FTP.' ; $lang['EM_confirm_move_copy'] = 'The core phpBB files will automatically be replaced by modified files using the copy function.' ; $lang['EM_confirm_move_exec'] = 'A script will be generated that you can execute to automatically replace the core phpBB files with the modified files.' ; $lang['EM_confirm_move_ftpm'] = 'You have selected to manually replace the core phpBB files with the modified files.' ; $lang['EM_install_EM'] = 'Install EasyMOD' ; $lang['EM_confirm_download'] = '<b>IMPORTANT:</b> To fully test the download method, make sure you can download this file. If it fails, you cannot use the "download" write method and should press "Rescan" to select another option.' ; // step 2 ftp test $lang['EM_ftp_testing'] = 'Testing FTP access...' ; $lang['EM_ftp_fail_conn'] = 'FTP ERROR: connection to %s failed.' ; $lang['EM_ftp_fail_conn_lh'] = "This error occurs frequently, particularly on hosts like Lycos. Back on step 1 you should try changing the FTP Server from 'localhost' to whatever hostname you typically use when you FTP." ; $lang['EM_ftp_fail_conn_invalid'] = "The connection failed because it appears you have provided an invalid FTP Server hostname. Hostnames cannot have slashes (/ or \\) or colons (:) in the name. Try reentering the FTP Server field." ; $lang['EM_fail_conn_info'] = 'The FTP Server you have specified could not be connected to. The following is recommended:'; $lang['EM_fail_conn_op1'] = 'Have you tried the default setting of <b>localhost</b>? This should be tried first.' ; $lang['EM_fail_conn_op2'] = 'Did you correctly enter the hostname? Try reentering.' ; $lang['EM_fail_conn_op3'] = 'Are you sure you have FTP access to the phpBB2 files? Obviously this is a requirement.' ; $lang['EM_fail_conn_op4'] = "Some servers have issues with the fsockopen method that EasyMOD attempts to use by default. If you have the PHP FTP extension loaded, then enable that option in step 1." ; $lang['EM_fail_login'] = 'FTP ERROR: login failed' ; $lang['EM_fail_login_info'] = 'The FTP Server was connected to, but the username and password were rejected. The following is recommended:' ; $lang['EM_fail_login_op1'] = 'Did you correctly type the username and password? Make sure your CAPS LOCK key is off and try again.' ; $lang['EM_fail_login_op2a'] = 'If you are 100% certain your user/pass is correct, then perhaps you are not connecting to the correct host. Try changing your FTP Server entry from localhost to the actual ftp host name.' ; $lang['EM_fail_login_op2b'] = 'Perhaps you are not connecting to the correct host. Try changing your FTP Server entry back to localhost or verify you have correctly entered the ftp host name.' ; $lang['EM_fail_pwd'] = 'FTP ERROR: pwd failed' ; $lang['EM_fail_pwd_info'] = 'You successfully logged into the server, but the pwd command (print working directory) failed.' ; $lang['EM_fail_cd'] = 'FTP ERROR: could not cd to %s' ; $lang['EM_fail_cd_info'] = 'You successfully logged into the server, but could not change direcory (CD) to the easymod directory. The following is recommended:' ; $lang['EM_fail_cd_op1'] = '<b>Important:</b> It appears you are including a domain name in the FTP Path setting. For most servers this is incorrect. Try reentering the FTP Path setting without the domain name included.' ; $lang['EM_fail_cd_op2'] = '<b>Important:</b> You have a slash (/) at the end of your FTP Path. Try removing this and retrying.' ; $lang['EM_fail_cd_op3'] = 'Are you sure you entered the correct path? Below is a directory listing of the files in the FTP root directory. The FTP root directory is simply the starting point when you connect. The path to the phpBB2 installation should begin with one of the directory names listed below.' ; $lang['EM_fail_cd_op4'] = 'Directory names are case sensitive. Be sure the easymod directory is all lowercase.' ; $lang['EM_fail_cd_op5'] = "In some *very rare* cases it's possible that you are not connecting to the proper FTP Server. Try specifying the hostname in the FTP Server field." ; $lang['EM_fail_cd_op6'] = "Some servers have issues with the passive mode that EasyMOD attempts to use by default. If you have the PHP FTP extension loaded, then enable that option in step 1." ; $lang['EM_fail_cd_pwd'] = 'FTP Error: Directory info could not be obtained. This usually indicates solution 4 listed above.' ; $lang['EM_fail_cd_nlist'] = 'FTP Error: A file listing could not be obtained. This usually indicates solution 4 listed above.' ; $lang['EM_fail_cd_nlist_no'] = 'No files to list.' ; $lang['EM_ftp_root'] = 'FTP root directory:' ; $lang['EM_dir_list'] = 'Directory listing:</b> your FTP Path should start with one of the directories listed below' ; $lang['EM_fail_pwd'] = 'FTP ERROR: could not pwd' ; $lang['EM_fail_put'] = 'FTP ERROR: could not write to phpBB root' ; $lang['EM_fail_put_info'] = 'EasyMOD requires that your <b>%s</b> account have write access on all directories and files in the phpBB directory. Please confirm all files and directories are set to at least 744 access.' ; $lang['EM_ftp_phpbb_root'] = 'phpBB root directory:' ; $lang['EM_fail_reput'] = 'FTP ERROR: could not overwrite phpBB root test file' ; $lang['EM_fail_delete'] = '<b>FTP WARNING:</b> could not remove test file (not critical)' ; // step 3 $lang['EM_step3'] = '<b>Step 3 (of 5):</b> EasyMOD is now installing itself as it would any MOD. There is a two step process of first creating the modified files and then moving them into place. The modified file(s) do no effect the core phpBB files in any way until the next step. Click the "Complete Processing" button to move the files into place.' ; $lang['EM_processing_files'] = 'Processing Files' ; $lang['EM_parsing'] = 'Parsing' ; $lang['EM_finding'] = 'Finding' ; $lang['EM_insert'] = 'Insert' ; $lang['EM_ifinding'] = 'In-line Finding' ; $lang['EM_iafter'] = 'In-line after, add' ; $lang['EM_before'] = 'before' ; $lang['EM_after'] = 'after' ; $lang['EM_build_post'] = 'Building Post Process Actions' ; $lang['EM_build_post_desc'] = 'The following actions will be executed in the final step' ; $lang['EM_complete_processing'] = 'Complete Processing' ; // step 4 $lang['EM_step4'] = '<b>Step 4 (of 5):</b> Depending on your selection, the modified files have been automatically moved into place or prepared for you to move them manually. If there are no errors, click the "Confirm" button to update your database and complete the installation process.' ; $lang['EM_add_db'] = 'Adding EasyMOD table to your database' ; $lang['EM_exec_sql'] = 'Executing SQL' ; $lang['EM_progress'] = 'Progress' ; $lang['EM_done'] = 'Done' ; $lang['EM_result'] = 'Result' ; $lang['EM_already_exist'] = 'The table was previously created' ; $lang['EM_failed_sql'] = 'Some queries failed, the statements and errors are listing below' ; $lang['EM_no_worry'] = 'This is probably nothing to worry about, install will continue. Should this fail to complete you may need to seek help at our development board.' ; $lang['EM_no_errors'] = 'No errors' ; $lang['EM_update_db'] = 'Updating EasyMOD table data' ; $lang['EM_store_entries'] = 'Storing config table entries' ; $lang['EM_do_worry'] = 'Could not successfully update table. Something is wrong and install cannot complete.' ; $lang['EM_complete_post'] = 'Completing Post-Process' ; $lang['EM_completed'] = 'Completed' ; $lang['EM_admin_panel'] = 'You can now proceed to the Admin Control Panel and select "Install MODs" under "MOD Center". You may install the included MODs if you desire. Return to <a href="../../../index.php">Forum Index</a>.' ; $lang['EM_confirm'] = 'Confirm' ; $lang['EM_move_files'] = '<b>IMPORTANT:</b> Before pressing confirm, move files into place.' ; // step 5 $lang['EM_step5'] = '<b>Final Step:</b> EasyMOD is now confirming all files have been correctly moved into place. If confirmed, then your database will be updated and installation will be complete!' ; $lang['EM_confirming_mod'] = 'Confirming Modifications' ; $lang['EM_confirmed'] = 'Confirmed!' ; $lang['EM_confirm_lang'] = 'lang_admin.php, looking for' ; $lang['EM_confirm_admin'] = 'admin_easymod.php, looking for' ; $lang['EM_confirm_exist'] = 'verifying existence' ; $lang['EM_confirm_failed'] = 'Install Failed' ; $lang['EM_confirm_fix'] = 'EM is not properly installed and you will need to fix the above error(s).' ; $lang['EM_install_completed'] = 'Installation Confirmed. EasyMOD is installed!' ; // debug info $lang['EM_debug_header'] = '<b>Debug Info:</b> The following information about your system config has been formatted for display in a forum post.' ; $lang['EM_debug_display'] = 'Display Debug Info' ; $lang['EM_debug_info'] = 'Expanded Debug Info' ; $lang['EM_debug_format'] = 'formatted for forum posting' ; $lang['EM_debug_installer'] = 'EM installer' ; $lang['EM_debug_work_dir'] = 'Working Dir' ; $lang['EM_debug_step'] = 'Install Step' ; $lang['EM_debug_mode'] = 'Mode' ; $lang['EM_debug_the_error'] = 'The Error' ; $lang['EM_debug_no_error'] = 'No error.' ; $lang['EM_debug_permissions'] = 'Permissions' ; $lang['EM_debug_sys_errors'] = 'including system errors' ; $lang['EM_debug_recommend'] = 'Recommendations' ; $lang['EM_debug_write'] = 'write' ; $lang['EM_debug_move'] = 'move' ; $lang['EM_debug_ftp_dir'] = 'ftp dir' ; $lang['EM_debug_ftp_debug'] = 'ftp debug' ; $lang['EM_debug_ftp_ext'] = 'ftp ext' ; $lang['EM_debug_ftp_notest'] = 'Not testing FTP since it is not being used.' ; $lang['EM_debug_selected'] = 'Selected settings' ; $lang['EM_debug_listing'] = 'CWD Listing' ; // cwd = current working directory $lang['EM_debug_ftp_test'] = 'FTP access test' ; $lang['EM_debug_success'] = 'successful' ; // forms $lang['Submit'] = 'Submit'; $lang['Rescan'] = 'Rescan'; // // errors // $lang['EM_err_warning'] = 'Warning' ; $lang['EM_err_error'] = 'Error' ; $lang['EM_err_critical_error'] = 'Critical Error' ; $lang['EM_err_secondary'] = 'Secondary Error - Critical' ; $lang['EM_err_cwd'] = 'Current working directory' ; $lang['EM_err_install_dir'] = '<b>Critical Error:</b> EasyMOD is not in the correct directory to be installed. It must be placed in a admin/mods/easymod off the phpBB root prior to installation.<br>' ; $lang['EM_err_no_subsilver'] = '<b>Critical Error:</b> EasyMOD cannot be installed. The subSilver template is not present in the templates directory. This template is required as the baseline template for MOD installations. The subSilver template is provided in the standard phpBB download at <a href="http://www.phpbb.com">www.phpbb.com</a>.' ; $lang['EM_err_no_english'] = '<b>Critical Error:</b> EasyMOD cannot be installed. The English language package is not present in the language directory. This language is required as the baseline language package for MOD installations. The English language package is provided in the standard phpBB download at <a href="http://www.phpbb.com">www.phpbb.com</a>.' ; $lang['EM_err_dupe_install'] = 'This version of EM has already been installed. Terminating to prevent reinstallation.' ; $lang['EM_err_pw_match'] = '<b>Error:</b> The EasyMOD passwords do not match. Please retry by pressing the "Rescan" button.' ; $lang['EM_err_acc_write'] = '<b>ACCESS ERROR:</b> phpBB does not have permission to write to the EasyMOD directory.' ; $lang['EM_err_acc_mkdir'] = '<b>ACCESS ERROR:</b> phpBB does not have permission to create new directories.' ; $lang['EM_err_copy'] = '<b>COPY ERROR:</b> You do not have copy access. Move method cannot be used.' ; $lang['EM_err_no_write'] = '<b>MOVE ERROR:</b> The write method you have selected does not create the files on there server. Therefore, using either automated FTP or the copy method is not permitted for the move method.' ; $lang['EM_err_config_table'] = 'Could not obtain Config Table list' ; $lang['EM_err_open_pp'] = '<b>Critical Error:</b> Cannot open post process file for writing.' ; $lang['EM_err_attempt_remainder'] = 'ATTEMPING REMAINDER OF POST PROCESS' ; $lang['EM_err_write_pp'] = '<b>Critical Error:</b> Unable to complete writing of post process file.' ; $lang['EM_err_no_step'] = '<b>Critical Error:</b> Undefinied install step.' ; $lang['EM_err_insert'] = 'Could not insert %s config information.' ; $lang['EM_err_update'] = 'Could not update %s config information.' ; $lang['EM_err_find'] = 'Could not find' ; $lang['EM_err_pw_fail'] = 'INVALID PASSWORD SUPPLIED' ; $lang['EM_err_find_fail'] = 'FIND FAILED: In file [%s] could not find' ; $lang['EM_err_ifind_fail'] = 'IN-LINE FIND FAILED: In file [%s] could not find' ; // admin_easymod errors $lang['EM_trace'] = 'Function Trace' ; $lang['EM_FAQ'] = 'FAQ' ; $lang['EM_report'] = 'Report' ; $lang['EM_error_detail'] = 'Error Detail' ; $lang['EM_line_num'] = 'MOD script line #' ; $lang['EM_err_config_info'] = 'Could not obtain Config information' ; $lang['EM_err_no_process_file'] = 'Critical Error: There is no filed specified to process.' ; $lang['EM_err_set_pw'] = 'The EasyMOD passwords do not match. Settings not updated.' ; $lang['EM_err_em_info'] = 'Could not obtain EasyMod information' ; $lang['EM_err_phpbb_ver'] = 'Could not obtain phpBB version info' ; $lang['EM_err_backup_open'] = 'Could not open [%s] for reading.' ; $lang['EM_err_no_find'] = 'FAILED: malformed script. A FIND was not previously performed.' ; $lang['EM_err_comm_open'] = 'OPEN FAILED: No file name supplied in MOD script' ; $lang['EM_err_comm_find'] = 'FIND FAILED: No target supplied for FIND command in MOD script' ; $lang['EM_err_inline_body'] = 'FAILED: Invalid command body supplied in MOD script' ; $lang['EM_err_no_ifind'] = 'FAILED: Malformed script. An IN-LINE FIND was not previously performed.' ; $lang['EM_err_comm_copy'] = 'COPY FAILED: The target file to be copied [%s%s] could not be found.' ; $lang['EM_err_modify'] = 'CRITICAL ERROR: Could not modify [%s]' ; $lang['EM_err_theme_info'] = 'Could not query database for theme info' ; $lang['EM_err_copy_format'] = 'Could not perform improperly formed COPY command.' ; // mod_io errors $lang['EM_modio_mkdir_chdir'] = 'FTP ERROR: could not change directory to [%s]<br>Current dir: [%s]' ; $lang['EM_modio_mkdir_mkdir'] = 'FTP ERROR: could not make directory [%s]<br>Current dir: [%s]' ; $lang['EM_modio_open_read'] = 'Could not open [%s] for reading.' ; $lang['EM_modio_open_write'] = 'Could not open [%s] for writing.' ; $lang['EM_modio_open_none'] = 'Write method not recognized.' ; $lang['EM_modio_close_chdir'] = 'FTP ERROR: could not change directory to [%s]' ; $lang['EM_modio_close_ftp'] = 'FTP ERROR: could not write file [%s]' ; $lang['EM_modio_prep_conn'] = 'FTP ERROR: could not connect to localhost' ; $lang['EM_modio_prep_login'] = 'FTP ERROR: login failed' ; $lang['EM_modio_prep_chdir'] = 'FTP ERROR: could not chdir to phpBB root directory' ; $lang['EM_modio_move_copy'] = 'COPY ERROR: could not move file [%s] to [%s]' ; $lang['EM_modio_move_ftpa'] = 'FTP ERROR: could not move file [%s] to [%s]' ; ?> --- NEW FILE: easymod_install.php --- <?php /*************************************************************************** * easymod_install.php * ------------------- * begin : Wednesday, March 15, 2002 * copyright : (C) 2002-2004 by Nuttzy - Craig Nuttall * email : nu...@bl... * * $Id: easymod_install.php,v 1.1 2005/04/24 14:59:52 bkettle Exp $ * ***************************************************************************/ /*************************************************************************** * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * [...1828 lines suppressed...] // echo "<br>\n" ; echo "<br>\n" ; echo '<br><br><h2><span class="ok"><b>' . $lang['EM_install_completed'] . "</b></span></h2>\n" ; echo '<p>'... [truncated message content] |
From: Brendan K. <bk...@us...> - 2005-04-24 14:57:20
|
Update of /cvsroot/easymod/easymod2/mods/easymod/includes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11892/includes Log Message: Directory /cvsroot/easymod/easymod2/mods/easymod/includes added to the repository |