]]jkjjgdjffksdkdxdsghfghdfghfgdfsdsdfsdfsfdsbcxvxcbccwewqeqwewqskfgj
במ12[cxvbcxvbxcvbcxvcxvbcvxcvbsdfsdfsdfsdfsdfsdfxcvbxcvxbbxqwqewqewv;'
/
home
/
u506006416
/
domains
/
crystalmiracle.co.in
/
public_html
/
admin
/
Upload FileeE
HOME
<?php include("header.php"); $sel_obj= new config(); ?> <?php include("sidebar.php");?> <?php if(isset($_POST['update_templete'])) { /*---------- Get Template ----*/ $temp_con="`id`=".$_POST['templete_id']; $query1=$sel_obj->display_rcd('mail_templete',$temp_con); if(is_array($query1) || !empty($query1)) { foreach($query1 as $data1) { } } /*----------- logo ---------*/ $old_logo = $data1['logo']; $basename = $data1['logo']; if ($_FILES["logo"]["name"] != "") { $temp=explode('.',$_FILES['logo']['name']); $file_ext=end($temp); $filename = "EmailLogo-" . time(); $extension = pathinfo( $_FILES["logo"]["name"], PATHINFO_EXTENSION ); $basename = $filename . "." . $extension; $source = $_FILES["logo"]["tmp_name"]; $destination = "../assets/images/logo/".$basename; move_uploaded_file($source, $destination); unlink("../assets/images/logo/".$old_logo); } /*---------------------------------*/ $updatedata = array( 'logo' => $basename, 'header_background' => $_POST['header_background'], 'body_background' => $_POST['body_background'], 'footer_background' => $_POST['footer_background'], 'subject' => $_POST['subject'], 'top_content' => $_POST['top_content'], // 'middle_content' => $_POST['middle_content'], 'bottom_content' => $_POST['bottom_content'], 'footer' => $_POST['footer'], 'updated_at' => date("Y-m-d H:i:s") ); $where_condition=array('id'=> $_POST['templete_id']); $update_query=$sel_obj->update("mail_templete",$updatedata,$where_condition); if($update_query=='TRUE') { echo "<script> swal({ title: 'Updated Successfully', text: 'Redirecting...', icon: 'success', timer: 2000, buttons: false, }) </script>"; } /*------ Active Template -----*/ $active_template = $_POST['templete_id']; } ?> <style> .note-editable{width: 100%; min-height:100px!important;} </style> <div class="content-wrapper pb-5"> <div class="content-header"> <div class="container-fluid"> <div class="row mb-2"> <div class="col-sm-6"> <h2 class="m-0 text-dark">Manage Email Templete</h2> </div> <div class="col-sm-6"> </div> </div> </div> </div> <!-- ------------------- Mail Templete ------------------ --> <section class="content pb-5 card"> <?php $query_mail=$db->select('mail_templete'); if(is_array($query_mail) || !empty($query_mail)) { $temp_no = 1; foreach($query_mail as $templete) { $mail_logo = $templete['logo']; $header_background = $templete['header_background']; $body_background = $templete['body_background']; $footer_background = $templete['footer_background']; $mail_subject = $templete['subject']; $mail_top_content = $templete['top_content']; // $mail_middle_content = $templete['middle_content']; $mail_bottom_content = $templete['bottom_content']; $mail_footer = $templete['footer']; ?> <div class="" style="width: 500px;"> <button class="btn btn-primary mb-4" title="Click to open mail box" data-toggle="collapse" data-target="#temp_id<?php echo $temp_no;?>">Email Template - <?php echo $temp_no;?> <i class="fa fa-arrow-circle-right"></i></button> </div> <div class="container-fluid pb-5 collapse <?php if($active_template==$templete['id']){echo 'show';} ?>" id="temp_id<?php echo $temp_no;?>"> <form class="form-horizontal" action="" method="post" enctype="multipart/form-data"> <div class="container-fluid"> <div class="row"> <div class="col-md-6"> <div class="card card-primary card-tabs"> <div class="card-header p-2 pt-1"> Edit Mail Templete - <?php echo $temp_no;?> </div> <div class="tab-content" id="custom-tabs-five-tabContent"> <div class="tab-pane fade active show" id="general"> <div class="card-body"> <div class="form-group row"> <input type="hidden" name="templete_id" value="<?php echo $templete['id']; ?>"> <div class="col-12"> <label for="logo" class="col-form-label">Header Image</label> <div class="row"> <div class="col-md-6"> <img src="<?php echo BASE_URL;?>assets/images/logo/<?php echo $mail_logo; ?>" alt="" class="img-fluid"> </div> <div class="col-md-6"> <input id="logo" name="logo" class="form-control" type="file"> </div> </div> </div> </div> <!-- <div class="form-group row"> <div class="col-12"> <label class="col-form-label">Header Background Color</label> <input type="color" id="header_background" name="header_background" value="<?php echo $header_background; ?>"> </div> </div> --> <div class="form-group row"> <div class="col-12"> <label class="col-form-label">Body Background Color</label> <input type="color" id="body_background" name="body_background" value="<?php echo $body_background; ?>"> </div> </div> <div class="form-group row"> <div class="col-12"> <label class="col-form-label">Footer Background Color</label> <input type="color" id="footer_background" name="footer_background" value="<?php echo $footer_background; ?>"> </div> </div> <div class="form-group row"> <div class="col-12"> <label for="content" class="col-form-label">Top Content</label> <textarea id="content" name="top_content" class="textarea"><?php echo $templete['top_content']; ?></textarea> </div> </div> <div class="form-group row"> <div class="col-12"> <label for="content" class="col-form-label">Bottom Content</label> <textarea id="content" name="bottom_content" class="textarea"><?php echo $templete['bottom_content']; ?></textarea> </div> </div> <div class="form-group row"> <div class="col-12"> <label for="footer" class="col-form-label">Footer</label> <textarea id="footer" name="footer" class="textarea"><?php echo $templete['footer']; ?></textarea> </div> </div> </div> </div> </div> <div class="card-footer"> <button type="submit" name="update_templete" class="btn btn-primary">Update Templete</button> </div> </div> </div> <div class="col-md-6"> <?php if ($temp_no==1) { include("mail_templete_1.php"); } if ($temp_no==2) { include("mail_templete_2.php"); } if ($temp_no==3) { include("mail_templete_3.php"); } ?> </div> </div> <!-- /.row (main row) --> </div> <!-- /.container-fluid --> </form> </div> <?php $temp_no++; } } ?> </section> <!-- -------------------------------------------- --> <!-- /.content --> </div> <!-- /.content-wrapper --> <?php include("footer.php");?> <script> window.setTimeout(function() { $(".alert").fadeTo(1000, 0).slideUp(100, function(){ $(this).remove(); }); }, 1000); </script>