<?php include "sessao.php"; require_once $_SESSION['DOCROOT'] . "/classes/class.enquete.php"; $numero = $_POST['enquete']; $Enq = new Enquete($numero); $temerro = 0; $javotou = FALSE; if ($Enq->getTipoResposta() == 'U') { if ($_POST['opcoes'] == NULL) { $temerro = 1; } } else { $temerro = 1; for ($x = 1; $x < 11; $x++) { $op = sprintf("op%02d", $x); if ($_POST[$op] == 'S') { $temerro = 0; } } } if ($Enq->getRestrita() == 'S' && $_SESSION['logado'] != 'SIM') { $temerro = 2; } if ($temerro == 0) { if ($Enq->ValidaVoto() == TRUE) { $javotou = FALSE; if ($Enq->getTipoResposta() == 'U') { $Enq->RegistraVoto($_POST['opcoes']); } else { for ($x = 1; $x < 11; $x++) {
<?php if ($numero != 0) { if ($enq->getRestrita() == 'S') { echo "checked"; } } ?> > <b>Restrita a Sócios </b> </fieldset> </td></tr> <tr> <td> <?php if ($enq->getTipoResposta() == "M") { $chkm = 'checked'; $chku = ""; } else { $chkm = ""; $chku = 'checked'; } ?> <fieldset width="430px" style="width:430px;" align="center"> <legend><span style="color:green;"><b>Tipo de Resposta</b></legend> <span style="float:left;"> <input <?php echo $chku; ?> type="radio" tabindex="16" name="resposta" value="unica">Única