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
1ecdebb2
Commit
1ecdebb2
authored
Aug 28, 2017
by
Oleg Dzhimiev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kml template testing
parent
d77238d0
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
7 deletions
+27
-7
select.js
js/select.js
+7
-7
select.php
select.php
+20
-0
No files found.
js/select.js
View file @
1ecdebb2
...
@@ -52,13 +52,13 @@ function parse_list(res){
...
@@ -52,13 +52,13 @@ function parse_list(res){
function
copy_models
(){
function
copy_models
(){
// testing
var
kmldata
=
$
(
'#kml'
)[
0
].
files
[
0
];
$
.
ajax
({
url
:
"select.php?cmd=copy"
,
if
(
kmldata
!=
undefined
){
success
:
function
(
response
){
if
(
kmldata
.
name
.
substr
(
-
3
)
!=
"kml"
){
console
.
log
(
response
);
kmldata
=
undefined
;
}
}
}
});
$
(
".chkbox"
).
each
(
function
(){
$
(
".chkbox"
).
each
(
function
(){
...
@@ -66,7 +66,7 @@ function copy_models(){
...
@@ -66,7 +66,7 @@ function copy_models(){
$
.
ajax
({
$
.
ajax
({
url
:
"select.php?cmd=copy&set="
+
$
(
this
).
attr
(
'set'
)
+
"&model="
+
$
(
this
).
attr
(
'model'
),
url
:
"select.php?cmd=copy&set="
+
$
(
this
).
attr
(
'set'
)
+
"&model="
+
$
(
this
).
attr
(
'model'
),
type
:
'post'
,
type
:
'post'
,
data
:
$
(
'#kml'
)[
0
].
files
[
0
]
,
data
:
kmldata
,
processData
:
false
,
processData
:
false
,
success
:
function
(
response
){
success
:
function
(
response
){
console
.
log
(
response
);
console
.
log
(
response
);
...
...
select.php
View file @
1ecdebb2
...
@@ -12,6 +12,13 @@ if (isset($_GET['showall'])){
...
@@ -12,6 +12,13 @@ if (isset($_GET['showall'])){
if
(
$_GET
[
'cmd'
]
==
'copy'
){
if
(
$_GET
[
'cmd'
]
==
'copy'
){
$kml_template
=
file_get_contents
(
'php://input'
);
$kml_template
=
file_get_contents
(
'php://input'
);
if
(
$kml_template
!=
""
){
if
(
!
kml_test
(
$kml_template
)){
$kml_template
=
""
;
}
}
die
();
$set
=
$_GET
[
'set'
];
$set
=
$_GET
[
'set'
];
$model
=
$_GET
[
'model'
];
$model
=
$_GET
[
'model'
];
...
@@ -82,6 +89,19 @@ return_xml($res);
...
@@ -82,6 +89,19 @@ return_xml($res);
//functions
//functions
function
kml_test
(
$data
){
$result
=
false
;
$xml
=
simplexml_load_string
(
$data
);
if
(
$xml
->
Document
->
PhotoOverlay
){
$result
=
true
;
}
return
$result
;
}
function
selective_scandir
(
$path
,
$showall
){
function
selective_scandir
(
$path
,
$showall
){
$results
=
Array
();
$results
=
Array
();
...
...
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