# HG changeset patch # User Zoe Hong # Date 1442234343 -7200 # Node ID f5b0cd4f25b2c00e18f9f4b021feebc88aae4e44 # Parent 3e11a9c5a672fa890b027f1d4527e8a71c50004e new: explore table for using on LGMap diff -r 3e11a9c5a672 -r f5b0cd4f25b2 views/Extractapp/ExportTabDelimited.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/views/Extractapp/ExportTabDelimited.php Mon Sep 14 14:39:03 2015 +0200 @@ -0,0 +1,92 @@ +. +*/ +/*! \file + * This is the view for ExportTabDelimited. +*/ + +// --- initialize --- +$outputTableArray = $viewmodel['outputTableArray']; +$bookId = $viewmodel['bookId']; +$sectionid = $viewmodel['section_id']; +$bookName = $viewmodel['bookName']; +$sectionName = $viewmodel['sectionName']; +$bookMeta = $viewmodel['bookMeta']; + + + +$count=1; + foreach ( $outputTableArray as $trIndex =>$trValue ) { + + if ( $trIndex==0 ) { + echo "#\t"; + echo "Book ID\t"; + echo "Section ID\t"; + echo "Name\t"; + echo "部\t"; + echo "Address\t"; + echo "Longitude\t"; // longitude + echo "Latitude\t"; // latitude + } else { + echo $count++."\t"; + echo $bookId."\t"; + echo $sectionid."\t"; + echo $bookName."\t"; + echo $sectionName."\t"; + echo $bookMeta->place_name."\t"; + echo $bookMeta->x."\t"; + echo $bookMeta->y."\t"; + } + if ( isset( $trValue["page"] ) ) { + echo $trValue["page"]."\t"; + } else { + echo "\t"; + } + + foreach ( $outputTableArray[0][0] as $index => $value ) { + if ( $index == "time" ) { + if ( isset( $trValue[0][$index] ) ) { + echo $trValue[0][$index]."\t"; + echo $trValue[0][$index]."\t"; + } else { + echo "\t"; + echo "\t"; + } + } else { + if ( isset( $trValue[0][$index] ) ) { + echo $trValue[0][$index]."\t"; + } else { + echo "\t"; + } + } + } + if ( isset( $trValue["other"] ) ) { + echo $trValue["other"]."\t"; + } else { + echo "\t"; + } + if ( isset( $trValue["full"] ) ) { + echo $trValue["full"]."\t"; + } else { + echo "\t"; + } + echo "\n"; + } + +?> +