26 echo
'<form method="POST" action="">';
27 $show_poll->display();
28 $has_required =
false;
29 foreach( $show_poll->widget_list as
$widget ){
30 if( $widget->is_required ==
true ){
35 if( $has_required ==
true ){
36 echo
"<p style='margin-top:0em;margin-bottom:0em'><span class='required_asterisk'>*</span> bedeutet Plichtfeld.</p>";
39 echo
'<br/><input type="submit" value="Senden" name="poll_submit"/>';
47 require_once(
"inc/user.class.php");
48 if( !(isset($_SESSION)) ){
52 session_regenerate_id();
55 require_once(
"config.php");
56 require_once(
"inc/tools.php");
58 require_once(
"inc/db.class.php");
59 require_once(
"inc/config.class.php");
60 require_once(
"inc/poll.class.php");
61 require_once(
"inc/messages.class.php");
62 $db=
new db( DB_USER, DB_PASS, DB_DATABASE, DB_HOST );
73 if( $pps[
"anonymous"] ==
"2"){
75 $p->load_from_id(
$db,$pps[
"ID"]);
78 ($p->get_timeout_timestamp() >=
$now) ){
89 if( (isset($_GET[
"h"])) AND (strlen($_GET[
"h"]) == 32) ){
92 if( $p->hashID === $_GET[
"h"] ){
101 if( (isset($_POST[
"poll_submit"])) AND (isset($poll)) ){
102 $poll->load_from_id(
$db,$poll->ID);
103 $page =
"handle poll";
108 if( (
$page ==
"show poll") OR (
$page ==
"handle poll") ){
109 $poll->load_widget_result_count(
$db);
113 if( (
$page ==
"show poll") OR (
$page ==
"handle poll") OR (
$page ==
"preview") ){
114 $theme_include =
'<link href="'.APP_ROOT.
'/CSS/Themes/'.$poll->theme.
'" rel="stylesheet" type="text/css">';
122 <!DOCTYPE html PUBLIC
"-//W3C//DTD XHTML 1.0 Strict//EN"
123 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
124 <html xmlns=
"http://www.w3.org/1999/xhtml" xml:lang=
"de" lang=
"de">
127 <title>Umfrage</title>
128 <meta http-equiv=
"content-type" content=
"text/html;charset=utf-8" />
129 <meta
name=
"generator" content=
"Geany 0.21" />
130 <style type=
"text/css">
141 .error .message.ul li{
147 margin:10px 0px 20px 0px;
149 box-shadow:1px 1px 2px #525252;
150 background-color:#F88F94;
151 border:2px solid #8A0000;
152 text-shadow:1px 1px 1px #FFD3D3;
156 background-color:#FF7B81;
161 .error .message_text_top_left{
162 background-color:#FFDFE1;
163 border-bottom:2px solid #8A0000;
164 border-right:2px solid #8A0000;
165 padding:2px 10px 2px 2px;
170 border-top-left-radius:10px;
171 border-bottom-right-radius:10px;
176 vertical-align: middle;
181 <?php echo $theme_include;?>
190 if (
$page ==
"show poll"){
195 }
else if(
$page ==
"handle poll"){
197 $errors = $poll->handle_inpt();
200 if(
sizeof($errors) != 0){
201 foreach($errors as $e){
208 $ret =
$db->insert_poll_result($poll);
210 $email_stack = array(
"pollID" => $poll->ID ,
"type" => $ret[
"action"] ,
"fullName" =>
"Unbekannt",
"uname" =>
"" ,
"timestamp" =>
"NOW()" );
212 if ( $ret[
"value"] !==
false ){
213 $notif_events = $poll->get_config(
"email_notif");
214 if( in_array($ret[
"action"],$notif_events) ){
215 $db->email_stack_add($email_stack);
219 $messages->add_message(
new errorMessage(
"Fehler in der Datenbank! Deine Daten wurden <b>nicht</b> gespeichert") );
222 echo
"<p>Vielen Dank, dass du an dieser Umfrage Teilgenommen hast.</p>";
223 echo
"<p><a href='embed.php?h={$poll->hashID}'>Zurück</a></p>";
233 exec(
"cd backend && php email-bg.php");