0byt3m1n1
Path:
C:
/
wamp64
/
www
/
cpms_new
/
USER
/
[
Home
]
File: studentreport_ctrl.php
<?php require_once "../lib/config.php"; require_once BASE_DIR."/lib/db/connection.php"; @$_SESSION['sl_no'] = 0; ?> <style type="text/css"> <!-- .style2 {font-weight: bold} .style3 { font-size: 16px; font-weight: bold; } .style4 { color: #FF0000; font-weight: bold; } .style5 { font-size: 18px; font-weight: bold; } --> </style> <?php $status =$_POST['radio']; $year =$_POST['txtyear']; $error_flag=0; if ( @$_POST['txtyear'] != "") { if (!is_numeric(@$_POST['txtyear'])) { $error['year']="Invalid year"; $error_flag=1; } } if($error_flag==1) { // 1 include "studentreport.php"; exit(); } else { // 1 ?> <div align="center"> <div align="center"> <p><strong><span class="style3"> <?php $u_name=@$_SESSION['username'];$u_name=strtoupper($u_name);echo $u_name;?> </span></strong></p> <span class="style5">Student Details </span></div> <p> <?php @$_SESSION['sl_no']= 0; $u_id= @$_SESSION['user_id']; if ($status == "rball") { if ( $year =="" ) { $sql="select * from student where user_id='$u_id' order by start_date"; } else { $sql="select * from student where user_id='$u_id' and '$year' between YEAR(`start_date`) and YEAR(`end_date`) order by start_date"; } $category="All"; } if ($status == "rbphd") { if ( $year =="" ) { $sql="select * from student where user_id='$u_id' and category='Ph.D' order by start_date"; } else { $sql="select * from student where user_id='$u_id' and YEAR(`start_date`)='$year' and category='Ph.D' order by start_date"; } $category="PhD"; } if ($status == "rbcourseproject") { if ( $year =="" ) { $sql="select * from student where user_id='$u_id' and category='Course Project' order by start_date"; } else { $sql="select * from student where user_id='$u_id' and YEAR(`start_date`)='$year' and category='Course Project' order by start_date"; } $category="Course Project"; } if ($status == "rbtraining") { if ( $year =="" ) { $sql="select * from student where user_id='$u_id' and category='Training' order by start_date"; } else { $sql="select * from student where user_id='$u_id' and YEAR(`start_date`)='$year' and category='Training' order by start_date"; } $category="Training"; } //echo $sql_budget; ledgerreport::printledgerDetails($sql,$year,$category); } // 1 class ledgerreport { //7 public function printledgerDetails($sql1,$year,$category) {//10 $sql=mysql_query($sql1); if(mysql_affected_rows()>0) {//14 //echo "By Account:$byaccount"; ?> </p> <table width="343" border="0"> <tr> <td width="101"><strong> Category </strong></td> <td width="232"><span class="style4">: <?php echo $category; ?></span></td> </tr> <tr> <td><strong>Year</strong></td> <td><span class="style4">: <?php if($year ==""){echo "All";}else{ echo $year;} ?> </span></td> </tr> </table> <table width="1222" height="108" border="1" align="center" id="ledgertable"> <tr> <th width="27" height="42"> S No </th> <th width="103">Name</th> <th width="145">Address</th> <th width="125">Phone</th> <th width="79">Mail ID</th> <th width="81">Course</th> <th width="81">College</th> <th width="83">Category</th> <th width="81">Title of Project</th> <th width="82">Joining Date</th> <th width="81">Project End Date</th> <th width="83">Remarks</th> <th width="89">Project File</th> </tr> <tr><?php $i=0;$credit=0; while($row=mysql_fetch_array($sql)) {//32 ?> <td height="58"><div align="center"> <?php @$_SESSION['sl_no']=@$_SESSION['sl_no']+1; echo @$_SESSION['sl_no']; ?> </div></td> <td><div align="center"> <?php echo $row['name']; ?> </div></td> <td><div align="center"> <?php /*$division=$row['user_id']; $sql_user = "select user_name from user where user_id='$division'"; $sql_user=mysql_query($sql_user); while($row_user=mysql_fetch_array($sql_user)) { $u_name_var=$row_user['user_name']; } $u_name_var=strtoupper($u_name_var); echo $u_name_var; ?>*/ echo $row['address'];?> </div></td> <?php /*$project_id=$row['project_id']; $sql_user = "select project_code from addproject where project_id='$project_id'"; $sql_user=mysql_query($sql_user); while($row_user=mysql_fetch_array($sql_user)) { echo $row_user['project_code']; } */ ?> <td><div align="center"> <?php echo $row['phone']; ?> </div></td> <td><div align="center"> <?php echo $row['email']; ?> </div></td> <td><div align="center"> <?php echo $row['course']; ?> </div></td> <td><div align="center"> <?php echo $row['college']; ?> </div></td> <td><div align="center"> <?php echo $row['category']; ?> </div></td> <td><div align="center"> <?php echo $row['title']; ?> </div></td> <td><div align="center"> <?php echo $row['start_date']; ?> </div></td> <td><div align="center"> <?php echo $row['end_date']; ?> </div></td> <td><div align="center"> <?php echo $row['remarks']; ?> </div></td> <td> <div align="center"> <a href="../Proposels/<?php echo $row['file']; ?>" target="_blank"> <img src="../images/white_download.png"alt="" name="imgProfile<?php echo $row['photo'];?>" width="50" height="50" id="imgProfile<?php echo $row['photo'];?>"/></a> </div> </td> <!-- <th><a href="../USER/edit_payment.php?id=</?php echo $row['payment_id']; ?>"><img src="../images/edit.png" alt="edit" width="25" height="25" /></a></th> <th> <a href="../USER/delete_payment.php?id=</?php echo $row['payment_id']; ?>"><img src="../images/delete.jpg" alt="Delete" width="25" height="25" /></a></th>--> </tr> <?php }//32 } //14 else { echo "No data found"; } ?> </table> <blockquote> <p> </p> <p><a href="#" class="projectboldtxt style2" onclick="window.print()">Print</a> <a href="studentreport.php">Back</a></p> </blockquote> <?php }//10 } //7 ?>