[Easymod-cvs] easymod2/mods/easymod easymod_display_functions.php,1.3,1.4
Status: Beta
Brought to you by:
wgeric
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 ; |