<?php
require_once("../head2Altsp.php");
$amount=$_POST['post'];
//require_once("headerIn.php");

/*if(isset($_POST['post']))
{

$post=$_POST['post'];

if($post=="Sajili"){
 
 $lineone =$_POST['lineone']; 

 $imei =$_POST['imei1']."-".$_POST['imei2'];

 $ilini =$_POST['ilini'];


 $pType =$_POST['pType']; 

 $date=Date("Y-m-d");

 if( $ilini !="" && $imei !="" && $pType!="" && $lineone!=""){
  
$rQ=$dBcon->addPhone($imei,$ilini,$pType,$date,$ownID,$lineone);
//print_r($rQ);
if ($rQ->rowCount()>0) {
   $r="Taarifa zimehifadhiwa!.";
   echo "<script> window.location.href='imeiform.php?id=$ownID&&id1=$r' </script>";
}
else{

  $r="Taarifa ulizotuma sio sahihi!.";
  
  echo "<script> window.location.href='imeiform.php?id=$ownID&&id1=$r' </script>";
}

}
else{
  $r="Taarifa sio sahihi!.";
  
  echo "<script> window.location.href='imeiform.php?id=$ownID&&id1=$r' </script>";
}
}
}
*/
?>
 <fieldset style="padding-top:5%; padding-right:10%; border-radius:12px; border:0;">
     <center>
     	<form method="POST" action="../vodaAPI.php">
        <table width="50%" border="1">
        	<tr><td><b>Sajili simu hapa:</b></td></tr>
          <tr><td>
            <?php
          /*if(isset($_GET['id1']))
           {
            if($_GET['id1']=="Taarifa zimehifadhiwa!.")
            {
              ?>
              <font color="blue">
                <?php
                 echo  $_GET['id1'];
                ?>
              </font>
              <?php
            }

         else
            {
              ?>
              <font color="red">
                <?php
                 echo  $_GET['id1'];
                ?>
              </font>
              <?php
            }
            }
           */
            ?>
            Kusajili simu yako kiasi cha Tsh:<?php echo $amount;?>/= kitakatwa kutoka kwenye akaunta yako ya M-pesa:<br>
          Tafathali ingiza namba ya M-pesa:</td></tr>
          <tr>
            <td>
              <input id= "id" type="hidden" value="<?php echo $amount;?>" name="amount"/>
              <input type="number" name="mpesa" width="100%">
            </td>
          </tr>
        	<tr>
        		<td>Aina ya simu:</td>
        	</tr>
           <tr>
            <td>
              <input  type="hidden" value="<?php echo $ownID;?>" name="owniD"/>
            </td>
          </tr>
          <tr>
            <td>
              <input width="100%" type="text"  placeholder="Aina ya simu" name="pType"/>
            </td>
          </tr>
           <tr>
            <td>Idadi ya laini:</td>
          </tr>
          <tr>
            <td>
              <input type="number" width="100%" placeholder="1" name="ilini"/>
            </td>
          </tr>
         
          <tr>
        		<td>Imei namba 1:</td>
        	</tr>
          <tr>
            <td>
              <input type="text" width="100%" placeholder="Imei namba 1" name="imei1"/>
            </td>
          </tr>
           <tr>
            <td>Imei namba 2:</td>
          </tr>
          <tr>
            <td>
              <input type="text" width="100%" placeholder="Imei namba 2" name="imei2"/>
            </td>
          </tr>
         
          <tr>
            <td>Lini namba moja:</td>
          </tr>
          <tr>
            <td>
              <input type="text" width="100%" placeholder="Laini na namba" name="lineone"/>
            </td>
          </tr>

          <tr>
            <td>
              <input type="submit"  value="Sajili"  name="post"/>
            </td>
          </tr>
       
          
        </table>
      </form>
    </center>
    </fieldset>
	

<?php
require_once("footer.php");
?>
<script type="text/javascript">
                  var i=0; 
    
                var counter=0;
	
	            var t=28;
                var mgs="";
                var action;
                 var i1=0; 
    
                var counter1=0;
	
	            var t1=28;
                var mgs1="";
                var action1;

	
</script>
