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

$servername = "localhost";
$username = "graveprm_paraapp";
$password = "0m=s^TD[a8G3";
$db = "graveprm_paraapp";

// Create connection
$conn = new mysqli($servername, $username, $password , $db);

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

  if ($result) {
    $return = array();
    while($row = $result->fetch_assoc()) {
      $return = $row;
    // $data_value = json_decode($return['ebook']);
    $data_value = json_decode(base64_decode($return['ebook'])); // Added by developer
   
    // 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>E-Book Questionnaire</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>ZIP / Postal Code <p class="text-danger">*</p></label>
                                                            <input type="text" name="company[company_zip]" class="form-control"
                                                            value="<?php echo  $data_value->company_zip ??null ?>" class="form-control"
                                                                   placeholder="" readonly>
                                                        </div>
                                                    </div>
                                                </div>
                                                <div class="row">
                                                    <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 class="panel-heading">
                                   
                                    </div>
                                    <div id="collapse5" class="panel-collapse collapse in">
                                        <div class="panel-body">
                                            <div class="row">
                                         
                                              
                                              
                                            </div>
                                            <div class="row">
                                                <div class="col-md-12">
                                                    <!--<h3>Domain and Hosting</h3>-->
                                                    <h4>What is the Genre of your book? </h4>
                                                    <input type="text" name="company[company_genre]" class="form-control"
                                                           placeholder="" value="<?php echo  $data_value->company_genre ??null ?>">
                                                </div>
                                                <div class="col-md-12">
                                                    <!--<h3>Domain and Hosting</h3>-->
                                                    <h4>Do you have a desired eBook title? </h4>
                                                    <input type="text" name="company[company_title]" class="form-control"
                                                           placeholder="" value="<?php echo  $data_value->company_title ??null ?>">
                                                </div>
                                                   <div class="col-md-12">
                                                    <!--<h3>Domain and Hosting</h3>-->
                                                    <h4>For the listed title, provide a brief explanation of your requirements. </h4>
                                                     <textarea id="form_message" name="company[company_brief]"
                                                              class="form-control" placeholder="" rows="10"
                                                              data-error="Type your message..."><?php echo  $data_value->company_brief ??null ?></textarea>
                                                </div>
                                                 <div class="col-md-12">
                                                    <!--<h3>Domain and Hosting</h3>-->
                                                    <h4>Is there a goal for length? (Number of words, pages) </h4>
                                                    <input type="text" name="company[company_length]" class="form-control"
                                                           placeholder="" value="<?php echo  $data_value->company_length??null ?>">
                                                </div>
                                                    <div class="col-md-12">
                                                    <!--<h3>Domain and Hosting</h3>-->
                                                    <h4>Define the purpose of this eBook? </h4>
                                                     <textarea id="form_message" name="company[company_purpose]"
                                                              class="form-control" placeholder="" rows="10"
                                                              data-error="Type your message..."><?php echo  $data_value->company_purpose ??null ?></textarea>
                                                </div>
                                                     <div class="col-md-12">
                                                    <!--<h3>Domain and Hosting</h3>-->
                                                    <h4>Who is your target audience / any profile to be specific? </h4>
                                                     <textarea id="form_message" name="company[company_target]"
                                                              class="form-control" placeholder="" rows="10"
                                                              data-error="Type your message..."><?php echo  $data_value->company_target ??null ?></textarea>
                                                </div>
                                                   <div class="col-md-12">
                                                    <!--<h3>Domain and Hosting</h3>-->
                                                    <h4>What will be the writing style? (US or UK) </h4>
                                                    <input type="text" name="company[company_writing_style]" class="form-control"
                                                           placeholder="" value="<?php echo  $data_value->company_writing_style ??null ?>">
                                                </div>
                                                      <div class="col-md-12">
                                                    <!--<h3>Domain and Hosting</h3>-->
                                                    <h4>Competitor’s eBook (three to five) </h4>
                                                    <input type="text" name="company[company_competitor]" class="form-control"
                                                           placeholder="" value="<?php echo  $data_value->company_competitor ??null ?>">
                                                </div>
                                                      <div class="col-md-12">
                                                    <!--<h3>Domain and Hosting</h3>-->
                                                    <h4>Duration of the project  - Share a timeline for your desired eBook </h4>
                                                    <input type="text" name="company[company_duration_time]" class="form-control"
                                                           placeholder="" value="<?php echo  $data_value->company_duration_time ??null ?>">
                                                </div>
                                                         <div class="col-md-12">
                                                    <!--<h3>Domain and Hosting</h3>-->
                                                    <h4>Any other requirements/instructions (CTA’S, Promotional Content, Tone of Writing etc.)? </h4>
                                                     <textarea id="form_message" name="company[company_instruction]"
                                                              class="form-control" placeholder="" rows="10"
                                                              data-error="Type your message..."><?php echo  $data_value->company_instruction ??null ?></textarea>
                                                </div>
                                               

                                                <!-- <div class="col-md-12"> -->
                                                  <!-- Adding Dropzone START -->
                                                  <!-- <h4>Select File (optional), Click or Drop files below box</h4> -->
                                                  <!-- <a href="<?=l($company['company_attachment'])?>" download>Attachment Download</a> -->
                                                  <!-- <div id="myId" class="dropzone" style="margin-bottom:10px;"></div> -->
                                                  <!-- <div class="fallback" class="dropzone">
                                                        <input name="file" type="file" multiple />
                                                    </div> -->
                                                  <!-- Adding Dropzone END -->
                                                    <!-- <div class="submit_btn">
                                                        <label>Select File (optional)</label>
                                                        <input
                                                          id="files"
                                                          type="file"
                                                          name="file[]"
                                                          multiple

                                                        />
                                                    </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"?>