<?php
error_reporting(55);
//print_r($_SESSION);
if($_POST)
{
	foreach($smsHead as $key=>$value){
		if(isset($_POST[$key])){
			saveNtice($key,"1");	
		}else{
			saveNtice($key,0);
		}
	}
	echo $db->getErMsg();
}
?>
<form method="post" action="" enctype="multipart/form-data">
  <div class="row-fluid">
    <div class="span12">
      <div class="top-bar">
        <h3><i class="icon-cog"></i> Send SMS Setting</h3>
      </div>
      <div class="well"> 
          <!-- Forms: Top Bar -->
          
          <!-- / Forms: Top Bar --> 
          <?php 
		  
		  ?>
          <!-- Forms: Content -->
          <div class="control-group">
            <label class="control-label">Checkbox</label>
            <div class="controls">
            <?php //$key=0;
			
			foreach($smsHead as $key=>$value){
				$cheched="";
				$statusSMS=myNotificationStatus($key);//echo $statusSMS;
				if($statusSMS=="1"){$cheched='checked="checked"';}
				?>
				<label class="checkbox line">
              <div class="checker"><span>
                <input class="check" <?php echo $cheched; ?> name="<?php echo $key; ?>" type="checkbox" value="<?php echo $key; ?>">
                </span></div>
              	<?php echo $value; ?>
              </label>
				<?php //$key++;
			}
			?>
          </div>
          <div class="form-actions">
							<button type="submit" class="btn btn-primary"> Send</button>
							<button type="button" class="btn"> Cancel</button>
						</div>
        </div>
      </div>
    </div>
  </div>
</form>