Beispiel #1
0
 function Inclui()
 {
     //Insere nova enquete
     $x = 0;
     $db = new BD();
     $sql = sprintf("insert into cad_enquete\n\t\t   \t\t\t\t  (pergunta,datainicio,datafim,tiporesposta,restrita)\n\t\t\t\t\t\t  values ('%s',curdate(),'%s','%s','%s')", $this->getPergunta(), date("Y/m/d", $this->getDataFim()), $this->getTipoResposta(), $this->getRestrita());
     $db->Exec($sql);
     $this->Codigo = $db->getInsertID();
     $db->Close();
     $this->IncluiOpcoes();
 }
Beispiel #2
0
 function Inclui()
 {
     //Insere novo evento
     $x = 0;
     $db = new BD();
     $sql = sprintf("insert into cad_eventos\n\t\t   \t\t\t\t  (data,local,descricao)\n\t\t\t\t\t\t  values ('%s','%s','%s')", date("Y/m/d", $this->getData()), $this->getLocal(), $this->getDescricao());
     $db->Exec($sql);
     $this->ID = $db->getInsertID();
     $pasta = "./eventos";
     if (is_dir($pasta) == false) {
         mkdir($pasta) or die("erro criando diretorio");
         chmod($pasta, 0777);
     }
     $pasta = sprintf("./eventos/%06d/", $this->ID);
     if (is_dir($pasta) == false) {
         mkdir($pasta) or die("erro criando diretorio");
         chmod($pasta, 0777);
     }
     $db->Close();
 }
Beispiel #3
0
 function Inclui()
 {
     //Insere nova reunião
     $x = 0;
     $db = new BD();
     $sql = sprintf("insert into cad_reuniao\n\t\t   \t\t\t\t  (data,hora,local)\n\t\t\t\t\t\t  values ('%s','%s','%s')", date("Y/m/d", $this->getData()), date("H:i", $this->getHora()), $this->getLocal());
     $db->Exec($sql);
     $this->ID = $db->getInsertID();
     $db->Close();
 }
Beispiel #4
0
 function Inclui()
 {
     //Insere novo evento
     $x = 0;
     $db = new BD();
     $sql = sprintf("insert into tb_calendario\n\t\t   \t\t\t\t  (dataevento,titulo,descricao,local,realizacao)\n\t\t\t\t\t\t  values ('%s','%s','%s','%s','%s')", date("Y/m/d", $this->getData()), $this->getTitulo(), $this->getDescricao(), $this->getLocal(), $this->getRealizacao());
     $db->Exec($sql);
     $this->ID = $db->getInsertID();
     $db->Close();
 }