[
MAINHACK
]
Mail Test
BC
Config Scan
HOME
Create...
New File
New Folder
Viewing / Editing File: add_project.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> <style type="text/css"> #display { position:absolute; width:300px; margin-left:0; padding:2px; display:none; border-top:0px; overflow:auto; border:1px #CCC solid; background-color: white; z-index:1000; } .show,.show1 { padding:7px; border-bottom:1px #999 dashed; font-size:18px; } .widget{ overflow:visible !important; } </style> <script> function fill(Value) { $('#fli').val(Value); $('#display').hide(); } $(document).ready(function(){ $("#fli").keyup(function() { var search = $('#fli').val(); //alert(search); if(search=="") { $("#display").html(""); } else { $.ajax({ type: "POST", url: "ajax_check.php", data: "search="+ search , success: function(html){ $("#display").html(html).show(); } }); } }); }); function fill1(Value,Value1,Value2) { $('#fli1').val(Value1); $('#client_id').val(Value); $('#phone').val(Value2); $('#display1').hide(); } $(document).ready(function(){ $("#fli1").keyup(function() { var search = $('#fli1').val(); //alert(search); if(search=="") { $("#display").html(""); } else { $.ajax({ type: "POST", url: "ajax_check.php", data: "search1="+ search , success: function(html){ $("#display1").html(html).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">Add Project</div> </div> <form method="post" id="exampleValidation" data-toggle="validator" enctype="multipart/form-data" > <div class="card-body"> <div class="form-group form-show-validation row"> <div class="col-lg-4 col-md-12 col-sm-12" id="direct" style="display:"> <label>Project Type <span class="required-label">*</span></label> <input type="text" name="project_type" value="<?=$row['project_type']?>" class="form-control" id="fli" placeholder="Search for all Project Type" required=""> <div id="display"></div> </div> <div class="col-lg-6 col-md-12 col-sm-12" id="agent" style=""> <label>Choose Customer <span class="required-label">*</span></label> <input type="text" name="customer_name" value="<?=$row['name']?>" class="form-control" id="fli1" placeholder="Search for all Customer" required=""> <input type="hidden" name="customer_id" id="client_id"> <input type="hidden" name="customer_phone" id="phone"> <div id="display1"></div> </div> </div> <div class="form-group form-show-validation row"> <label for="name" class="col-lg-1 col-md-3 col-sm-4 mt-sm-2 ">Project Name <span class="required-label">*</span></label> <div class="col-lg-6 col-md-12 col-sm-12"> <input type="text" name="name" class="form-control" placeholder="Project Name"> </div> <label for="name" class="col-lg-1 col-md-3 col-sm-4 mt-sm-2 ">Project 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="Project Name"> </div> </div> <div class="form-group form-show-validation row"> <label for="name" class="col-lg-1 col-md-3 col-sm-4 mt-sm-2 ">Renewal Date <span class="required-label">*</span></label> <div class="col-lg-3 col-md-12 col-sm-12"> <input type="date" name="renewal_date" class="form-control" placeholder="Renewal Title " required> </div> <label for="name" class="col-lg-1 col-md-3 col-sm-4 mt-sm-2 ">Project Title <span class="required-label">*</span></label> <div class="col-lg-6 col-md-12 col-sm-12"> <input type="text" name="title" class="form-control" placeholder="Project Title " 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 ">Project Proposal <span class="required-label">*</span></label> <div class="col-lg-4 col-md-12 col-sm-12"> <input type="file" name="file" placeholder="Project Proposal" required> </div> <label for="name" class="col-lg-2 col-md-3 col-sm-4 mt-sm-2 ">Proposed Cost <span class="required-label">*</span></label> <div class="col-lg-4 col-md-12 col-sm-12"> <input type="text" name="proposed_cost" 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 ">Description </label> <div class="col-lg-9 col-md-12 col-sm-12"> <textarea name="description" class="form-control" placeholder="Country"></textarea> </div> </div> <div class="form-group form-show-validation row"> <label for="name" class="col-lg-1 col-md-3 col-sm-4 mt-sm-2 ">Project Note <span class="required-label">*</span></label> <div class="col-lg-6 col-md-12 col-sm-12"> <input type="text" name="note" class="form-control" placeholder="Project Note" required> </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"> </div> </div> </div> </div> </form> <?php if(isset($_POST['sub'])){ $uid=$show->getid('ids','PJ'); $data1 = array( 'name' =>htmlspecialchars($_POST['name']), 'title' =>htmlspecialchars($_POST['title']), 'proposed_cost' =>htmlspecialchars($_POST['proposed_cost']), 'description' =>htmlspecialchars($_POST['description']), 'project_type' =>htmlspecialchars($_POST['project_type']), 'note' =>htmlspecialchars($_POST['note']), 'customer_id' =>htmlspecialchars($_POST['customer_id']), 'customer_name' =>htmlspecialchars($_POST['customer_name']), 'customer_phone' =>htmlspecialchars($_POST['customer_phone']), 'date' =>date('Y-m-d',strtotime($_POST['date'])), 'renewal_date' =>date('Y-m-d',strtotime($_POST['renewal_date'])), 'project_id' =>$uid, 'status' =>'Proposal Sent', ); //print_r($data1); if($show->insert('project',$data1)){ 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'=>$uid, 'proposed_cost' =>htmlspecialchars($_POST['proposed_cost']), 'content' =>htmlspecialchars($_POST['description']), 'date'=>date('Y-m-d',strtotime($_POST['date'])) ); $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> </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.7 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