function search() { $q = addslashes($_GET['q']); ?> <div class="row"> <div class="col-md-12"> <h1>Search Results for "<?php echo $q; ?> "</h1> <?php // echo $q; // pr(Registor::getAllAdminMenuFromSession()); $allAdmin = Registor::getAllAdminMenuSearch(); foreach ($allAdmin as $all) { foreach ($all as $key => $value) { $save[$key] = $value; } } $stored = $save; foreach ($stored as $key => $store) { if (stripos($store, $q) !== false) { // echo "Key: " . $key . "<br />Found: " . $q . "<br />"; $keys[] = $key; } } $regs = Registor::getAllAdminMenu(); // pr($regs); $cnt = 0; foreach ($regs as $domain => $arre) { foreach ($arre as $key => $re) { if (in_array($key, $keys)) { $cnt++; ?> <div class="menuicon" style="background: white; padding: 10px; margin: 10px; margin-left: 0px;" > <h3 style="margin: 0; padding: 0; margin-bottom: 10px;"> <a href="javascript:openLw('<?php echo $key; ?> ','<?php echo _SPPATH . $re; ?> ','fade');activkanMenuKiri('<?php echo $key; ?> ');"><?php echo Lang::t($key); ?> </a> </h3> <p> <?php echo $save[$key]; ?> </p> </div> <?php } } } if ($cnt < 1) { ?> <h3> <?php echo Lang::t('Cannot Find Any Matching Features'); ?> </h3> <?php } // pr(Registor::getAllAdminMenuSearch()); ?> </div> </div><?php }