<?php

if($_POST)
{
  
	$_SESSION['form']=$_POST;	$flgEr=FALSE;
	foreach($_POST as $field=>$value)
	{
	 
	   $aryvalue=$db->getRow("SELECT * FROM tbl_info");
	   $field_val=$aryvalue[$field];
	
		$flgUp=$db->update("update tbl_info set ".$field."='".mysql_escape_string($value)."' where ".$field."='".$field_val."'");
	}
	$_SERVER["msg"]="Updated Successfully";

}



if(isset($_SESSION['msg']) && $_SESSION['msg']!="")
{
	?>
	<div class="alert alert-success">
	  <a class="close" data-dismiss="alert">×</a>
	  <i class="icon icon-thumbs-up-alt"></i> <b>Notice</b><?php echo $_SESSION['msg'] ?></i>
	</div>
	<?php
	unset($_SESSION["msg"]);
}
if(is_array($alert_err) && count($alert_err)>0)
{
	?>
	<div class="alert alert-error">
	  <a class="close" data-dismiss="alert">×</a>
	  <i class="icon icon-warning-sign"></i> <b>Notice</b> <?php echo $alert_err[0] ?></i>
	</div>
	<?php
}
?>
<div class="row-fluid">
    <form method="post" action="" enctype="multipart/form-data">
        <!-- Forms: Box -->
        <div class="span12">
    
            <!-- Forms: Top Bar -->
            <div class="top-bar">
                <h3><i class="icon-cog"></i> Site Setting</h3>
            </div>
            <!-- / Forms: Top Bar -->
            <!-- Forms: Content -->
            <div class="well no-padding">
				<?php
        
        $aryFormTemp=$db->getRow("SELECT * FROM tbl_info");

              
                    ?>
                    <div class="control-group">
                    <label class="control-label" f for="">Facebook_url</label>
                    <div class="controls">
                     <textarea class="input-block-level"  name="facebook_url" id="<?php echo $aryFormTemp['facebook_url']; ?>" value="<?php echo $aryFormTemp['facebook_url']; ?>"><?php echo $aryFormTemp['facebook_url']; ?></textarea>
                    </div>
                    </div>
                   
                   <div class="control-group">
                    <label class="control-label" f for="">School  Website</label>
                    <div class="controls">
                     <textarea class="input-block-level"  name="school_website" id="<?php echo $aryFormTemp['school_website']; ?>"><?php echo $aryFormTemp['school_website']; ?></textarea>
                    </div>
                    </div> 
                    
                    
                     <div class="control-group">
                    <label class="control-label" f for="">GST</label>
                    <div class="controls">
                     <textarea class="input-block-level"  name="GST" id="<?php echo $aryFormTemp['GST']; ?>"><?php echo $aryFormTemp['GST']; ?></textarea>
                    </div>
                    </div> 
                    
                    <div class="control-group">
                    <label class="control-label" f for="">Convenience</label>
                    <div class="controls">
                     <textarea class="input-block-level"  name="convenience" id="<?php echo $aryFormTemp['convenience']; ?>"><?php echo $aryFormTemp['convenience']; ?></textarea>
                    </div>
                    </div> 
                    
                    <div class="control-group">
                    <label class="control-label" f for="">you_tube_url</label>
                    <div class="controls">
                     <textarea class="input-block-level"  name="you_tube_url" id="<?php echo $aryFormTemp['you_tube_url']; ?>"><?php echo $aryFormTemp['you_tube_url']; ?></textarea>
                    </div>
                    </div> 
                    
                    
                    
                    <div class="control-group">
                    <label class="control-label" f for="">Homework_sms_status</label>
                    <div class="controls">
                     <textarea class="input-block-level"  name="homework_sms_status" id="<?php echo $aryFormTemp['homework_sms_status']; ?>"><?php echo $aryFormTemp['homework_sms_status']; ?></textarea>
                    </div>
                    </div> 
                    
                   
                    
                     <div class="control-group">
                    <label class="control-label" f for="">circular_sms_status</label>
                    <div class="controls">
                     <textarea class="input-block-level"  name="st_circular_sms_status" id="<?php echo $aryFormTemp['st_circular_sms_status']; ?>" value="<?php echo $aryFormTemp['st_circular_sms_status']; ?>"><?php echo $aryFormTemp['st_circular_sms_status']; ?> </textarea>
                    </div>
                    </div> 
                    
                    
                     <div class="control-group">
                    <label class="control-label" f for="">att_pre_status</label>
                    <div class="controls">
                     <textarea class="input-block-level"  name="att_pre_status" id="<?php echo $aryFormTemp['att_pre_status']; ?>" value="<?php echo $aryFormTemp['att_pre_status']; ?>"><?php echo $aryFormTemp['att_pre_status']; ?></textarea>
                    </div>
                    </div> 
                    
                    <div class="control-group">
                    <label class="control-label" f for="">att_abs_status</label>
                    <div class="controls">
                     <textarea class="input-block-level"  name="att_abs_status" id="<?php echo $aryFormTemp['att_abs_status']; ?>"><?php echo $aryFormTemp['att_abs_status']; ?></textarea>
                    </div>
                    </div> 
                    
                    <div class="control-group">
                    <label class="control-label" f for="">app_version</label>
                    <div class="controls">
                     <textarea class="input-block-level"  name="app_version" id="<?php echo $aryFormTemp['app_version']; ?>"><?php echo $aryFormTemp['app_version']; ?></textarea>
                    </div>
                    </div> 
                     
                    <div class="control-group">
                    <label class="control-label" f for="">result_pattern</label>
                    <div class="controls">
                     <textarea class="input-block-level"  name="result_pattern" id="<?php echo $aryFormTemp['result_pattern']; ?>"><?php echo $aryFormTemp['result_pattern']; ?></textarea>
                    </div>
                    </div> 
                    
                    
                    <div class="control-group">
                    <label class="control-label" f for="">fee_month</label>
                    <div class="controls">
                     <textarea class="input-block-level"  name="fee_month" id="<?php echo $aryFormTemp['fee_month']; ?>"><?php echo $aryFormTemp['fee_month']; ?></textarea>
                    </div>
                    </div> 
                    <div class="control-group">
                    <label class="control-label" f for="">Teacher subject ctr</label>
                    <div class="controls">
                     <textarea class="input-block-level"  name="teacher_sub_control" id="<?php echo $aryFormTemp['teacher_sub_control']; ?>"><?php echo $aryFormTemp['teacher_sub_control']; ?></textarea>
                    </div>
                    </div>
                    
                    <div class="control-group">
                    <label class="control-label" f for="">Teacher Att class ctr</label>
                    <div class="controls">
                     <textarea class="input-block-level"  name="teacher_att_class_ctr" id="<?php echo $aryFormTemp['teacher_att_class_ctr']; ?>"><?php echo $aryFormTemp['teacher_att_class_ctr']; ?></textarea>
                    </div>
                    </div>
                    
                    <div class="control-group">
                    <label class="control-label" for="">Teacher HW class ctr</label>
                    <div class="controls">
                     <textarea class="input-block-level"  name="teacher_homework_class_ctr" id="<?php echo $aryFormTemp['teacher_homework_class_ctr']; ?>"><?php echo $aryFormTemp['teacher_homework_class_ctr']; ?></textarea>
                    </div>
                    </div>
                    
                     <div class="control-group">
                    <label class="control-label" f for="">online_payment</label>
                    <div class="controls">
                     <textarea class="input-block-level"  name="online_payment" id="<?php echo $aryFormTemp['online_payment']; ?>"><?php echo $aryFormTemp['online_payment']; ?></textarea>
                    </div>
                    </div>      
                  
                   <div class="control-group">
                    <label class="control-label" f for="">Merchant</label>
                    <div class="controls">
                     <textarea class="input-block-level"  name="Merchant" id="<?php echo $aryFormTemp['Merchant']; ?>"><?php echo $aryFormTemp['Merchant']; ?></textarea>
                    </div>
                    </div>    
                  
                  <div class="control-group">
                    <label class="control-label" f for="">Photo</label>
                    <div class="controls">
                     <textarea class="input-block-level"  name="photo" id="<?php echo $aryFormTemp['photo']; ?>"><?php echo $aryFormTemp['photo']; ?></textarea>
                    </div>
                    </div>  
                    
                    <div class="control-group">
                    <label class="control-label" f for="">Remarks role ctr</label>
                    <div class="controls">
                     <textarea class="input-block-level"  name="remarks_role_ctr" id="<?php echo $aryFormTemp['remarks_role_ctr']; ?>"><?php echo $aryFormTemp['remarks_role_ctr']; ?></textarea>
                    </div>
                    </div>
                    
				<?php
               // }
                ?>
            </div>
            <div class="form-actions">
                <button type="submit" class="btn btn-primary"> Save</button>
                <button type="button" class="btn"> Cancel</button>
            </div>
        </div>
	</form>
 
</div>