Greenscape Environmental Experience & Learning Survey Experiments

Dashboard

PHP List All Session Variables"; // foreach ($_SESSION as $key=>$val) // echo $key." ".$val."
"; // $msg = isset($_SESSION['user']) ? 'SESSION_user "set": yes' : 'SESSION_user "set": no'; // $msgEm = empty($_SESSION['user']) ? 'SESSION_user "empty": yes' : 'SESSION_user "empty": no'; // echo $msg; // echo '
'; // echo $msgEm; ?>

Functions

query("SELECT * FROM function ORDER BY function_id ASC"); if($result) { while ( $row = $result->fetch_assoc() ){ $val = explode(',', $row['accountType']); foreach ( $val as $v){ if ( $_SESSION['accountType'] == $v[0] ){ $id = $row['function_id']; $url = $row['function_url']; $title = $row['function_name']; $subTitle = $row['function_subTitle']; $img_src = $row['function_img']; $img_ic = $row['function_ic']; include(dir_rootPHP.'_global/html/get_clickBox_25.php'); } } } } ?>

Surveys

query("SELECT * FROM user_account WHERE user_id = ".$_SESSION['userID']); if($result_sNonDem) { while ( $row_nonDem = $result_sNonDem->fetch_assoc() ){ $demographic_isFinished = $row_nonDem['completed_demographic']; } } $result = $conn->query("SELECT * FROM survey ORDER BY order_id ASC"); if($result) { while ( $row = $result->fetch_assoc() ){ if ($row['survey_id'] > 1){ // (Not) Demographic Survey if ( $demographic_isFinished == 0 && $row['survey_id'] != 1 && $row['survey_exempt'] != 1){ $disable_survey = 'ctm-disable'; } else $disable_survey = ''; // echo "

".$disable_survey."

"; } ?>