update css and preg_match

This commit is contained in:
marcos 2019-12-03 18:31:13 +01:00
parent 7eec91b946
commit 1f97fcef40
2 changed files with 14 additions and 10 deletions

View File

@ -125,24 +125,26 @@ class OrderInterpreter extends Wizard
/** /**
* Method to print order interpreted on header search input. * Method to print order interpreted on header search input.
* *
* @return array * @return void
*/ */
public function getResult() public function getResult()
{ {
// Take value from input search. // Take value from input search.
$text = get_parameter('text', ''); $text = get_parameter('text', '');
$array_found = []; $array_found = [];
echo '<div id="result_order" class="show_result_interpreter">'; if ($text !== '') {
echo '<ul>'; echo '<div id="result_order" class="show_result_interpreter">';
foreach ($this->pages_name as $key => $value) { echo '<ul>';
if (preg_match('/.*'.$text.'.*/', $value)) { foreach ($this->pages_name as $key => $value) {
echo '<li>'; if (preg_match('/.*'.$text.'.*/i', $value)) {
echo '<img src="http://localhost/pandora_console/images/arrow_right_green.png">'; echo '<li>';
echo 'GO TO <a href="'.$this->pages_url[$key].'">'.$value.'</a><br>'; echo '<img src="http://localhost/pandora_console/images/arrow_right_green.png">';
echo 'GO TO <a href="'.$this->pages_url[$key].'">'.$value.'</a><br>';
}
} }
}
echo '</ul></div'; echo '</ul></div';
}
} }

View File

@ -8,5 +8,7 @@ div.show_result_interpreter {
padding-top: 5px; padding-top: 5px;
padding-bottom: 5px; padding-bottom: 5px;
box-shadow: 0px 0px 15px -4px #dadada; box-shadow: 0px 0px 15px -4px #dadada;
position: absolute;
z-index: 1; z-index: 1;
width: 300px;
} }