0byt3m1n1
Path:
C:
/
wamp64
/
www
/
cpms_new
/
ADMIN
/
[
Home
]
File: summary.php
<?php $MAIN_HEADING = "Projectwise Summary Report"; ?> <?php include("include/adminheader.php"); include("summary_ctrl.php"); ?> <form action="summary_ctrl.php" method="post" enctype="multipart/form-data" name="form1" id="form1"> <table width="500" height="" align="center"> <tr> <th width="150" height="33" class="projectboldtxt" scope="row"><div align="left">Complete Days</div></th> <td width="242"><label> <input name="checkcompletedays" type="checkbox" id="checkcompletedays" value="fullday" /> </label></td> </tr> <tr> <th height="42" class="projectboldtxt" scope="row"><div align="left">From</div></th> <td> <select class="form-control" name="cmbsumfdd" class="moreproject" id="cmbsumfdd"> <?php for ($i=1; $i<=31; $i++) { ?> <option value="<?php echo $i; ?>"<?php if(@$fromdate_dd==$i) { echo "selected='selected'"; } ?> ><?php echo $i ?></option> <?php } ?> </select> <select class="form-control"name="cmbsumfmm" id="cmbsumfmm"> <?php for($i=1; $i<=12; $i++) { ?> <option value="<?php echo $i; ?>"<?php if(@$fromdate_mm==$i) { echo "selected='selected'"; } ?> ><?php echo $month[$i]; ?></option> <?php } ?> </select> <input class="form-control" name="txtsumfyy" type="text" id="txtsumfyy" value="<?php if(isset($fromdate_yy) && $fromdate_yy!="") echo $fromdate_yy;?>" size="2" maxlength="4" /> <span class="valText"> <?php if(isset($error['fdate_yy'])) { echo $error['fdate_yy']; } if(isset($error['fdate_numeric'])) { echo $error['fdate_numeric']; } ?> </span></td> </tr> <tr><td><br/></td></tr> <tr> <th height="37" class="projectboldtxt" scope="row"><div align="left">To</div></th> <td> <select class="form-control" name="cmbsumtodd" class="moreproject" id="cmbsumtodd"> <?php for($i=1; $i<=12; $i++) { ?> <option value="<?php echo $i; ?>"<?php if(@$todate_dd==$i) { echo "selected='selected'"; } ?> ><?php echo $i; ?></option> <?php } ?> </select> <select class="form-control" name="cmbsumtomm" id="cmbsumtomm"> <?php for ($i=1; $i<=31; $i++) { ?> <option value="<?php echo $i; ?>"<?php if(@$todate_mm==$i) { echo "selected='selected'"; } ?> ><?php echo $month[$i]; ?></option> <?php } ?> </select> <input class="form-control" name="txtsumtoyy" type="text" id="txtsumtoyy" value="<?php if(isset($todate_yy) && $todate_yy!="") echo $todate_yy;?>" size="2" maxlength="4" /> <span class="valText"> <?php if(isset($error['todate_yy'])) { echo $error['todate_yy']; } else if(isset($error['todate_numeric'])) { echo $error['todate_numeric']; } ?> </span></td> </tr> <tr><td><br/></td></tr> <tr> <th class="projectboldtxt" scope="row"><div align="left">Brief</div></th> <td><label> <input name="checkbrief" type="checkbox" id="checkbrief" value="brief" /> </label></td> </tr> <tr><td><br/></td></tr> <tr> <th height="26" scope="row"> </th> <td><label> <input class="btn btn-success" type="submit" name="show" id="show" value="SHOW" /> <a class="btn btn-default" href="project_report.php" class="projectboldtxt style1">Back</a></label></td> </tr> </table> <?php if(isset($_POST['show'])) { if($error_flag==0) { $p_id=@$_SESSION['project_id_a']; if($completeday==fullday) { if($Brief==brief) { $sql="select group_name,debit,credit from ledger where project_id='$p_id' "; } else { $sql="select group_name,account_name,debit,credit from ledger where project_id='$p_id' "; } summaryreport::printsummarykDetails($sql,"",""); } else { if($Brief==brief) { $sql="select group_name,debit,credit from ledger where user_id='$u_id' and project_id='$p_id' and date between '$from_date' and '$to_date'" ; } else { $sql="select group_name,account_name,debit,credit from ledger where user_id='$u_id' and project_id='$p_id' and date between '$from_date' and '$to_date'" ; } summaryreport::printsummarykDetails($sql,$from_date,$to_date); } } } ?> </form><p> <?php include "include/footer.php"; ?> </p> </body> </html>