 
 <?php 
 include "includes/header.php";

$servername = "localhost";
$username = "codesite_codesitex";
$password = "~O25D_)lgLc4VL7H";
$db = "codesite_codesitex";
// Create connection
$conn = new mysqli($servername, $username, $password , $db);

// Check connection
$sql = "SELECT * FROM `illustration` WHERE id='". $_GET['id'] ."'";
 $result = $conn->query($sql);

  if ($result) {
    $return = array();
    while($row = $result->fetch_assoc()) {
      $return = $row;
    $data_value = json_decode($return['illustration']);
    $data_img =  $return['company_attachment'];
   
    // var_dump($data_value);
    }
  } else {
    $return = array();
  }


$conn->close();


?>
  
  <!-- Form is filled -->
    <section class="girl_rbg">
        <div class="employment_form">
            <div class="container">
                <div class="reserve_form">
                    <div class="row">
                        <div class="col-md-12">
                            <div class="allYourSec">
                                <h1>Questionnaire for Illustrations</h1>

                               
                            </div>
                        </div>
                    </div>
                    <!-- Form Start -->
                    <form action="javascript:void(0)" id="web-form" class="form" method="post" enctype="multipart/form-data">
                      <input type="hidden" name="form_id" value="59183">
                        <div class="row">
                            <div class="col-md-12">
                                <div class="panel-group" id="accordion">
                                    <div class="panel panel-default">
                                        <div class="col-md-6">
                                            <div class="panel-heading">
                                                <h4 class="panel-title">
                                                    Company</h4>
                                            </div>
                                        </div>
                                        <div class="col-md-6">
                                            <div class="panel-heading">
                                                <h4 class="panel-title">
                                                    Contact</h4>
                                            </div>
                                        </div>
                                        <div id="collapse1" class="panel-collapse collapse in">
                                            <div class="panel-body">

                                            <div class="row">
                                                    <div class="col-md-6">
                                                        <div class="form-group">
                                                            <label>Name<p class="text-danger">*</p></label>
                                                            <input type="text" name="company[company_name]" class="form-control"
                                                                   placeholder=""
                                                                   value="<?php echo $data_value->company_name??null; ?>">
                                                        </div>
                                                    </div>
                                                    <div class="col-md-6">
                                                        <div class="form-group">
                                                            <label>Business Name <p class="text-danger">*</p></label>
                                                            <input type="email" name="company[company_business]" class="form-control"
                                                                   placeholder=""
                                                                   value="<?php echo $data_value->company_business??null; ?>">
                                                        </div>
                                                    </div>
                                                </div>
                                                <div class="row">
                                                    
                                                    <div class="col-md-6">
                                                        <div class="form-group">
                                                            <label>Email <p class="text-danger">*</p></label>
                                                            <input type="email" name="company[company_email]" class="form-control"
                                                            value="<?php echo $data_value->company_email??null; ?>" class="form-control"
                                                                   placeholder="" readonly>
                                                        </div>
                                                    </div>
                                                     <div class="col-md-6">
                                                        <div class="form-group">
                                                            <label>Phone# <p class="text-danger">*</p></label>
                                                            <input type="tel" name="company[company_phone]" class="form-control"
                                                            value="<?php echo $data_value->company_phone??null; ?>" class="form-control"
                                                                   placeholder="" readonly>
                                                        </div>
                                                    </div>
                                                </div>
                                              
                                               
                                            </div>
                                        </div>
                                    </div>
                                </div>
                               
                              
                              
                               
                                <div class="panel panel-default">
                                    
                                    <div id="collapse5" class="panel-collapse collapse in">
                                        <div class="panel-body">
                                            <div class="row">
                                            <div class="col-md-12">
                                                  <div class="form-group">
                                                            <label>Book size <p class="text-danger">*</p></label>
                                                            <input type="text" name="company[company_size]" class="form-control"
                                                            value="<?php echo $data_value->company_size??null; ?>" class="form-control"
                                                                   placeholder="" readonly>
                                                        </div>
                                            </div>
                                                <div class="col-md-12">
                                                   
                                                    <h4>Target audience  </h4>
                                                     <textarea id="form_message" name="company[company_target_audience]"
                                                              class="form-control" placeholder="" rows="10"
                                                              data-error="Type your message..."><?php echo $data_value->company_target_audience??null; ?></textarea>
                                                </div>
                                              
                                                   <div class="col-md-12">
                                                    <h4>Book illustration types<span class="text-danger">*</span></h4>
                                                </div>
                                                <div class="col-md-12">
                                                    <div class="form-group custom-error">
                                                   
                                                    <?php foreach($data_value->company_illustration_type as $key => $val ){ ?>
                                                        <p>
                                                            <input class="" id="styled-checkbox-1" type="checkbox"
                                                                   value=""
                                                                   name="company[company_illustration_type]" checked>
                                                            <label for="styled-checkbox-1"><?php echo $val; ?> </label>
                                                        </p>
                                                       
                                                         <?php } ?>
                                                        
                                                    
                                                       
                                                    </div>
                                                </div>
                                                
                                                    <div class="col-md-12">
                                                   
                                                    <h4>Character Descriptions </h4>
                                                     <textarea id="form_message" name="company[company_character_description]"
                                                              class="form-control" placeholder="" rows="10"
                                                              data-error="Type your message..."><?php echo $data_value->company_character_description??null; ?></textarea>
                                                </div>
                                                                                                   <div class="col-md-12">
                                                    <h4>Reference images for characters<span class="text-danger">*</span></h4>
                                                </div>
                                                <div class="col-md-12">
                                                    <div class="form-group custom-error">
                                                        <?php foreach($data_value->company_images_characters as $key => $val ){ ?>
                                                        <p>
                                                            <input class="" id="styled-checkbox-5" type="checkbox"
                                                                   value=""
                                                                   name="company[company_images_characters]" checked>
                                                            <label for="styled-checkbox-5"><?php echo $val; ?>  </label>
                                                        </p>
                                                         
                                                        <?php } ?>
                                                  
                                                       
                                                    </div>
                                                </div>
                                                
                                                 <div class="col-md-12">
                                                      <h4>Illustration style reference images <span class="text-danger">*</span></h4>
                                                    <div class="form-group custom-error">
                                                       <?php foreach($data_value->company_style_reference as $key => $val ){ ?>
                                                        <p>
                                                            <input class="" id="styled-checkbox-12" type="checkbox"
                                                                   value=""
                                                                   name="company[company_style_reference]" checked>
                                                            <label for="styled-checkbox-12"><?php echo $val; ?> </label>
                                                        </p>
                                                        
                                                   <?php } ?>
                                                       
                                                    </div>
                                                </div>
                                            
                                            </div>
                                                               <div class="row">
                                 
                                             

                                      <div class="col-md-12">
                                          <h4>Download Files</h4>
                                          <div class="form-group custom-error">
                                                 <?php 
                                                  $data_img = json_decode($return['company_attachment']);
                                                  foreach($data_img as  $key => $value){ ?>
                                                 <p>
                                                 <a href="./images/uploads/<?php echo $value; ?>" download>Attachment Download</a>
                                                  </p>
                                               
                                               <?php } ?>
                                               
                                               </div>
                        </div>
                        </div>
                                            </div>
                         
                        <div class="row">
                          <div class="col-md-12">
                            <div class="btn_submit text-center">
                              <!-- <button class="btn btn-default" type="submit">Submit -->
                              <!-- </button> -->
                            </div>
                          </div>
                        </div>
                      </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </form>
                    <!-- Form End -->
                </div>
            </div>
        </div>
    </section>
  
  


   <?php include "includes/footer.php"?>