示例#1
0
文件: get_info.php 项目: rw00/tutorme
<?php

require_once "/php/classes/InfoManager.php";
if (isset($_GET["search"])) {
    $course = htmlspecialchars($_GET["search"]);
    echo jsearchCourses($course);
}
示例#2
0
文件: home.php 项目: rw00/tutorme
?>
            
            <br />
            <form method="get" action="home" class="form-horizontal">
                <div class="col-sm-4">
                    <input name="search" id="search-input" type="text" placeholder="Search..." class="form-control" />
                </div>
                <div class="col-sm-2">
                    <input type="submit" value="Search" class="btn btn-default btn-block" />
                </div>
            </form>
            <br />
            <br />
            <div id="search-result" <?php 
if (isset($_GET['search'])) {
    echo "data-ng-init='courses=" . jsearchCourses($_GET['search']) . "'";
}
?>
>
            <?php 
if (isset($_GET['search'])) {
    ?>
                <div class="col-sm-6" data-ng-repeat='course in courses'>
                    <course-info info="course"></course-info>
                </div>
                <?php 
}
?>
            </div>
        </div>
    </div>