[Easymod-cvs] easymod2/mods/easymod/includes admin_easymod.php.txt,1.13,1.14 mod_history.tpl,1.1,1.2
Status: Beta
Brought to you by:
wgeric
From: Eric F. <wg...@us...> - 2005-06-11 23:31:41
|
Update of /cvsroot/easymod/easymod2/mods/easymod/includes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19046/mods/easymod/includes Modified Files: admin_easymod.php.txt mod_history.tpl Log Message: - Fixed some language bugs - Added a details page to the history that I wrote a long time ago Index: mod_history.tpl =================================================================== RCS file: /cvsroot/easymod/easymod2/mods/easymod/includes/mod_history.tpl,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** mod_history.tpl 24 Apr 2005 14:59:53 -0000 1.1 --- mod_history.tpl 11 Jun 2005 23:31:32 -0000 1.2 *************** *** 22,26 **** <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 --> --- 22,31 ---- <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"> ! <form action="{install.S_ACTION}" method="post"> ! {install.S_HIDDEN_FIELDS} ! <input type="submit" name="submit" value="{S_DETAILS}" class="liteoption"> ! </form> ! </td> </tr> <!-- END install --> Index: admin_easymod.php.txt =================================================================== RCS file: /cvsroot/easymod/easymod2/mods/easymod/includes/admin_easymod.php.txt,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** admin_easymod.php.txt 11 Jun 2005 23:05:54 -0000 1.13 --- admin_easymod.php.txt 11 Jun 2005 23:31:32 -0000 1.14 *************** *** 660,664 **** ($mode != 'display_backup') && ($mode != 'download_backup') && ($mode != 'SQL_view') && ($mode != 'SQL_execute') && ! ($mode != 'update') && ($mode != 'process') && ($mode != 'post_process') && ($mode != 'diy_process')) { $mode = 'install' ; --- 660,665 ---- ($mode != 'display_backup') && ($mode != 'download_backup') && ($mode != 'SQL_view') && ($mode != 'SQL_execute') && ! ($mode != 'update') && ($mode != 'process') && ($mode != 'post_process') && ($mode != 'diy_process') && ! ($mode != 'history_details') && ($mode != 'del_files') && ($mode != 'del_record') && ($mode != 'restore_backups') && ($mode != 'install_lang') && ($mode != 'install_themes') && ($mode != 'uninstall')) { $mode = 'install' ; *************** *** 1019,1023 **** 'L_THEMES' => $lang['EM_Themes'], 'L_LANGUAGES' => $lang['EM_Languages'], ! 'L_NONE_INSTALLED' => $lang['EM_none_installed']) ); --- 1020,1025 ---- 'L_THEMES' => $lang['EM_Themes'], 'L_LANGUAGES' => $lang['EM_Languages'], ! 'L_NONE_INSTALLED' => $lang['EM_none_installed'], ! 'S_DETAILS' => $lang['EM_details']) ); *************** *** 1044,1047 **** --- 1046,1053 ---- 'URL' => $row['mod_author_url'], 'PHPBB_VER' => $row['mod_phpBB_version'], + + 'S_ACTION' => append_sid('admin_easymod.' . $phpEx), + 'S_HIDDEN_FIELDS' => '<input type="hidden" name="mod_id" value="' . $row['mod_id'] . '"><input type="hidden" name="mode" value="history_details"><input type="hidden" name="password" value="' . $password . '">', + ///////////////// ///////////////// blah, what about schema name? *************** *** 1058,1061 **** --- 1064,1230 ---- } + // + // history details + // + else if ( $mode == 'history_details' ) + { + // get the mod id + if ( isset($HTTP_POST_VARS['mod_id']) ) + { + $mod_id = intval($HTTP_POST_VARS['mod_id']); + } + else + { + message_die(GENERAL_ERROR, $lang['EM_No_mod_selected']); + } + + // load the template + $template->set_filenames(array( + "body" => "admin/mod_history_details.tpl") + ); + + $template->assign_vars(array( + 'L_MOD_DATA' => $lang['EM_Mod_Data'], + 'L_MOD_TITLE' => $lang['EM_Mod_Title'], + 'L_MOD_DESCRIPTION' => $lang['EM_Description'], + 'L_AUTHOR' => $lang['EM_Author'], + 'L_INSTALL_DATE' => $lang['EM_install_date'], + 'L_PHPBB_VER' => $lang['EM_phpBB_Version'], + 'L_THEMES' => $lang['EM_Proc_Themes'], + 'L_LANGUAGES' => $lang['EM_Proc_Languages'], + 'L_FILES' => $lang['EM_Files'], + 'L_DB_ALTS' => $lang['EM_db_alt'], + 'L_ADDED' => $lang['EM_tables_added'], + 'L_ALTERED' => $lang['EM_tables_altered'], + 'L_INSERTED' => $lang['EM_rows_added'], + + 'L_DELETE_FILES' => $lang['EM_del_files'], + 'L_DELETE_RECORD' => $lang['EN_del_record'], + 'L_INSTALL_LANG' => $lang['EM_install_new_lang'], + 'L_INSTALL_THEMES' => $lang['EM_install_new_themes'], + 'L_RESTORE_BACKUPS' => $lang['EM_restore_backups'], + 'L_UNISTALL' => $lang['EM_uninstall'], + 'L_GO' => $lang['Go'], + + 'S_ACTION' => append_sid($phpbb_root_path . 'admin/admin_easymod.'.$phpEx), + 'S_HIDDEN_FIELDS' => '<input type="hidden" name="mod_id" value="' . $mod_id . '"><input type="hidden" name="password" value="' . $password . '">') + ); + + $sql = "SELECT * FROM " . EASYMOD_TABLE . " + WHERE mod_id = $mod_id + LIMIT 0, 1"; + + if( !$result = $db->sql_query($sql) ) + { + message_die(GENERAL_ERROR, $lang['EM_err_em_info'], '', __LINE__, __FILE__, $sql); + } + + $row = $db->sql_fetchrow($result); + + // file + $file = explode('/', $row['mod_file']); + + if ( file_exists('./mods/' . $row['mod_file']) ) + { + $temp_url = $phpbb_root_path . 'admin/mods/' . $row['mod_file']; + $mod_file = '<a href="' . $temp_url . '" class="gen" target="_blank">' . $file[1] . '</a>'; + + $template->assign_block_vars('switch_install_file', array()); + } + else + { + $mod_file = $file[1]; + } + + // see what files are there so we can work with them + if ( file_exists('./mods/' . $file[0] . '/processed/') || file_exists('./mods/' . $file[0]. '/backups/') ) + { + $template->assign_block_vars('switch_files', array()); + } + // see if backups are there so we can give them the option to restore them + if ( file_exists('./mods/' . $file[0]. '/backups/') ) + { + $template->assign_block_vars('switch_backups', array()); + } + + $template->assign_vars(array( + 'TITLE' => $row['mod_title'], + 'VERSION' => $row['mod_version'], + 'MOD_FILE' => $mod_file, + 'DESCRIPTION' => $row['mod_description'], + 'AUTHOR' => $row['mod_author_handle'], + 'EMAIL' => $row['mod_author_email'], + 'REAL_NAME' => $row['mod_author_name'], + 'URL' => $row['mod_author_url'], + 'DATE' => create_date($board_config['default_dateformat'], $row['mod_process_date'], $board_config['board_timezone']), + 'PHPBB_VERSION' => $row['mod_phpBB_version'], + 'THEMES' => $row['mod_processed_themes'], + 'LANGUAGES' => $row['mod_processed_langs'], + 'FILES' => $row['mod_files_edited'], + 'ADDED' => $row['mod_tables_added'], + 'ALTERED' => $row['mod_tables_altered'], + 'INSERTED' => $row['mod_rows_inserted']) + ); + + } + + // + // delete MOD files + // + else if ( $mode == 'del_files' ) + { + // display which folders to delete, either + // processed, backups, or the complete folder + message_die(GENERAL_MESSAGE, $lang['Comming_soon']); + + } + + // + // delete MOD record + // + else if ( $mode == 'del_record' ) + { + // display confirm and delete sql entry + message_die(GENERAL_MESSAGE, $lang['Comming_soon']); + + } + + // + // Restore Backups + // + else if ( $mode == 'restore_backups' ) + { + // display confirm and move the backups into place + message_die(GENERAL_ERROR, $lang['Comming_soon']); + + } + + // + // Install MOD on new Languages + // + else if ( $mode == 'install_lang' ) + { + // list which languages so user can choose and go through install process + message_die(GENERAL_ERROR, $lang['Comming_soon']); + + } + + // + // Install MOD on new themes + // + else if ( $mode == 'install_themes' ) + { + // list which themes so user can choose and go through install process + message_die(GENERAL_ERROR, $lang['Comming_soon']); + + } + + // + // uninstall the mod + // + else if ( $mode == 'unistall_mod' ) + { + message_die(GENERAL_MESSAGE, $lang['Comming_soon']); + } // |