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.
*
* @return array
* @return void
*/
public function getResult()
{
// Take value from input search.
$text = get_parameter('text', '');
$array_found = [];
echo '<div id="result_order" class="show_result_interpreter">';
echo '<ul>';
foreach ($this->pages_name as $key => $value) {
if (preg_match('/.*'.$text.'.*/', $value)) {
echo '<li>';
echo '<img src="http://localhost/pandora_console/images/arrow_right_green.png">';
echo 'GO TO <a href="'.$this->pages_url[$key].'">'.$value.'</a><br>';
if ($text !== '') {
echo '<div id="result_order" class="show_result_interpreter">';
echo '<ul>';
foreach ($this->pages_name as $key => $value) {
if (preg_match('/.*'.$text.'.*/i', $value)) {
echo '<li>';
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-bottom: 5px;
box-shadow: 0px 0px 15px -4px #dadada;
position: absolute;
z-index: 1;
width: 300px;
}