26 require_once(
"inc/user.class.php");
27 if( !(isset($_SESSION)) ){
31 require_once(
"config.php");
32 require_once(
"inc/tools.php");
33 require_once(
"inc/db.class.php");
34 require_once(
"inc/poll.class.php");
35 require_once(
"inc/html.class.php");
36 require_once(
"inc/messages.class.php");
37 require_once(
"inc/chart.class.php");
39 $db=
new db( DB_USER, DB_PASS, DB_DATABASE, DB_HOST );
41 if( (isset($_GET[
"pollID"])) AND ($_GET[
"pollID"] !=
"") AND (is_numeric($_GET[
"pollID"])) ){
43 if (!$poll->load_from_id(
$db, intval($_GET[
"pollID"]) ) ){
44 die(
"Umfrage existiert nicht.");
48 die(
"Umfrage laden fehlgeschlagen");
50 if( (isset($_GET[
"widget"])) AND ($_GET[
"widget"] !=
"") AND (is_numeric($_GET[
"widget"])) ){
51 foreach($poll->widget_list as $wid){
53 foreach( $wid->get_all_childs() as $child){
54 if( $child->ID == $_GET[
"widget"] ){
65 if( !isset($option) ){
66 die(
"widget existiert nicht");
69 if( $poll->anonymous ===
false ){
70 require_once(
"inc/check_login.php");
74 if ( in_array(
"*", $poll->groups) ){
77 if( in_array($_SESSION[
"user"]->group,$poll->groups) ){
82 if( isset($_SESSION[
"projects"]) ){
83 foreach( $_SESSION[
"projects"] as $pr ){
87 foreach($poll->groups as $poll_group){
88 if( in_array($poll_group,$projects) ){
94 if( intval($_SESSION[
"user"]->ID) === intval($poll->owner) ){
99 if( $granted ===
false ){
100 die(
"Das ansehen dieses Textes ist nicht erlaubt" );
117 if( $option instanceof
label ){