Skip to content

Commit f8fc8a7

Browse files
author
haxorsprogramming
committed
update
1 parent 7d4310d commit f8fc8a7

File tree

3 files changed

+50
-56
lines changed

3 files changed

+50
-56
lines changed

README.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -110,11 +110,9 @@ password : admin<br/>
110110
Aplikasi ini merupakan project bersama yang dibuat oleh anggota Haxorsprogramming, jika anda tertarik menggunakan aplikasi ini untuk usaha. Anda dapat menggunakannnya secara gratis. Jika perlu bantuan untuk setup, silahkan menghubungi kami di Whatsapp (082272177022). Aplikasi ini juga bebas dikembangkan bagi teman" developer yang tertarik untuk mengembangkannya ..
111111
</p>
112112

113-
<h2>Aplikasi ini sedang akan mendapatkan update besar. Untuk versi sekarang kami sarankan tidak menggunakannya untuk tahap produksi, kami akan informasikan segera jika sudah selesai & bisa digunakan untuk tahap produksi</h2>
114-
115113
Silahkan subs channel Haxors Update di telegram untuk mendapatkan informasi terbaru seputar perkembangan aplikasi" yang sedang di kembangan oleh haxorsprogramming
116114
<h3>https://t.me/haxorsupdate</h3>
117115

118116
<p align='justify'>
119-
Ingin berkontribusi untuk pengembangan club programming ini? bantu kami melalui donasi lewat saweria di <h2><a href='https://saweria.co/donate/haxorsprogramming'>Saweria Haxorsprogramming</a></h2>sedikit banyaknya donasi dapat memberi kontribusi yang positif bagi perkembangan club ini. Terima kasih, salam koding .. ^_^
117+
Ingin berkontribusi untuk pengembangan club programming ini? bantu kami melalui donasi lewat saweria di <h2><a href='https://saweria.co/donate/haxorsprogramming'>Saweria Haxorsprogramming</a></h2>Sedikit banyaknya donasi dapat memberi kontribusi yang positif bagi perkembangan club ini. Terima kasih, salam koding .. ^_^
120118
</p>

engine/core/route.php

Lines changed: 47 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
<?php
22
session_start();
33
date_default_timezone_set("Asia/Jakarta");
4-
54
//import library php mailer (untuk mengirimkan email)
65
use PHPMailer\PHPMailer\PHPMailer;
76
use PHPMailer\PHPMailer\Exception;
@@ -10,17 +9,17 @@
109
require_once 'lib/phpmailer/library/OAuth.php';
1110
require_once 'lib/phpmailer/library/POP3.php';
1211
require_once 'lib/phpmailer/library/SMTP.php';
13-
1412
//import library aws (untuk kebutuhan serverless)
1513
require 'lib/aws-master/src/Aws.php';
14+
//import library firebase (coming soon)
1615

