<?php $this->load->view('admin/header'); ?>
<div class="wrapper">
<?php $this->load->view('admin/top'); ?>
<?php $this->load->view('admin/side'); ?>
<div class="content-wrapper">
    <!-- Content Header (Page header) -->
    <section class="content-header">
      <h1>
        <?php echo $page_title; ?>
      </h1>
    </section>

    <!-- Main content -->
    <section class="content">

      <!-- Default box -->
      <div class="box">
		<?php echo form_open('studio/src_add_photo', array('class'=>'form-horizontal','enctype'=>'multipart/form-data'));?>
        <div class="box-header with-border">
          <h3 class="box-title"><?php echo $page_title; ?> Form</h3>

          <div class="box-tools pull-right">
            <button type="button" class="btn btn-box-tool" data-widget="collapse" data-toggle="tooltip" title="Collapse">
              <i class="fa fa-minus"></i></button>
            <button type="button" class="btn btn-box-tool" data-widget="remove" data-toggle="tooltip" title="Remove">
              <i class="fa fa-times"></i></button>
          </div>
        </div>
        <div class="box-body">
			<div class="col-md-12">
					<!-- form start -->
					  <div class="box-body">
						<div class="form-group">
						  <label for="inputEmail3" class="col-sm-2 control-label">Client<span style='color:red;'>*</span></label>
						  <div class="col-sm-4">
							<select name='client_code' class='form-control'>
							<option value=''>Select Client</option>
							<?php
							$this->db->select('*');
							$this->db->from('client');
							$this->db->where('client.status','yes');
							$photo_list = $this->db->get();
								if($photo_list->num_rows()>0){
									foreach($photo_list->result() as $row){
										echo "<option value='".$row->client_code."'>".$row->name."</option>";
									}
								}
							?>
							</select>
						  </div>
						  <label for="inputEmail3" class="col-sm-2 control-label">Name<span style='color:red;'>*</span></label>
						  <div class="col-sm-4">
							<input type="text" class="form-control" id="name" placeholder="Name" name="name" required >
						  </div>
						  
						</div>
						<div class="form-group">
						  <label for="inputEmail3" class="col-sm-2 control-label">Function Category<span style='color:red;'>*</span></label>
						  <div class="col-sm-4">
							<select name='function_category_id' class='form-control'>
							<option value=''>Select Function Category</option>
							<?php
							$this->db->select('*');
							$this->db->from('function_category');
							$this->db->where('function_category.status','yes');
							$photo_list = $this->db->get();
								if($photo_list->num_rows()>0){
									foreach($photo_list->result() as $row){
										echo "<option value='".$row->function_category_id."'>".$row->function_category_name."</option>";
									}
								}
							?>
							</select>
						  </div>
						  <label for="inputEmail3" class="col-sm-2 control-label">Photo Category<span style='color:red;'>*</span></label>
						  <div class="col-sm-4">
							<select name='photo_category_id' class='form-control'>
							<option value=''>Select Photo Category</option>
							<?php
							$this->db->select('*');
							$this->db->from('photo_category');
							$this->db->where('photo_category.status','yes');
							$photo_list = $this->db->get();
								if($photo_list->num_rows()>0){
									foreach($photo_list->result() as $row){
										echo "<option value='".$row->photo_category_id."'>".$row->photo_category_name."</option>";
									}
								}
							?>
							</select>
						  </div>
						</div>
						<div class="form-group">
						 <label for="inputPassword3" class="col-sm-2 control-label">Select Multiple Images</label>
						  <div class="col-sm-10">
						  <input type="file" class="form-control" id="userfile" placeholder="Main Page Banner" name="userfile[]" multiple required >
						  </div>
						</div>
						<div class="form-group">
						  <label for="inputPassword3" class="col-sm-2 control-label"></label>
						  <div class="col-sm-6"><?php echo $message; ?></div>
						</div>
					  </div>
					  <!-- /.box-body -->
					  
					 
			</div>
        </div>
        <!-- /.box-body -->
        <div class="box-footer">
          <a href="<?php echo base_url(); ?>studio/photo_list" class="btn btn-primary">Back</a>
		  <button type="submit" class="btn btn-info pull-right">Submit</button>
        </div>
		<?php echo form_close();?>
        <!-- /.box-footer-->
      </div>
      <!-- /.box -->

    </section>
    <!-- /.content -->
  </div>
 <?php $this->load->view('admin/footer'); ?>