<?php

session_start();

include "../config.php";
include "../header.php";
include "../style.php";
if( isset($_SESSION["alogin"]) ) {
    	?><table>
      	<tr>
        <td width="15%" valign=top><br>
        <? include("adminnavigation.php"); ?>
        </td>
        <td valign="top" align="center"><br><br> <?
    	echo "<font size=2 face='$fonttype' color='$fontcolour'><p><b><center>";

			if($_POST['type']=="once") {
			$type = $_POST['day'];
			$number = $_POST['week'];
			} else {
			$type = $_POST['type'];
			$number = $_POST['week']*3;
			}		
		
		$userid = $_POST['userid'];
		$userid = dbput($userid);
		$type = dbput($type);
		$number = dbput($number);
        $query = "insert into snfcsolos (userid,type,cashsolos_left) values('$userid','$type','$number')";
		
		
		
		$count = 0;
		$quantity = $_POST['quantity'];
		while($quantity > $count) {
			$count++;
			mysql_query ($query);
		}
		
        echo "<p><center>".$quantity." blank SNF Cash Solo(s) have been added to ".$userid."'s account.</p></center>";
		
		
        echo "</td></tr></table>";
    }
else
	echo "Unauthorised Access!";

include "../footer.php";

?>