0byt3m1n1
Path:
C:
/
wamp64
/
www
/
cpms_new
/
USER
/
[
Home
]
File: file_report_ctrl.php
<?php require_once "../lib/config.php"; require_once BASE_DIR."/lib/db/connection.php"; $error_flag=0; $u_id= @$_SESSION['user_id']; $p_id=@$_SESSION['project_id']; $sql="select * from fileshelf where user_id='$u_id' and project_id='$p_id' "; $sql=mysql_query($sql); $i=0; while($row=mysql_fetch_array($sql)) { $file_name_db=$row['filename']; $i=$i+1; $file_name_array[$i]=$file_name_db; } $file_name=@$_POST['cmbfilename']; $file_name_selected=$file_name_array[$file_name]; $p_id=@$_SESSION['project_id']; $u_id=@$_SESSION['user_id']; $sql="select * from fileshelf where user_id='$u_id' and project_id ='$p_id' and filename='$file_name_selected'"; filereport::printfileDetails($sql); class filereport { //7 public function printfileDetails($sql) {//10 $sql=mysql_query($sql); if(mysql_affected_rows()>0) {//14 ?> <div align="center"><b><?php $p_code=@$_SESSION['project_code_s'];echo "Details of project:$p_code"?></div> <table width="434" height="81" border="1" align="center" bordercolor="#CC0000"> <tr> <th width="17">S no</th> <th width="91">fille name</th> <th width="48">Date </th> <th width="178">Description</th> <th width="66">Download</th> </tr> <tr><?php $i=0; while($row=mysql_fetch_array($sql)) {//32 ?> <th><?php @$_SESSION['sl_no']=@$_SESSION['sl_no']+1; echo @$_SESSION['sl_no']; ?></th> <th><?php echo $row['filename']; ?></th> <th><?php echo $row['date']; ?></th> <th><?php echo $row['description']; ?></th> <th><a href= "<?php echo "../Proposels/".$row['fileupload'];?>" target="_blank"><img src="../images/white_download.png" alt="download" width="44" height="44" /></a></th> </tr> <?php }//32 ?> </table> <?php }//14 else {//14 ?><font color="#CC0000"><b><?php echo "No Details to display"; ?></b></font><?php }//14 }//10 }//7 if(isset($_POST['show'])) { ?> </p> <p><a href="#" class="projectboldtxt style2" onclick="window.print()">Print</a> <a href="fileshelf.php">Back</a></p> </blockquote> <?php } ?>