diff --git a/.DS_Store b/.DS_Store
new file mode 100644
index 0000000..5008ddf
Binary files /dev/null and b/.DS_Store differ
diff --git a/app/Http/Controllers/ChoosequestionController.php b/app/Http/Controllers/ChoosequestionController.php
new file mode 100644
index 0000000..2cb97cc
--- /dev/null
+++ b/app/Http/Controllers/ChoosequestionController.php
@@ -0,0 +1,187 @@
+select('id','title')
+ ->get();
+
+ $casestudy = DB::table('case_to_question')
+ ->join('case_study_question','case_study_question.id','=','case_to_question.question_id')
+ ->join('case_study_material','case_study_material.id','=','case_to_question.case_id')
+ ->select('case_to_question.id','case_to_question.question_id','case_to_question.case_id',
+ 'case_study_question.question_rank','case_study_question.detail')
+ ->get();
+ $survey = DB::table('survey_detail_question')
+ ->select('id','survey_id','detail')
+ ->get();
+
+ $section = DB::table('section_question')
+ ->select('id','section_id','question_rank','detail')
+ ->get();
+ $question_hasresult = DB::table('temp_result')->select('id','type_id','question_id')->get();
+
+ $question_hasresult = json_decode($question_hasresult,true);
+ $case_hasresult = array();
+ $survey_hasresult = array();
+ $section_hasresult = array();
+ foreach($question_hasresult as $item){
+ if ($item['type_id'] == 1) {
+ array_push($case_hasresult, $item['question_id']);
+ } elseif ($item['type_id'] == 2){
+ array_push($section_hasresult, $item['question_id']);
+ } elseif ($item['type_id'] == 3){
+ array_push($survey_hasresult, $item['question_id']);
+ }
+ }
+ return view('admin.data_analysis.show_question',
+ compact('casematerial','casestudy','survey','section','case_hasresult','section_hasresult','survey_hasresult'));
+
+ }
+
+ public function survey($id)
+ {
+ $number=DB::table('survey_answer')
+ ->where('id','=',$id)
+ ->count();
+ if($number==0){
+ return view('admin.data_analysis.noanswer');
+ }
+ else{
+ $user= DB::table('survey_answer')
+ ->join('users','survey_answer.user_id','=','users.id')
+ ->where('survey_answer.id','=',$id)
+ ->where('users.is_active','=',1)
+ ->get();
+ $type=1;
+ return view('admin.data_analysis.question_choose_user',compact('user','type','id'));
+ }
+ }
+
+ public function casestudy($id)
+ {
+ $number=DB::table('case_study_answer')
+ ->where('id','=',$id)
+ ->count();
+ if($number>0) {
+ $user = DB::table('case_study_answer')
+ ->join('users', 'case_study_answer.user_id', '=', 'users.id')
+ ->where('case_study_answer.id', '=', $id)
+ ->where('users.is_active','=',1)
+ ->get();
+ $type = 2;
+ return view('admin.data_analysis.question_choose_user', compact('user', 'type','id'));
+ }
+ else{
+ return view('admin.data_analysis.noanswer');
+ }
+
+ }
+
+ public function section($id)
+ {
+ $number=DB::table('survey_answer')
+ ->where('id','=',$id)
+ ->count();
+ if($number==0){
+ return view('admin.data_analysis.noanswer');
+ }
+ else{
+ $user= DB::table('section_question_answer')
+ ->join('users','section_question_answer.user_id','=','users.id')
+ ->where('section_question_answer.id','=',$id)
+ ->where('users.is_active','=',1)
+ ->get();
+ $type=3;
+ return view('admin.data_analysis.question_choose_user',compact('user','type','id'));
+ }
+ }
+
+ public function submit()
+ {
+// $users = $_POST["userid"];
+
+
+ $type = $_POST["type"]; //type 1=survey 2=case study 3=section question
+ $question_id = $_POST["questionid"];
+ $function = $_POST["Function"];
+ $property=$_POST["Focus"]; //Focus = Age/Income
+ if ($type==1){
+ $table="survey_answer";
+ $user= DB::table('survey_answer')
+ ->where('survey_answer.id','=',$question_id)
+ ->get();
+ }
+ elseif($type==2){
+ $table="case_study_answer";
+ $user = DB::table('case_study_answer')
+ ->where('case_study_answer.id', '=', $question_id)
+ ->get();
+ }
+ elseif($type==3){
+ $table="section_question_answer";
+ $user= DB::table('section_question_answer')
+ ->where('section_question_answer.id','=',$question_id)
+ ->get();
+ }
+ $message = $function.";".$table.";".$question_id.";";
+
+ $user=json_decode($user,true);
+
+ foreach ($user as $temp){
+ $userid=$temp["user_id"];
+
+ $message=$message.$userid.",";
+ }
+ if(count($user)!=0){
+ $message = substr($message,0,strlen($message)-1);
+ }
+ $message = $message.";".$property;
+// foreach ($users as $temp){
+// $message= $message.";".$temp;
+// }
+ $message = mb_convert_encoding($message,'GBK','UTF-8');
+
+
+
+
+ $socket = socket_create(AF_INET,SOCK_STREAM,SOL_TCP);
+
+ if(socket_connect($socket,'192.168.122.97',6666) == false){
+ $return_message= 'connect fail massege:'.socket_strerror(socket_last_error());
+ }else{
+
+
+ if(socket_write($socket,$message,strlen($message)) == false){
+ $return_message='fail to write'.socket_strerror(socket_last_error());
+
+ }else{
+ while($callback = socket_read($socket,1024)){
+ $return_message= 'server return message is:'.PHP_EOL.$callback;
+ }
+ }
+ }
+ socket_close($socket);
+
+
+
+ return redirect('/dataanalysis');
+
+ }
+
+ public function result($type,$id)
+ {
+ $result = DB::table('temp_result')->where('question_id','=',$id)
+ ->where('type_id','=',$type)->orderBy('id','desc')->get();
+ return view('admin.data_analysis.analysis_result',compact('result'));
+ }
+}
diff --git a/app/Http/Controllers/ShowResultController.php b/app/Http/Controllers/ShowResultController.php
new file mode 100644
index 0000000..6f89532
--- /dev/null
+++ b/app/Http/Controllers/ShowResultController.php
@@ -0,0 +1,92 @@
+get();
+ $semesters = DB::table('users')
+ ->groupBy("semesters")
+ ->pluck("semesters");
+ $section_numbers = DB::table('users')
+ ->groupBy("section_numbers")
+ ->pluck("section_numbers");
+ return view('admin.result.index', compact("users", "semesters", "section_numbers"));
+ }
+
+ // public function user(){
+ // $userList = DB::table('users')
+ // ->select('id', 'first_name', 'last_name')
+ // ->get();
+ // return view('result.userlist', compact('userList'));
+ // #return view('result.userlist');
+ // }
+
+ // public function showID($id){
+ // $userInfo = DB::table('users')->find($id);
+ // $first_name = $userInfo->first_name;
+ // $last_name = $userInfo->last_name;
+
+
+ // return view('result.answerPerID', compact('id', 'first_name', 'last_name'));
+ // }
+
+ public function show_by_user(){
+ $section = request('section');
+ $semester = request('semester');
+ $match = ['section_numbers' => $section, 'semesters' => $semester];
+ $users = DB::table('users')->where($match)->get();
+ return view('admin.result.show_by_user', compact("users", "semester", "section"));
+ #return view('admin.result.show_by_user', compact("semester", "section"));
+ }
+
+ public function show_by_ID($user_id){
+ $user = DB::table('users')->find($user_id);
+ $section_answer_for_user = DB::table('section_question_answer')
+ ->where('user_id' , $user->id)
+ ->get();
+
+ $case_answer_for_user = DB::table('case_study_answer')
+ ->where('user_id' , $user->id)
+ ->get();
+
+
+ $section_empty = $section_answer_for_user->isEmpty();
+ $case_empty = $case_answer_for_user->isEmpty();
+
+
+ if (!$section_empty and !$case_empty) {
+
+
+ $section_question_answers = DB::table('section_question')
+ ->join('section_question_answer',
+ 'section_question.id', '=','section_question_answer.id')
+ ->join('chapter_section',
+ 'section_question.section_id', '=', 'chapter_section.section_id')
+ ->orderBy('chapter_id', 'ASC')
+ ->orderBy('question_rank', 'ASC')
+ ->where('user_id', $user->id)
+ ->get();
+ // dd($section_question_answers);
+ return view('admin.result.show_by_id', compact("user", "section_question_answers"));
+ }
+ elseif($section_empty and !$case_empty){
+ dd('No chapter answer!');
+ }
+ elseif(!$section_empty and $case_empty){
+ dd('No case study answer!');
+ }
+ else{
+ dd('No answer!');
+ }
+
+
+
+
+ }
+}
diff --git a/app/Http/Controllers/ShowUser.php b/app/Http/Controllers/ShowUser.php
new file mode 100644
index 0000000..660ec13
--- /dev/null
+++ b/app/Http/Controllers/ShowUser.php
@@ -0,0 +1,76 @@
+join('registerinfo1','users.id','=','registerinfo1.user_id')
+ ->select('users.id','users.user_name','users.email','users.first_name','users.last_name','users.is_active',
+ 'registerinfo1.usertype','registerinfo1.age','registerinfo1.gender','registerinfo1.nationality')
+ ->where('users.is_active','=',1)
+ ->orderBy('users.id')->get();
+
+
+ return view('show_users', compact('allusers'));
+ }
+
+ public function userdetail($id){
+ $basicinfo = DB::table('users')
+ ->join('registerinfo1','users.id','=','registerinfo1.user_id')
+ ->select('users.id','users.user_name','users.email','users.first_name','users.last_name','users.is_active',
+ 'registerinfo1.usertype','registerinfo1.age','registerinfo1.gender','registerinfo1.nationality',
+ 'registerinfo1.identification','registerinfo1.identification_other')
+ ->where('users.is_active','=',1)
+ ->where('users.id','=',$id)
+ ->orderBy('users.id')->get();
+
+ $userdata=DB::table('registerinfo1')
+ ->select('registerinfo1.user_id','registerinfo1.usertype')
+ ->where('registerinfo1.user_id','=',$id)
+ ->get();
+
+ $userdata=json_decode($userdata, true);
+
+ $languageinfo = DB::table('registerinfo2')
+ ->where('registerinfo2.user_id','=',$id)
+ ->orderBy('registerinfo2.user_id')->get();
+
+ if ($userdata[0]["usertype"] == 'student') {
+ $educationalinfo = DB::table('registerinfo3')
+ ->where('registerinfo3.user_id','=',$id)
+ ->orderBy('registerinfo3.user_id')->get();
+ } else {
+ $educationalinfo = DB::table('registerinfo3_2')
+ ->where('registerinfo3_2.user_id','=',$id)
+ ->orderBy('registerinfo3_2.user_id')->get();
+ }
+
+ $religiousinfo = DB::table('registerinfo4')
+ ->where('registerinfo4.user_id','=',$id)
+ ->orderBy('registerinfo4.user_id')->get();
+
+ return view('show_users_detail', compact('basicinfo','languageinfo','educationalinfo','religiousinfo'));
+ }
+
+ public function deleteuser($id){
+ DB::table('users')
+ ->select('users.id','users.is_active')
+ ->where('users.id','=',$id)
+ ->update([
+ 'users.is_active' => 0
+ ]);
+
+ return redirect("/users");
+ }
+}
diff --git a/app/Http/Controllers/SocketconnectController.php b/app/Http/Controllers/SocketconnectController.php
new file mode 100644
index 0000000..9ffc8f4
--- /dev/null
+++ b/app/Http/Controllers/SocketconnectController.php
@@ -0,0 +1,40 @@
+ 1, "usec" => 0));
+// //发送套接流的最大超时时间为6秒
+// socket_set_option($socket, SOL_SOCKET, SO_SNDTIMEO, array("sec" => 6, "usec" => 0));
+// /****************设置socket连接选项,这两个步骤你可以省略*************/
+
+ //连接服务端的套接流,这一步就是使客户端与服务器端的套接流建立联系
+ if(socket_connect($socket,'192.168.122.97',6666) == false){
+ echo 'connect fail massege:'.socket_strerror(socket_last_error());
+ }else{
+ $message = 'l love you socket';
+ //转为GBK编码,处理乱码问题,这要看你的编码情况而定,每个人的编码都不同
+ $message = mb_convert_encoding($message,'GBK','UTF-8');
+ //向服务端写入字符串信息
+
+ if(socket_write($socket,$message,strlen($message)) == false){
+ echo 'fail to write'.socket_strerror(socket_last_error());
+
+ }else{
+ echo 'client write success'.PHP_EOL;
+ //读取服务端返回来的套接流信息
+ while($callback = socket_read($socket,1024)){
+ echo 'server return message is:'.PHP_EOL.$callback;
+ }
+ }
+ }
+ socket_close($socket);
+ }
+}
diff --git a/database/migrations/2018_12_03_114626_create_registerinfo1_table.php b/database/migrations/2018_12_03_114626_create_registerinfo1_table.php
new file mode 100644
index 0000000..a225ad3
--- /dev/null
+++ b/database/migrations/2018_12_03_114626_create_registerinfo1_table.php
@@ -0,0 +1,39 @@
+increments('id');
+ $table->integer('user_id')->unsigned();
+ $table->text('usertype');
+ $table->integer('age');
+ $table->text('gender');
+ $table->text('nationality');
+ $table->text('identification');
+ $table->text('identification_other')->nullable();
+ $table->integer('if_valid')->nullable();
+ $table->timestamps();
+ });
+ }
+
+ /**
+ * Reverse the migrations.
+ *
+ * @return void
+ */
+ public function down()
+ {
+ Schema::dropIfExists('registerinfo1');
+ }
+}
diff --git a/database/migrations/2018_12_03_171602_create_registerinfo3_table.php b/database/migrations/2018_12_03_171602_create_registerinfo3_table.php
new file mode 100644
index 0000000..3f8f5c8
--- /dev/null
+++ b/database/migrations/2018_12_03_171602_create_registerinfo3_table.php
@@ -0,0 +1,43 @@
+increments('id');
+ $table->integer('user_id')->unsigned();
+ $table->text('education_level');
+ $table->text('majoring_in')->nullable();
+ $table->text('currently_pursuing');
+ $table->text('major_current');
+ $table->text('anticipated_field');
+ $table->text('anticipated_field_other')->nullable();
+ $table->text('parental_level');
+ $table->text('major_parent')->nullable();
+ $table->text('income_rmb')->nullable();
+ $table->text('income_usd')->nullable();
+ $table->integer('if_valid')->nullable();
+ $table->timestamps();
+ });
+ }
+
+ /**
+ * Reverse the migrations.
+ *php
+ * @return void
+ */
+ public function down()
+ {
+ Schema::dropIfExists('registerinfo3');
+ }
+}
diff --git a/database/migrations/2018_12_04_054948_create_registerinfo4_table.php b/database/migrations/2018_12_04_054948_create_registerinfo4_table.php
new file mode 100644
index 0000000..793b8bf
--- /dev/null
+++ b/database/migrations/2018_12_04_054948_create_registerinfo4_table.php
@@ -0,0 +1,36 @@
+increments('id');
+ $table->integer('user_id')->unsigned();
+ $table->text('affiliation');
+ $table->text('affiliation_other')->nullable();
+ $table->text('political_orientation');
+ $table->integer('if_valid')->nullable();
+ $table->timestamps();
+ });
+ }
+
+ /**
+ * Reverse the migrations.
+ *
+ * @return void
+ */
+ public function down()
+ {
+ Schema::dropIfExists('registerinfo4');
+ }
+}
diff --git a/database/migrations/2018_12_04_113341_create_registerinfo2_table.php b/database/migrations/2018_12_04_113341_create_registerinfo2_table.php
new file mode 100644
index 0000000..4f217ed
--- /dev/null
+++ b/database/migrations/2018_12_04_113341_create_registerinfo2_table.php
@@ -0,0 +1,57 @@
+increments('id');
+ $table->integer('user_id')->unsigned();
+ $table->text('language1');
+ $table->text('language1_order');
+ $table->text('language1_speaking');
+ $table->text('language1_listening');
+ $table->text('language1_reading');
+ $table->text('language1_writing');
+ $table->text('language2')->nullable();
+ $table->text('language2_order')->nullable();
+ $table->text('language2_speaking')->nullable();
+ $table->text('language2_listening')->nullable();
+ $table->text('language2_reading')->nullable();
+ $table->text('language2_writing')->nullable();
+ $table->text('language3')->nullable();
+ $table->text('language3_order')->nullable();
+ $table->text('language3_speaking')->nullable();
+ $table->text('language3_listening')->nullable();
+ $table->text('language3_reading')->nullable();
+ $table->text('language3_writing')->nullable();
+ $table->text('language4')->nullable();
+ $table->text('language4_order')->nullable();
+ $table->text('language4_speaking')->nullable();
+ $table->text('language4_listening')->nullable();
+ $table->text('language4_reading')->nullable();
+ $table->text('language4_writing')->nullable();
+ $table->integer('if_valid')->nullable();
+ $table->timestamps();
+ });
+ }
+
+ /**
+ * Reverse the migrations.
+ *
+ * @return void
+ */
+ public function down()
+ {
+ Schema::dropIfExists('registerinfo2');
+ }
+}
diff --git a/database/migrations/2018_12_04_151941_create_registeragreement_table.php b/database/migrations/2018_12_04_151941_create_registeragreement_table.php
new file mode 100644
index 0000000..67340ae
--- /dev/null
+++ b/database/migrations/2018_12_04_151941_create_registeragreement_table.php
@@ -0,0 +1,35 @@
+ increments('id');
+ $table->integer('user_id')->unsigned();
+ $table->integer('participate_in_study');
+ $table->integer('receive_information');
+ $table->integer('if_valid')->nullable();
+ $table->timestamps();
+ });
+ }
+
+ /**
+ * Reverse the migrations.
+ *
+ * @return void
+ */
+ public function down()
+ {
+ Schema::dropIfExists('registeragreement');
+ }
+}
diff --git a/database/migrations/2018_12_06_123355_create_register_industry_table.php b/database/migrations/2018_12_06_123355_create_register_industry_table.php
new file mode 100644
index 0000000..f110518
--- /dev/null
+++ b/database/migrations/2018_12_06_123355_create_register_industry_table.php
@@ -0,0 +1,31 @@
+increments('id');
+ $table->char('name',100);
+ });
+ }
+
+ /**
+ * Reverse the migrations.
+ *
+ * @return void
+ */
+ public function down()
+ {
+ Schema::dropIfExists('register_industry');
+ }
+}
diff --git a/database/migrations/2018_12_06_130325_create_registerinfo3_2_table.php b/database/migrations/2018_12_06_130325_create_registerinfo3_2_table.php
new file mode 100644
index 0000000..c6d98dd
--- /dev/null
+++ b/database/migrations/2018_12_06_130325_create_registerinfo3_2_table.php
@@ -0,0 +1,41 @@
+increments('id');
+ $table->integer('user_id')->unsigned();
+ $table->text('education_level');
+ $table->text('major_in')->nullable();
+ $table->text('industry');
+ $table->text('industry_other')->nullable();
+ $table->text('work_position');
+ $table->text('work_position_other')->nullable();
+ $table->text('income_rmb')->nullable();
+ $table->text('income_usd')->nullable();
+ $table->integer('if_valid')->nullable();
+ $table->timestamps();
+ });
+ }
+
+ /**
+ * Reverse the migrations.
+ *
+ * @return void
+ */
+ public function down()
+ {
+ Schema::dropIfExists('registerinfo3_2');
+ }
+}
diff --git a/database/migrations/2018_12_06_150742_create_case_study_question_table.php b/database/migrations/2018_12_06_150742_create_case_study_question_table.php
new file mode 100644
index 0000000..7a08ca8
--- /dev/null
+++ b/database/migrations/2018_12_06_150742_create_case_study_question_table.php
@@ -0,0 +1,33 @@
+increments('id');
+ $table->integer('step_id')->unsigned();
+ $table->integer('question_rank')->unsigned();
+ $table->text('detail');
+ });
+ }
+
+ /**
+ * Reverse the migrations.
+ *
+ * @return void
+ */
+ public function down()
+ {
+ Schema::dropIfExists('case_study_question');
+ }
+}
diff --git a/database/migrations/2018_12_06_150931_create_case_to_question_table.php b/database/migrations/2018_12_06_150931_create_case_to_question_table.php
new file mode 100644
index 0000000..bec27e3
--- /dev/null
+++ b/database/migrations/2018_12_06_150931_create_case_to_question_table.php
@@ -0,0 +1,32 @@
+increments('id');
+ $table->integer('case_id')->unsigned();
+ $table->integer('question_id')->unsigned();
+ });
+ }
+
+ /**
+ * Reverse the migrations.
+ *
+ * @return void
+ */
+ public function down()
+ {
+ Schema::dropIfExists('case_to_question');
+ }
+}
diff --git a/database/migrations/2018_12_06_151230_create_case_study_answer_table.php b/database/migrations/2018_12_06_151230_create_case_study_answer_table.php
new file mode 100644
index 0000000..5973751
--- /dev/null
+++ b/database/migrations/2018_12_06_151230_create_case_study_answer_table.php
@@ -0,0 +1,34 @@
+integer('id')->unsigned();
+ $table->integer('user_id')->unsigned();
+ $table->text('answer');
+ $table->integer('score');
+ $table->primary(['id','user_id']);
+ });
+ }
+
+ /**
+ * Reverse the migrations.
+ *
+ * @return void
+ */
+ public function down()
+ {
+ Schema::dropIfExists('case_study_answer');
+ }
+}
diff --git a/database/migrations/2018_12_06_152247_create_survey_answer_table.php b/database/migrations/2018_12_06_152247_create_survey_answer_table.php
new file mode 100644
index 0000000..24c2ca7
--- /dev/null
+++ b/database/migrations/2018_12_06_152247_create_survey_answer_table.php
@@ -0,0 +1,33 @@
+integer('id')->unsigned();
+ $table->integer('user_id')->unsigned();
+ $table->text('answer');
+ $table->primary(['id','user_id']);
+ });
+ }
+
+ /**
+ * Reverse the migrations.
+ *
+ * @return void
+ */
+ public function down()
+ {
+ Schema::dropIfExists('survey_answer');
+ }
+}
diff --git a/database/migrations/2018_12_06_152345_create_section_question_answer_table.php b/database/migrations/2018_12_06_152345_create_section_question_answer_table.php
new file mode 100644
index 0000000..a5d1a9c
--- /dev/null
+++ b/database/migrations/2018_12_06_152345_create_section_question_answer_table.php
@@ -0,0 +1,34 @@
+integer('id')->unsigned();
+ $table->integer('user_id')->unsigned();
+ $table->text('answer');
+ $table->integer('score');
+ $table->primary(['id','user_id']);
+ });
+ }
+
+ /**
+ * Reverse the migrations.
+ *
+ * @return void
+ */
+ public function down()
+ {
+ Schema::dropIfExists('section_question_answer');
+ }
+}
diff --git a/database/migrations/2018_12_06_152620_create_section_question_table.php b/database/migrations/2018_12_06_152620_create_section_question_table.php
new file mode 100644
index 0000000..f2abef7
--- /dev/null
+++ b/database/migrations/2018_12_06_152620_create_section_question_table.php
@@ -0,0 +1,33 @@
+increments('id');
+ $table->integer('section_id')->unsigned();
+ $table->integer('question_rank')->unsigned();
+ $table->text('detail');
+ });
+ }
+
+ /**
+ * Reverse the migrations.
+ *
+ * @return void
+ */
+ public function down()
+ {
+ Schema::dropIfExists('section_question');
+ }
+}
diff --git a/database/migrations/2018_12_06_152731_create_survey_detail_question_table.php b/database/migrations/2018_12_06_152731_create_survey_detail_question_table.php
new file mode 100644
index 0000000..d00f588
--- /dev/null
+++ b/database/migrations/2018_12_06_152731_create_survey_detail_question_table.php
@@ -0,0 +1,32 @@
+increments('id');
+ $table->integer('survey_id')->unsigned();
+ $table->text('detail');
+ });
+ }
+
+ /**
+ * Reverse the migrations.
+ *
+ * @return void
+ */
+ public function down()
+ {
+ Schema::dropIfExists('survey_detail_question');
+ }
+}
diff --git a/database/migrations/2018_12_06_152857_create_question_type_table.php b/database/migrations/2018_12_06_152857_create_question_type_table.php
new file mode 100644
index 0000000..8b1095d
--- /dev/null
+++ b/database/migrations/2018_12_06_152857_create_question_type_table.php
@@ -0,0 +1,33 @@
+integer('id')->unsigned();
+ $table->string('question_name',50);
+ $table->string('answer_name',50);
+ $table->primary(['id']);
+ });
+ }
+
+ /**
+ * Reverse the migrations.
+ *
+ * @return void
+ */
+ public function down()
+ {
+ Schema::dropIfExists('question_type');
+ }
+}
diff --git a/database/migrations/2018_12_11_052722_create_temp_result_table.php b/database/migrations/2018_12_11_052722_create_temp_result_table.php
new file mode 100644
index 0000000..0635139
--- /dev/null
+++ b/database/migrations/2018_12_11_052722_create_temp_result_table.php
@@ -0,0 +1,38 @@
+increments('id');
+ $table->integer('type_id');
+ $table->integer('question_id');
+ $table->text('lda')->nullable();
+ $table->text('sentiment')->nullable();
+ $table->text('co_occur')->nullable();
+ $table->text('regression')->nullable();
+ $table->text('cluster')->nullable();
+ $table->text('p_or_n')->nullable();
+ });
+ }
+
+ /**
+ * Reverse the migrations.
+ *
+ * @return void
+ */
+ public function down()
+ {
+ Schema::dropIfExists('temp_result');
+ }
+}
diff --git a/database/migrations/2019_05_09_090110_modify_user_info.php b/database/migrations/2019_05_09_090110_modify_user_info.php
new file mode 100644
index 0000000..423adff
--- /dev/null
+++ b/database/migrations/2019_05_09_090110_modify_user_info.php
@@ -0,0 +1,33 @@
+bigInteger('studentIDs');
+ $table->integer('section_numbers');
+ $table->text('semesters');
+ #$table->dropColumn('testing', 'test', 'test_final', 'roles', 'role_user');
+ });
+ }
+
+ /**
+ * Reverse the migrations.
+ *
+ * @return void
+ */
+ public function down()
+ {
+ //
+ }
+}
diff --git a/database/migrations/2019_05_09_091116_drop_some_useless_tables.php b/database/migrations/2019_05_09_091116_drop_some_useless_tables.php
new file mode 100644
index 0000000..cf6b397
--- /dev/null
+++ b/database/migrations/2019_05_09_091116_drop_some_useless_tables.php
@@ -0,0 +1,32 @@
+get();
+ $student_id = array();
+ $section_numbers = array();
+ $semesters = array();
+ for($i = 1;$i<42;$i++){
+ $student_id[] = random_int(517370910000, 517370919999);
+ $section_numbers[] = random_int(1, 3);
+ $semesters[] = $array[random_int(0, 2)];
+
+ }
+ // foreach ($users as $user) {
+ // $user->studentIDs = random_int(517370910000, 517370919999);
+
+ // }
+ for($i = 1;$i<41;$i++){
+ DB::table('users')
+ ->where('id', $i)
+ ->update([
+ 'studentIDs' => $student_id[$i],
+ 'section_numbers' => $section_numbers[$i] ,
+ 'semesters' => $semesters[$i]
+ ]);
+ }
+
+ }
+}
diff --git a/public/css/mycss.css b/public/css/mycss.css
new file mode 100644
index 0000000..dc7b7d1
--- /dev/null
+++ b/public/css/mycss.css
@@ -0,0 +1,59 @@
+#main-nav {
+margin-left: 1px;
+}
+#main-nav.nav-tabs.nav-stacked > li > a {
+padding: 10px 8px;
+font-size: 12px;
+font-weight: 600;
+color: #4A515B;
+background: #E9E9E9;
+background: -moz-linear-gradient(top, #FAFAFA 0%, #E9E9E9 100%);
+background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#FAFAFA), color-stop(100%,#E9E9E9));
+background: -webkit-linear-gradient(top, #FAFAFA 0%,#E9E9E9 100%);
+background: -o-linear-gradient(top, #FAFAFA 0%,#E9E9E9 100%);
+background: -ms-linear-gradient(top, #FAFAFA 0%,#E9E9E9 100%);
+background: linear-gradient(top, #FAFAFA 0%,#E9E9E9 100%);
+filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#FAFAFA', endColorstr='#E9E9E9');
+-ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr='#FAFAFA', endColorstr='#E9E9E9')";
+border: 1px solid #D5D5D5;
+border-radius: 4px;
+}
+#main-nav.nav-tabs.nav-stacked > li > a > span {
+color: #4A515B;
+}
+#main-nav.nav-tabs.nav-stacked > li.active > a, #main-nav.nav-tabs.nav-stacked > li > a:hover {
+color: #FFF;
+background: #3C4049;
+background: -moz-linear-gradient(top, #4A515B 0%, #3C4049 100%);
+background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#4A515B), color-stop(100%,#3C4049));
+background: -webkit-linear-gradient(top, #4A515B 0%,#3C4049 100%);
+background: -o-linear-gradient(top, #4A515B 0%,#3C4049 100%);
+background: -ms-linear-gradient(top, #4A515B 0%,#3C4049 100%);
+background: linear-gradient(top, #4A515B 0%,#3C4049 100%);
+filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#4A515B', endColorstr='#3C4049');
+-ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr='#4A515B', endColorstr='#3C4049')";
+border-color: #2B2E33;
+}
+#main-nav.nav-tabs.nav-stacked > li.active > a, #main-nav.nav-tabs.nav-stacked > li > a:hover > span {
+color: #FFF;
+}
+#main-nav.nav-tabs.nav-stacked > li {
+margin-bottom: 4px;
+}
+/*˵ʽ*/
+.secondmenu a {
+font-size: 10px;
+color: #4A515B;
+text-align: center;
+}
+.navbar-static-top {
+background-color: #212121;
+margin-bottom: 5px;
+}
+.navbar-brand {
+background: url('') no-repeat 10px 8px;
+display: inline-block;
+vertical-align: middle;
+padding-left: 50px;
+color: #fff;
+}
\ No newline at end of file
diff --git a/public/image/JILOGO.png b/public/image/JILOGO.png
new file mode 100644
index 0000000..d804a17
Binary files /dev/null and b/public/image/JILOGO.png differ
diff --git a/resources/views/Chooseonesurvey.blade.php b/resources/views/Chooseonesurvey.blade.php
new file mode 100644
index 0000000..9c593b3
--- /dev/null
+++ b/resources/views/Chooseonesurvey.blade.php
@@ -0,0 +1,52 @@
+@extends('layouts.app')
+@section('content')
+
+
+
Please choose a survey
+
+
+
+
+
+
+";
+ echo"
";
+ echo"
";
+ echo"
";
+ echo"";
+ echo"Survey id Survey title Do this survey ";
+ echo" ";
+ $survey = json_decode($survey_question,true);
+ foreach($survey as $survey_value)
+ {
+ echo"";
+ $survey_id = $survey_value['id'];
+ $survey_title = $survey_value['title'];
+ echo"$survey_id ";
+ echo"$survey_title ";
+
+ $link_do = url("/surveys/$survey_id");
+ echo"Do it ";
+ echo" ";
+ }
+
+ echo"
";
+
+ $link_add_survey = url("/homepage");
+
+ echo"
Back to the homepage ";
+
+
+ echo"
"
+
+?>
+
+
+
+
+
+
+
+@endsection
\ No newline at end of file
diff --git a/resources/views/add_newsurvey.blade.php b/resources/views/add_newsurvey.blade.php
new file mode 100644
index 0000000..ed71057
--- /dev/null
+++ b/resources/views/add_newsurvey.blade.php
@@ -0,0 +1,83 @@
+
+@extends('admin.Header')
+@section('content')
+
+
+
Add a New Survey "
+ ?>
+
+
+
+
+
+";
+ echo"
";
+ echo"
";
+ echo"
";
+
+ echo"
";
+ $link_back = url("/showsurvey");
+ echo"
Back to Check Page ";
+ echo"
";
+
+ echo"
";
+ echo"
";
+ echo"
";
+?>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+@endsection
\ No newline at end of file
diff --git a/resources/views/add_newsurveyquestions.blade.php b/resources/views/add_newsurveyquestions.blade.php
new file mode 100644
index 0000000..d40e4a1
--- /dev/null
+++ b/resources/views/add_newsurveyquestions.blade.php
@@ -0,0 +1,82 @@
+@extends('admin.Header')
+@section('content')
+
+
+
Add a New Survey question for Survey $id "
+ ?>
+
+
+
+
+
+
+ {{ csrf_field() }}
+ ";
+ echo " ";
+
+ echo "Question details ";
+ echo "";
+ echo "";
+
+ echo " ";
+ echo "
";
+
+ echo "";
+ echo"";
+ echo $id;
+ echo" ";
+ echo "
";
+
+
+
+
+
+
+
+
+
+ echo"submit ";
+ echo " ";
+ echo " ";
+ ?>
+
+ ";
+
+
+ echo"
";
+ echo"
";
+ echo"
";
+
+ echo"
";
+ $link_back = url("/check/survey/$id");
+ echo"
Back to Check Page ";
+ echo"
";
+
+ echo"
";
+ echo"
";
+ echo"
";
+
+ ?>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+@endsection
\ No newline at end of file
diff --git a/resources/views/admin/data_analysis/analysis_result.blade.php b/resources/views/admin/data_analysis/analysis_result.blade.php
new file mode 100644
index 0000000..a47b25a
--- /dev/null
+++ b/resources/views/admin/data_analysis/analysis_result.blade.php
@@ -0,0 +1,256 @@
+@extends('admin.Header')
+
+@section('style')
+ @parent
+
+@endsection
+
+@section('content')
+
+
+
+
+
+
+
Sentiment distribution
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Co-occurrence
+
+
+
+
+
+
+
+
+
+
+
+Return "
+
+?>
+@endsection
+
+@section('script')
+ @parent
+
+@endsection
\ No newline at end of file
diff --git a/resources/views/admin/data_analysis/noanswer.blade.php b/resources/views/admin/data_analysis/noanswer.blade.php
new file mode 100644
index 0000000..0ac21d3
--- /dev/null
+++ b/resources/views/admin/data_analysis/noanswer.blade.php
@@ -0,0 +1,10 @@
+@extends('admin.Header')
+
+@section('content')
+ There is nobodying answering this question
+ Return "
+
+ ?>
+@endsection
\ No newline at end of file
diff --git a/resources/views/admin/data_analysis/question_choose_user.blade.php b/resources/views/admin/data_analysis/question_choose_user.blade.php
new file mode 100644
index 0000000..e7b5078
--- /dev/null
+++ b/resources/views/admin/data_analysis/question_choose_user.blade.php
@@ -0,0 +1,104 @@
+@extends('admin.Header')
+
+@section('content')
+
+
+
+
Data Analysis
+
+
+
+
+
+
+
+
+
+@endsection
\ No newline at end of file
diff --git a/resources/views/admin/data_analysis/show_question.blade.php b/resources/views/admin/data_analysis/show_question.blade.php
new file mode 100644
index 0000000..41312c5
--- /dev/null
+++ b/resources/views/admin/data_analysis/show_question.blade.php
@@ -0,0 +1,136 @@
+@extends('admin.Header')
+
+@section('content')
+
+
+
+
All Questions
+
+
+
+
+
+
+ Survey Question";
+ echo"
";
+ echo"
";
+ echo"";
+ echo"Question id Question Detail Data Analysis Result ";
+ echo" ";
+ $chapter = json_decode($survey,true);
+ $survey_typeid = 3;
+ foreach($chapter as $ch_value)
+ {
+ echo"";
+ $questionid = $ch_value['id'];
+ $questiondetail = $ch_value['detail'];
+ echo"$questionid ";
+ echo"$questiondetail ";
+ $link_sec = url("/dataanalysis/survey/$questionid");
+ echo"check ";
+ if (in_array($questionid, $survey_hasresult)){
+ $result_url = url("/dataanalysis/result/$survey_typeid/$questionid");
+ echo "result ";
+ } else {
+ echo "No result ";
+ }
+ echo" ";
+ }
+
+ echo"
";
+
+ ?>
+
+
+
+
+
+ Case Study Question";
+ echo"
";
+ echo"
";
+ echo"";
+ echo"Question id Question Detail Data Analysis Result ";
+ echo" ";
+ $chapter = json_decode($casestudy,true);
+ $case_detail = json_decode($casematerial,true);
+ $case_now = 1;
+ $case_typeid = 1;
+
+
+ foreach($chapter as $ch_value)
+ {
+ if($ch_value['case_id'] == $case_now){
+ $tmp_title = $case_detail[$case_now -1]['title'];
+ echo"";
+ echo"Case $case_now $tmp_title ";
+ echo" ";
+ $case_now++;
+ }
+ echo"";
+ $absolute_id = $ch_value['id'];
+ $questionid = $ch_value['question_id'];
+ $questiondetail = $ch_value['detail'];
+ echo"$questionid ";
+ echo"$questiondetail ";
+ $link_sec = url("/dataanalysis/casestudy/$absolute_id");
+ echo"check ";
+ if (in_array($absolute_id, $case_hasresult)){
+ $result_url = url("/dataanalysis/result/$case_typeid/$absolute_id");
+ echo "result ";
+ } else {
+ echo "No result ";
+ }
+ echo" ";
+ }
+
+ echo"
";
+
+ ?>
+
+
+
+
+
+ Section Study Question";
+ echo"
";
+ echo"
";
+ echo"";
+ echo"Question id Question Detail Data Analysis Result ";
+ echo" ";
+ $chapter = json_decode($section,true);
+ $section_typeid = 2;
+ $i=0;
+ foreach($chapter as $ch_value)
+ {
+ echo"";
+ $i++;
+ $questionid = $ch_value['id'];
+ $questiondetail = $ch_value['detail'];
+ echo"$i ";
+ echo"$questiondetail ";
+ $link_sec = url("/dataanalysis/sectionstudy/$questionid");
+ echo"check ";
+ if (in_array($questionid, $section_hasresult)){
+ $result_url = url("/dataanalysis/result/$survey_typeid/$questionid");
+ echo "result ";
+ } else {
+ echo "No result ";
+ }
+ echo" ";
+ }
+
+ echo"
";
+
+ ?>
+
+
+
+
+
+
+
+
+@endsection
\ No newline at end of file
diff --git a/resources/views/admin/data_analysis/submit_result.blade.php b/resources/views/admin/data_analysis/submit_result.blade.php
new file mode 100644
index 0000000..0333915
--- /dev/null
+++ b/resources/views/admin/data_analysis/submit_result.blade.php
@@ -0,0 +1,12 @@
+@extends('admin.Header')
+
+@section('content')
+ The request has been sent.
+ Check ";
+ echo $message;
+ ?>
+
+@endsection
+
diff --git a/resources/views/admin/result/index.blade.php b/resources/views/admin/result/index.blade.php
new file mode 100644
index 0000000..c621282
--- /dev/null
+++ b/resources/views/admin/result/index.blade.php
@@ -0,0 +1,35 @@
+@extends('admin.Header')
+@section('content')
+ Show by users
+
+
+ {{ csrf_field() }}
+ Select the semester:
+
+
+ @foreach ($semesters as $semester)
+ {{$semester}}
+ @endforeach
+
+
+
+
+
+ Select the section:
+
+
+ @foreach ($section_numbers as $section)
+ {{$section}}
+ @endforeach
+
+
+
+
+
+ Get the students
+
+
+
+
+
+@endsection('content')
\ No newline at end of file
diff --git a/resources/views/admin/result/show_by_id.blade.php b/resources/views/admin/result/show_by_id.blade.php
new file mode 100644
index 0000000..4ca4f21
--- /dev/null
+++ b/resources/views/admin/result/show_by_id.blade.php
@@ -0,0 +1,22 @@
+@extends('admin.Header')
+
+@section('content')
+{{$user->first_name}} {{$user->last_name}}'s answers
+
+Answer for chapter questions
+
+
+
+ Chapter number
+ Question description
+ Answer
+
+ @foreach($section_question_answers as $answer)
+
+ {{$answer->chapter_id}}
+ {{$answer->detail}}
+ {{$answer->answer}}
+
+ @endforeach
+
+@endsection('content')
\ No newline at end of file
diff --git a/resources/views/admin/result/show_by_user.blade.php b/resources/views/admin/result/show_by_user.blade.php
new file mode 100644
index 0000000..9442c70
--- /dev/null
+++ b/resources/views/admin/result/show_by_user.blade.php
@@ -0,0 +1,18 @@
+@extends('admin.Header')
+@section('content')
+ Show by users from section {{$section}} in {{$semester}}
+
+
+ Student ID
+ First Name
+ Last Name
+ @foreach($users as $user)
+
+ {{$user->studentIDs}}
+ {{$user->first_name}}
+ {{$user->last_name}}
+
+
+ @endforeach
+
+@endsection('content')
\ No newline at end of file
diff --git a/resources/views/register_info3_nonstu.blade.php b/resources/views/register_info3_nonstu.blade.php
new file mode 100644
index 0000000..344706d
--- /dev/null
+++ b/resources/views/register_info3_nonstu.blade.php
@@ -0,0 +1,195 @@
+@extends('layouts.app')
+@section('content')
+
+ Educational & Financial Background
+
+ {{ csrf_field()}}
+
+
+
+
+
+ "
+ ?>
+
+
+
Education Level
+
+ Less than a high school diploma
+ High school degree or equivalent
+ Some college, no degree
+ Associate degree
+ Bachelor’s degree
+ Master’s degree
+ Professional degree
+ Doctorate
+
+
+
+ Major in
+ ";
+ $majors = json_decode($major, true);
+ foreach ($majors as $value) {
+ $id = $value["id"];
+ $name = $value["name"];
+ echo "$name ";
+ }
+ echo ""
+ ?>
+
+
+
+
+ Work industry:
+ ";
+ $industry= json_decode($industry, true);
+ foreach ($industry as $value) {
+ $id = $value["id"];
+ $name = $value["name"];
+ echo "$name ";
+ }
+ echo ""
+ ?>
+
+
+
+ Work position
+
+ Trained professional
+ Skilled Laborer
+ Junior management
+ Middle management
+ Upper management
+ Consultant
+ Administrative Staff
+ Temporary employee
+ Researcher
+ Self-employed
+ Other
+
+
+
+
+
+ Combined parental/familial income per month before taxes in RMB
+
+ less than 1,500
+ 1,500-4,500
+ 4,500-9,000
+ 9,000-35,000
+ 35,000-55,000
+ 55,000-80,000
+ 80,000 or more
+ I don't know
+
+
+
+
+
+ Combined parental/familial income per year before taxes in USD
+
+ less than 9,999
+ 10,000-19,999
+ 20,000-29,999
+ 30,000-39,999
+ 40,000-49,999
+ 50,000-59,999
+ 60,000-69,999
+ 70,000-79,999
+ 80,000-89,999
+ 90,000-99,999
+ 100,000 or more
+ I don’t know
+
+
+
+
+
+
+
+
+ Next "
+ ?>
+
+
+@endsection
+
+@section('script')
+ @parent
+
+@endsection
\ No newline at end of file
diff --git a/resources/views/result/answerPerID.blade.php b/resources/views/result/answerPerID.blade.php
new file mode 100644
index 0000000..54d8788
--- /dev/null
+++ b/resources/views/result/answerPerID.blade.php
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+{{$first_name}} {{$last_name}}'s answer
+ID:{{$id}}
+
+
\ No newline at end of file
diff --git a/resources/views/result/index.blade.php b/resources/views/result/index.blade.php
new file mode 100644
index 0000000..e7edb68
--- /dev/null
+++ b/resources/views/result/index.blade.php
@@ -0,0 +1,12 @@
+
+
+
+ Results
+
+
+
+
+
\ No newline at end of file
diff --git a/resources/views/result/userlist.blade.php b/resources/views/result/userlist.blade.php
new file mode 100644
index 0000000..3882aba
--- /dev/null
+++ b/resources/views/result/userlist.blade.php
@@ -0,0 +1,18 @@
+
+
+
+
+
+
+
+ @foreach($userList as $user)
+
+ {{$user->id}}
+ {{$user->first_name}}
+ {{$user->last_name}}
+
+
+ @endforeach
+
+
+
\ No newline at end of file
diff --git a/resources/views/section_question_modify.blade.php b/resources/views/section_question_modify.blade.php
new file mode 100644
index 0000000..ba1653a
--- /dev/null
+++ b/resources/views/section_question_modify.blade.php
@@ -0,0 +1,88 @@
+@extends('admin.Header')
+@section('content')
+
+
+
Modify Chapter $id Section $section_id Question $question_rank "
+ ?>
+
+
+
+
+
+
+ {{ csrf_field() }}
+ ";
+ echo" ";
+ echo" ";
+ echo" ";
+ $section_question = json_decode($section_question,true);
+ foreach ($section_question as $sec_details)
+ {
+ $chapter_id = $id;
+ $sec_id = $section_id;
+
+ $question_id = $sec_details['question_id'];
+
+ $question_detail = $sec_details['question'];
+
+ echo "Section Question Details ";
+ echo "";
+ echo "";
+ echo "$question_detail";
+ echo " ";
+ echo "
";
+
+ echo "";
+ echo"";
+ echo $question_id;
+ echo" ";
+ echo "
";
+
+
+
+
+ }
+
+ echo"submit ";
+ echo " ";
+ echo " ";
+ ?>
+
+";
+ echo"
";
+ echo"
";
+ echo"
";
+
+ echo"
";
+ $link_back = url("/check/chapter/$id");
+ echo"
Back to Check Page ";
+ echo"
";
+
+ echo"
";
+ echo"
";
+ echo"
";
+?>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+@endsection
\ No newline at end of file
diff --git a/resources/views/show_survey_question_details.blade.php b/resources/views/show_survey_question_details.blade.php
new file mode 100644
index 0000000..61b9ccc
--- /dev/null
+++ b/resources/views/show_survey_question_details.blade.php
@@ -0,0 +1,63 @@
+@extends('admin.Header')
+@section('content')
+
+
+
+ Survey $id";
+ ?>
+
+
+
+
+
+";
+ echo"
";
+ echo"
";
+ echo"
";
+ echo"";
+ echo"Question details Delete ";
+ echo" ";
+ $survey_detail_question = json_decode($survey_detail_question,true);
+ foreach($survey_detail_question as $survey_value)
+ {
+ echo"";
+ $question_id = $survey_value['id'];
+ $question_detail = $survey_value['detail'];
+ echo"$question_detail ";
+ $link_delete = url("/delete/surveyquestion/$id/$question_id");
+ echo"delete ";
+ echo" ";
+ }
+
+ echo"
";
+
+ $link_add_survey = url("/addnewsurveyquestinos/$id");
+
+ echo"
Add a question ";
+
+?>
+
+
+
+
+
+
+
+";
+ echo" ";
+ echo" ";
+
+ echo"";
+ $link_back = url("showsurvey");
+ echo"
Back to Show Survey Page ";
+ echo"
";
+
+ echo" ";
+ echo" ";
+ echo" ";
+?>
+@endsection
\ No newline at end of file
diff --git a/resources/views/show_survey_questions.blade.php b/resources/views/show_survey_questions.blade.php
new file mode 100644
index 0000000..ec9490d
--- /dev/null
+++ b/resources/views/show_survey_questions.blade.php
@@ -0,0 +1,55 @@
+@extends('admin.Header')
+@section('content')
+
+
+
Survey material
+
+
+
+
+
+
+";
+ echo"
";
+ echo"
";
+ echo"
";
+ echo"";
+ echo"Survey id Survey title Link to Check Link to Modify Delete ";
+ echo" ";
+ $survey = json_decode($survey_question,true);
+ foreach($survey as $survey_value)
+ {
+ echo"";
+ $survey_id = $survey_value['id'];
+ $survey_title = $survey_value['title'];
+ echo"$survey_id ";
+ echo"$survey_title ";
+ $link_sec = url("/modify/survey/$survey_id");
+ $link_sec_check = url("/check/survey/$survey_id");
+ echo"Check questions ";
+ echo"Change title ";
+ $link_delete = url("/delete/survey/$survey_id");
+ echo"delete ";
+ echo" ";
+ }
+
+ echo"
";
+
+ $link_add_survey = url("/addnewsurvey");
+
+ echo"
Add a new survey ";
+
+
+
+
+?>
+
+
+
+
+
+
+
+@endsection
\ No newline at end of file
diff --git a/resources/views/show_users.blade.php b/resources/views/show_users.blade.php
new file mode 100644
index 0000000..3d2ce20
--- /dev/null
+++ b/resources/views/show_users.blade.php
@@ -0,0 +1,84 @@
+@extends('admin.Header')
+@section('content')
+
+
+
+
+
All Users
+
+
+
+ #
+ Username
+ Email
+ First Name
+ Last Name
+ User Type
+ Age
+ Gender
+ Nationality
+
+
+
+
+
+ ";
+ echo"$id ";
+ echo"$users_username ";
+ echo"$users_email ";
+ echo"$users_firstname ";
+ echo"$users_lastname ";
+ echo"$users_usertype ";
+ echo"$users_age ";
+ echo"$users_gender ";
+ echo"$users_nationality ";
+ $link_detail = url("/user/detail/$user_id");
+ echo" details ";
+ $link_delete = url("/user/delete/$user_id");
+ echo" delete ";
+ echo"";
+ }
+ ?>
+
+
+
+
+ Back";
+ ?>
+
+
+
+
+@endsection
+
+@section('script')
+ @parent
+
+@endsection
\ No newline at end of file
diff --git a/resources/views/show_users_detail.blade.php b/resources/views/show_users_detail.blade.php
new file mode 100644
index 0000000..575138c
--- /dev/null
+++ b/resources/views/show_users_detail.blade.php
@@ -0,0 +1,361 @@
+@extends('admin.Header')
+@section('content')
+
+
+
+
+
+
User Detail
+
+
+
+ ";
+ echo"Username ";
+ echo"$users_username ";
+ echo"";
+ echo"";
+ echo"Email ";
+ echo"$users_email ";
+ echo" ";
+ echo"";
+ echo"First Name ";
+ echo"$users_firstname ";
+ echo" ";
+ echo"";
+ echo"Last Name ";
+ echo"$users_lastname ";
+ echo" ";
+ echo"";
+ echo"User Type ";
+ echo"$users_usertype ";
+ echo" ";
+ echo"";
+ echo"Age ";
+ echo"$users_age ";
+ echo" ";
+ echo"";
+ echo"Gender ";
+ echo"$users_gender ";
+ echo" ";
+ echo"";
+ echo"Nationality ";
+ echo"$users_nationality ";
+ echo" ";
+ }
+ ?>
+
+
+
+
+
Language Information
+
+
+
+ ";
+ echo"Language ";
+ echo"$language1 ";
+ echo"Ratings of languages ";
+ echo"$language1_order ";
+ echo"";
+ echo"";
+ echo"Proficiency in Speaking ";
+ echo"$language1_speaking ";
+ echo"Proficiency in listening ";
+ echo"$language1_listening ";
+ echo" ";
+ echo"";
+ echo"Proficiency in Writing ";
+ echo"$language1_writing ";
+ echo"Proficiency in Reading ";
+ echo"$language1_reading ";
+ echo" ";
+
+ if ($key['language2']!=null){
+ echo" ";
+ echo"
";
+ echo "
";
+ echo "
";
+ echo "";
+ $language2 = $key['language2'];
+ $language2_order = $key['language2_order'];
+ $language2_speaking = $key['language2_speaking'];
+ $language2_listening = $key['language2_listening'];
+ $language2_reading = $key['language2_reading'];
+ $language2_writing = $key['language2_writing'];
+ echo"";
+ echo"Language ";
+ echo"$language2 ";
+ echo"Ratings of languages ";
+ echo"$language2_order ";
+ echo" ";
+ echo"";
+ echo"Proficiency in Speaking ";
+ echo"$language2_speaking ";
+ echo"Proficiency in listening ";
+ echo"$language2_listening ";
+ echo" ";
+ echo"";
+ echo"Proficiency in Writing ";
+ echo"$language2_writing ";
+ echo"Proficiency in Reading ";
+ echo"$language2_reading ";
+ echo" ";
+ }
+ if ($key['language3']!=null){
+ echo" ";
+ echo"
";
+ echo "
";
+ echo "
";
+ echo "";
+ $language3 = $key['language3'];
+ $language3_order = $key['language3_order'];
+ $language3_speaking = $key['language3_speaking'];
+ $language3_listening = $key['language3_listening'];
+ $language3_reading = $key['language3_reading'];
+ $language3_writing = $key['language3_writing'];
+ echo"";
+ echo"Language ";
+ echo"$language3 ";
+ echo"Ratings of languages ";
+ echo"$language3_order ";
+ echo" ";
+ echo"";
+ echo"Proficiency in Speaking ";
+ echo"$language3_speaking ";
+ echo"Proficiency in listening ";
+ echo"$language3_listening ";
+ echo" ";
+ echo"";
+ echo"Proficiency in Writing ";
+ echo"$language3_writing ";
+ echo"Proficiency in Reading ";
+ echo"$language3_reading ";
+ echo" ";
+ }
+ if ($key['language4']!=null){
+ echo" ";
+ echo"
";
+ echo "
";
+ echo "
";
+ echo "";
+ $language4 = $key['language4'];
+ $language4_order = $key['language4_order'];
+ $language4_speaking = $key['language4_speaking'];
+ $language4_listening = $key['language4_listening'];
+ $language4_reading = $key['language4_reading'];
+ $language4_writing = $key['language4_writing'];
+ echo"";
+ echo"Language ";
+ echo"$language4 ";
+ echo"Ratings of languages ";
+ echo"$language4_order ";
+ echo" ";
+ echo"";
+ echo"Proficiency in Speaking ";
+ echo"$language4_speaking ";
+ echo"Proficiency in listening ";
+ echo"$language4_listening ";
+ echo" ";
+ echo"";
+ echo"Proficiency in Writing ";
+ echo"$language4_writing ";
+ echo"Proficiency in Reading ";
+ echo"$language4_reading ";
+ echo" ";
+ }
+ }
+ ?>
+
+
+
+
+
Enducational Background
+
+
+
+ ";
+ echo"Highest Educational Degree Achieved ";
+ echo"$educational_level ";
+ echo"";
+ if($key['majoring_in']!= "No"){
+ $majoring = $key['majoring_in'];
+ echo"";
+ echo"Majoring in ";
+ echo"$majoring ";
+ echo" ";
+ }
+ echo"";
+ echo"Current Pursuing Degree ";
+ echo"$current ";
+ echo" ";
+ echo"";
+ echo"Current Major ";
+ echo"$major_current ";
+ echo" ";
+ echo"";
+ echo"Anticipated Field ";
+ echo"$Antifield ";
+ echo" ";
+ echo"";
+ echo"Highest parental education level ";
+ echo"$parental_level ";
+ echo" ";
+ if($key['major_parent']!= "No"){
+ $major_parent = $key['major_parent'];
+ echo"";
+ echo"Major of Parents ";
+ echo"$major_parent ";
+ echo" ";
+ }
+ echo"";
+ echo"Income in RMB ";
+ echo"$income ";
+ echo" ";
+ }
+ else {
+ $educational_level = $key['education_level'];
+ $industry = $key['industry'];
+ if ($industry == "Other")
+ {
+ $industry = $key['industry_other'];
+ }
+ $work_position = $key['work_position'];
+ if ($work_position == "Other")
+ {
+ $work_position = $key['work_position_other'];
+ }
+ $income = $key['income_rmb'];
+ echo"";
+ echo" Highest Educational Degree Achieved ";
+ echo" $educational_level ";
+ echo" ";
+ if($key['major_in']!= "No"){
+ $majoring = $key['major_in'];
+ echo"";
+ echo"Major in ";
+ echo"$majoring ";
+ echo" ";
+ }
+ echo"";
+ echo"Work industry ";
+ echo"$industry ";
+ echo" ";
+ echo"";
+ echo"Work Position ";
+ echo"$work_position ";
+ echo" ";
+ echo"";
+ echo"Income in RMB ";
+ echo"$income ";
+ echo" ";
+ }
+ }
+ ?>
+
+
+
+
+
Religious Background
+
+
+
+ ";
+ echo"Affiliation ";
+ echo"$affiliation ";
+ echo"";
+ echo"";
+ echo"Political Orientation ";
+ echo"$political_orientation ";
+ echo" ";
+ }
+ ?>
+
+
+
+
+
delete ";
+ echo"
";
+ echo"
";
+ $link_user = url("/users");
+ echo"
Back ";
+ ?>
+
+
+
+
+
+@endsection
+
+@section('script')
+ @parent
+
+ @endsection
\ No newline at end of file
diff --git a/resources/views/survey_finished.blade.php b/resources/views/survey_finished.blade.php
new file mode 100644
index 0000000..5bb73ee
--- /dev/null
+++ b/resources/views/survey_finished.blade.php
@@ -0,0 +1,21 @@
+@extends('layouts.app')
+@section('content')
+
+
+
+
+
+
+ ";
+ echo"
You have already finished this survey, please click the button to the survey page ";
+ echo"
";echo"
";echo"
";
+ $return_url = url("chooseonesurvey");
+ echo"
";
+ echo"
";
+ ?>
+
+
+
+@endsection
diff --git a/resources/views/survey_title_modify.blade.php b/resources/views/survey_title_modify.blade.php
new file mode 100644
index 0000000..d8b42e1
--- /dev/null
+++ b/resources/views/survey_title_modify.blade.php
@@ -0,0 +1,92 @@
+@extends('admin.Header')
+@section('content')
+
+
+
Modify Survey $id Content "
+ ?>
+
+
+
+
+
+
+ {{ csrf_field() }}
+ ";
+ $survey_question = json_decode($survey_question,true);
+ foreach ($survey_question as $survey_details)
+ {
+ $pre_survey_title = $survey_details['title'];
+ for ($i = 0;$i<=5;$i++)
+ {
+ $pre_choice[$i] = $survey_details['choice'.$i];
+ }
+
+ echo "Survey Title ";
+ echo "";
+ echo "";
+ echo "$pre_survey_title";
+ echo " ";
+ echo "
";
+ for ($i = 0;$i<=5;$i++)
+ {
+ echo "Choice $i ";
+ echo "";
+ echo "";
+ echo "$pre_choice[$i]";
+ echo " ";
+ echo "
";
+ }
+
+
+ echo "";
+ echo"";
+ echo $id;
+ echo" ";
+ echo "
";
+
+
+ }
+
+ echo"submit ";
+ echo " ";
+ echo " ";
+ ?>
+
+";
+ echo"
";
+ echo"
";
+ echo"
";
+
+ echo"
";
+ $link_back = url("/showsurvey");
+ echo"
Back to Check Page ";
+ echo"
";
+
+ echo"
";
+ echo"
";
+ echo"
";
+?>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+@endsection
\ No newline at end of file