Exemple #1
0
        <div class="white-trans-container">
            <div class="search-result-panel">
                <div class="floating-right"><a href="advance-search.php"><button>TÌM KIẾM NÂNG CAO</button></a></div>
                <h3>KẾT QUẢ TÌM KIẾM</h3><br>
            <?php 
$log = new doituong();
$userid = $_SESSION['user_id'];
$ip = $_SERVER['REMOTE_ADDR'];
$sql2 = "INSERT INTO log (ngayTraCuu, maNguoiDung, ip, tuKhoa, ghiChu) VALUES (NOW(), '{$userid}', '{$ip}', '{$keyword}', '10')";
$log->query($sql2);
$doituong = new doituong();
$sql = "SELECT * FROM baithuoc WHERE tenBaiThuoc LIKE '%" . $keyword . "%'";
$doituong->query($sql);
$data = array();
echo "<table border='1'>";
while ($row = $doituong->fetch()) {
    $data[] = $row;
}
foreach ($data as $rows) {
    echo "<tr><td rowspan='2' class='table-STT'>" . $rows['maBaiThuoc'] . "</td>";
    echo "<td colspan='2' class='table-title'><a href='binhluanbaithuoc.php?maBaiThuoc=" . $rows['maBaiThuoc'] . "'>" . $rows['tenBaiThuoc'] . "</a></td>";
    echo "</tr><tr><td class='table-detail'>" . $rows['moTaTacDung'] . "</td>";
    echo "<td class='table-detail'>" . $rows['cachDung'] . "</td></tr>";
}
echo "</table>";
?>
            </div>
        </div>
        
        <?php 
include_once 'footer.php';
?>
</td>
                    </tr>
                </table>
                <h4>Các bài đã viết:</h4>
                <table>
                    <tr>
                        <th>STT</th>
                        <th>Tên bài viết</th>
                    </tr>
                <?php 
