Mercurial > hg > extraction-interface
comparison interface/edit_section_db.php @ 1:ef6d0c6a13d7
(1)Add 'sort_by' time entry in main page. (check_sections.php)
Modify check_sections_details page to have level3 option.
(2)Modify map to have default dataset loaded.
author | Zoe Hong <zhong@mpiwg-berlin.mpg.de> |
---|---|
date | Wed, 21 Jan 2015 10:49:44 +0100 |
parents | b12c99b7c3f0 |
children | da5309d54083 |
comparison
equal
deleted
inserted
replaced
0:b12c99b7c3f0 | 1:ef6d0c6a13d7 |
---|---|
152 return; | 152 return; |
153 }else{ | 153 }else{ |
154 echo json_encode("Succeeded."); | 154 echo json_encode("Succeeded."); |
155 } | 155 } |
156 } | 156 } |
157 | |
157 if(isset($_POST['command']) && $_POST['command']!=''){ | 158 if(isset($_POST['command']) && $_POST['command']!=''){ |
158 $command=$_POST['command']; | 159 $command=$_POST['command']; |
159 if($command=="write"){ | 160 if($command=="write"){ |
160 if(isset($_POST['bookId'])&&isset($_POST['sectionArray'])&&isset($_POST['version'])&&isset($_POST['editor'])&& | 161 |
162 $bookId=$_POST['bookId']; | |
163 $sectionArray=$_POST['sectionArray']; | |
164 $version=$_POST['version']; | |
165 $editor=$_POST['editor']; | |
166 | |
167 foreach ($sectionArray as $key => $value) { | |
168 //echo $key.','; | |
169 foreach ($value as $key => $inner_val) { | |
170 //echo $key.",".$inner_val."\n"; | |
171 } | |
172 } | |
173 | |
174 //echo "bookId:".$bookId.", "."editor:".$editor; | |
175 if(isset($bookId)&&isset($sectionArray)&&isset($version)&&isset($editor)&&\ | |
176 is_numeric($bookId) && sizeof($sectionArray)!=0 && is_numeric($version) && $editor!=""){ | |
177 | |
178 updateSectionArray($bookId,$sectionArray,$version,$editor); | |
179 } | |
180 /* | |
181 if(isset($_POST['bookId'])&&isset($_POST['sectionArray'])&&isset($_POST['version'])&&isset($_POST['editor'])&&\ | |
161 is_numeric($_POST['bookId']) && sizeof($_POST['sectionArray'])!=0 && is_numeric($_POST['version']) && $_POST['editor']!=""){ | 182 is_numeric($_POST['bookId']) && sizeof($_POST['sectionArray'])!=0 && is_numeric($_POST['version']) && $_POST['editor']!=""){ |
162 $bookId=$_POST['bookId']; | 183 $bookId=$_POST['bookId']; |
163 $sectionArray=$_POST['sectionArray']; | 184 $sectionArray=$_POST['sectionArray']; |
164 $version=$_POST['version']; | 185 $version=$_POST['version']; |
165 $editor=$_POST['editor']; | 186 $editor=$_POST['editor']; |
166 updateSectionArray($bookId,$sectionArray,$version,$editor); | 187 |
188 echo "updating db..."; | |
189 // updateSectionArray($bookId,$sectionArray,$version,$editor); | |
167 } | 190 } |
191 */ | |
168 } | 192 } |
169 } | 193 } |
170 | 194 |
171 ?> | 195 ?> |