|
From: Florin C B. <ory...@us...> - 2013-06-17 18:07:53
|
Update of /cvsroot/mxbb/mx_smartor/admin In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv18969 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.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** admin_album_ext.php 17 Jun 2013 18:05:07 -0000 1.8 --- admin_album_ext.php 17 Jun 2013 18:07:51 -0000 1.9 *************** *** 24,27 **** --- 24,32 ---- require($module_root_path . 'album_mod/includes/album_constants.'.$phpEx); + // + // Begin program proper + // + $mode = ''; + // ********************************************************************** *************** *** 40,45 **** // Mode setting // ! $mode = $mx_request_vars->request('mode', MX_TYPE_NO_TAGS, ''); // // Main db settings --- 45,65 ---- // 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 *************** *** 47,51 **** // $sql = "SELECT * ! FROM " . ALBUM_CONFIG_TABLE; if ( !$result = $db->sql_query( $sql ) ) { --- 67,71 ---- // $sql = "SELECT * ! FROM " . ALBUM_CONFIG_TABLE; if ( !$result = $db->sql_query( $sql ) ) { *************** *** 54,72 **** 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); --- 74,92 ---- 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); *************** *** 74,79 **** } $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>" ); --- 94,98 ---- } $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>" ); *************** *** 81,95 **** } } ! // // Populate parameter variables // $album_index = $new['index']; ! // $other = $new['other']; - - $override_default_pages = $new['override_default_pages']; $integration_enabled = $new['enable_integration']; // --- 100,113 ---- } } ! // // 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']; // *************** *** 97,102 **** // $pagelist_index = get_list_formatted('page_list', $new['index'], 'index'); ! ! // $pagelist_other = get_list_formatted('page_list', $new['other'], 'other'); // --- 115,119 ---- // $pagelist_index = get_list_formatted('page_list', $new['index'], 'index'); ! // $pagelist_other = get_list_formatted('page_list', $new['other'], 'other'); // *************** *** 106,110 **** $template->assign_vars( array( ! 'S_ALBUM_ACTION' => mx_append_sid( "admin_album_ext.$phpEx" ), 'L_ALBUM_TITLE' => $lang['mx_album_admin'], --- 123,127 ---- $template->assign_vars( array( ! 'S_ALBUM_ACTION' => mx_append_sid("admin_album_ext.$phpEx"), 'L_ALBUM_TITLE' => $lang['mx_album_admin'], *************** *** 125,132 **** '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 --- 142,155 ---- '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 *************** *** 141,150 **** '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'], --- 164,172 ---- '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'], *************** *** 153,158 **** )); ! $template->pparse( "body" ); ! include_once( $mx_root_path . 'admin/page_footer_admin.' . $phpEx ); ?> --- 175,180 ---- )); ! $template->pparse("body"); ! include_once($mx_root_path . 'admin/page_footer_admin.' . $phpEx); ?> |