concordia gate
This commit is contained in:
parent
7307c4612b
commit
7b38c59e92
19
cat/concordia_gate.php
Normal file
19
cat/concordia_gate.php
Normal file
@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
$url = 'http://concordia.vm.wmi.amu.edu.pl:8800';
|
||||
$data = array("operation" => $_POST["operation"],"tmId" => intval($_POST["tmId"]),"pattern" => $_POST["pattern"]);
|
||||
|
||||
// use key 'http' even if you send the request to https://...
|
||||
$options = array(
|
||||
'http' => array(
|
||||
'header' => "Content-type: application/x-www-form-urlencoded\r\n",
|
||||
'method' => 'POST',
|
||||
'content' => json_encode($data),
|
||||
),
|
||||
);
|
||||
$context = stream_context_create($options);
|
||||
$result = file_get_contents($url, false, $context);
|
||||
|
||||
print $result;
|
||||
|
||||
?>
|
@ -6,13 +6,13 @@ function searchHandle(tmid) {
|
||||
}
|
||||
|
||||
$.ajax({
|
||||
url: concordiaUrl,
|
||||
url: '/concordia_gate.php',
|
||||
type: 'post',
|
||||
dataType: 'json',
|
||||
success: function (data) {
|
||||
$('#result').html(renderResult(data));
|
||||
},
|
||||
data: JSON.stringify(concordiaRequest)
|
||||
data: concordiaRequest
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -21,6 +21,7 @@ shutil.copytree('js', root_dir+'/js')
|
||||
shutil.copytree('css', root_dir+'/css')
|
||||
shutil.copytree('images', root_dir+'/images')
|
||||
shutil.copy('favicon.ico', root_dir+'/favicon.ico')
|
||||
shutil.copy('concordia_gate.php', root_dir+'/concordia_gate.php')
|
||||
|
||||
|
||||
versions_dir = 'versions'
|
||||
|
Loading…
Reference in New Issue
Block a user