Msg('CTLG_TAB_SEARCH_MENU_TITLE');
?>
</span></td>
                                        </TR>
                                        <TR>
                                            <TD vAlign=top style="padding-top: 3px;">
                                                <p><?php 
SearchForm();
?>
</p>
                                            </TD>
                                        </TR>
                                        <TR>
                                            <TD vAlign=top style="padding-top: 3px;">
                                                <p><?php 
SearchResult();
?>
</p>
                                            </TD>
                                        </TR>
                                    </TABLE>
                                </div>
                                <!-- // Page Content -->
                            </TD>
                        </TR>
                    </TABLE>
                </div>
            </div>
        </TD>
    </TR>
예제 #2
0
    ?>
</td><br />
	</tr>
		<?php 
}
?>
</table>

<table>
<?php 
if (isset($_GET["name"])) {
    $input = htmlentities(strval($_GET["name"]));
    echo "Результат поиска " . $input . ": ";
    echo "\n\t<tr>\n\t\t<th>Имя</th>\n\t\t<th>Фамилия</th>\n\t\t<th>Номер группы</th>\n\t\t<th>Баллов</th>\n\t</tr>";
}
$result_search = SearchResult($input);
while ($inputResult = mysqli_fetch_assoc($result_search)) {
    ?>
	<tr>
		<td><?php 
    echo $inputResult["firstname"];
    ?>
</td>
		<td><?php 
    echo $inputResult["lastname"];
    ?>
</td>
		<td><?php 
    echo $inputResult["groupname"];
    ?>
</td>
예제 #3
0
 $page = $_POST['page'];
 // Current page number
 $per_page = $_POST['per_page'];
 // Articles per page
 if ($page != 1) {
     $start = ($page - 1) * $per_page;
 } else {
     $start = 0;
 }
 $language_search = GetCookieWord('language_search');
 switch ($language_search) {
     case 'search':
         $words = GetCookieWord('word');
         $select_search = SearchSelect($words, $start, $per_page);
         // get select with db
         $array_result = SearchResult($select_search);
         //controller get select with db
         $numArticles = GetCookieWord('searched');
         // get numbers result search
         $numPage = ceil($numArticles / $per_page);
         // Total number of page for pagination
         $articleList = PrepareResult($array_result);
         // prepare content article
         break;
     default:
         die("No, language_search");
         return false;
 }
 // We send back the total number of page and the article list
 $dataBack = array('numPage' => $numPage, 'articleList' => $articleList);
 $dataBack = json_encode($dataBack);