Changeset 2876 for trunk/admin/inc/class.uimainscreen.inc.php
- Timestamp:
- 05/28/10 09:36:15 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/admin/inc/class.uimainscreen.inc.php
r2802 r2876 23 23 { 24 24 25 $html = createObject('phpgwapi.html');25 //$html = createObject('phpgwapi.html'); 26 26 $section = addslashes($_REQUEST['section']); 27 27 $select_lang = addslashes($_REQUEST['select_lang']); … … 95 95 if (empty($section)) 96 96 { 97 $GLOBALS['phpgw']->js->validate_file('jscode','openwindow','admin'); 98 //$GLOBALS['phpgw']->common->phpgw_header(); 99 //echo parse_navbar(); 97 100 98 $GLOBALS['phpgw']->js->validate_file('jscode','openwindow','admin'); 99 //$GLOBALS['phpgw']->common->phpgw_header(); 100 //echo parse_navbar(); 101 102 103 $GLOBALS['phpgw']->template->set_var('form_action',$GLOBALS['phpgw']->link('/index.php','menuaction=admin.uimainscreen.index')); 101 $GLOBALS['phpgw']->template->set_var('form_action',$GLOBALS['phpgw']->link('/index.php','menuaction=admin.uimainscreen.index')); 104 102 $GLOBALS['phpgw']->template->set_var('tr_color',$GLOBALS['phpgw_info']['theme']['th_bg']); 105 103 $GLOBALS['phpgw']->template->set_var('value',' '); … … 140 138 $tr_color = $GLOBALS['phpgw']->nextmatchs->alternate_row_color($tr_color); 141 139 $GLOBALS['phpgw']->template->set_var('tr_color',$tr_color); 142 $GLOBALS['phpgw']->template->set_var('value','<input type="button" value="' . lang('Edit') 143 . '" onclick="ExpressoLivre.link( \'' . $GLOBALS[ 'phpgw' ] -> link( '/index.php','menuaction=admin.uimainscreen.index' ) 144 . '\' + \'§ion=\' + escape( this.form.section.item( 1 ).value ) + \'&select_lang=\' + escape( this.form.select_lang.item( 1 ).value ) )' 145 . '"><input type="button" name="cancel" value="'. lang('cancel') .'" onclick="ExpressoLivre.link( \'' . $GLOBALS[ 'phpgw' ] -> link( '/admin/index.php' ) . '\' )">'); 140 $GLOBALS['phpgw']->template->set_var('value', 141 '<input type="button" value="' 142 . lang('Edit') . '" onclick="ExpressoLivre.link( \'' 143 . $GLOBALS[ 'phpgw' ] -> link( '/index.php','menuaction=admin.uimainscreen.index' ) 144 . '\' + \'§ion=\' + escape( this.form.section.item( 1 ).value )' 145 . ' + \'&select_lang=\' + escape( this.form.select_lang.item( 1 ).value ) )' 146 . '">' 147 . '<input type="button" name="cancel" value="' 148 . lang('cancel') . '" onclick="ExpressoLivre.link( \'' 149 . $GLOBALS[ 'phpgw' ] -> link( '/admin/index.php' ) 150 . '\' )">' 151 ); 146 152 $GLOBALS['phpgw']->template->fp('rows','row_2',True); 147 153 } 148 154 else 149 155 { 150 $GLOBALS['phpgw']->db->query("SELECT content FROM phpgw_lang WHERE lang='$select_lang' AND message_id='$section" 156 $GLOBALS['phpgw']->template->set_block('message','edit','edit'); 157 $GLOBALS['phpgw']->template->set_block('message','edit_script','edit_script'); 158 159 $GLOBALS['phpgw']->js->validate_file('jscode','openwindow','admin'); 160 161 $GLOBALS['phpgw']->db->query("SELECT content FROM phpgw_lang WHERE lang='$select_lang' AND message_id='$section" 151 162 . "_message'",__LINE__,__FILE__); 152 163 $GLOBALS['phpgw']->db->next_record(); 153 154 $current_message = $GLOBALS['phpgw']->db->f('content');155 156 if($_REQUEST['htmlarea'])157 {158 //$text_or_htmlarea=$html->htmlarea('message',stripslashes($current_message));159 160 include_once("news_admin/inc/fckeditor.php");161 $oFCKeditor = new FCKeditor( 'message' );162 163 $webserver_url = $GLOBALS['phpgw_info']['server']['webserver_url'];164 $webserver_url = ( !empty($webserver_url) ) ? $webserver_url : '/';165 166 if(strrpos($webserver_url,'/') === false || strrpos($webserver_url,'/') != (strlen($webserver_url)-1))167 $webserver_url .= '/';168 169 $oFCKeditor->BasePath = $webserver_url . 'news_admin/templates/default/fckeditor/';170 $oFCKeditor->ToolbarSet = 'Basic';171 $oFCKeditor->Value = $current_message;172 173 $text_or_htmlarea = $oFCKeditor->Create( );174 175 $htmlarea_button='<input type="button" name="no-htmlarea" onclick="ExpressoLivre.link( \''.$GLOBALS['phpgw']->link('/index.php','menuaction=admin.uimainscreen.index&htmlarea=true§ion=' . $section ) . '\');" value="'.lang('disable WYSIWYG-editor').'">';176 }177 else178 {179 $text_or_htmlarea='<textarea name="message" style="width:100%; min-width:350px; height:300px;" wrap="virtual">' . stripslashes($current_message) . '</textarea>';180 $htmlarea_button='<input type="button" name="htmlarea" onclick="ExpressoLivre.link( \''.$GLOBALS['phpgw']->link('/index.php','menuaction=admin.uimainscreen.index&htmlarea=true§ion=' . $section ) . '\' );" value="'.lang('activate WYSIWYG-editor').'">';181 182 }183 184 $GLOBALS['phpgw']->js->validate_file('jscode','openwindow','admin');185 //$GLOBALS['phpgw']->common->phpgw_header();186 //echo parse_navbar();187 164 188 165 $GLOBALS['phpgw']->template->set_var('form_action',$GLOBALS['phpgw']->link('/index.php','menuaction=admin.uimainscreen.index')); 189 166 $GLOBALS['phpgw']->template->set_var('select_lang',$select_lang); 190 167 $GLOBALS['phpgw']->template->set_var('section',$section); 191 $GLOBALS['phpgw']->template->set_var('tr_color',$GLOBALS['phpgw_info']['theme']['th_bg']); 192 $GLOBALS['phpgw']->template->set_var('value',' '); 193 $GLOBALS['phpgw']->template->fp('rows','row_2',True); 168 $GLOBALS['phpgw']->template->set_var('message', '<textarea name="message"></textarea>'); 194 169 195 $ tr_color = $GLOBALS['phpgw']->nextmatchs->alternate_row_color($tr_color);196 $GLOBALS['phpgw']->template-> set_var('tr_color',$tr_color);170 $GLOBALS['phpgw']->template->fp('scripts','edit_script',True); 171 $GLOBALS['phpgw']->template->fp('rows','edit',True); 197 172 198 199 $GLOBALS['phpgw']->template->set_var('value',$text_or_htmlarea); 200 201 202 203 $GLOBALS['phpgw']->template->fp('rows','row_2',True); 173 $GLOBALS['phpgw']->template->set_var( 'value', 174 '<input type="submit" name="submit" value="' 175 . lang('Save') . '">' 176 . '<input type="button" name="cancel" value="'. lang('cancel') 177 .'" onclick="ExpressoLivre.link( \'' 178 . $GLOBALS[ 'phpgw' ] -> link( '/index.php','menuaction=admin.uimainscreen.index' ) 179 . '\' )">' 180 ); 204 181 205 $tr_color = $GLOBALS['phpgw']->nextmatchs->alternate_row_color($tr_color);206 $GLOBALS['phpgw']->template->set_var('tr_color',$tr_color);207 $GLOBALS['phpgw']->template->set_var('value','<input type="submit" name="submit" value="' . lang('Save')208 . '"><input type="button" name="cancel" value="'. lang('cancel') .'" onclick="ExpressoLivre.link( \'' . $GLOBALS[ 'phpgw' ] -> link( '/index.php','menuaction=admin.uimainscreen.index' ) . '\' )">'.$htmlarea_button);209 182 $GLOBALS['phpgw']->template->fp('rows','row_2',True); 210 183 }
Note: See TracChangeset
for help on using the changeset viewer.