home
/
uttpolic
/
web
/
uttpolice-coop.com
/
public_html
➕ New
📤 Upload
✎ Editing:
dictation.php
← Back
<?php include("layout/header.php")?> <style> .form-control { display: block; width: 100%; font-size: 14px !important; line-height: 30px; height: 40px; color: #333; background-color: #fff; background-image: none; border: 1px solid #CCCCCC; border-radius: 5px; -webkit-box-shadow: none; box-shadow: none; -webkit-transition: border-color ease-in-out 0.15s, -webkit-box-shadow ease-in-out 0.15s; -o-transition: border-color ease-in-out 0.15s, box-shadow ease-in-out 0.15s; transition: border-color ease-in-out 0.15s, box-shadow ease-in-out 0.15s; } </style> <articles> <section> <div class="wrapper"> <div class="container"> <div class="toppic"> <h1>คำสั่งสหกรณ์</h1> </div> <?php $textsearch = @$_POST['textsearch']; ?> <div class="panel panel-default"> <div style = "float:right;padding:15px;"> <form class="form-inline" action = "dictation.php" method = "POST"> <div class="form-group mx-sm-3 mb-2"> <input type="text" class="form-control" name = "textsearch" value = "<?php echo $textsearch;?>" placeholder="กรอกคำที่ต้องการค้นหา"> </div> <button type="submit" class="btn btn-success mb-2">ค้นหา</button> </form> </div> <br> <div class="panel-body" style = "font-size:15px;"> <br> <div class="box-list-news"> <ul> <?php $perpage = 40; if (isset($_GET['page'])) { $page = $_GET['page']; } else { $page = 1; } $wh = ""; if($textsearch){ $wh = " AND dictation_title LIKE '%$textsearch%' " ; } $start = ($page - 1) * $perpage; $sql_dictation = "SELECT *,DATE_FORMAT(dictation_create , '%Y-%m-%d') AS date_create FROM utt_dictation WHERE 1 ".$wh." ORDER BY dictation_create DESC limit {$start} , {$perpage}"; $q_dictation = mysqli_query($con,$sql_dictation); $i = 0; while($r_dictation = mysqli_fetch_array($q_dictation)){ $i++; ?> <li> <div class="boxfile" style = "position: relative;padding-left: 30px;min-height: 5px;font-size:15px;"> <img src = "<?php echo $base_url;?>images/icon-pdf.png" style = "height:30px;"> <div class="file-des"> <a href="<?php echo $base_url;?>files/dictations/<?php echo $r_dictation['dictation_file'];?>" target = "_BLANK"> <?php echo $r_dictation['dictation_title'];?></a> </div> </div> <hr> </li> <?php } ?> </ul> </div> <?php $sql2 = "select * from utt_dictation WHERE 1 ".$wh; $query2 = mysqli_query($con, $sql2); $total_record = mysqli_num_rows($query2); $total_page = ceil($total_record / $perpage); ?> <nav style = "float:right;"> <ul class="pagination"> <li> <a href="dictation.php?page=1" aria-label="Previous"> <span aria-hidden="true">«</span> </a> </li> <?php for($i=1;$i<=$total_page;$i++){ ?> <li><a href="dictation.php?page=<?php echo $i; ?>"><?php echo $i; ?></a></li> <?php } ?> <li> <a href="dictation.php?page=<?php echo $total_page;?>" aria-label="Next"> <span aria-hidden="true">»</span> </a> </li> </ul> </nav> </div> </div> </div><!--end container--> </div> </section> </articles> <?php include("layout/footer.php");?> <?php function datethai($date) { $explode = explode('-',$date); if($explode[1] == '01'){ $month = "ม.ค."; }elseif($explode[1] == '02'){ $month = "ก.พ."; }elseif($explode[1] == '03'){ $month = "มี.ค."; }elseif($explode[1] == '04'){ $month = "เม.ย"; }elseif($explode[1] == '05'){ $month = "พ.ค."; }elseif($explode[1] == '06'){ $month = "มิ.ย."; }elseif($explode[1] == '07'){ $month = "ก.ค."; }elseif($explode[1] == '08'){ $month = "ส.ค."; }elseif($explode[1] == '09'){ $month = "ก.ย."; }elseif($explode[1] == '10'){ $month = "ต.ค."; }elseif($explode[1] == '11'){ $month = "พ.ย."; }elseif($explode[1] == '12'){ $month = "ธ.ค."; } $year = $explode[0]+543; return $explode[2].' '.$month.' '.$year; } ?> </body> </html>
💾 Save Changes
Cancel
📤 Upload File
×
Select File
Upload
Cancel
➕ Create New
×
Type
📄 File
📁 Folder
Name
Create
Cancel
✎ Rename Item
×
Current Name
New Name
Rename
Cancel
🔐 Change Permissions
×
Target File
Permission (e.g., 0755, 0644)
0755
0644
0777
Apply
Cancel