当前位置: 首页>>代码示例>>PHP>>正文


PHP Formulario::getIC1方法代码示例

本文整理汇总了PHP中Formulario::getIC1方法的典型用法代码示例。如果您正苦于以下问题:PHP Formulario::getIC1方法的具体用法?PHP Formulario::getIC1怎么用?PHP Formulario::getIC1使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Formulario的用法示例。


在下文中一共展示了Formulario::getIC1方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: DaoFormulario

     $formulario->setIA5($_POST["adicionais5"]);
 }
 if (isset($_POST["adicionais6"])) {
     $formulario->setIA6($_POST["adicionais6"]);
 }
 if (isset($_POST["sugestoes"])) {
     $formulario->setSugestao($_POST["sugestoes"]);
 }
 $formulario->setIdUsuario((int) $idLogado);
 try {
     $dao = new DaoFormulario();
     //ATUALIZAR A QUANTIDADE DE RESPONDIMENTO DO USUARIO
     $daoUser = new DaoUsuario();
     $usuarioLogado = $daoUser->buscarPorId((int) $idLogado);
     //VERIFICA SE O CURSO QUE O USUARIO VEZ É O MESMO QUE ELE ESCOLHEU NO FORMULÁRIO
     if ($usuarioLogado->getIdCurso() === $formulario->getIC1()) {
         $formulario->setStatus(1);
         $dao->inserir($formulario);
         $quantidadeFormulario = $dao->buscarPorIdDoUsuarioEIdDoCurso($usuarioLogado->getId(), $formulario->getIC1());
         $usuarioLogado->setQtdResponde(count($quantidadeFormulario));
         $daoUser->atualizar($usuarioLogado);
         echo "<script type='text/javascript'>";
         echo "location.href='http://localhost/questionario/aluno/sair.php';";
         echo "</script>";
     } else {
         echo "<script type='text/javascript'>";
         echo "var \$ = jQuery.noConflict();\r\n            \$(document).ready(function() {\r\n            \$('#modalMsgErroIdCursoFormulario').modal('show');\r\n                });";
         echo "</script>";
     }
     //echo "succes";
 } catch (Exception $e) {
开发者ID:alissonl3,项目名称:questionario,代码行数:31,代码来源:formulario.php

示例2: atualizar

 public function atualizar(Formulario $formulario)
 {
     try {
         $sql = "UPDATE formulario SET " . " anoConclusao = :anoConclusao," . " ia1 = :ia1," . " ia2 = :ia2," . " ia3 = :ia3," . " ia4 = :ia4," . " ia5 = :ia5," . " ia6 = :ia6," . " ic1 = :ic1," . " ic2 = :ic2," . " ic3 = :ic3," . " ic4 = :ic4," . " ic5 = :ic5" . " ic6 = :ic6," . " ic7 = :ic7," . " ic8 = :ic8," . " ic9 = :ic9," . " ic10 = :ic10" . " id1 = :id1," . " id2 = :id2," . " id3 = :id3," . " ic4 = :ic4," . " ip1 = :ip1" . " ip2 = :ip2," . " ip3 = :ip3," . " ip3a = :ip3a" . " ip3b = :ip3b," . " ip3c = :ip3c," . " ip3d = :ip3d," . " sugestao = :sugestao," . " semestre = :semestre," . " status = :status," . " idUsuario = :idUsuario" . " WHERE id = :id";
         $p_sql = $this->pdo->prepare($sql);
         $p_sql->bindValue(":id", $formulario->getId());
         $p_sql->bindValue(":anoConclusao", $formulario->getAnoConclusao());
         $p_sql->bindValue(":ia1", $formulario->getIA1());
         $p_sql->bindValue(":ia2", $formulario->getIA2());
         $p_sql->bindValue(":ia3", $formulario->getIA3());
         $p_sql->bindValue(":ia4", $formulario->getIA4());
         $p_sql->bindValue(":ia5", $formulario->getIA5());
         $p_sql->bindValue(":ia6", $formulario->getIA6());
         $p_sql->bindValue(":ic1", $formulario->getIC1());
         $p_sql->bindValue(":ic2", $formulario->getIC2());
         $p_sql->bindValue(":ic3", $formulario->getIC3());
         $p_sql->bindValue(":ic4", $formulario->getIC4());
         $p_sql->bindValue(":ic5", $formulario->getIC5());
         $p_sql->bindValue(":ic6", $formulario->getIC6());
         $p_sql->bindValue(":ic7", $formulario->getIC7());
         $p_sql->bindValue(":ic8", $formulario->getIC8());
         $p_sql->bindValue(":ic9", $formulario->getIC9());
         $p_sql->bindValue(":ic10", $formulario->getIC10());
         $p_sql->bindValue(":id1", $formulario->getID1());
         $p_sql->bindValue(":id2", $formulario->getID2());
         $p_sql->bindValue(":id3", $formulario->getID3());
         $p_sql->bindValue(":ip1", $formulario->getIP1());
         $p_sql->bindValue(":ip2", $formulario->getIP2());
         $p_sql->bindValue(":ip3", $formulario->getIP3());
         $p_sql->bindValue(":ip3a", $formulario->getIP3A());
         $p_sql->bindValue(":ip3b", $formulario->getIP3B());
         $p_sql->bindValue(":ip3c", $formulario->getIP3C());
         $p_sql->bindValue(":ip3d", $formulario->getIP3D());
         $p_sql->bindValue(":sugestao", $formulario->getSugestao());
         $p_sql->bindValue(":semestre", $formulario->getSemestre());
         $p_sql->bindValue(":status", $formulario->getStatus());
         $p_sql->bindValue(":idUsuario", $formulario->getIdUsuario());
         return $p_sql->execute();
     } catch (Exception $e) {
         print "Ocorreu um erro ao tentar executar esta ação, foi gerado um LOG do mesmo, tente novamente mais tarde.";
     }
 }
开发者ID:alissonl3,项目名称:questionario,代码行数:42,代码来源:DaoFormulario.php


注:本文中的Formulario::getIC1方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。