Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
X
x3domlet
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
3
Issues
3
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Elphel
x3domlet
Commits
79a151be
Commit
79a151be
authored
Jul 19, 2018
by
Oleg Dzhimiev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
+master_kml.xml support for index page
parent
bf175159
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
5 deletions
+18
-5
list.php
list.php
+18
-5
No files found.
list.php
View file @
79a151be
...
@@ -56,8 +56,10 @@ foreach($models as $model){
...
@@ -56,8 +56,10 @@ foreach($models as $model){
if
(
!
is_file
(
$thumb
)){
$thumb
=
""
;}
if
(
!
is_file
(
$thumb
)){
$thumb
=
""
;}
$res
.=
"<model name='
$group_item
' group='
$model
' thumb='
$thumb
'>
\n
"
;
$res
.=
"<model name='
$group_item
' group='
$model
' thumb='
$thumb
'>
\n
"
;
// read kml
// read kml
$res
.=
"
\t
<map>
\n
"
.
parse_kml
(
"
$model_path
/
$group_item
.kml"
)
.
"
\t
</map>
\n
"
;
$res
.=
"
\t
<map>
\n
"
.
parse_kml
(
$model_path
,
$group_item
)
.
"
\t
</map>
\n
"
;
foreach
(
$versions
as
$version
){
foreach
(
$versions
as
$version
){
$res
.=
"
\t
<version name='
$version
'>
\n
"
;
$res
.=
"
\t
<version name='
$version
'>
\n
"
;
...
@@ -87,7 +89,7 @@ foreach($models as $model){
...
@@ -87,7 +89,7 @@ foreach($models as $model){
$res
.=
"<model name='
$model
' group='' thumb='
$thumb
'>
\n
"
;
$res
.=
"<model name='
$model
' group='' thumb='
$thumb
'>
\n
"
;
// read kml
// read kml
$res
.=
"
\t
<map>
\n
"
.
parse_kml
(
"
$model_path
/
$model
.kml"
)
.
"
\t
</map>
\n
"
;
$res
.=
"
\t
<map>
\n
"
.
parse_kml
(
$model_path
,
$model
)
.
"
\t
</map>
\n
"
;
foreach
(
$versions
as
$version
){
foreach
(
$versions
as
$version
){
$res
.=
"
\t
<version name='
$version
'>
\n
"
;
$res
.=
"
\t
<version name='
$version
'>
\n
"
;
...
@@ -233,13 +235,23 @@ function create_thumbnail($path,$vpaths,$thumbname){
...
@@ -233,13 +235,23 @@ function create_thumbnail($path,$vpaths,$thumbname){
}
}
function
parse_kml
(
$file
){
// there is master_kml.xml
function
parse_kml
(
$path
,
$file
){
$master_kml
=
"
$path
/master_kml.xml"
;
if
(
is_file
(
$master_kml
)){
$xml
=
simplexml_load_file
(
$master_kml
);
$file
=
"../"
.
(
$xml
->
name
)
.
"/"
.
(
$xml
->
name
);
}
$pf
=
"
$path
/
$file
.kml"
;
$res
=
""
;
$res
=
""
;
if
(
is_file
(
$
file
)){
if
(
is_file
(
$
pf
)){
$xml
=
simplexml_load_file
(
$
file
);
$xml
=
simplexml_load_file
(
$
pf
);
$recs
=
$xml
->
Document
->
children
();
$recs
=
$xml
->
Document
->
children
();
...
@@ -248,6 +260,7 @@ function parse_kml($file){
...
@@ -248,6 +260,7 @@ function parse_kml($file){
}
}
}
else
{
}
else
{
echo
"File not found, you suck!
\n
"
;
$res
=
<<<TEXT
$res
=
<<<TEXT
<Camera>
<Camera>
<longitude>-111.9328843</longitude>
<longitude>-111.9328843</longitude>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment