EVOLUTION-NINJA
Edit File: lead_feeds.php
<?php $this->load->view('includes/admin_header');?> <div class="main-container ace-save-state" id="main-container"> <script type="text/javascript"> try{ace.settings.loadState('main-container')}catch(e){} </script> <!-- <div id="sidebar" class="sidebar responsive ace-save-state"> <script type="text/javascript"> try{ace.settings.loadState('sidebar')}catch(e){} </script> <ul class="nav nav-list"> <li class=""> <a href=""></i><span class="menu-text"><b> Feeds </b></span> </a> </li> <li class=""> <a href=""> </i><span class="menu-text" style="color:blue;"> All </span> </a> </li> <li class=""> <a href=""> <span class="menu-text" style="color:blue;"> </span> </a> <li class=""> <a href=""> <span class="menu-text" style="color:blue;"> Followed by me </span> </a> </li> <li class=""> <a href=""> <span class="menu-text" style="color:blue;"> Dormant Records </span> </a> </li> <li class=""> <a href=""> <span class="menu-text" style="color:blue;"> AUTO-FOLLOW RULES </span> </a> </li> </ul>/.nav-list </div> --> <div class="main-content"> <div class="main-content-inner"> <div class="page-content"> <div class="row"> <div class="col-xs-12"> <!-- PAGE CONTENT BEGINS --> <div class="container-fluid" style="margin-top:3%;"> <div class="row check-mid"> <div class="col-sm-12 col-xs-12 checkbg-home "> <div class="row land_owner_a"> <div class="col-sm-12 col-md-1"></div> <div class="form-group col-sm-12 col-md-10 mob-div" style="background-color:rgba(0,0,0,0.03);padding-top:10px;"> <form id="chat_form" role="form"> <div class="timeline-body"> <div class="form-group" > <textarea class="form-control" name="text" id="send_message" rows="2" placeholder="Hey! What's up?"></textarea> <div class="row"> <div class="col-sm-1 col-xs-1"> <div class="dropdown " style="padding-top:10px;"> <label style="width:2px;height:2px;" > <input type="file" name="upload" style="width:2px;height:2px;margin-top:-15px;"> <i class="fa fa-paperclip fa-2x" aria-hidden="true" style="color:black;margin-left:15px;margin-top:10px;"></i><span></span> </div> </div> <div class="row breadcrumb" style="float:right;"> <select name="user_id"><!-- <option value=" ">All User</option> --> <?php foreach($udata as $u){ ?> <?php if($login_person_data->user_id != $u->user_id){?> <option value="<?php echo $u->user_id; ?>"><?php echo $u->user_name; ?></option> <?php } ?> <?php }?> </select> <button type="submit" class="btn btn-primary btn-sm" id="feed_submit" >Post</button> </ul> </div> </div> </div> </div> </form> <div class="col-sm-12 col-md-1"></div> </div> </div> <div class="row land_owner_a"> <div class="col-sm-12 col-md-1"></div> <div class="form-group col-sm-12 col-md-10" > <div class="row"> <div class="col-sm-1 col-xs-1"> <h3>Feeds</h3> </div> <div class="col-sm-1 col-xs-1" style="margin-top:20px;float:right;margin-right:5%;"> <select class="date_list new_s" id="feeds_filter"> <option value=" ">Select</option> <option value="today"><a href=" ">Now</a></option> <option value="yesterday"><a href=" ">Yesterday</a></option> <option value="lastweek"><a href=" ">Last Week</a></option> <option value="current-month"><a href=" ">Current Month</a></option> <option value="lastmonth"><a href=" ">Last Month</a></option> </select> </div> </div> </div> </div><!---- Feeds end----> <div id="new_div"> <?php foreach($send_data as $sd){ ?> <div class="row land_owner_a"> <div class="col-sm-12 col-md-1"></div> <div class="form-group col-sm-12 col-md-10" > <div class="row" > <div class="col-sm-2"> <img class="img-circle" src="<?php if($sd->profile_pick!=''){ echo base_url();?>/profile_pictures/<?php echo $sd->profile_pick; } else { echo base_url();?>/profile_pictures/no_img.gif<?php } ?>" style="width:50px;height:50px;"> <span style="color:#438eb9;" target="_blank"><b><?php echo $sd->sender_name; ?></b></span> </div> <div class="col-sm-10" style="border:1px solid rgba(0,0,0,0.03);" > <span style="margin-left:10px;font-size:15px;"> <span> <?php echo $sd->message; ?> </span> <a href=""> <b><?php if($sd->receiver_name != "All Users"){ echo $sd->receiver_name; }?></b></a></span> <?php if($login_person_data->user_id <=1) {?> <span style="float: right !important"><a href="<?php echo base_url();?>delete_post/<?php echo $sd->feeds_id; ?>"><b>DELETE</b></a></span> <?php }?> <span style="margin-left:10px;color:#e0dbdb !important;"> <?php echo $sd->send_date_time; ?><br></span> <a title="Click to download" href="<?php echo base_url();?>document_uploads/<?php echo $sd->document_name; ?>" download="<?php echo $sd->document_name; ?>"> <?php echo $sd->document_name; ?></a> <?php if($sd->document_name != ""){?> <a target="_blank" href="<?php echo base_url();?>document_uploads/<?php echo $sd->document_name; ?>"><img style="margin-left:20px;" target="_blank" src="<?php echo base_url();?>/document_uploads/<?php echo $sd->document_name; ?>" width="60" height="60"></a> <?php } foreach($comment as $comments){ if($comments->feeds_id == $sd->feeds_id){ ?> <div class="row" style="padding-top:45px;"> <div class="col-sm-2"> <img class="img-circle" target="_blank" src=" <?php if($comments->admin_pic!=''){ echo base_url();?>/profile_pictures/<?php echo $comments->admin_pic;} else { echo base_url();?>/profile_pictures/no_img.gif<?php } ?>" style="width:50px;height:50px;" > <span style="color:#438eb9;"><b><?php echo $comments->sender_name; ?> </b> </span> </div> <div class="col-sm-10" style="font-size:13px;"> <span > <?php echo $comments->comment; ?> </span> <a href=""> <b><?php if($comments->receiver_name != "All Users"){ echo $comments->receiver_name; }?></b></a> <span style="color:#e0dbdb !important;"> <?php echo $comments->send_at; ?><br></span> <a title="Click to download" href="<?php echo base_url();?>document_uploads/<?php echo $comments->file_name; ?>" download="<?php echo $comments->file_name; ?>"> <?php echo $comments->file_name; ?></a> <?php if($comments->file_name!=''){?> <a title="Click to download" target="_blank" href="<?php echo base_url();?>document_uploads/<?php echo $comments->file_name; ?>"><img id="images" style="margin-left:20px;color:#e0dbdb !important;" src="<?php echo base_url();?>/document_uploads/<?php echo $comments->file_name; ?>" alt="Cinqueterra" width="60" height="60"></a> <?php } ?> </div> </div> <?php } } ?> </span> </div> <div class="comment"></div> </div> </div> </div><!------logo-----> <div class="row land_owner_a"> <div class="col-sm-12 col-md-3"></div> <div class="form-group col-sm-12 col-md-5 mob-div" style="background-color:rgba(0,0,0,0.03);padding-top:10px;"> <form role="form" class="admin_upload"> <div class="timeline-body"> <div class=" form-group" > <input type="hidden" name="receiver-ids" value="<?php echo $sd->sender_id; ?>"> <textarea class="form-control center-block text-click<?php echo $sd->feeds_id; ?>" rows="1" onclick="display(<?php echo $sd->feeds_id; ?>);" placeholder="Comment"></textarea> <div class="show-text<?php echo $sd->feeds_id; ?>" style="display:none;"> <textarea class="form-control center-block" rows="2" name="admin_message" placeholder="Comment"></textarea> <input type="hidden" value="<?php echo $sd->feeds_id; ?>" name="feedsids" class="person_detsial<?php echo $sd->feeds_id; ?>"> <div class="row" id="close<?php echo $sd->feeds_id; ?>"> <button type="submit" class="btn btn-primary btn-sm" style="float:right;margin-top:10px;margin-right:10px;">Submit</button> <div class="" style="float:right;margin-top:10px;margin-right:10px;"> <button class="btn btn-sm" type="button" onclick="cancel(<?php echo $sd->feeds_id; ?>);">Cancel </button> </div> <label style="width:2px;height:2px;" > <input type="file" name="admin_upload" style="width:2px;height:2px;"> <i class="fa fa-paperclip fa-2x" aria-hidden="true" style="color:black;margin-left:15px;margin-top:10px;"></i><span></span> </div> </div> </div> </div> </form> </div> </div><!------comment end------> <?php } ?> </div> </div> </div> </div> </div> <!-- PAGE CONTENT ENDS --> </div><!-- /.col --> </div><!-- /.row --> </div><!-- /.page-content --> </div> </div><!-- /.main-content --> <a href="#" id="btn-scroll-up" class="btn-scroll-up btn btn-sm btn-inverse"> <i class="ace-icon fa fa-angle-double-up icon-only bigger-110"></i> </a> </div><!-- /.main-container --> <!-- basic scripts --> <!--[if !IE]> --> <script src="<?php echo base_url('admin_assets/assets/js/jquery-2.1.4.min.js');?>"></script> <script src="<?php echo base_url('admin_assets/assets/js/jquery-ui.min.js');?>"></script> <!-- <![endif]--> <!--[if IE]> <script src="assets/js/jquery-1.11.3.min.js"></script> <![endif]--> <script type="text/javascript"> if('ontouchstart' in document.documentElement) document.write("<script src='assets/js/jquery.mobile.custom.min.js'>"+"<"+"/script>"); </script> <!-- <script src="<?php echo base_url('admin_assets/assets/js/bootstrap.min.js');?>"></script> --> <!-- page specific plugin scripts --> <!-- ace scripts --> <script src="<?php echo base_url('admin_assets/assets/js/ace-elements.min.js');?>"></script> <script src="<?php echo base_url('admin_assets/assets/js/ace.min.js');?>"></script> <!-- inline scripts related to this page --> </body> </html> <style type="text/css">.feed_select{ } .NameHighlights div { display: none; } .NameHighlightsHover { position: relative; display: inline-block; border-bottom: 1px dotted black; } .NameHighlightsHover div { margin-top:15%; display:block; position:absolute; width: 25em; top:1.3em; *top:20px; left:70px; z-index:1000; background-color:white ; padding: 5px; border-radius: 4px; font-size:15px; border:2px solid rgba(0,0,0,0.03); box-shadow: 8px 8px 5px gray; } </style> <script type="text/javascript"> $(document).ready(function(){ $('#feed_submit').click(function(){ var send_message=$("#send_message").val(); var receiver_id=$("#receiver_id").val(); //alert(send_message); //alert(receiver_id); $.ajax({ type:'POST', url:'<?php echo site_url('yaskawa/insert_feeds'); ?>', data:{'send_message':send_message,'receiver_id':receiver_id}, success:function(data){ swal({ title: "Successfully Added", text: "", }); send_message=$("#send_message").val(''); receiver_id=$("#receiver_id").val(''); date=$("#datepicker").val(''); } }); }); }); </script> <script type="text/javascript"> // $(document).ready(function(){ $(document).on('change', '.date_list',function(){ var days=$('#feeds_filter').val(); $.ajax({ type:"POST", url:"<?php echo site_url('yaskawa/feeds_data_filter');?>", data:{'days':days}, success : function(response){ var res=jQuery.parseJSON(response); console.log(response); var content=''; if(res.result==1) { $("#new_div").empty(); $.each(res.date_result,function(idx,vx) { content+='<div class="row land_owner_a">'; content+='<div class="col-sm-12 col-md-1"></div>'; content+='<div class="form-group col-sm-12 col-md-10" >'; content+='<div class="row">'; content+='<div class="col-sm-2">'; content+='<img class="img-circle" src="<?php echo base_url();?>/profile_pictures/'+vx.admin_pic+'" style="width:50px;height:50px;"> <span style="color:#438eb9;"><b>'+vx.user_name +'</b></span>'; content+='</div>'; content+='<div class="col-sm-10" style="border:1px solid rgba(0,0,0,0.03);" >'; content+='<span style="margin-left:10px;font-size:15px;">'; content+='<span> '+vx.comment+' </span>'; if(vx.receiver_name != "All Users"){ content+='<a href=""> <b>'+vx.receiver_name+'</b></a></span>'; } content+='<span style="float: right !important"><a href="<?php echo base_url();?>delete_post/<?php echo $sd->feeds_id; ?>"><b>DELETE</b></a></span>'; content+='<span style="margin-left:10px;color:#e0dbdb !important;"> '+vx.send_date_time+'<br></span>'; content+='<a title="Click to download" href="<?php echo base_url();?>document_uploads/'+vx.document_name+'" download="'+vx.document_name+'"> '+vx.document_name+'</a>'; if(vx.document_name != ""){ content+='<a href="<?php echo base_url();?>document_uploads/"'+vx.document_name+'"><img style="margin-left:20px;" src="<?php echo base_url();?>/document_uploads/'+vx.document_name+'" width="60" height="60"></a>'; } $.each(vx.subcomment,function(idx,v){ // $.each(res.date_result,function(idx,vx) // { content+='<div class="row" style="padding-top:45px;">'; content+='<div class="col-sm-2">'; content+='<img class="img-circle" src="<?php echo base_url();?>/profile_pictures/'+vx.admin_pic+'" style="width:50px;height:50px;">'; content+='<span style="color:#438eb9;"><b>'+v.sender_name+'</b></span>'; content+='</div>'; content+='<div class="col-sm-10" style="font-size:13px;">'; content+='<span> '+v.comment+' </span>'; if(v.receiver_name != "All Users"){ content+='<a href=""> <b>'+v.receiver_name+'</b></a>'; } content+='<span style="color:#e0dbdb !important;"> '+ v.send_at+'<br></span>'; content+='<a title="Click to download" href="<?php echo base_url();?>document_uploads/"'+v.file_name+'" download="'+v.file_name+'"> '+v.file_name+'</a>'; content+='<a title="Click to download" href="<?php echo base_url();?>document_uploads/"'+v.file_name+'"><img id="images" style="margin-left:20px;color:#e0dbdb !important;" src="<?php echo base_url();?>/document_uploads/'+v.file_name+'" alt="Cinqueterra" width="60" height="60"></a>'; content+='</div>'; content+='</div>'; // } }); content+='</span>'; content+='</div>'; content+='<div class="comment"></div>'; content+='</div>'; content+='</div>'; content+='</div>';<!------logo-----> content+='<div class="row land_owner_a">'; content+='<div class="col-sm-12 col-md-3"></div>'; content+='<div class="form-group col-sm-12 col-md-5" style="background-color:rgba(0,0,0,0.03);padding-top:10px;">'; content+='<form role="form" class="admin_upload">'; content+='<div class="timeline-body">'; content+='<div class=" form-group">'; content+='<input type="hidden" name="receiver-ids" value="'+vx.receiver_id+'">'; content+='<textarea class="form-control center-block text-click'+vx.feeds_id+'" rows="1" onclick="display('+vx.feeds_id+');" placeholder="Comment"></textarea>'; content+='<div class="show-text'+vx.feeds_id+'" style="display:none;">'; content+='<textarea class="form-control center-block" id="update_feeds" rows="2" name="admin_message" placeholder="Comment"></textarea>'; content+='<input type="hidden" value="'+vx.feeds_id+'" name="feedsids" class="person_detsial'+vx.feeds_id+'">'; content+='<div class="row" id="close'+vx.feeds_id+'">'; content+='<button type="submit" class="btn btn-primary btn-sm" style="float:right;margin-top:10px;margin-right:10px;">Submit</button>'; content+='<div class="" style="float:right;margin-top:10px;margin-right:10px;">'; content+='<button class="btn btn-sm" type="button" onclick="cancel('+vx.feeds_id+');">Cancel</button>'; content+='</div>'; content+='<label style="width:2px;height:2px;" >'; content+='<input type="file" name="admin_upload" style="width:2px;height:2px;">'; content+='<i class="fa fa-paperclip fa-2x" aria-hidden="true" style="color:black;margin-left:15px;margin-top:10px;"></i><span></span>'; content+='</div>'; content+='</div>'; content+='</div>'; content+='</div>'; content+='</form>'; content+='</div>'; content+='</div>';<!------comment end------> $("#new_div").html(content); }); } else if(res.result==0) { //alert("Date not found"); $("#new_div").empty(); } } }); }); //}); </script> <!-- <link rel="stylesheet" href="<?php //echo base_url('assets/css/sweetalert.css'); ?>"> <script type="text/javascript" src="<?php //echo base_url('assets/js/sweetalert-dev.js'); ?>"></script> <script type="text/javascript" src="<?php //echo base_url('assets/js/jquery-ui.min.js');?>"></script> --> <!-- //--> </script> <script type="text/javascript"> $(document).ready(function(){ // $("#images").load(function(){ // alert("Image loaded."); // }); }); </script> <script type="text/javascript"> function display(key){ var person_detsial=$('.person_detsial'+key).val(); $('.show-text'+key).show(); $('.text-click'+key).hide(); } function cancel(key){ $('#close'+key).hide(); location.reload(); } </script> <script type="text/javascript"> function append_cancel(key){ $('#append_close'+key).hide(); } </script> <script type="text/javascript"> $(document).ready(function(){ $('#chat_form').submit(function(e){ e.preventDefault(); formdata = new FormData($(this)[0]); $.ajax({ type : 'post', url : '<?php echo site_url('yaskawa/insert_feeds'); ?>', data : formdata, contentType : false, processData : false, success : function(response){ resp=jQuery.parseJSON(response); console.log(response); if(resp.result == 1) { // alert("Submit successfully"); location.reload(); } else { alert("Something went wrong..Try again"); } } }); }); $(document).on('submit','.admin_upload',function(e){ e.preventDefault(); formdata = new FormData($(this)[0]); $.ajax({ type : 'post', url : '<?php echo site_url('yaskawa/sender_upload_files'); ?>', data : formdata, contentType : false, processData : false, success : function(response){ var resp=jQuery.parseJSON(response); console.log(response); if(resp.result == 1) { //alert("Submit successfully"); location.reload(); } else { alert("Something went wrong..Try again"); } } }); }); }); </script> <script> $(document).on('change','input[type="file"]', function() { var val = $(this).val(); $(this).siblings('span').text(val); }); </script> <?php $this->load->view('includes/admin_footer');?>