|
Server IP : 2a02:4780:3:1493:0:3736:a38e:7 / Your IP : 216.73.216.60 Web Server : LiteSpeed System : Linux sg-nme-web1393.main-hosting.eu 4.18.0-553.77.1.lve.el8.x86_64 #1 SMP Wed Oct 8 14:21:00 UTC 2025 x86_64 User : u926327694 ( 926327694) PHP Version : 7.4.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : OFF | Python : OFF Directory (0755) : /home/u926327694/domains/smsoft.in/public_html/demo/money/../ |
| [ Home ] | [ C0mmand ] | [ Upload File ] |
|---|
<?php
include("config/dbconnect.php");
$SchoolCode=$_SESSION['code'];
if(isset($_POST['sendWhatsapp_test']))
{
$receiver = $_POST['mno'];
$message = "Hello this is message for whatsapp test message";
if($receiver!="" && strlen($receiver)==10)
{
sendWhatsappWithGlobal($receiver, $message);
echo "<script>alert('Whatsapp test message has been sent.');window.location='send_balance_sms.php';</script>"; exit;
}
else {
echo "<script>alert('Unable to sent whatsapp test message.');window.location='send_balance_sms.php';</script>"; exit;
}
}
if(isset($_POST['btnSaveWhatsappDetails']))
{
$whatsapp_api_url = $_POST['whatsapp_api_url'];
$whatsapp_api_key = $_POST['whatsapp_api_key'];
$whatsapp_type = $_POST['whatsapp_type'];
$whatsapp_instance_id = $_POST['whatsapp_instance_id'];
$page = 'send_balance_sms.php';
if(isset($_POST['page'])){
$page = $_POST['page'];
}
$update_school_details=mysqli_query($con,"UPDATE schools SET whatsapp_api_url='$whatsapp_api_url', whatsapp_api_key='$whatsapp_api_key', whatsapp_instance_id='$whatsapp_instance_id', whatsapp_type='$whatsapp_type' WHERE schoolCode='$SchoolCode'");
if($update_school_details) {
echo'<script> alert("Whatsapp details has been updated."); document.location="'.$page.'"; </script>';
}
else
{
echo'<script> alert("Unable to update whatsapp details."); document.location="'.$page.'"; </script>';
}
}
mysqli_close($con);
?>