<?php
session_start();
include_once "../config.php";
require_once '../database1.php';
require_once "../check_admin.php";

class blocked extends database
{
	public function allBlockedContacts()
    {
        return $this->fetchRow('tb_blocked');
    }
}	
$obj = new blocked();
$blockedContacts = $obj->allBlockedContacts();

$templateType = 'add';
include '../header.php';
?>

<script src="<?php echo MAIN_DOMAIN ?>/ckeditor/ckeditor.js"></script>
            <!-- MAIN CONTENT-->
            <div class="main-content">
                <div class="section__content section__content--p30">
                    <div class="container-fluid">
                        <div class="row">
                            <div class="col-md-12">
                                <div class="overview-wrap">
                                    <h2 class="title-1">Blocked</h2>
                                    
                                </div>
								<?php if($msg !=''){echo '<span class="col-md-6 alert alert-danger pull-left">' . $msg .  '</span>';}?>
                            </div>
                        </div>
                        
                        <div class="row m-t-25 m-row">
					
                            <div class="col-lg-10">
                                <div class="card">
                                    
                                    <div class="card-body card-block">

    									<form method="post" class="form" cluster-url="../ajax/mailbox/blocked" cluster-warning="Adding Blocked Contacts...">
                                             <div class="error-main"></div>
                                             <div class="form-group input-container">
                                            <label>Blocked Emails (Seperate emails by comma)</label>
                                            <textarea id="emails" class="form-control" name="emails" placeholder="Blocked Contacts" style="height: 150px"><?php echo htmlspecialchars($blockedContacts['cl_emails']) ?></textarea>
                                             <div class="error-input"></div>
                                        </div>
                                            <div class="form-group input-container">
                                                <button type="submit" class="btn btn-success btn-submit">Submit</button>
                                            </div>
                                        </form>
                                    </div>
                                </div>
                            </div>
                          
                        </div>
                        
                    <script>
							$(document).ready(function(){
								$('.active').removeClass('active');
								$('#cat-menu').addClass('active');

                                
							}); 

                            
						</script>   

                      
                     

                        <SCRIPT>
                            $('#name').change(function(){
                                var name = $(this).val();
                                name = name.replace(/ /g,"-");
                                name = name.replace("'","-");
                                name = name.replace('"',"-");
                                name = name.replace(',',"-");
                                name = name.replace(';',"-");
                                name = name.replace('/',"-");
                                name = name.replace('?',"-");
                                $('#slug').val(name);
                            })
                        </SCRIPT> 
                       

  <?php
  include '../footer.php';
  ?>