|
From: Florin C B. <ory...@us...> - 2013-04-05 11:38:17
|
Update of /cvsroot/mxbb/mx_smartor/admin In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv26893 Modified Files: admin_album_ext.php Log Message: Index: admin_album_ext.php =================================================================== RCS file: /cvsroot/mxbb/mx_smartor/admin/admin_album_ext.php,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** admin_album_ext.php 9 Aug 2011 04:32:19 -0000 1.6 --- admin_album_ext.php 5 Apr 2013 11:38:14 -0000 1.7 *************** *** 26,34 **** require($module_root_path . 'album_mod/includes/album_constants.'.$phpEx); - // - // Begin program proper - // - $mode = ''; - // ********************************************************************** --- 26,29 ---- *************** *** 47,67 **** // Mode setting // ! // ! if ($mx_request_vars->is_post('submit') ) ! { ! $mode = 'submit'; ! } ! else ! { ! $mode = $mx_request_vars->request('mode', MX_TYPE_NO_TAGS, ''); ! } - /* - if ($mx_request_vars->is_empty_post('fullurl') || $mx_request_vars->is_empty_post('fullurl')) - { - mx_message_die(GENERAL_ERROR, "Failed to update fullurl."); - } - */ - // // Main db settings --- 42,47 ---- // Mode setting // ! $mode = $mx_request_vars->request('mode', MX_TYPE_NO_TAGS, ''); // // Main db settings *************** *** 69,73 **** // $sql = "SELECT * ! FROM " . ALBUM_CONFIG_TABLE; if ( !$result = $db->sql_query( $sql ) ) { --- 49,53 ---- // $sql = "SELECT * ! FROM " . ALBUM_CONFIG_TABLE; if ( !$result = $db->sql_query( $sql ) ) { *************** *** 76,94 **** else { ! while ($row = $db->sql_fetchrow($result)) { $config_name = $row['config_name']; $config_value = $row['config_value']; $default_config[$config_name] = $config_value; ! ! $new[$config_name] = ( isset($_POST[$config_name]) ) ? $_POST[$config_name] : $default_config[$config_name]; ! if (isset($_POST['submit'])) { $sql = "UPDATE " . ALBUM_CONFIG_TABLE . " SET ! config_value = '" . str_replace( "\'", "''", $new[$config_name] ) . "' ! WHERE config_name = '$config_name'"; if ( !$db->sql_query( $sql ) ) { ! mx_message_die( GENERAL_ERROR, "Failed to update general configuration for $config_name", "", __LINE__, __FILE__, $sql ); } $mx_cache->put('album_config', $new); --- 56,74 ---- else { ! while ( $row = $db->sql_fetchrow( $result ) ) { $config_name = $row['config_name']; $config_value = $row['config_value']; $default_config[$config_name] = $config_value; ! ! $new[$config_name] = ( isset( $_POST[$config_name] ) ) ? $_POST[$config_name] : $default_config[$config_name]; ! if ( isset( $_POST['submit'] ) ) { $sql = "UPDATE " . ALBUM_CONFIG_TABLE . " SET ! config_value = '" . str_replace( "\'", "''", $new[$config_name] ) . "' ! WHERE config_name = '$config_name'"; if ( !$db->sql_query( $sql ) ) { ! mx_message_die( GENERAL_ERROR, "Failed to update general configuration for $config_name", "", __LINE__, __FILE__, $sql ); } $mx_cache->put('album_config', $new); *************** *** 96,100 **** } $db->sql_freeresult($result); ! if (isset($_POST['submit'])) { $message = $lang['album_config_updated'] . "<br /><br />" . sprintf( $lang['Click_return_album_config'], "<a href=\"" . mx_append_sid( "admin_album_ext.$phpEx" ) . "\">", "</a>" ) . "<br /><br />" . sprintf( $lang['Click_return_admin_index'], "<a href=\"" . mx_append_sid( $mx_root_path . "admin/index.$phpEx?pane=right" ) . "\">", "</a>" ); --- 76,81 ---- } $db->sql_freeresult($result); ! ! if ( isset( $_POST['submit'] ) ) { $message = $lang['album_config_updated'] . "<br /><br />" . sprintf( $lang['Click_return_album_config'], "<a href=\"" . mx_append_sid( "admin_album_ext.$phpEx" ) . "\">", "</a>" ) . "<br /><br />" . sprintf( $lang['Click_return_admin_index'], "<a href=\"" . mx_append_sid( $mx_root_path . "admin/index.$phpEx?pane=right" ) . "\">", "</a>" ); *************** *** 102,115 **** } } ! // // Populate parameter variables // $album_index = $new['index']; ! $album_fullurl = str_replace('http://www.', 'http://', $new['fullurl']); // $other = $new['other']; $override_default_pages = $new['override_default_pages']; $integration_enabled = $new['enable_integration']; - $fullurl_enabled = $new['enable_fullurl']; // --- 83,97 ---- } } ! // // Populate parameter variables // $album_index = $new['index']; ! // $other = $new['other']; + + $override_default_pages = $new['override_default_pages']; $integration_enabled = $new['enable_integration']; // *************** *** 117,121 **** // $pagelist_index = get_list_formatted('page_list', $new['index'], 'index'); ! // $pagelist_other = get_list_formatted('page_list', $new['other'], 'other'); // --- 99,104 ---- // $pagelist_index = get_list_formatted('page_list', $new['index'], 'index'); ! ! // $pagelist_other = get_list_formatted('page_list', $new['other'], 'other'); // *************** *** 125,129 **** $template->assign_vars( array( ! 'S_ALBUM_ACTION' => mx_append_sid("admin_album_ext.$phpEx"), 'L_ALBUM_TITLE' => $lang['mx_album_admin'], --- 108,112 ---- $template->assign_vars( array( ! 'S_ALBUM_ACTION' => mx_append_sid( "admin_album_ext.$phpEx" ), 'L_ALBUM_TITLE' => $lang['mx_album_admin'], *************** *** 144,157 **** 'L_ALBUM_INTEGRATION_ENABLED_YES' => $lang['integration_enabled_yes'], 'L_ALBUM_INTEGRATION_ENABLED_NO' => $lang['integration_enabled_no'], - - 'L_ALBUM_FULLURL_ENABLED_YES' => $lang['fullurl_enabled_yes'], - 'L_ALBUM_FULLURL_ENABLED_NO' => $lang['fullurl_enabled_no'], ! 'ALBUM_INTEGRATION_ENABLED_YES' => ($integration_enabled == '1') ? ' checked="checked"' : '', ! 'ALBUM_INTEGRATION_ENABLED_NO' => ($integration_enabled == '0') ? ' checked="checked"' : '', ! ! 'ALBUM_FULLURL_ENABLED_YES' => ($fullurl_enabled == '1') ? ' checked="checked"' : '', ! 'ALBUM_FULLURL_ENABLED_NO' => ($fullurl_enabled == '0') ? ' checked="checked"' : '', ! // // Default static settings or block settings --- 127,134 ---- 'L_ALBUM_INTEGRATION_ENABLED_YES' => $lang['integration_enabled_yes'], 'L_ALBUM_INTEGRATION_ENABLED_NO' => $lang['integration_enabled_no'], ! 'ALBUM_INTEGRATION_ENABLED_YES' => ( $integration_enabled == '1' ) ? ' checked="checked"' : '', ! 'ALBUM_INTEGRATION_ENABLED_NO' => ( $integration_enabled == '0' ) ? ' checked="checked"' : '', ! // // Default static settings or block settings *************** *** 166,174 **** 'OVERRIDE_DEFAULT_PAGES_CHECKBOX_NO' => ( $override_default_pages == '0' ) ? ' checked="checked"' : '', 'L_ALBUM_INDEX' => $lang['index'], 'ALBUM_INDEX' => $pagelist_index, ! ! 'L_FULLURL_INDEX' => $lang['fullurl'], ! 'ALBUM_FULLURL' => $album_fullurl, 'L_SUBMIT' => $lang['Submit'], --- 143,152 ---- 'OVERRIDE_DEFAULT_PAGES_CHECKBOX_NO' => ( $override_default_pages == '0' ) ? ' checked="checked"' : '', + 'L_ALBUM_INDEX' => $lang['index'], 'ALBUM_INDEX' => $pagelist_index, ! ! // 'L_SUBMIT' => $lang['submit'], ! // 'L_RESET' => $lang['reset'], 'L_SUBMIT' => $lang['Submit'], *************** *** 177,182 **** )); ! $template->pparse("body"); ! include_once($mx_root_path . 'admin/page_footer_admin.' . $phpEx); ?> --- 155,160 ---- )); ! $template->pparse( "body" ); ! include_once( $mx_root_path . 'admin/page_footer_admin.' . $phpEx ); ?> |