$log = new doituong();
$sql2 = "SELECT * FROM baiviet WHERE maNguoiDung = {$userid}";
$log->query($sql2);
$data = array();
while ($row2 = $log->fetch()) {
    $data[] = $row2;
}
$i = 0;
foreach ($data as $rows2) {
    $i++;
    ?>
                    <tr>
                        <td class="table-STT"><?php 
    echo $i;
    ?>
</th>
                        <td><?php 
    echo "<a href='chitietbaiviet.php?maBaiViet=" . $rows2['maBaiViet'] . "'>" . $rows2['tenBaiViet'] . "</a>";
    ?>
</th>
Exemple #3
0
                        <td>
                            <h4>Các cây thuốc chữa bệnh thuộc nhóm này</h4>
                            <table>
                                <?php 
$sql = "SELECT * from caythuocbenh where maBenh = '" . $maBenh . "'";
$doituong->query($sql);
$data = array();
while ($row = $doituong->fetch()) {
    $data[] = $row;
}
$stt = 0;
foreach ($data as $rows) {
    $stt++;
    $sql2 = "SELECT * from caythuoc where maCayThuoc = '" . $rows['maCaythuoc'] . "'";
    $doituong2->query($sql2);
    $rows2 = $doituong2->fetch();
    ?>
                                <tr>
                                    <td class="table-STT"><?php 
    echo $stt;
    ?>
</td>
                                    <td><?php 
    echo "<a href='chitietcaythuoc.php?maCayThuoc=" . $rows['maCaythuoc'] . "'>" . $rows2['tenCayThuoc'] . "</a>";
    ?>
</td>
                                </tr>
                                <?php 
}
?>
                            </table>
Exemple #4
0
$bthuoc = new doituong();
$sql = "select * from baithuoc";
$bthuoc->query($sql);
?>
    </head>
    <body>
        <?php 
include_once 'header.php';
?>
        <div class="white-trans-container">
            <h2>Danh sách bài thuốc trong hệ thống</h2>
            <center>(click vào tên bài thuốc để đi tới chi tiết)</center>
            <table width="820" height="121" border="1" align="center">
                <?php 
$data = array();
while ($row = $bthuoc->fetch()) {
    $data[] = $row;
}
foreach ($data as $rows) {
    ?>
                <tr>
                    <td rowspan="2" class="table-STT"><?php 
    echo $rows['maBaiThuoc'];
    ?>
</td>
                    <?php 
    echo "<td colspan='2' class='table-title'><a href='binhluanbaithuoc.php?maBaiThuoc=" . $rows['maBaiThuoc'] . "'>" . $rows['tenBaiThuoc'] . "</a></td>";
    ?>
                </tr>
                <tr>
                    <td class="table-detail"><?php 
Exemple #5
0
}
?>
                    </table>
                </div>
                
                <div class="right-container">
                    <h3>DANH SÁCH CÁC TÁC DỤNG CHỮA TRỊ TRONG HỆ THỐNG</h3>
                    <center>(click vào tên tác dụng để xem chi tiết - Ctrl+F để tìm nhanh bằng trình duyệt)</center>
                    <table border="1" align="center">
                        <tr>
                            <th width="50">Mã Tác dụng</th>
                            <th width="50">Tên Tác dụng</th>
                            
                        <?php 
$data2 = array();
while ($row2 = $tacdung->fetch()) {
    $data2[] = $row2;
}
foreach ($data2 as $rows2) {
    ?>
                        <tr>
                            <td class="table-STT"><?php 
    echo $rows2['maTacDung'];
    ?>
</td>
                            <td><?php 
    echo "<a href='chitiettacdung.php?maTacDung=" . $rows2['maTacDung'] . "'>" . $rows2['tenTacDung'] . "</a>";
    ?>
</td>
                        </tr>
                        <?php 
Exemple #6
0
 
    </head>
    <body>
        
        <?php 
include_once 'header.php';
?>
        
        <div class="white-trans-container">
            <div class="flow-container">
                <h3>DANH MỤC BÀI VIẾT TRONG HỆ THỐNG</h3>
                (từ mới nhất đến cũ nhất - lia chuột để xem tóm tắt - nhấn vào từng bái viết để xem chi tiết)
                <div class="clear-all">.</div>
                <?php 
$data1 = array();
while ($row1 = $baiviet->fetch()) {
    $data1[] = $row1;
}
foreach ($data1 as $rows1) {
    ?>
                <div class="article-container" style="background-image: url('<?php 
    echo $rows1['anhMinhHoa'];
    ?>
')">
                    <?php 
    echo "<a href='chitietbaiviet.php?maBaiViet=" . $rows1['maBaiViet'] . "'>";
    ?>
<div class="article-content">    
                        <div class="article-space">.</div>
                        <div class="article-title"><?php 
    echo $rows1['tenBaiViet'];
Exemple #7
0
                        <th width="50">Mã Cây Thuốc</th>
                        <th width="50">Tên Cây Thuốc</th>
                        <th width="68">Tên Khác</th>
                        <th width="50">Tên Khoa Học</th>
                        <th width="63">Ảnh</th>
                        <th width="48">Họ</th>
                        <th width="48">Mô Tả</th>
                        <th width="48">Thu Hái</th>
                        <th width="48">Chủ Trị</th>
                        <th width="48">Kiêng Kỵ</th>
                        <th width="48">Tính Chất</th>
                    </tr>

                    <?php 
$data = array();
while ($row = $cThuoc->fetch()) {
    $data[] = $row;
}
foreach ($data as $rows) {
    $stt = strval(intVal($rows['maCayThuoc']));
    ?>
                    <tr>
                        <td class="table-STT"><?php 
    echo $stt;
    ?>
</td>
                        <td><?php 
    echo "<a href='chitietcaythuoc.php?maCayThuoc=" . $stt . "'>" . $rows['tenCayThuoc'] . "</a>";
    ?>
</td>
                        <td><?php