Mercurial > hg > extraction-interface
comparison models/extractapp.php @ 91:3e11a9c5a672 extractapp
new: explore table for using on LGMap
| author | Zoe Hong <zhong@mpiwg-berlin.mpg.de> |
|---|---|
| date | Mon, 14 Sep 2015 14:37:29 +0200 |
| parents | 94ad33739fa4 |
| children | b0cecc104639 |
comparison
equal
deleted
inserted
replaced
| 90:94ad33739fa4 | 91:3e11a9c5a672 |
|---|---|
| 292 | 292 |
| 293 $data['topic_tag'] = $this->GetTopicTag($topic_id); | 293 $data['topic_tag'] = $this->GetTopicTag($topic_id); |
| 294 $data['topic_name'] = $this->GetTopicName($topic_id); | 294 $data['topic_name'] = $this->GetTopicName($topic_id); |
| 295 $data['topic_tag_ch'] = $this->GetTopicTagName($topic_id); | 295 $data['topic_tag_ch'] = $this->GetTopicTagName($topic_id); |
| 296 | 296 |
| 297 | |
| 298 $data['info'] = array('file_id'=>$this->file_id, 'user_id'=>$this->user_id, | 297 $data['info'] = array('file_id'=>$this->file_id, 'user_id'=>$this->user_id, |
| 299 'branch_id'=>$this->branch_id, 'section_id'=>$this->section_id, 'book_id'=>$this->book_id, | 298 'branch_id'=>$this->branch_id, 'section_id'=>$this->section_id, 'book_id'=>$this->book_id, |
| 300 'book_name'=>$this->book_name,'section_name'=>$this->section_name, 'period'=>$this->book_meta->period, | 299 'book_name'=>$this->book_name,'section_name'=>$this->section_name, 'period'=>$this->book_meta->period, |
| 301 'current_fileId'=>$this->current_fileId); | 300 'current_fileId'=>$this->current_fileId); |
| 301 | |
| 302 | 302 |
| 303 $this->messages['debug'] .= "[Debug] "; | 303 $this->messages['debug'] .= "[Debug] "; |
| 304 $this->messages['debug'] .= "file_id=".$this->file_id.", section_id=".$this->section_id; | 304 $this->messages['debug'] .= "file_id=".$this->file_id.", section_id=".$this->section_id; |
| 305 $this->messages['debug'] .= ", user_id=".$this->user_id.", branch_id=".$this->branch_id.", topic_id=".$this->topic; | 305 $this->messages['debug'] .= ", user_id=".$this->user_id.", branch_id=".$this->branch_id.", topic_id=".$this->topic; |
| 306 $this->messages['debug'] .= ", book_id=".$this->book_id.", book_name=".$this->book_name.", section_name=".$this->section_name; | 306 $this->messages['debug'] .= ", book_id=".$this->book_id.", book_name=".$this->book_name.", section_name=".$this->section_name; |
| 307 $this->messages['debug'] .= ", current_fileId=".$this->current_fileId."<br>"; | 307 $this->messages['debug'] .= ", current_fileId=".$this->current_fileId."<br>"; |
| 308 | 308 |
| 309 $this->messages['info'] .= "[Info] book name: ".$this->book_name; | 309 $this->messages['info'] .= "[Info] book name: ".$this->book_name; |
| 310 $this->messages['info'] .= ", period: ".$this->book_meta->period; | |
| 310 $this->messages['info'] .= ", section id: ". $this->section_id; | 311 $this->messages['info'] .= ", section id: ". $this->section_id; |
| 312 $this->messages['info'] .= ", section name: ".$this->section_name; | |
| 311 $this->messages['info'] .= ", branch id: ".$this->branch_id; | 313 $this->messages['info'] .= ", branch id: ".$this->branch_id; |
| 312 $this->messages['info'] .= ", file id: ".$this->file_id; | 314 $this->messages['info'] .= ", file id: ".$this->file_id; |
| 313 $this->messages['info'] .= ", period: ".$this->book_meta->period; | |
| 314 $this->messages['info'] .= "<br>"; | 315 $this->messages['info'] .= "<br>"; |
| 315 | 316 |
| 316 | 317 |
| 317 $data['messages'] = $this->messages; | 318 $data['messages'] = $this->messages; |
| 318 | 319 |
| 724 | 725 |
| 725 return $outputTableArray; | 726 return $outputTableArray; |
| 726 } | 727 } |
| 727 | 728 |
| 728 // === for export table === | 729 // === for export table === |
| 729 | |
| 730 public function ExportTable($postdata, $isFromFile) { | 730 public function ExportTable($postdata, $isFromFile) { |
| 731 if ($isFromFile) { | 731 if ($isFromFile) { |
| 732 $content = $this->lg_text; | 732 $content = $this->lg_text; |
| 733 $topic = $this->topic; | 733 $topic = $this->topic; |
| 734 $section_id = $this->section_id; | 734 $section_id = $this->section_id; |
| 739 $taglistArray = $this->taglist_infile; | 739 $taglistArray = $this->taglist_infile; |
| 740 | 740 |
| 741 } else { | 741 } else { |
| 742 $content = $postdata['content']; | 742 $content = $postdata['content']; |
| 743 $topic = $postdata['topic']; | 743 $topic = $postdata['topic']; |
| 744 | |
| 745 $section_id = $postdata['sectionId']; | 744 $section_id = $postdata['sectionId']; |
| 746 $sectionName = $postdata['sectionName']; | 745 $sectionName = $postdata['sectionName']; |
| 747 $bookId = $postdata['bookId']; | 746 $bookId = $postdata['bookId']; |
| 748 $bookName = $postdata['bookName']; | 747 $bookName = $postdata['bookName']; |
| 749 | 748 |
| 756 | 755 |
| 757 // input data: taglistArray, topic_tag, content; output: outputTableArray | 756 // input data: taglistArray, topic_tag, content; output: outputTableArray |
| 758 $outputTableArray = $this->GetTableArray($taglistArray, $topic_tag, $content); | 757 $outputTableArray = $this->GetTableArray($taglistArray, $topic_tag, $content); |
| 759 | 758 |
| 760 | 759 |
| 760 | |
| 761 $bookMeta = $this->book_meta; // just added | |
| 761 | 762 |
| 762 // data for view | 763 // data for view |
| 763 $data = array(); | 764 $data = array(); |
| 764 $data['outputTableArray'] = $outputTableArray; | 765 $data['outputTableArray'] = $outputTableArray; |
| 765 $data['bookId'] = $bookId; | 766 $data['bookId'] = $bookId; |
| 766 $data['section_id'] = $section_id; | 767 $data['section_id'] = $section_id; |
| 767 $data['bookName'] = $bookName; | 768 $data['bookName'] = $bookName; |
| 768 $data['sectionName'] = $sectionName; | 769 $data['sectionName'] = $sectionName; |
| 770 $data['bookMeta'] = $bookMeta; | |
| 769 | 771 |
| 770 return $data; | 772 return $data; |
| 771 | 773 |
| 772 } | 774 } |
| 773 | |
| 774 // === for manage tag list === | 775 // === for manage tag list === |
| 775 public function EditTaglist($_postdata) { | 776 public function EditTaglist($_postdata) { |
| 776 /** | 777 /** |
| 777 */ | 778 */ |
| 778 | 779 |
