[ Index ] |
|
Code source de Joomla 1.0.13 |
1 <?php 2 /** 3 * @version $Id: pollwindow.php 5864 2006-11-27 22:54:44Z Saka $ 4 * @package Joomla 5 * @copyright Copyright (C) 2005 Open Source Matters. All rights reserved. 6 * @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php 7 * Joomla! is free software. This version may have been modified pursuant 8 * to the GNU General Public License, and as distributed it includes or 9 * is derivative of works licensed under the GNU General Public License or 10 * other free or open source software licenses. 11 * See COPYRIGHT.php for copyright notices and details. 12 */ 13 14 // Set flag that this is a parent file 15 define( "_VALID_MOS", 1 ); 16 17 require_once ( '../includes/auth.php' ); 18 include_once ( $mosConfig_absolute_path . '/language/' . $mosConfig_lang . '.php' ); 19 20 $database = new database( $mosConfig_host, $mosConfig_user, $mosConfig_password, $mosConfig_db, $mosConfig_dbprefix ); 21 $database->debug( $mosConfig_debug ); 22 23 $pollid = mosGetParam( $_REQUEST, 'pollid', 0 ); 24 $css = mosGetParam( $_REQUEST, 't', '' ); 25 26 $query = "SELECT title" 27 . "\n FROM #__polls" 28 . "\n WHERE id = " . (int) $pollid 29 ; 30 $database->setQuery( $query ); 31 $title = $database->loadResult(); 32 33 $query = "SELECT text" 34 . "\n FROM #__poll_data" 35 . "\n WHERE pollid = " . (int) $pollid 36 . "\n ORDER BY id" 37 ; 38 $database->setQuery( $query ); 39 $options = $database->loadResultArray(); 40 41 $iso = split( '=', _ISO ); 42 // xml prolog 43 echo '<?xml version="1.0" encoding="'. $iso[1] .'"?' .'>'; 44 ?> 45 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 46 <html xmlns="http://www.w3.org/1999/xhtml"> 47 <head> 48 <title>Poll Preview</title> 49 <link rel="stylesheet" href="../../templates/<?php echo $css; ?>/css/template_css.css" type="text/css"> 50 <meta http-equiv="Content-Type" content="text/html; <?php echo _ISO; ?>" /> 51 </head> 52 53 <body> 54 <form> 55 <table align="center" width="90%" cellspacing="2" cellpadding="2" border="0" > 56 <tr> 57 <td class="moduleheading" colspan="2"><?php echo $title; ?></td> 58 </tr> 59 <?php foreach ($options as $text) 60 { 61 if ($text != "") 62 {?> 63 <tr> 64 <td valign="top" height="30"><input type="radio" name="poll" value="<?php echo $text; ?>"></td> 65 <td class="poll" width="100%" valign="top"><?php echo $text; ?></td> 66 </tr> 67 <?php } 68 } ?> 69 <tr> 70 <td valign="middle" height="50" colspan="2" align="center"><input type="button" name="submit" value="Vote"> <input type="button" name="result" value="Results"></td> 71 </tr> 72 <tr> 73 <td align="center" colspan="2"><a href="#" onClick="window.close()">Close</a></td> 74 </tr> 75 </table> 76 </form> 77 </body> 78 </html>
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Wed Nov 21 14:43:32 2007 | par Balluche grâce à PHPXref 0.7 |
![]() |