adjustments

This commit is contained in:
Rafał Jaworski 2017-02-22 11:22:20 +01:00
parent dff6e2f15c
commit 6eb2940d59
2 changed files with 17 additions and 13 deletions

View File

@ -3,20 +3,24 @@
$url = 'http://@concordia_host@:@concordia_port@';
$inputSentence = $_GET["pattern"];
$tmId = intval($_GET["tmId"]);
$data = array("operation" => "concordiaSearch","tmId" => $tmId,"pattern" => $inputSentence);
// use key 'http' even if you send the request to https://...
$options = array(
if (!empty($inputSentence)) {
$request = array("operation" => "concordiaSearch","tmId" => $tmId,"pattern" => $inputSentence);
// 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),
'content' => json_encode($request),
),
);
$context = stream_context_create($options);
$response = file_get_contents($url, false, $context);
);
$context = stream_context_create($options);
$response = file_get_contents($url, false, $context);
$data = json_decode($response);
$data = json_decode($response);
}
function sub($string, $start, $end = null) {
if (is_null($end)) {

View File

@ -623,7 +623,7 @@ label {
}
input, textarea {
clear: both;
font-size: 140%;
font-size: 100%;
font-family: "frutiger linotype", "lucida grande", "verdana", sans-serif;
padding: 1%;
width:98%;