Watershed REstoration using Spatio-Temporal Optimization of REsources
Visualize & Design Your Watershed Landscape
Portrait Values Questionnaire (PVQ)
Step 1 of 3
Instructions
Below you will find brief descriptions of different people. For each person we describe what is very important
to him/her/them. Please read each description carefully and indicate how much this person is like you. The
meaning of the scores is as follow:
1 means that the persons is totally not like you,
7 means that the persons is totally like you.
Please try to distinguish as much as possible in your answering by using different scores. The person
that is most like you should thus receive the highest score. The person that is the least like you, the lowest.
* required field
\n"; //E: For TEST
shuffle($e_pvq_files);
$html_file = $e_pvq_files[0]; //E: It takes the fisrt element of the shuffled array
// echo "e2: ".$html_file; //E: For TEST
}
else{
// echo "html.file: ".$html_file." \n"; //E: For TEST
// echo "fixvar: ".$fixvar." \n"; //E: For TEST
$html_file = $fixvar;
// echo "html.file: ".$html_file." \n"; //E: For TEST
}
//E: At first execution of this script $valid is empty, then "html" files are called. See L.117 comment
if(empty($valid)){ //E:At fisrt execution $valid is empty
// include ("form_pvq.html");
include ($html_file); //E: This html-file was slected above from an array of several html-files
// echo "empty: ".$html_file." val= ".$valid." ind= ".$ind; //E: For TEST
}else{
if (!$valid==true){ ////E: We enter here if some question was set empty, otherwise it goes to insert data into DB MySQL
////E: If some question was not set, "html" files are called again
// include ("form_pvq_4.html");
include ($html_file);//E: This html-file was slected above from an array of several html-files
echo "else: ".$html_file." val= ".$valid." ind= ".$ind; //E: For TEST
}
else {//E: insert read data into the DB MySQL
// session_start();
echo "User registered"." ";
// include ('../model_ecw/data.php');
include ('../data_login/data_db_login1.php');
// include ('connection_local_remote.php');
include ('../data_login/connect_local_remote_login1.php');
// echo "Exp-1: ".$exp_q1." ";//E: For checking !
// echo "Exp-2: ".$exp_q2_report." ";//E: For checking!
// echo "Exp-17: ".$exp_q17." ";//E: For checking !
// UPDATE table_name SET column1 = value1, column2 = value2, ... WHERE condition;
//E: ""$query_insert_2" is for insert LULC info
//E: ""$query_insert_3" is for insert EXP info
$query_insert_4 = "UPDATE $users_register SET pvq_q1='$pvq_q1', pvq_q2='$pvq_q2',pvq_q3='$pvq_q3',pvq_q4='$pvq_q4',pvq_q5='$pvq_q5',
pvq_q6='$pvq_q6', pvq_q7='$pvq_q7', pvq_q8='$pvq_q8', pvq_q9='$pvq_q9', pvq_q10='$pvq_q10', pvq_q11='$pvq_q11',pvq_q12='$pvq_q12', pvq_q13='$pvq_q13',
pvq_q14='$pvq_q14', pvq_q15='$pvq_q15', pvq_q16='$pvq_q16', pvq_q17='$pvq_q17'
WHERE username = '$user_name_i'";/**/
/*$query_insert_3 = "UPDATE REGISTER SET EXP_Q1='$exp_q1', EXP_Q2='$exp_q2_report',EXP_Q3='$exp_q3_report',EXP_Q4='$exp_q4_report',EXP_Q5='$exp_q5',
EXP_Q6='$exp_q6', EXP_Q7='$exp_q7', EXP_Q8='$exp_q8', EXP_Q9='$exp_q9', EXP_Q10='$exp_q10', EXP_Q11='$exp_q11',EXP_Q12='$exp_q12', EXP_Q13='$exp_q13_report',
EXP_Q14='$exp_q14', EXP_Q15='$exp_q15', EXP_Q16='$exp_q16', EXP_Q17='$exp_q17',EXP_Q18='$exp_q18', EXP_Q19='$exp_q19', EXP_Q20='$exp_q20', EXP_Q21='$exp_q21'
WHERE username = 'enoay1'";/**/
//E: ""$query_insert_2" is for insert LULC info
//E: ""$query_insert_3" is for insert EXP info
$result = mysqli_query($connection_login, $query_insert_4);
//E: Create a Cookie and Session
// setcookie("cookie_1","This cokie come from insert_exp_info"); //E: ??
// session_start(); //E: ??
// $_SESSION['exp_test'] = $exp_q2_report; //E: ??
// ++++++++++++++++++++++
//EE: This line send the current page to "registry_done.php" page (FIRST way to send to it)
// header('Location:done_exp.php');//E: It moves the "registry_done.php" (First way)
echo "Username: ".$user_name_i." \n"; //E: For test
echo "Answer for question 1: ".$pvq_q1." \n"; //E: For test
echo "html: ".$html_file." - val= ".$valid." - ind= ".$ind." - fixvar: ".$fixvar; //E: For test
////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////// Changes for TESTETING /////////////////////////////////
// By commenting this two options, this page prints the previous echo messages
//EE: This line send-back the current page to "login_ok.php" after submitting.
//EE: Used to run in REMOTE HOST
echo("");//E: Send back to 'login_ok.php'
//EE: Send the current page to "done_exp_test.php" after submitting for testing
//EE: Used to test at LOCAL HOST
// echo("");//E: For test
}
}
//----------------------E: Start: (Block 2) of Change for new survey ---------------------
?>
Get Involved
We provide web-based tools for visualizing watershed and designing land use and runoff management alternatives on the landscape.