โดย jamepiyawat » 15/06/2019 2:45 pm
พอดีว่าผมอยากจะทำให้ตารางที่ดึงข้อมูลมาแสดงผลข้อมูลเท่ากับหน้าเว็บครับแต่ว่าตอนนี้มันเกินออกไปทำยังไงดีครับ
โค้ด: เลือกทั้งหมด
<div class="row">
<div class="col-md-12 table-responsive" align="center">
<h3 align="center"><?php echo $lang_recentinformation;?></h3>
<table class="table table-striped">
<thead class="bg-primary" align="bottom">
<tr>
<th class="text-center"><b><?php echo $lang_no; ?></b></th>
<th class="text-center"> <?php echo $lang_name?> </th>
<th class="text-center"> <?php echo $lang_unit?> </th>
<th class="text-center"> <?php echo $lang_keyword?> </th>
<th class="text-center"> <?php echo $lang_savewhen?> </th>
<th class="text-center"> <?php echo $lang_ipaddress;?> </th>
<!-- <th> Edit time-date </th> -->
<th class="text-center"> <?php echo $lang_showinformation?> </th>
</tr>
</thead>
<?php
while ($fetch = mysqli_fetch_assoc($result)) {
?>
<tr>
<td class="text-center"> <?php echo $fetch['id']; ?></td> <!-- ลำดับ-->
<td class="text-center"> <?php echo $fetch['name']; ?></td> <!-- ชื่อ-->
<td class="text-center"> <?php echo $fetch['url']; ?></td> <!-- url-->
<td class="text-center"> <?php echo $fetch['keyword']; ?></td> <!-- keyword-->
<td class="text-center"> <?php
if ($fetch['create_time']) {
date_default_timezone_set("Asia/Bangkok");
echo (date("Y-m-d H:i:s", $fetch['create_time']));
}
?></td>
<td class="text-center"> <?php include 'ip.php'; ?></td>
<td>
<center><a class="glyphicon glyphicon-new-window" href="show.php?id= <?php echo $fetch['id']; ?>&lang=<?php echo $lang; ?> "></a></center>
</td>
</tr>
<?php
}
?>
</table>
<div class="row">
<div class="col-md-12">
<div class="text-center">
<nav aria-label="Page navigation">
<?php
echo $Pagination->parse();
?>
</nav>
</div>
</div>
</div>
<a href="list.php?lang=<?php echo $lang; ?>" class="btn btn-primary"><?php echo $lang_moreinformation; ?></a>
</div>
</div>
พอดีว่าผมอยากจะทำให้ตารางที่ดึงข้อมูลมาแสดงผลข้อมูลเท่ากับหน้าเว็บครับแต่ว่าตอนนี้มันเกินออกไปทำยังไงดีครับ
[attachment=0]Selection_667.png[/attachment]
[code]<div class="row">
<div class="col-md-12 table-responsive" align="center">
<h3 align="center"><?php echo $lang_recentinformation;?></h3>
<table class="table table-striped">
<thead class="bg-primary" align="bottom">
<tr>
<th class="text-center"><b><?php echo $lang_no; ?></b></th>
<th class="text-center"> <?php echo $lang_name?> </th>
<th class="text-center"> <?php echo $lang_unit?> </th>
<th class="text-center"> <?php echo $lang_keyword?> </th>
<th class="text-center"> <?php echo $lang_savewhen?> </th>
<th class="text-center"> <?php echo $lang_ipaddress;?> </th>
<!-- <th> Edit time-date </th> -->
<th class="text-center"> <?php echo $lang_showinformation?> </th>
</tr>
</thead>
<?php
while ($fetch = mysqli_fetch_assoc($result)) {
?>
<tr>
<td class="text-center"> <?php echo $fetch['id']; ?></td> <!-- ลำดับ-->
<td class="text-center"> <?php echo $fetch['name']; ?></td> <!-- ชื่อ-->
<td class="text-center"> <?php echo $fetch['url']; ?></td> <!-- url-->
<td class="text-center"> <?php echo $fetch['keyword']; ?></td> <!-- keyword-->
<td class="text-center"> <?php
if ($fetch['create_time']) {
date_default_timezone_set("Asia/Bangkok");
echo (date("Y-m-d H:i:s", $fetch['create_time']));
}
?></td>
<td class="text-center"> <?php include 'ip.php'; ?></td>
<td>
<center><a class="glyphicon glyphicon-new-window" href="show.php?id= <?php echo $fetch['id']; ?>&lang=<?php echo $lang; ?> "></a></center>
</td>
</tr>
<?php
}
?>
</table>
<div class="row">
<div class="col-md-12">
<div class="text-center">
<nav aria-label="Page navigation">
<?php
echo $Pagination->parse();
?>
</nav>
</div>
</div>
</div>
<a href="list.php?lang=<?php echo $lang; ?>" class="btn btn-primary"><?php echo $lang_moreinformation; ?></a>
</div>
</div>[/code]