|
Server IP : 145.79.210.100 / Your IP : 216.73.216.101 Web Server : LiteSpeed System : Linux in-mum-web1954.main-hosting.eu 5.14.0-570.26.1.el9_6.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Jul 16 09:12:04 EDT 2025 x86_64 User : u474798400 ( 474798400) PHP Version : 7.4.33 Disable Function : system, exec, shell_exec, passthru, mysql_list_dbs, ini_alter, dl, symlink, link, chgrp, leak, popen, apache_child_terminate, virtual, mb_send_mail MySQL : OFF | cURL : ON | WGET : ON | Perl : OFF | Python : OFF Directory (0755) : /home/u474798400/domains/excentia.in/public_html/admin/ |
| [ Home ] | [ C0mmand ] | [ Upload File ] |
|---|
<?php include('config.php');
include('checksession.php');
include('include/header.php');
$query=mysqli_query($conn,"select * from tbl_project_contact_details where id='".$_GET['id']."'");
$query1=mysqli_query($conn,"select * from tbl_projects");
?>
<!-- Content Wrapper. Contains page content -->
<div class="content-wrapper">
<!-- Content Header (Page header) -->
<section class="content-header">
<div class="container-fluid">
<div class="row mb-2">
<div class="col-sm-6">
<h1>Add Project Info</h1>
</div>
<div class="col-sm-6">
<ol class="breadcrumb float-sm-right">
<li class="breadcrumb-item"><a href="#">Home</a></li>
<li class="breadcrumb-item active">Project Info</li>
</ol>
</div>
</div>
</div>
<!-- /.container-fluid -->
</section>
<!-- Main content -->
<section class="content">
<div class="container-fluid">
<div class="row">
<div class="col-12">
<?php while($row=mysqli_fetch_array($query)){?>
<form id="edit_pr_details_intro" enctype="multipart/form-data">
<!--<form action="" method="post" enctype="multipart/form-data">-->
<div class="card card-primary">
<div class="card-header">
<h4 class="card-title">Add Project Info</h4>
</div>
<div class="card-body">
<div class="form-group" style="width:100%; float:left; margin:40px 0 0 0;">
<label> Select Project</label>
<div class="col-md-12">
<div class="card card-outline card-info">
<div class="card-header">
<h3 class="card-title">
Chose
</h3>
</div>
<!-- /.card-header -->
<div class="card-body">
<select name="project" id="project" class="form-control">
<option value="0">Select</option>
<?php while($row1=mysqli_fetch_array($query1)){?>
<option value=<?=$row1['id'];?> <?php if($row1['id']==$row['pro_id']){ echo 'selected'; }?>><?=$row1['name'];?></option>
<?php } ?>
</select>
</div>
</div>
</div>
</div>
<!-- <div class="form-group" style="width:100%; float:left; margin:40px 0 0 0;">-->
<!-- <label> Heading</label>-->
<!-- <div class="col-md-12">-->
<!-- <div class="card card-outline card-info">-->
<!-- <div class="card-header">-->
<!-- <h3 class="card-title">-->
<!-- Heading-->
<!-- </h3>-->
<!-- </div>-->
<!-- /.card-header -->
<!-- <div class="card-body">-->
<!-- <input class="form-control" type="text" id="title" name="title" placeholder="Heading" value="<?=$row['title'];?>">-->
<!-- </textarea>-->
<!-- </div>-->
<!-- </div>-->
<!-- </div>-->
<!--</div>-->
<div class="form-group" style="width:100%; float:left; margin:40px 0 0 0;">
<label> Heading *</label>
<div class="col-md-12">
<div class="card card-outline card-info">
<div class="card-header">
<h3 class="card-title">
Heading
</h3>
</div>
<!-- /.card-header -->
<div class="card-body">
<textarea id="summernote" name="secondcontent">
<?=$row['title'];?>
</textarea>
</div>
</div>
</div>
</div>
<div class="form-group" style="width:100%; float:left; margin:40px 0 0 0;">
<label> Content *</label>
<div class="col-md-12">
<div class="card card-outline card-info">
<div class="card-header">
<h3 class="card-title">
Content
</h3>
</div>
<!-- /.card-header -->
<div class="card-body">
<textarea id="summernote2" name="firstcontent">
<?=$row['intro_text'];?>
</textarea>
</div>
</div>
</div>
</div>
<div class="form-group" style="width:100%; float:left; margin:40px 0 0 0;">
<label> Address</label>
<div class="col-md-12">
<div class="card card-outline card-info">
<div class="card-header">
<h3 class="card-title">
Address
</h3>
</div>
<!-- /.card-header -->
<div class="card-body">
<input class="form-control" type="text" id="name1" name="name1" placeholder="Address" value="<?=$row['address1'];?>">
</div>
</div>
</div>
</div>
<div class="form-group" style="width:100%; float:left; margin:40px 0 0 0;">
<label> Line 2 text</label>
<div class="col-md-12">
<div class="card card-outline card-info">
<div class="card-header">
<h3 class="card-title">
Line 2 text
</h3>
</div>
<!-- /.card-header -->
<div class="card-body">
<input class="form-control" type="text" id="name2" name="name2" placeholder="Content" value="<?=$row['address2'];?>">
</div>
</div>
</div>
</div>
<div class="form-group" style="width:100%; float:left; margin:40px 0 0 0;">
<label> Line 3 text</label>
<div class="col-md-12">
<div class="card card-outline card-info">
<div class="card-header">
<h3 class="card-title">
Line 3 text
</h3>
</div>
<!-- /.card-header -->
<div class="card-body">
<input class="form-control" type="text" id="name3" name="name3" placeholder="Content" value="<?=$row['delivered_text'];?>">
</div>
</div>
</div>
</div>
<div class="form-group" style="width:100%; float:left; margin:40px 0 0 0;">
<label> Rera No</label>
<div class="col-md-12">
<div class="card card-outline card-info">
<div class="card-header">
<h3 class="card-title">
Rera No
</h3>
</div>
<!-- /.card-header -->
<div class="card-body">
<input class="form-control" type="text" id="name4" name="name4" placeholder="Rera No" value="<?=$row['rera_no'];?>">
</div>
</div>
</div>
</div>
<div class="col-6 lefts">
<div class="form-group">
<label for="exampleInputFile1">Image * <br><span style="color:red;">(For better view please upload 700px x 583px size images.)</span></label>
<div class="input-group">
<div class="custom-file">
<input type="file" class="custom-file-input" name="pro_img" id="exampleInputFile">
<label class="custom-file-label" for="exampleInputFile">Choose file</label>
</div>
<div class="input-group-append">
<span class="input-group-text">Upload</span>
</div>
</div>
</div>
</div>
<div class="col-6" style="float:left">
<div style="width: 151px; height: 121px; position: relative; z-index: 100; opacity: 1; margin: 0 0 -120px 0px; border: 3px solid #fff;"></div>
<img src="upload_image/<?=$row['image'];?>" id="image" / width="150px;" height="120px;" border="0">
</div>
<!--<div class="col-6 lefts">-->
<!--</div>-->
<!--<div class="col-6 lefts" >-->
<!--<span class="add_images" onclick="add_more_images();">+ </span>-->
<!--</div>-->
<div class="col-6 rights">
<p id="err_msg" style="text-align:right"></p>
<div class="form-group">
<input type="hidden" name="id" value="<?=$row['id'];?>">
<button class="btn btn-warning addpro" type="submit" class="">Submit <span class="spinner-border text-secondary" role="status" style="display:none;"></span></button>
</div>
</div>
<div id="dvPreview">
</div>
</div>
</div>
</form>
<?php } ?>
</div>
</div>
<!-- /.container-fluid -->
</section>
</div>
<!-- /.content-wrapper -->
<?php include('include/footer.php');?>
<script>
document.getElementById('exampleInputFile').onchange = function () {
var src = URL.createObjectURL(this.files[0])
document.getElementById('image').src = src
}
$(function () {
// Summernote
$('#summernote').summernote()
// CodeMirror
CodeMirror.fromTextArea(document.getElementById("codeMirrorDemo"), {
mode: "htmlmixed",
theme: "monokai"
});
})
$(function () {
// Summernote
$('#summernote2').summernote()
// CodeMirror
CodeMirror.fromTextArea(document.getElementById("codeMirrorDemo"), {
mode: "htmlmixed",
theme: "monokai"
});
})
$(document).ready(function(){
$("#edit_pr_details_intro").submit(function(e){
e.preventDefault();
var secondcontent=$("#summernote2").val().trim();
var firstcontent=$("#summernote").val().trim();
//alert(firstcontent);
var newdata = new FormData(this);
newdata.append( "action", 'editprojectinfodata');
newdata.append( "secondcontent", secondcontent);
newdata.append( "firstcontent", firstcontent);
if($("#project").val()=='0')
{
$("#err_msg").show().html('<span style="color:red;"> Please select project.</span>').delay(4000).fadeOut(100);;
return false;
}
else if($("#summernote2").val().trim()=='')
{
$("#err_msg").show().html('<span style="color:red;"> Please enter content.</span>').delay(4000).fadeOut(100);;
return false;
}
else if($("#name1").val()=='')
{
$("#err_msg").show().html('<span style="color:red;"> Please fill up all the fields.</span>').delay(4000).fadeOut(100);;
return false;
}
else if($("#name2").val()=='')
{
$("#err_msg").show().html('<span style="color:red;"> Please fill up all the fields.</span>').delay(4000).fadeOut(100);;
return false;
}
else if($("#name3").val()=='')
{
$("#err_msg").show().html('<span style="color:red;"> Please fill up all the fields.</span>').delay(4000).fadeOut(100);;
return false;
}
else if($("#name8").val()=='')
{
$("#err_msg").show().html('<span style="color:red;"> Please fill up all the fields.</span>').delay(4000).fadeOut(100);;
return false;
}
else{
$(".spinner-border").show();
$.ajax({
url: 'allajax.php',
type:'POST',
data: newdata,
contentType: false,
cache: false,
processData:false,
success:function(result2){
console.log(result2);
if(result2==1){
$(".spinner-border").hide();
$("#err_msg").show().html('<span style="color:green;">Data updated successfully.</span>').delay(5000).fadeOut(100);
setTimeout(function(){
window.location.reload();
}, 2000);
//$("#edit_pr_details_intro")[0].reset();
}else{
$("#err_msg").show().html('<span style="color:red;">Something wrong. Try after sometimes.</span>').delay(5000).fadeOut(100);
}
}
});
}
});
});
</script>