<?php

$reseller_id = $_SESSION['userid'];

if(isset($_POST['sms_custom'])){
    $getCustomSMS = $obj->getSingleData('re_tbl_sms', [
        'where' => [
            ['status', '=', 1],
            ['reseller_id', '=', $reseller_id]
        ]
    ]);
    if($sms){
        $obj->updateData(
                're_tbl_sms',
                ['smsbody' => $_POST['smsbody']],
                [
                    ['status', '=', $_POST['status']],
                    ['reseller_id', '=', $reseller_id]
                ]
            );

    }else{
        $obj->raw_sql("re_tbl_sms", [
            // 'smshead' =>$_POST['smshead'],
            'smsbody' =>$_POST['smsbody'],
            'status' =>$_POST['status'],
            'reseller_id' => $reseller_id
        ]);
    }
    echo '<script>window.location="?page='.$_POST['sms_custom'].'"; </script>';
}
$obj->notificationShow();


$getCustomSMS = $obj->getSingleData('re_tbl_sms', [
    'where' => [
        ['status', '=', 1],
        ['reseller_id', '=', $reseller_id]
    ]
]);
?>