0xV3NOMx
Linux ip-172-26-7-228 5.4.0-1103-aws #111~18.04.1-Ubuntu SMP Tue May 23 20:04:10 UTC 2023 x86_64



Your IP : 13.59.236.101


Current Path : /proc/thread-self/root/var/www/html/gfgcg/
Upload File :
Current File : //proc/thread-self/root/var/www/html/gfgcg/timetable.php

<?php


$servername = "97.74.228.93";
$username   = "logisys3_logu";
$password  = "Logisys@2106";

$conn = new  mysqli($servername,$username,$password);
if(!$conn) 
{
    die("Connection failed: " . mysqli_connect_error());
}

$db = "logisys3_bnu";

$query  = "SELECT fdegree, fdescpn, CONCAT(fpath,'/',ffilename) AS link FROM {$db}.deg_timetable
WHERE ifnull(factive,'')  = 'T' order by fdegree";

$result = mysqli_query($conn, $query);
$count = mysqli_num_rows($result);

$query1 = "select funivname, date_format(now(), '%d/%m/%Y %r') as fdate from {$db}.control"; 
// var_dump(expression)
$result1 = mysqli_query($conn, $query1);
$row1 = mysqli_fetch_assoc($result1);

$table = '<center><h1>'.$row1['funivname'].'</h1><h2>Draft Time Table of UG Courses MAY / JUNE 2019 Examination</center></h2><center>
    <table style="margin-left:2px;text-align: left;width: 60%;font-size:14px;margin: auto;" align-self="middle" cellspacing="1" cellpadding="5" border="0" align="center" bgcolor="#505151">
			<thead> 
			<tr style = "background-color:#8acc51">
			 <th width="8%"><center>Sl. No.</center></th>
             <th width="15%"><center>Degree code</center></th>
             <th><center>Degree Name</center></th>
			 <th width="25%"><center>Time Table</center></th>
			</tr>
		</thead>';	
$i = 0;

if($count > 0)
{
    while($row = mysqli_fetch_assoc($result))
    {
        $table .= "<tr bgcolor='#ffffff' >";
        $table .= "<td><center>".++$i."</center></td>";
        $table .= "<td><center>".$row['fdegree']."</center></td>";
        $table .= "<td>".$row['fdescpn']."</td>";
        $table .= "<td><a href='".$row['link']."' target = 'blank'>Click here for time table</a></td>";
        $table .= "</tr>";
    }
}
else
{
    $table .= "<tr bgcolor='#ffffff' >";
    $table .= "<td colspan='4'><center>Time Table Not yet Announced</center></td>";
}

// $subject = "{$row['funivname']} Statistics as on ".$row['fdate'];
echo $table;

function moneyFormatIndia($num) {
    $explrestunits = "" ;
    if(strlen($num)>3) {
        $lastthree = substr($num, strlen($num)-3, strlen($num));
        $restunits = substr($num, 0, strlen($num)-3); // extracts the last three digits
        $restunits = (strlen($restunits)%2 == 1)?"0".$restunits:$restunits; // explodes the remaining digits in 2's formats, adds a zero in the beginning to maintain the 2's grouping.
        $expunit = str_split($restunits, 2);
        for($i=0; $i<sizeof($expunit); $i++) {
            // creates each of the 2's group and adds a comma to the end
            if($i==0) {
                $explrestunits .= (int)$expunit[$i].","; // if is first value , convert into integer
            } else {
                $explrestunits .= $expunit[$i].",";
            }
        }
        $thecash = $explrestunits.$lastthree;
    } else {
        $thecash = $num;
    }
    return $thecash; // writes the final format where $currency is the currency symbol.
}

?>