@@ -45,6 +45,7 @@ public function select_user()
45
45
$ scopeID = $ this ->input ->post ('scope_list ' , TRUE );
46
46
$ this ->session ->set_userdata ('scopeID ' , $ scopeID );
47
47
48
+
48
49
$ userArray = $ dbutil ->getUsers ();
49
50
$ data ['userArray ' ] = $ userArray ;
50
51
$ this ->load ->view ('templates/header ' , $ data );
@@ -66,6 +67,8 @@ public function select_project()
66
67
$ dbutil = new DBUtil ();
67
68
$ pArray = $ dbutil ->getAllProjects ();
68
69
70
+ $ data ['userName ' ] = $ userName ;
71
+
69
72
$ data ['pArray ' ] = $ pArray ;
70
73
71
74
$ this ->load ->view ('templates/header ' , $ data );
@@ -83,6 +86,10 @@ public function select_experiment()
83
86
$ projectID = $ this ->input ->post ('project_list ' , TRUE );
84
87
$ this ->session ->set_userdata ('projectID ' , $ projectID );
85
88
89
+
90
+ $ data ['userName ' ] = $ this ->session ->userdata ('userName ' );
91
+ $ data ['projectID ' ] = $ projectID ;
92
+
86
93
$ dbutil = new DBUtil ();
87
94
$ eArray = $ dbutil ->getExperimentByProjectID ($ projectID );
88
95
@@ -107,6 +114,10 @@ public function create_microscopy()
107
114
$ experimentID = $ this ->input ->post ('experiment_list ' , TRUE );
108
115
$ this ->session ->set_userdata ('experimentID ' , $ experimentID );
109
116
117
+ $ data ['userName ' ] = $ this ->session ->userdata ('userName ' );
118
+ $ data ['projectID ' ] = $ this ->session ->userdata ('projectID ' );
119
+ $ data ['experimentID ' ] = $ experimentID ;
120
+
110
121
$ this ->load ->view ('templates/header ' , $ data );
111
122
$ this ->load ->view ('create/create_microscopy ' , $ data );
112
123
$ this ->load ->view ('templates/footer ' , $ data );
@@ -122,6 +133,31 @@ public function submit_microscopy()
122
133
123
134
$ imageBasename = $ this ->input ->post ('image_basename ' , TRUE );
124
135
echo "<br/>Image basename: " .$ imageBasename ;
136
+ $ description = $ this ->input ->post ('description ' , TRUE );
137
+ echo "<br/>Description: " .$ description ;
138
+
139
+ $ dbutil = new DBUtil ();
140
+
141
+ $ scopeName = $ this ->session ->userdata ('scopeID ' );
142
+ $ userName = $ this ->session ->userdata ('userName ' );
143
+ $ projectID = $ this ->session ->userdata ('projectID ' );
144
+ $ experimentID = $ this ->session ->userdata ('experimentID ' );
145
+
146
+
147
+ $ array = array ();
148
+ $ mp = array ();
149
+ $ mp ['Experiment_id ' ] = intval ($ experimentID );
150
+ $ mp ['Image_basename ' ] = $ imageBasename ;
151
+ $ mp ['User ' ] = $ userName ;
152
+ $ mp ['Description ' ] = $ description ;
153
+ $ mp ['Microscope_name ' ] = $ scopeName ;
154
+ $ array ['Microscopy ' ] = $ mp ;
155
+
156
+ $ json_str = json_encode ($ array );
157
+ $ json = json_decode ($ json_str );
158
+
159
+ $ result = $ dbutil ->inserMicroscopy ($ json );
160
+ var_dump ($ result );
125
161
}
126
162
127
163
}
0 commit comments