<script src="http://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.js"></script>
<link href="http://cdnjs.cloudflare.com/ajax/libs/summernote/0.8.9/summernote.css" rel="stylesheet">
<script src="http://cdnjs.cloudflare.com/ajax/libs/summernote/0.8.9/summernote.js"></script>
<style>
.dropdown-menu{
	width:200px !important;
}
</style>
<div class="page-content-wrapper">
                <div class="page-content">
                    <div class="page-bar">
                        <div class="page-title-breadcrumb">
                            <div class=" pull-left">
                                <div class="page-title">Mass Mail</div>
                            </div>
                            <ol class="breadcrumb page-breadcrumb pull-right">
                                <li><i class="fa fa-home"></i>&nbsp;<a class="parent-item" href="index.html">Home</a>&nbsp;<i class="fa fa-angle-right"></i>
                                </li>
                                <li><a class="parent-item" href="">Others</a>&nbsp;<i class="fa fa-angle-right"></i></li><li class="active">Mass Mail</li>
                            </ol>
                        </div>
                    </div>
<div class="row">
                        <div class="col-md-12 col-sm-12">
                            <div class="card card-box">
                                <div class="card-head">
                                    <header>Send Mail</header>                                    
                                </div>
                                <div class="card-body" id="bar-parent1">
                                	
                                	<?php if(isset($error) && $error!='') { ?> 
                                	<div class="alert alert-danger"><?php echo $error; ?></div>
                                	<?php } else if(isset($success) && $success!=''){ ?>                                		
                                		<div class="alert alert-success"><?php echo $success; ?></div>
                                	<?php } else if(isset($_REQUEST['success'])){ ?>                                		
                                		<div class="alert alert-success"><?php echo $_REQUEST['success']; ?></div>
                                	<?php } ?>
                                	                                	
                                    <form action="" id="form_user_add" class="form-horizontal" method="post">
                                        <div class="form-body">
                                        	
                                        	<div class="form-group row">
                                                <label class="control-label col-md-3">Mail Type<span class="required"> * </span></label>
                                                <div class="col-md-2 mt-2">                                                    
                                                    <input type="radio" name="mail_type" id="mail_type_promo" value="promo" <?php if(isset($_POST['mail_type']) && $_POST['mail_type']=='promo'){ echo 'checked'; }?> > Promotional
                                                </div>
                                                <div class="col-md-2 mt-2">                                                    
                                                    <input type="radio" name="mail_type" id="mail_type_general" value="general" <?php if(isset($_POST['mail_type']) && $_POST['mail_type']=='general'){ echo 'checked'; }?> > General
                                                </div>
                                            </div>
                                        	     
                                        	<div class="form-group row">
                                                <label class="control-label col-md-3">Select Mailing List<span class="required"> * </span></label>
                                                <div class="col-md-4">                                                    
                                                    <select name="status" id="status" >
										              <?php foreach($userTypeArray as $typeValue => $typeName) { ?>
										              <option value="<?php echo $typeValue; ?>" <?php if($typeValue == $status) { echo 'selected="selected"'; } ?> ><?php echo $typeName; ?></option>
										              <?php } ?>
										            </select>
                                                </div>
                                            </div>                            	 
                                            <div class="form-group row">
                                                <label class="control-label col-md-3">Subject<span class="required"> * </span></label>
                                                <div class="col-md-4">                                                    
                                                    <input name="subject" type="text" id="subject" data-required="1" class="form-control" value="<?php if(isset($_POST['subject'])) { echo htmlentities(($_POST['subject']), ENT_QUOTES); } else if(isset($resEdit['subject']) && $resEdit['subject']!=''){ echo $resEdit['subject'];} ?>"/>
                                                </div>
                                            </div>                                             
                                            <div class="form-group row">
                                                <label class="control-label col-md-3">Message</label>
                                                <div class="col-md-12">                                                    
                                                    <?php
													/*$oFCKeditor = new FCKeditor('FCKeditor1') ;
													$oFCKeditor->BasePath = 'fckeditor/' ;
													$oFCKeditor->Width= '600';
													$oFCKeditor->Height= '350' ;
													$oFCKeditor->Value = stripslashes($content);
													$oFCKeditor->Create() ;*/
													?>
													<textarea cols="80" rows="10" name="editordata" id="summernote"><?php if(isset($content) && $content!=''){ echo $content; }?></textarea>
                                                </div>
                                                <script>
												    $(document).ready(function() {
												        $('#summernote').summernote();
												    });
												</script>
                                            </div>
                                                                                
                                            
                                        </div>                                        
                                      	<div class="form-group">
                                            <div class="offset-md-3 col-md-9">                                            	
                                            		<button type="submit" name="Send" class="btn btn-info">Send</button>                                            	
                                            </div>
                                        </div>
                                    </form>
                                </div>
                            </div>
                        </div>
                    </div>
	</div>
</div>
