
<?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);


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

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

$conn->close();


?>


<style>
    .logoimg img {
   display: none;
}
.reserve_form {
    padding: 0 0;
}
.allYourSec h1 {
    color: #3e8fc9;
    text-transform: capitalize;
}
</style>
<body>
	<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> PUBLISHING Questionnaire</h1>

                                <!--<p>Please take your time and answer ALL of the questions. Application design and development is-->
                                <!--    a collaborative process and needs your involvement in all stages.</p>-->
                            </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-12">
                                            <div class="panel-heading">
                                                <h4 class="panel-title">
                                                    Publishing Details Required</h4><br>
                                            </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>OFFICIAL AUTHOR NAME<p class="text-danger">*</p></label>
                                                            <input type="text" name="company[company_author_name]" class="form-control"
                                                                   placeholder=""
                                                                   value="<?php echo $data_value->company_author_name??null; ?>">
                                                        </div>
                                                    </div>
                                                    <div class="col-md-6">
                                                        <div class="form-group">
                                                            <label>OFFICIAL BOOK NAME <p class="text-danger">*</p></label>
                                                            <input type="text" name="company[company_book_name]" class="form-control"
                                                                   placeholder=""
                                                                   value="<?php echo $data_value->company_book_name??null; ?>">
                                                        </div>
                                                    </div>
                                                </div>
                                                <div class="row">
                                                        <div class="col-md-12">
                                                   
                                                    <h4>Official Author Description: (About the Author) </h4>
                                                     <textarea id="form_message" name="company[company_description]"
                                                              class="form-control" placeholder="" rows="10"
                                                              data-error="Type your message..."><?php echo $data_value->company_description??null; ?></textarea>
                                                </div>
                                                </div>
                                                <div class="row">
                                                        <div class="col-md-12">
                                                   
                                                    <h4>Product Description: (About the Book) </h4>
                                                     <textarea id="form_message" name="company[company_product_description]"
                                                              class="form-control" placeholder="" rows="10"
                                                              data-error="Type your message..."><?php echo $data_value->company_product_description??null; ?></textarea>
                                                </div>
                                                </div>
                                                <div class="row">
                                                    <div class="col-md-12">
                                                        
                                                        <div class="form-group">
                                                            <label>ISBN (With Imprint):  <p class="text-danger">*</p></label>
                                                            <input type="text" name="company[company_isbn]" class="form-control"
                                                                   placeholder=""
                                                                   value="<?php echo $data_value->company_isbn??null; ?>">
                                                        </div>
                                                  
                                                    </div>
                                                </div>
                                                <div class="row">
                                                    <div class="col-md-12">
                                                        
                                                        <div class="form-group">
                                                            <label>KEYWORDS:  <p class="text-danger">*</p></label>
                                                            <input type="text" name="company[company_keywords]" class="form-control"
                                                                   placeholder=""
                                                                   value="<?php echo $data_value->company_keywords??null; ?>">
                                                        </div>
                                                  
                                                    </div>
                                                </div>
                                                <div class="row">
                                                    <div class="col-md-12">
                                                        
                                                        <div class="form-group">
                                                            <label>GENRE:  <p class="text-danger">*</p></label>
                                                            <input type="text" name="company[company_genre]" class="form-control"
                                                                   placeholder=""
                                                                   value="<?php echo $data_value->company_genre??null; ?>">
                                                        </div>
                                                  
                                                    </div>
                                                </div>
                                           
                                                
                                            </div>
                                        </div>
                                    </div>
                                </div>
                               
                              
                              
                               
                                <div class="panel panel-default">
                                    <div class="panel-heading">
                                        <h4 class="panel-title">
                                             Personal Details
                                        </h4>
                                    </div>
                                    <div id="collapse5" class="panel-collapse collapse in">
                                        <div class="panel-body">
                                  
                                            <div class="row">
                                                <div class="col-md-12">
                                                    <!--<h3>Domain and Hosting</h3>-->
                                                    <h4>Email Address  </h4>
                                                    <input type="email" name="company[company_email]" class="form-control"
                                                           placeholder="" value="<?php echo $data_value->company_genre??null; ?>">
                                                </div>
                                                <div class="col-md-12">
                                                    <!--<h3>Domain and Hosting</h3>-->
                                                    <h4>Password: </h4>
                                                    <input type="text" name="company[company_Password]" class="form-control"
                                                           placeholder="" value="<?php echo $data_value->company_Password??null; ?>">
                                                </div>
                                                   <div class="col-md-12">
                                                    <!--<h3>Domain and Hosting</h3>-->
                                                    <h4>Complete Name: </h4>
                                                   <input type="text" name="company[company_name]" class="form-control"
                                                           placeholder="" value="<?php echo $data_value->company_name??null; ?>">
                                                </div>
                                                 <div class="col-md-12">
                                                    <!--<h3>Domain and Hosting</h3>-->
                                                    <h4>Complete Address (No Abbreviations): </h4>
                                                    <input type="text" name="company[company_address]" class="form-control"
                                                           placeholder="" value="<?php echo $data_value->company_address??null; ?>">
                                                </div>
                                                    <div class="col-md-12">
                                                    <!--<h3>Domain and Hosting</h3>-->
                                                    <h4>Active Phone Number:</h4>
                                                      <input type="tel" name="company[company_phone]" class="form-control"
                                                           placeholder="" value="<?php echo $data_value->company_phone??null; ?>">
                                                </div>
                                                     
                                                  
                                                   
                                                
                                                        
                                  
                                            </div>
                                     
                                        </div>
                                    </div>
                                </div>
                                
                                
                                  <div class="panel panel-default">
                                    <div class="panel-heading">
                                        <h4 class="panel-title">
                                             Account Details (In order to receive Royalties)
                                        </h4>
                                    </div>
                                    <div id="collapse5" class="panel-collapse collapse in">
                                        <div class="panel-body">
                                  
                                            <div class="row">
                                                <div class="col-md-12">
                                                    <!--<h3>Domain and Hosting</h3>-->
                                                    <h4>Social Security Number:  </h4>
                                                    <input type="text" name="company[company_security_number]" class="form-control"
                                                           placeholder="" value="<?php echo $data_value->company_security_number??null; ?>">
                                                </div>
                                                <div class="col-md-12">
                                                    <!--<h3>Domain and Hosting</h3>-->
                                                    <h4>Bank Account Holder Name (Exact name as mentioned in the bank): </h4>
                                                   <textarea id="form_message" name="company[company_account]"
                                                              class="form-control" placeholder="" rows="10"
                                                              data-error="Type your message..."><?php echo $data_value->company_account??null; ?></textarea>
                                                </div>
                                                   <div class="col-md-12">
                                                    <!--<h3>Domain and Hosting</h3>-->
                                                    <h4>Account type Checking or Savings): </h4>
                                                   <input type="text" name="company[company_type]" class="form-control"
                                                           placeholder="" value="<?php echo $data_value->company_type??null; ?>">
                                                </div>
                                                 <div class="col-md-12">
                                                    <!--<h3>Domain and Hosting</h3>-->
                                                    <h4>Account Number: </h4>
                                                    <input type="text" name="company[company_account_number]" class="form-control"
                                                           placeholder="" value="<?php echo $data_value->company_account_number??null; ?>">
                                                </div>
                                                    <div class="col-md-12">
                                                    <!--<h3>Domain and Hosting</h3>-->
                                                    <h4>Routing Number:</h4>
                                                      <input type="text" name="company[company_bank_name]" class="form-control"
                                                           placeholder="" value="<?php echo $data_value->company_bank_name??null; ?>">
                                                </div>
                                                
                                                 <div class="col-md-12">
                                                    <!--<h3>Domain and Hosting</h3>-->
                                                    <h4>Full Name (As shown in the tax return)</h4>
                                                      <input type="text" name="company[company_full_name]" class="form-control"
                                                           placeholder="" value="<?php echo $data_value->company_full_name??null; ?>">
                                                </div>
                                                     
                                                  
                                                   
                                                
                                                        
                                  
                                            </div>
                                            <div class="row">
                                                

												<div class="col-md-12">
												  <!-- Adding Dropzone START -->
												   <div class="attachmenttext">
												  <h4>Download</h4>
												   
                                                   <?php 
                                                  $data_img = json_decode($return['company_attachment']);
                                                  foreach($data_img as  $key => $value){ ?>
                                                 
                                                 <a href="./images/uploads/<?php echo $value; ?>" download>Attachment Download</a>
                                                
                                            
                                               <?php } ?>
                                                </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' ?>