Find this useful? Enter your email to receive occasional updates for securing PHP code.
Signing you up...
Thank you for signing up!
PHP Decode
@extends('layouts.app') @section('title', __('Whatsapp')) @section('content') <..
Decoded Output download
<style>
body{margin-top: 100px}
.button {
background-color: #04AA6D;
border: none;
border-radius: 10px;
color: white;
padding: 15px 32px;
text-align: center;
text-decoration: none;
display: inline-block;
font-size: 16px;
margin: 40px 2px;
cursor: pointer;
}
</style>
Did this file decode correctly?
Original Code
@extends('layouts.app')
@section('title', __('Whatsapp'))
@section('content')
<div class="page-heading">
<div class="page-title">
<div class="row">
<div class="col-12 col-md-8 order-md-1 order-last">
<h3>{{ __('Whatsapp') }}</h3>
<p class="text-subtitle text-muted">
{{ __('Scan Whatsapp.') }}
</p>
</div>
<x-breadcrumb>
<li class="breadcrumb-item">
<a href="/dashboard">{{ __('Dashboard') }}</a>
</li>
<li class="breadcrumb-item active" aria-current="page">
{{ __('Whatsapp') }}
</li>
</x-breadcrumb>
</div>
</div>
<section class="section">
<div class="row">
<div class="col-md-4">
<div class="card">
<div class="card-body">
<form action="{{ route('whatsapps.index') }}" method="GET">
<div class="row mb-2">
<div class="col-md-12">
<div class="form-group">
<label for="filter-bulan">{{ __('No WA adalah No Perusahaan') }}</label>
<input type="text" name="filter-bulan" id="filter-bulan" class="form-control"
value="{{ $no_wa }}" placeholder="{{ __('No WA') }}"
readonly />
</div>
<div class="form-group">
<label for="filter-bulan">{{ __('Api Key Whatsapp Gateway') }}</label>
<input type="text" name="filter-bulan" id="filter-bulan" class="form-control"
value="{{ $api_key }}" placeholder="{{ __('api_key') }}"
readonly />
</div>
</div>
</div>
</form>
</div>
</div>
</div>
<div class="col-md-8">
<div class="card">
<div class="card-body">
<div class="row" id="whatsapp">
<!-- Tombol untuk menampilkan modal -->
<script src="https://code.jquery.com/jquery-3.7.1.min.js"></script>
<script>
$(document).ready(function () {
setInterval( function() {
$("#whatsapp").load(location.href + " #whatsapp");
}, 5000 );
});
</script>
<?php
echo'<style>
body{margin-top: 100px}
.button {
background-color: #04AA6D;
border: none;
border-radius: 10px;
color: white;
padding: 15px 32px;
text-align: center;
text-decoration: none;
display: inline-block;
font-size: 16px;
margin: 40px 2px;
cursor: pointer;
}
</style>';
$waGateway = getCompany();
$no_wa = $waGateway->no_wa;
$apikey = $waGateway->api_key_wa_gateway;
$logo = $waGateway->logo;
$device = $no_wa; //'{{ $no_wa }}';
$data = array(
"api_key" => $apikey, //"pd7i6RXB5jYghEisBCjwc2WWO7Vbbqd5",
"device" => $device,
"force" => true,
);
$url =config('app.url');
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://wame.delitech.id/generate-qr", /*"https://wazapp.aviantech.net/generate-qr",*/
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS => json_encode($data),
CURLOPT_HTTPHEADER => array(
'Content-Type: application/json'
),
));
$response = curl_exec($curl);
curl_close($curl);
// Dekode respons JSON
$result = json_decode($response, true);
//echo $response;
echo "<center>";
// check response
if(isset($result['status']) && $result['status'] == false) {
// QR code failed to generate, display error message
if(isset($result['qrcode']) && $result['qrcode']!=''){
$qrCodeDataURI = $result['qrcode'];
echo '<img src="' . $qrCodeDataURI . '" alt="QR Code" width="300">';
echo '<img src="'.$url.'/storage/uploads/logos/'.$logo.'" width="48" style="margin-left:-175px;margin-top:130px ;position:absolute">';
echo "<div align='center'>";
echo '<br>1.Buka Whatsapp di telpon Anda';
echo '<br>2.Ketuk <b>Menu</b> di Android, atau <b>Pengaturan</b> di Iphone';
echo '<br>3.Ketuk <b>Perangkat tertaut</b> lalu <b>Tautkan perangkat</b>';
echo '<br>4.Arahkan telepon Anda di layar ini untuk memindai kode QR';
//echo '<meta http-equiv="refresh" content="10">';
} else {
//echo $result['msg'];
echo '<img src="https://mikcloud.me/storage/uploads/logos/wa.gif" alt="QR Code" width="300">';
//echo '<a href="https://mikcloud.me/logout.php"> LOGOUT </a>';
}
} else {
// Change response status to true
// QR code generated successfully, get QR code image data
// echo $result['status'];
echo '<img src="'.$url.'/storage/uploads/logos/'.$logo.'" alt="QR Code" title="Terhubung" width="250">';
echo '<br>';
echo '<h3 class="text-primary">Terhubung</h3>';
// Display the QR code image in HTML using the <img> tag
//echo "Failed to generate QR code: " . $result['message'];
//echo '<br>';
echo '<a href="#" data-bs-toggle="modal" data-bs-target="#myModal" class="button"> LOGOUT </a>';
}
echo "<center>";
if(isset($_GET['aksi'])&& $_GET ['aksi']=='logout'){
if(isset($_GET['device'])&& $_GET['device']!=''){
$sender = $_GET['device'];
}else{
$sender = '';
}
$waGateway = getCompany();
$apikey = $waGateway->api_key_wa_gateway;
$data = array(
"api_key" => $apikey, //"pd7i6RXB5jYghEisBCjwc2WWO7Vbbqd5",
"sender" => $sender,
);
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://wame.delitech.id/logout-device", /*"https://wazapp.aviantech.net/generate-qr",*/
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS => json_encode($data),
CURLOPT_HTTPHEADER => array(
'Content-Type: application/json'
),
));
$response = curl_exec($curl);
curl_close($curl);
// Dekode respons JSON
$result = json_decode($response, true);
}
?>
<div class="modal fade" id="myModal" tabindex="-1" aria-labelledby="exampleModalLabel"
aria-hidden="true">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="exampleModalLabel">Apakah anda ingin keluar ?</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal"
aria-label="Close"></button>
</div>
<div class="modal-body">
</div>
<div class="modal-footer">
<a href="{{ config('app.url') }}/whatsapps/logout/{{ $no_wa }}" class="btn btn-danger btn-sm">Ya</a>
<button type="button" class="btn btn-secondary"
data-bs-dismiss="modal">Tidak</button>
</div>
</div>
</div>
</div>
</div>
</section>
</div>
@endsection
Function Calls
getCompany | 1 |
Stats
MD5 | c4479842972df3c918ee36e574cbc8d0 |
Eval Count | 0 |
Decode Time | 80 ms |