1716
class Route{
18-
17+
//fungsi bind (memasukkan view ke dalam controller)
1918
public function bind($blade, $data = [])
2019
{
2120
require_once 'engine/bind/'.$blade.'.bind.php';
2221
}
23-
22+
//fungsi state (memasukkan model ke dalam controller)
2423
public function state($state)
2524
{
2625
require_once 'engine/state/'.$state.'.state.php';
@@ -122,9 +121,9 @@ public function goto($page)
122121
public function emck($email)
123122
{
124123
if (filter_var($email, FILTER_VALIDATE_EMAIL)) {
125-
echo("true");
124+
return true;
126125
} else {
127-
echo("false");
126+
return false;
128127
}
129128
}
130129
//fungsi untuk cek sesi
@@ -176,20 +175,20 @@ public function ambilHari($bulan)
176175
$tahun = date('Y');
177176
return cal_days_in_month(CAL_GREGORIAN,$bulan,2019);
178177
}
179-
178+
//array bulan normal
180179
public function getListBulanInt()
181180
{
182181
$dataList = ['01','02','03','04','05','06','07','08','09','10','11','12'];
183182
return $dataList;
184183
}
185-
184+
//fungsi untuk merubah desimal angka ke tanggal
186185
public function getTanggalBedaDigit($tanggal)
187186
{
188187
$dataList = ['00','01','02','03','04','05','06','07','08','09','10','11','12','13','14','15','16','17','18','19','20','21','22','23','24','25','26','27','28','29','30','31','32','33','34'];
189188
$dataSend = $dataList[$tanggal];
190189
return $dataSend;
191190
}
192-
191+
//conversi bulan angka ke huruf
193192
public function bulanIndo($bulan)
194193
{
195194
switch ($bulan){
@@ -231,7 +230,7 @@ public function bulanIndo($bulan)
231230
break;
232231
}
233232
}
234-
233+
//konversi bulan huruf ke angka
235234
public function bulanToInt($bulan)
236235
{
237236
switch ($bulan){
@@ -261,26 +260,25 @@ public function bulanToInt($bulan)
261260
return '12';
262261
}
263262
}
264-
263+
//fungsi kirim email
265264
public function kirimEmail($nama,$penerima,$judul,$isi,$emailHost,$passwordHost)
266265
{
267266
$mail = new PHPMailer(false);
268-
// Passing `true` enables exceptions
269267
try {
270268
//Server settings
271-
$mail->SMTPDebug = 0; // Enable verbose debug output
272-
$mail->isSMTP(); // Set mailer to use SMTP
273-
$mail->Host = 'smtp.gmail.com'; // Specify main and backup SMTP servers
269+
$mail->SMTPDebug = 0; // Enable verbose debug output
270+
$mail->isSMTP(); // Set mailer to use SMTP
271+
$mail->Host = 'smtp.gmail.com'; // Specify main and backup SMTP servers
274272
$mail->SMTPAuth = true; // Enable SMTP authentication
275-
$mail->Username = $emailHost; // SMTP username
276-
$mail->Password = $passwordHost; // SMTP password
277-
$mail->SMTPSecure = 'tls'; // Enable TLS encryption, `ssl` also accepted
278-
$mail->Port = 587; // TCP port to connect to
273+
$mail->Username = $emailHost; // SMTP username
274+
$mail->Password = $passwordHost; // SMTP password
275+
$mail->SMTPSecure = 'tls'; // Enable TLS encryption, `ssl` also accepted
276+
$mail->Port = 587; // TCP port to connect to
279277
//Recipients
280278
$mail->setFrom($emailHost, 'Haxors Uinsu');
281-
$mail->addAddress($penerima, $nama); // Add a recipient
279+
$mail->addAddress($penerima, $nama); // Add a recipient
282280
//Content
283-
$mail->isHTML(true); // Set email format to HTML
281+
$mail->isHTML(true); // Set email format to HTML
284282
$mail->Subject = $judul;
285283
$mail->Body = $isi;
286284
$mail->AltBody = $isi;
@@ -291,7 +289,7 @@ public function kirimEmail($nama,$penerima,$judul,$isi,$emailHost,$passwordHost)
291289
return 'error';
292290
}
293291
}
294-
//xss filter data
292+
//fungsi xss filter data
295293
public function xss_filter($data)
296294
{
297295
// Fix &entity\n;
@@ -323,12 +321,35 @@ public function xss_filter($data)
323321
$data = preg_replace('#</*(?:applet|b(?:ase|gsound|link)|embed|frame(?:set)?|i(?:frame|layer)|l(?:ayer|ink)|meta|object|s(?:cript|tyle)|title|xml)[^>]*+>#i', '', $data);
324322
}
325323
while ($old_data !== $data);
326-
327324
// we are done...
328325
return $data;
329326
}
330327
//send notifikasi cucian selesai
331-
public function cucianSelesaiNotif($message, $phone_no, $apiKey){
328+
public function cucianSelesaiNotif($message, $phone_no, $apiKey){
329+
$message = preg_replace( "/(\n)/", "<ENTER>", $message );
330+
$message = preg_replace( "/(\r)/", "<ENTER>", $message );
331+
332+
$phone_no = preg_replace( "/(\n)/", ",", $phone_no );
333+
$phone_no = preg_replace( "/(\r)/", "", $phone_no );
334+
335+
$data = array("phone_no" => $phone_no, "key" => $apiKey, "message" => $message);
336+
$data_string = json_encode($data);
337+
$ch = curl_init('http://116.203.92.59/api/send_message');
338+
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
339+
curl_setopt($ch, CURLOPT_POSTFIELDS, $data_string);
340+
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
341+
curl_setopt($ch, CURLOPT_VERBOSE, 0);
342+
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 0);
343+
curl_setopt($ch, CURLOPT_TIMEOUT, 15);
344+
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
345+
'Content-Type: application/json',
346+
'Content-Length: ' . strlen($data_string))
347+
);
348+
$result = curl_exec($ch);
349+
}
350+
//fungsi broadcast pesan
351+
public function broadcastPesan($message, $phone_no, $apiKey)
352+
{
332353
$message = preg_replace( "/(\n)/", "<ENTER>", $message );
333354
$message = preg_replace( "/(\r)/", "<ENTER>", $message );
334355

@@ -349,31 +370,6 @@ public function cucianSelesaiNotif($message, $phone_no, $apiKey){
349370
'Content-Length: ' . strlen($data_string))
350371
);
351372
$result = curl_exec($ch);
352-
}
353-
354-
public function broadcastPesan($message, $phone_no, $apiKey)
355-
{
356-
$message = preg_replace( "/(\n)/", "<ENTER>", $message );
357-
$message = preg_replace( "/(\r)/", "<ENTER>", $message );
358-
359-
$phone_no = preg_replace( "/(\n)/", ",", $phone_no );
360-
$phone_no = preg_replace( "/(\r)/", "", $phone_no );
361-
362-
$data = array("phone_no" => $phone_no, "key" => $apiKey, "message" => $message);
363-
$data_string = json_encode($data);
364-
$ch = curl_init('http://116.203.92.59/api/send_message');
365-
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
366-
curl_setopt($ch, CURLOPT_POSTFIELDS, $data_string);
367-
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
368-
curl_setopt($ch, CURLOPT_VERBOSE, 0);
369-
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 0);
370-
curl_setopt($ch, CURLOPT_TIMEOUT, 15);
371-
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
372-
'Content-Type: application/json',
373-
'Content-Length: ' . strlen($data_string))
374-
);
375-
$result = curl_exec($ch);
376-
}
377-
373+
}
378374

379-
}
375+
}

index.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* Small, Fast, & Secure Web Framework
55
* Based on PHP
66
* Special thanks to
7-
* Bapak Sandika Galih (Web Programmign Unpas)
7+
* Bapak Sandhika Galih (Web Programming Unpas)
88
*
99
* Thanks for support
1010
* Muhammad Ikhsan, ST. M.Kom (Pembina Haxors Programming Club)
@@ -46,4 +46,4 @@ function __construct(){
4646
/**
4747
* Instance new props to global & stack the function
4848
*/
49-
$props = new Props;
49+
$props = new Props;

0 commit comments

Comments
 (0)