<?php include_once("fckeditor/fckeditor.php") ; ?>
<?php if(isset($_SESSION['client_msg']) )
{
?>
    <div class="alert alert-info" data-dismiss="alert" style="margin-top:10px;">                
    <a href="#" style="float:right;" class="close" data-dismiss="alert">&times;</a>
    <strong>Info!</strong> <?php echo $_SESSION['client_msg'];unset($_SESSION['client_msg']);  ?>
    </div> 
<?php }  
if(isset($_REQUEST['add_logo']) )
{	
    //$id      = $_REQUEST['id'];	
	$logo_name   =  mysql_real_escape_string($_POST['logo_name']);
	$logo_title	 =  mysql_real_escape_string($_POST['logo_title']);
	$logo_alt 	 =  mysql_real_escape_string($_POST['logo_alt']);
	$home_desc   =  mysql_real_escape_string($_POST['home_desc']);
	$lux_title   =  mysql_real_escape_string($_POST['lux_title']);
	
	$web_keywords=  mysql_real_escape_string($_POST['web_keywords']);
	$web_meta_desc   =  mysql_real_escape_string($_POST['web_meta_desc']);
	
	
	$small_img     =  $_FILES['small_logo_image']['name'];
	move_uploaded_file($_FILES['small_logo_image']['tmp_name'],"../upload/".$small_img);			
	$home_image   = $_FILES['home_image']['name'];
	move_uploaded_file($_FILES['home_image']['tmp_name'],"../upload/".$home_image);	
	$lux_lamp_image ='';
	//$lux_lamp_image   = $_FILES['lux_lamp_image']['name'];
	//move_uploaded_file($_FILES['lux_lamp_image']['tmp_name'],"client_logo/".$lux_lamp_image);	
	$lux_lamp_content   =  mysql_real_escape_string($_POST['FCKeditor1']);
	echo $take_action1->client_logo($small_img,$logo_name,$home_image,$home_desc,$lux_lamp_image,$lux_lamp_content,$lux_title,$logo_title,$logo_alt,$web_keywords,$web_meta_desc);
}

?>
<?php

 //$modify_id   =  $_GET['modify_id'];
 $logo  = mysql_query("SELECT * FROM `client_logo` where `id`=1");
 $show = mysql_fetch_array($logo);

 ?>
<div class="row-fluid" >
    <div class="span12">
        <div class="head clearfix">
            <div class="isw-ok"></div>
            <h1>Home Setting Change</h1>
        </div>        
        <div class="block-fluid">                             
            <form id="validation" method="POST" action="" enctype="multipart/form-data">
                    <div class="row-form clearfix">
                	<div class="span2">
                    <label>Websit Title</label>
                    	<input type="text" name="logo_name" value="<?php echo $show['website_title'];?>" required/>
                        </div>
                    <div class="span2">
                    <label>Logo Image</label>
                        <input type="file" name="small_logo_image" />
                        </br>
                        <span>
                        <?php if(!empty($show['small_logo_image'])){?>
                        <img src="../upload/<?php echo $show['small_logo_image'];?>" alt="<?php echo $show['logo_alt'];?>" title="<?php echo $show['logo_title'];?>" height="80" width="80"/>
                        <?php } ?>
                        </span> 
                        </div>    
                    <div class="span2">
                    <label>Logo Title</label>
                    	<input type="text" name="logo_title" value="<?php echo $show['logo_title'];?>" required/>
                        </div>
                    <div class="span2">
                    <label>Logo Alt Text</label>
                    	<input type="text" name="logo_alt" value="<?php echo $show['logo_alt'];?>" required/>
                        </div>        
                    
                    <div class="span2" >
                <label>Fevicon Icon</label>
                    <input type="file" name="home_image" />
                    </br>
                    <span>
                    <?php if(!empty($show['home_image'])){?>
                    <img src="../upload/<?php echo $show['home_image'];?>" alt="<?php echo $show['logo_alt'];?>" title="<?php echo $show['logo_title'];?>"  height="80" width="80"/>
                    <?php } ?>
                    </span> 
                    </div>                     
                    </div>
                    <div class="row-form clearfix">
                    <div class="span12">
                    <label>Websit Keywords</label>
                    	<input type="text" name="web_keywords" value="<?php echo $show['web_keywords'];?>" required/>
                        </div>
                    </div>
                    <div class="row-form clearfix">    
                    <div class="span12">
                    <label>Websit Meta Description</label>
                    	<input type="text" name="web_meta_desc" value="<?php echo $show['web_meta_desc'];?>" required/>
                        </div>
                        </div>
                        <div class="row-form clearfix">
                    <div class="span3">
                    <label>Footer Content</label>
                     <textarea type="text" class="form-control" rows="5" id="exampleInputtext1" name="home_desc" required><?php echo $show['home_desc'];?></textarea> 
                         </div>
                        <div class="span3">
                            <label>Home Content Title</label>
                            <input type="text" class="form-control" name="lux_title" value="<?php echo $show['lux_title'];?>" required>                     
                        </div>
					</div>
                    <div class="row-form clearfix" id="serial_no">                                                  
                    <div class="span12">
                    <label>Home Description</label>
                    
                    <?php
                        $oFCKeditor = new FCKeditor('FCKeditor1');
                        
                        $oFCKeditor->BasePath = 'fckeditor/';
                        
                        //set the EnterMode to "br" (overwrites the default configuration from fckconfig.js)
                        
                        $oFCKeditor->Config['EnterMode'] = 'br';
                        
                        $oFCKeditor->Value = "";
                        
                        $oFCKeditor->Value = $show['lux_lamp_content'];
                      
                        
                        $oFCKeditor->Create() ; 
                        ?>
                    </div>  
                    </div> 
                    <div class="row-form clearfix">
                    <div class="span2">        
                    	<input value="Update" class="btn btn-block" name="add_logo" type="submit" />
                    </div>
                    </div>
                    </form>
                </div>
            </form>
        </div>
    </div>
</div>            
<script type="text/javascript">
function confirm_delete() 
{
	if(confirm('Are you sure ? '))
	{
		return true;
	}
	else 
	{
		return false;
	}
}
</script>