Skip to content

Commit

Permalink
Final v2 release
Browse files Browse the repository at this point in the history
  • Loading branch information
SamuelMoraesF committed Jan 28, 2015
1 parent 3b66e06 commit 12b6df0
Show file tree
Hide file tree
Showing 15 changed files with 415 additions and 10 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
config.php
gerenciamento/.htaccess

7 changes: 6 additions & 1 deletion config.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@

define('PALESTRANTE','Fulano de Tal'); //Nome do palestrante

define('SHOWSLIDES', false); //Exibir ou não os slides
define('SHOWSLIDES', true); //Exibir ou não os slides

define('SLIDESURL', 'http://localhost/talk');

define('SENDMETHOD','sqlite'); //Método de envio da pergunta, as opções podem ser 'email', 'pushover' ou 'sqlite'

Expand Down Expand Up @@ -47,4 +49,7 @@

define('FROMNOTIFY','email@exemplo.com'); //Email a enviar a mensagem

// Não modifique isto
$confloaded = true;

?>
7 changes: 7 additions & 0 deletions css/bootstrap.min.css

Large diffs are not rendered by default.

Binary file added fonts/glyphicons-halflings-regular.eot
Binary file not shown.
288 changes: 288 additions & 0 deletions fonts/glyphicons-halflings-regular.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added fonts/glyphicons-halflings-regular.ttf
Binary file not shown.
Binary file added fonts/glyphicons-halflings-regular.woff
Binary file not shown.
Binary file added fonts/glyphicons-halflings-regular.woff2
Binary file not shown.
30 changes: 28 additions & 2 deletions functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,38 @@
function askalert(){
if (isset($_POST['pergunta']) && isset($_POST['nome']) && isset($_POST['email']) && isset($_POST['acao'])){
if ($_POST['acao'] == "envia") {
echo '<section class="alert">Sua pergunta foi enviada com sucesso, aguarde que já vamos responder</section>';

if (SHOWSLIDES == false) {

echo '<section class="alert">Sua pergunta foi enviada com sucesso, aguarde que já vamos responder</section>';

} else {

echo '<div class="alert alert-success alert-dismissible fade in" role="alert">
<button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">×</span></button>
Sua pergunta foi enviada com sucesso, aguarde que já vamos responder
</div>';

}


}
}
else if(isset($_POST['acao'])) {
if($_POST['acao'] == "envia") {
echo '<section class="alert">Por favor, complete todos os campos para poder efetuar sua pergunta</section>';

if (SHOWSLIDES == false) {

echo '<section class="alert">Por favor, complete todos os campos para poder efetuar sua pergunta</section>';

} else {

echo '<div class="alert alert-warning alert-dismissible fade in" role="alert">
<button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">×</span></button>
Por favor, complete todos os campos para poder efetuar sua pergunta
</div>';

}
}
}
}
Expand Down
1 change: 0 additions & 1 deletion gerenciamento/.666

This file was deleted.

4 changes: 0 additions & 4 deletions gerenciamento/.htaccess

This file was deleted.

11 changes: 10 additions & 1 deletion gerenciamento/table.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,13 @@
<?php include '../config.php' ?>
<?php

if (!isset($confloaded)){

include '../config.php';

}

?>

<?php if(SENDMETHOD == "sqlite") : ?>
<?php

Expand Down
68 changes: 67 additions & 1 deletion index.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
<?php include 'functions.php'; ?>

<?php if (SHOWSLIDES == false): ?>

<!DOCTYPE html>
<html lang="pt-br">
<head>
Expand All @@ -21,7 +24,6 @@
<h1 class="lectitle"><?php echo NOMEEVENTO ?></h1><h2 class="bytitle">por <?php echo PALESTRANTE ?></h2>
</header>
<?php askalert() ?>
<?php if($shownotas == false){echo '<div style="padding:20px;"></div>';} ?>
<form class="ask" method="post" action="<?php echo FULLURL ?>/">
<input type="text" name="pergunta" placeholder="Faça uma pergunta" class="pergunta" required>
<input type="submit" value="Perguntar">
Expand All @@ -35,3 +37,67 @@
<script src="http://mozorg.cdn.mozilla.net/tabzilla/tabzilla.js"></script>
</body>
</html>

<?php else: ?>

<!DOCTYPE html>
<html lang="pt-BR">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title><?php echo NOMEEVENTO ?></title>

<link href="<?php echo FULLURL ?>/css/bootstrap.min.css" rel="stylesheet">

<style>
.ask {
position: fixed;
top:0;
left:0;
}
.ask a{
border-radius:0 0 10px 0;
}
.ask span {
padding-right:5px;
}
</style>

<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body style="overflow:hidden;">

<div class="ask"><a href="#" data-toggle="modal" data-target="#ask" class="btn btn-success"><span class="glyphicon glyphicon-question-sign"></span> Perguntar</a></div>

<iframe src="<?php echo SLIDESURL ?>" style="width:100%;height:100vh;border:0;"></iframe>

<div class="modal fade" id="ask" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
<h4 class="modal-title" id="myModalLabel">Pergunte para o palestrante!</h4>
</div>
<div class="modal-body">
<form class="pergunta" method="post" action="<?php echo FULLURL ?>/">
<input style="margin-bottom:10px;" class="form-control" type="text" name="nome" placeholder="Seu Nome" class="nome" required>
<input style="margin-bottom:10px;" class="form-control" type="email" name="email" placeholder="Seu Email" class="email" required>
<textarea style="margin-bottom:10px;" class="form-control" name="pergunta" placeholder="Sua Pergunta" class="pergunta" required></textarea>
<input class="form-control" type="hidden" name="acao" value="envia">
<input class="btn btn-default" style="width:100%;" type="submit" value="Perguntar">
</form>
</div>
</div>
</div>
</div>

<script src="<?php echo FULLURL ?>/js/jquery.min.js"></script>
<script src="<?php echo FULLURL ?>/js/bootstrap.min.js"></script>
</body>
</html>

<?php endif; ?>
7 changes: 7 additions & 0 deletions js/bootstrap.min.js

Large diffs are not rendered by default.

Empty file modified perguntas.db
100644 → 100755
Empty file.

0 comments on commit 12b6df0

Please sign in to comment.