home
/
uttpolic
/
web
/
uttpolice-coop.com
/
public_html
➕ New
📤 Upload
✎ Editing:
raw.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><i class="fas fa-anchor"></i> ระเบียบสหกรณ์</h1> </div> <?php $textsearch = @$_POST['textsearch']; ?> <div class="panel panel-default"> <div style = "float:right;padding:15px;"> <form class="form-inline" action = "raw.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"> <?php $sql_cat = "SELECT * FROM utt_raw_category "; $q_cat = mysqli_query($con,$sql_cat); while($r_cat = mysqli_fetch_array($q_cat)){ $cate_id = $r_cat['cate_id']; ?> <div class="page-header" style = "border-bottom:2px solid #5bbee7;padding:10px;width:50%;"> <h3 style = "font-size:18px;"><i class="fas fa-anchor"></i> <?php echo $r_cat['cate_name'];?></h3> </div> <ul> <?php $perpage = 40; if (isset($_GET['page'])) { $page = $_GET['page']; } else { $page = 1; } $wh = ""; if($textsearch){ $wh = " AND raw_title LIKE '%$textsearch%' " ; } $start = ($page - 1) * $perpage; $sql_raw = "SELECT *,DATE_FORMAT(raw_create , '%Y-%m-%d') AS date_create FROM utt_raw WHERE 1 AND cate_id = '$cate_id' ".$wh." ORDER BY raw_create DESC limit {$start} , {$perpage}"; $q_raw = mysqli_query($con,$sql_raw); $i = 0; while($r_raw = mysqli_fetch_array($q_raw)){ $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/<?php echo $r_raw['raw_file'];?>" target = "_BLANK"><?php echo $r_raw['raw_title'];?></a> </div> </div> <hr> </li> <?php } ?> </ul> <?php } ?> </div> </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