[ Index ] |
|
Code source de b2evolution 2.1.0-beta |
1 <?php 2 /** 3 * This is a demo template displaying a form to contact the admin user of the site 4 * 5 * This template is designed to be used aside of your blog, in case you have a website containing other sections than your blog. 6 * This lets you use b2evolution as a contact form handler outside of your blog per se. 7 * 8 * b2evolution - {@link http://b2evolution.net/} 9 * Released under GNU GPL License - {@link http://b2evolution.net/about/license.html} 10 * @copyright (c)2003-2007 by Francois PLANQUE - {@link http://fplanque.net/} 11 * 12 * @package evoskins 13 * @subpackage noskin 14 */ 15 16 // The User ID of the administrator: 17 $recipient_id = 1; 18 19 // Tie this to no blog in particular. (Do not include a link to any blog in the emails you will receive). 20 $blog = 0; 21 22 // This is the page where we want to go after sending an email. (This page should be able to display $Messages) 23 // If empty, we will default to return to the same page, but you could put any URL here. 24 $redirect_to = ''; 25 26 /** 27 * Check this: we are requiring _main.inc.php INSTEAD of _blog_main.inc.php because we are not 28 * trying to initialize any particular blog 29 */ 30 require_once dirname(__FILE__).'/conf/_config.php'; 31 32 require_once $inc_path.'_main.inc.php'; 33 34 load_funcs( 'skins/_skin.funcs.php' ); 35 36 // Are we returning to this page? 37 param( 'return', 'integer', 0 ); 38 39 40 header( 'Content-type: text/html; charset='.$io_charset ); 41 ?> 42 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 43 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php locale_lang() ?>" lang="<?php locale_lang() ?>"><!-- InstanceBegin template="/Templates/Standard.dwt" codeOutsideHTMLIsLocked="false" --> 44 <head> 45 <!-- InstanceBeginEditable name="doctitle" --> 46 <title><?php echo T_('Contact Form Demo'); ?></title> 47 <!-- InstanceEndEditable --> 48 <link rel="stylesheet" href="rsc/css/fp02.css" type="text/css" /> 49 <!-- InstanceBeginEditable name="head" --> 50 <!-- InstanceEndEditable --> 51 </head> 52 <body> 53 <!-- InstanceBeginEditable name="ToolBar" --> 54 <?php 55 // ---------------------------- TOOLBAR INCLUDED HERE ---------------------------- 56 require $skins_path.'_toolbar.inc.php'; 57 // ------------------------------- END OF TOOLBAR -------------------------------- 58 ?> 59 <!-- InstanceEndEditable --> 60 61 <div class="pageHeader"> 62 <div class="pageHeaderContent"> 63 64 <!-- InstanceBeginEditable name="NavBar2" --> 65 <?php 66 // --------------------------------- START OF BLOG LIST -------------------------------- 67 skin_widget( array( 68 // CODE for the widget: 69 'widget' => 'colls_list_public', 70 // Optional display params 71 'block_start' => '<div class="NavBar">', 72 'block_end' => '</div>', 73 'block_display_title' => false, 74 'list_start' => '', 75 'list_end' => '', 76 'item_start' => '', 77 'item_end' => '', 78 'item_selected_start' => '', 79 'item_selected_end' => '', 80 'link_selected_class' => 'NavButton2', 81 'link_default_class' => 'NavButton2', 82 ) ); 83 // ---------------------------------- END OF BLOG LIST --------------------------------- 84 ?> 85 <!-- InstanceEndEditable --> 86 87 <div class="NavBar"> 88 <div class="pageTitle"> 89 <h1 id="pageTitle"><!-- InstanceBeginEditable name="PageTitle" --><?php echo T_('Contact Form Demo') ?><!-- InstanceEndEditable --></h1> 90 </div> 91 </div> 92 93 <div class="pageHeaderEnd"></div> 94 95 </div> 96 </div> 97 98 99 <div class="pageSubTitle"><!-- InstanceBeginEditable name="SubTitle" --><?php echo T_('This demo displays a form to contact the site admin.') ?><!-- InstanceEndEditable --></div> 100 101 102 <div class="main"><!-- InstanceBeginEditable name="Main" --> 103 104 105 <?php 106 // ------------------------- MESSAGES GENERATED FROM ACTIONS ------------------------- 107 messages( array( 108 'block_start' => '<div class="action_messages">', 109 'block_end' => '</div>', 110 ) ); 111 // --------------------------------- END OF MESSAGES --------------------------------- 112 ?> 113 114 115 <?php 116 // ----------------------------- MESSAGE FORM ---------------------------- 117 if( empty( $return ) ) 118 { // We are *not* coming back after sending a message: 119 120 if( empty( $redirect_to ) ) 121 { // We haven't asked for a specific return URL, so we'll come back to here with a param. 122 $redirect_to = url_add_param( $ReqURI, 'return=1', '&' ); 123 } 124 125 // The form, per se: 126 require $skins_path.'_msgform.php'; 127 } 128 else 129 { // We are coming back after sending a message: 130 131 echo '<p>'.T_('Thank you for your message. I will reply as soon as possible.').'</p>'; 132 133 // This is useful for testing but does not really make sense on production: 134 echo '<p><a href="'.regenerate_url().'">'.T_('Send another message?').'</a></p>'; 135 } 136 // ------------------------- END OF MESSAGE FORM ------------------------- 137 ?> 138 139 140 141 142 143 <!-- InstanceEndEditable --></div> 144 <table cellspacing="3" class="wide"> 145 <tr> 146 <td class="cartouche">Original page design by <a href="http://fplanque.net/">François PLANQUE</a> </td> 147 148 <td class="cartouche" align="right"> <a href="http://b2evolution.net/" title="b2evolution home"><img src="rsc/img/b2evolution_button.png" alt="b2evolution" width="80" height="15" class="middle" /></a></td> 149 </tr> 150 </table> 151 <!-- InstanceBeginEditable name="Baseline" --> 152 <?php 153 debug_info(); 154 ?> 155 <!-- InstanceEndEditable --> 156 </body> 157 <!-- InstanceEnd --></html>
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Thu Nov 29 23:58:50 2007 | par Balluche grâce à PHPXref 0.7 |
![]() |