[ Index ] |
PHP Cross Reference of phpwcms V1.4.3 _r380 (23.11.09) |
[Summary view] [Print] [Text view]
1 <?php 2 3 /************************************************************************************* 4 Copyright notice 5 6 (c) 2002-2009 Oliver Georgi (oliver@phpwcms.de) // All rights reserved. 7 8 This script is part of PHPWCMS. The PHPWCMS web content management system is 9 free software; you can redistribute it and/or modify it under the terms of 10 the GNU General Public License as published by the Free Software Foundation; 11 either version 2 of the License, or (at your option) any later version. 12 13 The GNU General Public License can be found at http://www.gnu.org/copyleft/gpl.html 14 A copy is found in the textfile GPL.txt and important notices to the license 15 from the author is found in LICENSE.txt distributed with these scripts. 16 17 This script is distributed in the hope that it will be useful, but WITHOUT ANY 18 WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 19 PARTICULAR PURPOSE. See the GNU General Public License for more details. 20 21 This copyright notice MUST APPEAR in all copies of the script! 22 *************************************************************************************/ 23 24 // retrieve the list of entries from online form 25 26 // first some settings 27 28 // replacement tag 29 $_form_entries['RT'] = '{FORM_RESULT_LISTING}'; 30 31 // insert the ID of the content part here 32 $_form_entries['FORM_ID'] = 270; 33 34 // which form fields should be listed - comma separated 35 $_form_entries['FIELDS'] = 'vorname,name,email'; 36 37 // now some template settings 38 39 // Header - put in the header section here 40 $_form_entries['HEADER'] = ' 41 <table cellpadding="0" cellspacing="0" border="0" class="listing" summary="form entries"> 42 <tr> 43 <th>Vorname</th> 44 <th>Name</th> 45 <th>E-Mail</th> 46 </tr> 47 '; 48 49 // Footer - put in the footer section here 50 $_form_entries['FOOTER'] = '</table>'; 51 52 // Spacer - his is placed between each line of entries 53 $_form_entries['SPACER'] = '<tr><td colspan="4"> </td></tr>'; 54 55 $_form_entries['ENTRY'] = ' 56 <tr> 57 <td>{vorname}</td> 58 <td>{name}</td> 59 <td>{email}</td> 60 </tr> 61 '; 62 63 64 65 ////////// Do not change below ////////////////////////////// 66 67 if(strpos($content['all'], $_form_entries['RT']) !== false) { 68 69 70 $_form_entries['RESULT'] = array(); 71 $_form_entries['ALL'] = _dbQuery("SELECT * FROM ".DB_PREPEND.'phpwcms_formresult WHERE formresult_pid='.intval($_form_entries['FORM_ID'])); 72 $_form_entries['FIELDS'] = convertStringToArray($_form_entries['FIELDS']); 73 $_form_entries['SELECT'] = array(); 74 $_form_entries['ENTRIES'] = array(); 75 foreach($_form_entries['FIELDS'] as $_form_entries_value) { 76 $_form_entries['SELECT'][$_form_entries_value] = $_form_entries_value; 77 } 78 79 $_fc = 0; 80 foreach($_form_entries['ALL'] as $_form_entries_value) { 81 82 $_form_entries['ENTRIES'][$_fc] = $_form_entries['ENTRY']; 83 $_form_entries_value = @unserialize($_form_entries_value['formresult_content']); 84 foreach($_form_entries_value as $_form_entries_key => $_form_entries_value1) { 85 86 if(isset($_form_entries['SELECT'][$_form_entries_key])) { 87 $_form_entries['ENTRIES'][$_fc] = str_replace('{'.$_form_entries_key.'}', html_specialchars($_form_entries_value1), $_form_entries['ENTRIES'][$_fc]); 88 } 89 90 } 91 92 $_fc++; 93 94 } 95 96 97 if(count($_form_entries['ENTRIES'])) { 98 99 $content['all'] = str_replace( $_form_entries['RT'], 100 $_form_entries['HEADER']. 101 implode($_form_entries['SPACER'], $_form_entries['ENTRIES']), $content['all']). 102 $_form_entries['FOOTER']; 103 104 105 } else { 106 107 $content['all'] = str_replace($_form_entries['RT'], '', $content['all']); 108 109 } 110 111 112 } 113 114 ?>
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Wed Dec 30 05:55:15 2009 | Cross-referenced by PHPXref 0.7 |