mqnoy

wew php

Apr 21st, 2014
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.63 KB | None | 0 0
  1. <?php
  2. include "config.php";
  3. /*$act_msg=$_POST['send_bulk'];
  4. $msg_kon=$_POST['konf'];
  5. $nm_group=$_POST['destination'];
  6. $SQLNm_groups = "SELECT * FROM pbk_groups WHERE ID=$nm_group;";
  7. $query_Nmgroups = mysql_query($SQLNm_groups)or die('Error');
  8. $Row=mysql_fetch_array($query_Nmgroups);
  9.  
  10.  
  11.                         if ($act_msg=="send" and $msg_kon=="y")
  12.         {echo "sms di di kirim ke ";echo $Row['Name'];
  13.                                             }
  14.                         if ($act_msg=="send" and $msg_kon=="n")
  15.         {echo "sms di save";
  16.                                             }
  17.                         if ($msg_kon=="")
  18.         {echo "pilih dulu";
  19.                                             }
  20.                         else if($act_msg=="save")
  21.         {echo "sms akan di save";
  22.                                             }
  23.                         else if($act_msg=="")
  24.         {echo "kosong!";
  25.                                             }*/
  26.    
  27.    
  28. if (ISSET($_POST['send_bulk']))
  29. {
  30. if($_POST['konf']=="" OR $_POST['destination']=="" OR $_POST['body_msg']=="")
  31. {
  32. echo"<script>alert('please complete blank field')</script>";
  33. }else{
  34. $nm_group=$_POST['destination'];
  35. //echo "$act_msg<br/>";
  36. //echo "$msg_kon<br/>";
  37. //echo "$nm_group<br/>";
  38.             $sms=$_POST['body_msg'];
  39.             $msg_kon=$_POST['konf'];
  40.  
  41.                             $sql2=mysql_query("SELECT * FROM pbk WHERE GroupID='$nm_group'");
  42.                             while ($row=mysql_fetch_array($sql2))
  43.             {
  44.             $nohp = $row['Number'];
  45.             $Gname = $row['Name']; 
  46.                            
  47.             //echo $row['Number'];
  48.     echo "Sms terkirim $Gname nomor : " .$nohp. " <br/> ";
  49.  
  50.                             $query3 = "INSERT INTO outbox (DestinationNumber, TextDecoded, CreatorID, class) VALUES ('$nohp', '$sms', 'Gammu 1.25.0', 0)";
  51.                             //mysql_query($query3);
  52.                             $result_Bulk=mysql_query($query3);
  53.                             }
  54.                         if($result_Bulk>0){
  55.                        
  56.                         echo "DONE";   
  57.                         }else{echo "NOT COMPLATE";}                        
  58.  
  59. }}
  60. ?>
Advertisement
Add Comment
Please, Sign In to add comment