<?php
$FormID = isset($_REQUEST['form']) ? $_REQUEST['form'] : 0;
if($viewpage == 1){ //VIEW MODE
	
}else{ //ADD-EDIT MODE
$_SESSION['csrftoken'] = md5(uniqid(mt_rand(), true));
 ?>
 
    <div class="row">
    <div class="col-md-12">
    	<label class="col-md-4 control-label"></label>
    	 <input  type="hidden" value="<?php echo $editID?>" name="editID" /><br/>
    	 <input  type="submit" name="saveButton" id="SaveUpdate"  value="Generate PDF" class="btn btn-primary" onclick="generatePDF();return false;">
    	 <a href="<?php echo $_SERVER['PHP_SELF']."?form=$FormID"; ?>" class="btn btn-secondary">CLEAR</a>
    	 <!-- <a href="<?php echo $_SERVER['PHP_SELF']."?view=1&form=$FormID"; ?>" class="btn btn-tertiary">CANCEL</a> -->
		 <?php 
		 	// if(isset($isPreview) == 1){ ?>
				<!-- <a href="<?php echo $_SERVER['PHP_SELF']."?view=1&form=$FormID"; ?>" id="backButton" class="btn btn-primary">Back</a> -->
				
				<!-- <a href="<?php echo $_SERVER['PHP_SELF']."?form=$FormID&edit=$editID"; ?>" id="previewEditButton" class="btn btn-primary">EDIT</a> -->
				
				<!-- <a href="<?php echo $_SERVER['PHP_SELF']."?form=$FormID&delID=$editID"; ?>" id="previewDeleteButton" class="btn btn-primary">DELETE</a> -->

		 <?php //} ?>
    	 <input type="hidden" name="csrftoken" value="<?php echo $_SESSION['csrftoken'] ?? '' ?>">

    </div>
    </div>
</form>
<?php } ?>
	</div>
	<div id="pdfviewer"></div>
</section>
<!-- end: page -->
<?php	
	$k_footer_before = '';
	//if(is_resource($connect)) mysql_close($connect);
	include "k_files/k_footer.php";
?>