예제 #1
0
?>

 <?php 
include "tophome.php";
?>

 <form method="post" action="prc_cadenquetes.php" name="CadEnquete" onload="loadfoco();">
  <table id="tabform"   border="0" cellspacing="0" width="440px">

<?php 
require_once $_SESSION['DOCROOT'] . "/classes/class.enquete.php";
$numero = $_GET['enq'];
$enq = new Enquete($numero);
?>
   <tr> <td><input type="hidden" name="codigo" value=" <?php 
echo $enq->getCodigo();
?>
"> </td> </tr>

    <tr> <td> 
	  <fieldset  width="430px" style="width:430px;" align="center">
    	<legend><span style="color:green;"><b>Pergunta</b></legend>
		<input size="65" maxlength="50" tabindex="1" name="pergunta" value="<?php 
echo $enq->getPergunta();
?>
">
   	</fieldset> 

	</td> </tr> 
    <tr><td align=right>
  <fieldset  width="430px" style="width:430px;" align="center">
예제 #2
0
<div class="painel">
<div class="LeftCorner"> </div>
<div class="TitPainel">.:: Enquetes ::.</div>
<div class="RightCorner"> </div>
<div class="corpo"> 
<table cellpadding="0" cellspacing="0" frame="box" rules="none">
<?php 
$vez = 0;
foreach ($lst as $e) {
    $enq = new Enquete($e['numero']);
    if ($vez != 0) {
        echo '<tr> <td colspan=2>' . "\n";
        echo '<hr style="height: 1px; width: 100%;" align="left">' . "\n";
        echo '</td></tr>' . "\n";
    }
    $nomeform = sprintf("enq%04d", $enq->getCodigo());
    echo ' <form method="post" action="prc_votaenq.php" name="' . $nomeform . '">' . "\n";
    echo '<input type=hidden name="enquete"  value="' . $enq->getCodigo() . '">' . "\n";
    echo "<tr><td colspan=2>" . $enq->getPergunta() . "</td></tr>\n";
    for ($x = 1; $x < 11; $x++) {
        if ($enq->getOpcao($x) != NULL) {
            if ($enq->getTipoResposta() == "U") {
                echo '<tr><td colspan=2> <input type="radio" tabindex="' . $x . '" name="opcoes" value="' . $x . '">' . $enq->getOpcao($x) . '</td></tr>';
            } else {
                echo '<tr><td colspan=2> <input type="checkbox" tabindex="' . $x . '" name="' . sprintf("op%02d", $x) . '" value="S">' . $enq->getOpcao($x) . '</td></tr>';
            }
        }
    }
    echo '<tr><td><a href="javascript:document.' . $nomeform . '.submit();"><b>Votar</a></td>';
    echo '<td align="center"><a href="lst_resenquete.php?enq=' . $enq->getCodigo() . '"><b>Resultado</a></td></tr>';
    echo '</form>';