Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- include "config.php";
- /*$act_msg=$_POST['send_bulk'];
- $msg_kon=$_POST['konf'];
- $nm_group=$_POST['destination'];
- $SQLNm_groups = "SELECT * FROM pbk_groups WHERE ID=$nm_group;";
- $query_Nmgroups = mysql_query($SQLNm_groups)or die('Error');
- $Row=mysql_fetch_array($query_Nmgroups);
- if ($act_msg=="send" and $msg_kon=="y")
- {echo "sms di di kirim ke ";echo $Row['Name'];
- }
- if ($act_msg=="send" and $msg_kon=="n")
- {echo "sms di save";
- }
- if ($msg_kon=="")
- {echo "pilih dulu";
- }
- else if($act_msg=="save")
- {echo "sms akan di save";
- }
- else if($act_msg=="")
- {echo "kosong!";
- }*/
- if (ISSET($_POST['send_bulk']))
- {
- if($_POST['konf']=="" OR $_POST['destination']=="" OR $_POST['body_msg']=="")
- {
- echo"<script>alert('please complete blank field')</script>";
- }else{
- $nm_group=$_POST['destination'];
- //echo "$act_msg<br/>";
- //echo "$msg_kon<br/>";
- //echo "$nm_group<br/>";
- $sms=$_POST['body_msg'];
- $msg_kon=$_POST['konf'];
- $sql2=mysql_query("SELECT * FROM pbk WHERE GroupID='$nm_group'");
- while ($row=mysql_fetch_array($sql2))
- {
- $nohp = $row['Number'];
- $Gname = $row['Name'];
- //echo $row['Number'];
- echo "Sms terkirim $Gname nomor : " .$nohp. " <br/> ";
- $query3 = "INSERT INTO outbox (DestinationNumber, TextDecoded, CreatorID, class) VALUES ('$nohp', '$sms', 'Gammu 1.25.0', 0)";
- //mysql_query($query3);
- $result_Bulk=mysql_query($query3);
- }
- if($result_Bulk>0){
- echo "DONE";
- }else{echo "NOT COMPLATE";}
- }}
- ?>
Advertisement
Add Comment
Please, Sign In to add comment