This commit is contained in:
2022-05-30 08:59:05 -04:00
parent 30f19d771d
commit cd8afaf1b1
4 changed files with 82 additions and 52 deletions
+8 -8
View File
@@ -1132,13 +1132,13 @@ class Member extends Users_Controller {
if ($_POST) { if ($_POST) {
$in = [];
//$email = $this->input->post('email'); //$email = $this->input->post('email');
// $firstname = $this->input->post('firstname'); // $firstname = $this->input->post('firstname');
// $lastname = $this->input->post('lastname'); // $lastname = $this->input->post('lastname');
$your_message = $this->input->post('msg'); $your_message = $this->input->post('msg');
$data['firstname'] = $_SESSION['firstname']; // $firstname; $in['firstname'] = $_SESSION['firstname']; // $firstname;
$data['lastname'] = $_SESSION['lastname']; // $lastname; $in['lastname'] = $_SESSION['lastname']; // $lastname;
// if ($firstname == '' || $lastname == '') { // if ($firstname == '' || $lastname == '') {
// $message = 'Both first and last name are required'; // $message = 'Both first and last name are required';
// } // }
@@ -1152,14 +1152,14 @@ class Member extends Users_Controller {
// } // }
if ($message == '') { if ($message == '') {
$data['email'] = $_SESSION['email']; // $email; $in['email'] = $_SESSION['email']; // $email;
$data['your_message'] = $your_message; $in['your_message'] = $your_message;
$data['loc'] = $_SERVER['REMOTE_ADDR']; //'38.101.241.200'; $in['loc'] = $_SERVER['REMOTE_ADDR']; //'38.101.241.200';
$data['action'] = WRENCHBOARD_SEND_CONTACTUS; $in['action'] = WRENCHBOARD_SEND_CONTACTUS;
$this->load->model('backend_model'); $this->load->model('backend_model');
$out = array(); $out = array();
$res = $this->backend_model->wrenchboard_api($data, $out); $res = $this->backend_model->wrenchboard_api($in, $out);
$message = "Your message was sent"; $message = "Your message was sent";
$email = $firstname = $lastname = $your_message = ""; $email = $firstname = $lastname = $your_message = "";
} else { } else {
+6 -14
View File
@@ -5,32 +5,29 @@
<div class="col-xl-6"> <div class="col-xl-6">
<!--begin::Tables Widget 3--> <!--begin::Tables Widget 3-->
<div class="card card-xl-stretch mb-5 mb-xl-8">
<!--begin::Order details-->
<div class="card card-flush py-4 flex-row-fluid">
<!--begin::Card header--> <!--begin::Card header-->
<div class="card-header"> <div class="card-header">
<div class="card-title"> <div class="card-title">
<h2>Add Credit to your Account </h2> <h2>Add Credit with Account Deposit </h2>
</div> </div>
</div> </div>
<!--end::Card header--> <!--end::Card header-->
<!--begin::Card body--> <!--begin::Card body-->
<div class="card-body pt-0"> <div class="card-body pt-0">
<div class="table-responsive"> <div class="table-responsive">
<!--begin::Table--> <h4> Transfer fund to WrenchBoard GTB Account 0250869867 </h4>
<?php echo $txt_detail; ?> <br>
<!--end::Table--> Make sure you add your account username in the notes part of the transfer for prompt processing. When the transfer is complete notify here <a href='/member/support'>Contact us </a>
</div> </div>
</div> </div>
<!--end::Card body--> <!--end::Card body-->
</div> </div>
<!--end::Order details-->
<!--end::Tables Widget 3--> <!--end::Tables Widget 3-->
</div> </div>
<!--end::Col--> <!--end::Col-->
<!--begin::Col-->
<div class="col-xl-6"> <div class="col-xl-6">
<!--begin::Table Widget 8--> <!--begin::Table Widget 8-->
<div class="card card-xl-stretch mb-5 mb-xl-8"> <div class="card card-xl-stretch mb-5 mb-xl-8">
@@ -95,8 +92,6 @@
<?php <?php
} }
?> ?>
</tbody> </tbody>
<!--end::Table body--> <!--end::Table body-->
</table> </table>
@@ -111,11 +106,8 @@
</div> </div>
<!--end::Body--> <!--end::Body-->
</div> </div>
<!--end::Tables Widget 8-->
</div> </div>
<!--end::Col-->
</div> </div>
<!--end::Row-->
+50 -26
View File
@@ -2,7 +2,7 @@
<?php include('common/userstrip.php'); ?> <?php include('common/userstrip.php'); ?>
<!--begin::Row--> <!--begin::Row-->
<div class="row g-5 g-xl-8"> <div class="row g-5 g-xl-8">
<div class="col-xl-12"> <div class="col-xl-8">
<!--begin::Charts Widget 1--> <!--begin::Charts Widget 1-->
<div class="card card-xl-stretch mb-5 mb-xl-8"> <div class="card card-xl-stretch mb-5 mb-xl-8">
<!--begin::Header--> <!--begin::Header-->
@@ -58,36 +58,40 @@
// --> // -->
</script> </script>
<div class="panel-body">
<div class="row">
<div class="col-md-10 col-md-offset-1">
<?= $message ?>
<div class="form-group">
<label class="col-lg-3 control-label">My Email:</label>
<div class="col-lg-9">
<input type="text" class="form-control" name='email' placeholder="Email" value="<?= $email ?>" readonly>
</div>
</div>
<div class="form-group">
<label class="col-lg-3 control-label">Your message<br>[max 500]:</label>
<div class="col-lg-9">
<textarea rows="5" cols="5" class="form-control" name="msg" placeholder="Enter your message here" onkeydown="textCounter(this.form.msg, this.form.remLen, 500);" onkeyup="textCounter(this.form.msg, this.form.remLen, 500);"><?= $msg ?></textarea>
<input type="text" class="form-control" name="remLen" value="<?= (500 - strlen($msg)) ?>" placeholder="0" style='width: 50px;' readonly>
</div>
</div>
<div class="text-right">
<button type="submit" class="btn btn-primary">Send Message <i class="icon-arrow-right14 position-right"></i></button>
</div>
</div>
</div> <!-- h1 class="fw-bolder text-dark mb-9">Send Us Email</h1 -->
<?= $message ?>
<!--begin::Input group-->
<div class="d-flex flex-column mb-5 fv-row">
<!--begin::Label-->
<label class="fs-5 fw-bold mb-2">My email</label>
<!--end::Label-->
<!--begin::Input-->
<input class="form-control form-control-solid" placeholder="Email" value="<?= $email ?>" readonly>
<!--end::Input-->
</div> </div>
<!--end::Input group-->
<!--begin::Input group -->
<div class="d-flex flex-column mb-10 fv-row">
<label class="fs-6 fw-bold mb-2">Your message<br>[max 500]:</label>
<textarea class="form-control form-control-solid" rows="6" name="msg" placeholder="Enter your message here" onkeydown="textCounter(this.form.msg, this.form.remLen, 500);" onkeyup="textCounter(this.form.msg, this.form.remLen, 500);"><?= $msg ?></textarea>
<input type="text" class="form-control" name="remLen" value="<?= (500 - strlen($msg)) ?>" placeholder="0" style='width: 100px;' readonly>
</div>
<!--end::Input group-->
<!--begin::Submit-->
<button type="submit" class="btn btn-primary" id="kt_contact_submit_button">
<!--begin::Indicator-->
<span class="indicator-label">Send Message </span>
<!--end::Indicator-->
</button>
<!--end::Submit-->
</form> </form>
<!--end::Form-->
</div> </div>
<!--end::Table--> <!--end::Table-->
</div> </div>
@@ -98,5 +102,25 @@
</div> </div>
<!--end::Charts Widget 1--> <!--end::Charts Widget 1-->
</div> </div>
<div class="col-xl-4">
<div class="card card-xl-stretch mb-5 mb-xl-8">
<!--begin::Card header-->
<div class="card-header">
<div class="card-title">
<h2>. </h2>
</div>
</div>
<!--end::Card header-->
<!--begin::Card body-->
<div class="card-body pt-0">
<div class="table-responsive">
<h4> .</h4>
<br>
.
</div>
</div>
</div>
</div>
</div> </div>
<!--end::Row--> <!--end::Row-->
+18 -4
View File
@@ -30,10 +30,13 @@ $endpoints = array(
'getpendingjobs' => array('POST'), 'getpendingjobs' => array('POST'),
'taskmessage' => array('POST'), 'taskmessage' => array('POST'),
'sendtaskmessage' => array('POST'), 'sendtaskmessage' => array('POST'),
'getwallets' => array('POST') 'getwallets' => array('POST'),
'sitecontact' => array('POST')
); );
$call_backend = true; // sometimes we need to overwite the call to the extenstion API
$local_out = []; // use local out to send output when the result is not from the extenstion
$ret = -1;
/* /*
header("Access-Control-Allow-Origin: *"); header("Access-Control-Allow-Origin: *");
@@ -91,6 +94,10 @@ if ($_SERVER["REQUEST_METHOD"] == "GET") {
} }
$in["loc"] = $_SERVER["REMOTE_ADDR"]; $in["loc"] = $_SERVER["REMOTE_ADDR"];
switch ($endpoint) { switch ($endpoint) {
case 'sitecontact':
$local_out = ['result'=>'100','msg'=>'Recieved'];
$call_backend = false;
break;
case 'generics': case 'generics':
case 'apigate': case 'apigate':
//$in["action"] = WRENCHBOARD_ACCOUNT_LOGIN; //$in["action"] = WRENCHBOARD_ACCOUNT_LOGIN;
@@ -179,8 +186,15 @@ $in["pid"] = 100;
//file_put_contents("in_debug.log", $in); // DEBUG //file_put_contents("in_debug.log", $in); // DEBUG
$out = array(); $out = array();
$ret = $wrenchboard->wrenchboard_api($in, $out); if ( $call_backend == true){
$out['internal_return'] = $ret; // this is reserved array parameter - to be caprured and reoved before you use the out array() $ret = $wrenchboard->wrenchboard_api($in, $out);
$out['internal_return'] = $ret; // this is reserved array parameter - to be caprured and reoved before you use the out array()
}
else
{
$out = $local_out;
}
header("HTTP/1.1 200 OK"); header("HTTP/1.1 200 OK");
header("Status: 200 OK"); header("Status: 200 OK");