<?php
include "scrinit.php";
require_once 'soapClient.class.php';
	$ws=new WebsmsClient($cfg);
	
	$sp=mysqli_query($con,"select smsname from sysset");
	$row=mysqli_fetch_array($sp);
	$sender = $row['smsname'];
	$des=$_SESSION['tel'];
	$mes=$_SESSION['sms1'];
	
  if (is_array($des) || is_object($des)){
	foreach ($des as $t)
	{
		echo $t;
	
	    $res=$ws->submitSM($sender,$t,$mes,"GSM");
	}
  }
	
	$credits=$ws->getCredits();
	
	echo " ΥΠΟΛΟΙΠΟΜΕΝΕΣ ΜΟΝΑΔΕΣ: ".$credits;
	
	
	//$batch=$ws->getBatch($batchid);
	//var_dump($batch);
	
	
	//Function calls
	/*
	$ws=new WebsmsClient($cfg);
	$credits=$ws->getCredits();
	var_dump($credits);
	
	*/
	
	
?>
</body>
</html>