File: /var/www/gurumedia_st_usr/data/www/gurumedia.store/frdsp/dp/page/frd-p-sfabapi/frd-dashboard.php
<?php
require_once('frd1_whoami.php');
$FR_ptitle="Steadfast Booking Automation";//PAGE TITLE
$p="$FR_RP";//PAGE NAME
$inn="";
require_once('frd-this-header.php');
require_once('frd1_header.php');
?>
<h2 class="PT"> Steadfast Booking Automation </h2>
<!-- 1 SCRIPT START -->
<section>
<?php
if(isset($_POST['fr_sf_api_key'])){
extract($_POST);
//FRD DATA UPDATE S:-
try{
$FRQ = "UPDATE frd_qapi_steadfast SET
fr_sf_clientid = :fr_sf_clientid,
fr_sf_api_key = :fr_sf_api_key,
fr_sf_secret_key = :fr_sf_secret_key,
fr_sf_def_weight = :fr_sf_def_weight,
fr_sf_def_note = :fr_sf_def_note
WHERE id = 1";
$FRQ = $FR_CONN->prepare("$FRQ");
$FRQ->bindParam(':fr_sf_clientid', $fr_sf_clientid, PDO::PARAM_INT);
$FRQ->bindParam(':fr_sf_api_key', $fr_sf_api_key, PDO::PARAM_STR);
$FRQ->bindParam(':fr_sf_secret_key', $fr_sf_secret_key, PDO::PARAM_STR);
$FRQ->bindParam(':fr_sf_def_weight', $fr_sf_def_weight, PDO::PARAM_INT);
$FRQ->bindParam(':fr_sf_def_note', $fr_sf_def_note, PDO::PARAM_STR);
$FRQ->execute();
FR_SWAL("Dear Boss $UsrName!"," Update Done","success");
FR_GO("$FR_THIS_PAGE","2");
exit;
}catch(PDOException $e){
FR_SWAL("$UsrName Update Failed","","error");
echo "FRD ERROR MESSAGE:" . $e->getMessage() . "<br>";
}
//END>>
}
?>
</section>
<!-- 1 SCRIPT END -->
<section>
<div class="container">
<div class="col-md-11">
<?php if($frplug_api_steadfast == 1){
//FRD SOFTWARE CONFIG TABLE DATA:-
$FRR = FR_QSEL("SELECT * FROM frd_qapi_steadfast WHERE id = 1","");
if($FRR['FRA']==1){
extract($FRR['FRD']);
} else{ ECHO_4($FRR['FRM']); }
//END>>
?>
<div class="row">
<div class="col-md-12 jumbotron">
<form action="" method="POST">
<h2 class="text-center text-danger boldd">SteadFast Booking Automation</h2>
<h4 class='text-center'>Connect Your Website To SteadFast Courier</h4>
<span>Client ID</span><br>
<input class="form-control" type="text" value="<?php echo "$fr_sf_clientid";?>" name="fr_sf_clientid" required>
<br>
<span>API Key</span><br>
<input class="form-control" type="text" value="<?php echo "$fr_sf_api_key";?>" name="fr_sf_api_key" required>
<br>
<span>Secret Key </span><br>
<input class="form-control" type="text" value="<?php echo "$fr_sf_secret_key";?>" name="fr_sf_secret_key" required>
<br>
<span>Default Weight </span><br>
<input class="form-control" type="text" value="<?php echo "$fr_sf_def_weight";?>" name="fr_sf_def_weight" required>
<br>
<span>Default Note </span><br>
<small>[INVO_CUSTOMER_NOTE]</small>
<input class="form-control" type="text" value="<?php echo "$fr_sf_def_note";?>" name="fr_sf_def_note" required>
<div class='text-right mt-10'>
<button type='submit' class='btn btn-success'> <span class='glyphicon glyphicon-save'></span> Save</button>
</div>
</form>
</div>
</div>
<?php } ?>
</div>
</div>
</section>
<?php
require_once('frd-this-footer.php');
require_once('frd1_footer.php');
?>