Changeset 3809 for extensions/ContactForm/classes/cf_plugin.class.php
- Timestamp:
- Sep 1, 2009, 3:31:24 PM (15 years ago)
- Location:
- extensions
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions
-
Property
svn:ignore
set to
.buildpath
.project
-
Property
svn:ignore
set to
-
extensions/ContactForm/classes/cf_plugin.class.php
r3749 r3809 40 40 } 41 41 42 function loc_begin_index() { 43 $this->display_message(); 44 } 42 45 function loc_begin_page_header() { 43 46 if (!$this->config->get_value(CF_CFG_DEFINE_LINK)) { … … 224 227 'cf_messages' => realpath(cf_get_template('cf_messages.tpl')), 225 228 )); 229 226 230 $template->block_html_head( '', 227 231 '<link rel="stylesheet" type="text/css" '. … … 242 246 $redirect_msg = $template->parse('cf_redirect', true); 243 247 $redirect_delay = $this->config->get_value(CF_CFG_REDIRECT_DELAY); 244 redirect_html($redirect_url, $redirect_msg, $redirect_delay); 248 // redirect($redirect_url, $redirect_msg, $redirect_delay); 249 redirect($redirect_url); 250 } 251 252 protected function display_message() { 253 $infos = pwg_get_session_var('cf_infos'); 254 pwg_unset_session_var('cf_infos'); 255 if ( null == $infos or 256 (empty($infos['infos']) and 257 empty($infos['errors'])) 258 ) { 259 return; 260 } 261 global $template; 262 $template->set_filenames(array( 263 'cf_index' => realpath(cf_get_template('cf_messages_index.tpl')), 264 'cf_title' => realpath(cf_get_template('cf_title.tpl')), 265 'cf_button' => realpath(cf_get_template('cf_button.tpl')), 266 'cf_messages' => realpath(cf_get_template('cf_messages.tpl')), 267 )); 268 269 $template->block_html_head( '', 270 '<link rel="stylesheet" type="text/css" '. 271 'href="' . CF_INCLUDE . 'contactform.css' . '">', 272 $smarty, $repeat); 273 $cf = array( 274 'TITLE' => 'contact_form_title', 275 ); 276 if (!empty($infos['errors'])) { 277 $template->assign('errors', $infos['errors']); 278 } 279 if (!empty($infos['infos'])) { 280 $template->assign('infos', $infos['infos']); 281 } 282 $template->assign('CF', $cf); 283 $template->assign_var_from_handle('CF_TITLE', 'cf_title'); 284 $template->assign_var_from_handle('CF_MESSAGES', 'cf_messages'); 285 $template->assign_var_from_handle('CF_BUTTON', 'cf_button'); 286 287 $begin = 'PLUGIN_INDEX_CONTENT_BEFORE'; 288 $old_begin = $template->get_template_vars($begin); 289 $template->assign_var_from_handle($begin, 'cf_index'); 290 $template->concat($begin, $old_begin); 245 291 } 246 292 … … 253 299 $this->display_form($infos); 254 300 } else { 255 $this->redirect(make_index_url(),$infos); 301 pwg_set_session_var('cf_infos', array( 302 'infos' => $infos['infos'], 303 'errors' => $infos['errors'], 304 )); 305 redirect(make_index_url()); 306 //$this->redirect(make_index_url(),$infos); 256 307 } 257 308 } else { … … 294 345 add_event_handler('send_mail_content', 295 346 array(&$this, 'send_mail_content')); 296 $return = @pwg_mail( 297 $webmaster_mail, 298 $mail_args 299 ); 347 348 $return = true; 349 // $return = @pwg_mail( 350 // $webmaster_mail, 351 // $mail_args 352 // ); 353 300 354 cf_switch_back_to_user_lang(); 301 355 if (!$return) {
Note: See TracChangeset
for help on using the changeset viewer.