Location: PHPKode > projects > phpMyPrepaid > phpmyprepaid/scrape/CreateGroup.php
<?php
	//////////////////////////////////////////////////////////
	//	phpMyPrepaid  was based on a project known 	//
	//	as dhalbe-Admin - a webbased application for	//
	//	simplifying working with a Free-Radius server 	//
	//	and an MySQL as Backend-Database. 		//
	//							//
	//	None of the original code or concepts remain	//
	//	in this file.					//
	//////////////////////////////////////////////////////////
    
/*	Copyright (C) 2004  dhalbe-Admin Project  
    	Copyright (C) 2004  Michael Conrad (hide@address.com),
    	Copyright (C) 2004  Christian Roedel (hide@address.com)
    	Copyright (C) 2004  Carl Peterson (hide@address.com)
	Copyright (C) 2005  Carl Peterson (hide@address.com)
	Copyright (C) 2005  Port Networks LLC.

    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program; if not, write to the Free Software
    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
*/


	//////////////////////////////////////////////////////////
	//	First we set some variables depending		//
	//	on what button was pressed.  We also need to 	//
	//	check and make sure we have all the data we	//
	//	need to procede with the creation		//
	//////////////////////////////////////////////////////////

	#include('config.inc.php');
	if(isset($msg)){
		unset($msg); 
		}
	if(!is_admin()){ 
		$msg= "<p class=\"error\">Please log in as an administrator</p>"; 
		$include = "adminLogin.php";
		}
	if(!isset($_SESSION['locID'])) {
		$msg= "$msg <p class=\"error\">Please Select a Location</p>";
		
		if(!isset($include)) { $include = "ShowLoc.php";
		}
	}
	$location = $_SESSION['locID'];
	echo($location);  // testing
	
	get_relm($location);  // pulls the domain from the DB
	echo($relm);  // testing

if ($buttonID=="CR_group") 
{
	$grname=$_POST['GroupName'];
	$grsessiontime=$_POST['MaxAllSession'];
	$grsimuse=$_POST['SimUse'];
	$gridleTimeout=$_POST['IdleTimeout'];
	$gruploadlimit=$_POST['UploadLimit'];
	$grdownloadlimit=$_POST['DownloadLimit'];
dd
}
else
{
echo "<table border=1>";
echo"<tr>";

    printf('<form  name="center" id="center" action="index.php" method="post">');
			echo('<td class="fieldcell" style="text-align: right">'),
				('Group Name:'),
				('</td>'),
				('<td class="fieldcell" style="text-align: left">'),
				('<input type=text size=30 class=text name=\'GroupName\'>'),
				('</td>'),
				('</tr><tr>'),
					('<td class="fieldcell" style="text-align: right">'),
					('Maximun session time:'),
					('</td>'),
					('<td class="fieldcell" style="text-align: left">'),
					('<input type=text size=30 class=text name=\'MaxAllSession\'>'),
					('</td>'),
				('</tr><tr>'),
					('<td class="fieldcell" style="text-align: right">'),
					('Number Simultaneous user:'),
					('</td>'),
					('<td class="fieldcell" style="text-align: left">'),
					('<input type=text size=30 class=text name=\'SimUser\'>'),
					('</td>'),
				('</tr><tr>'),
					('<td class="fieldcell" style="text-align: right">'),
					('Idle Timeout:'),
					('</td>'),
					('<td class="fieldcell" style="text-align: left">'),
					('<input type=text size=30 class=text name=\'IdleTimeout\'>'),
					('</td>'),
				('</tr><tr>'),
					('<td class="fieldcell" style="text-align: right">'),
					('Upload Limit:'),
					('</td>'),
					('<td class="fieldcell" style="text-align: left">'),
					('<select name="UploadLimit">'),
					("<option value=\"$upload1\">$upload1"),
					("<option value=\"$upload2\">$upload2"),
					("<option value=\"$upload3\">$upload3"),
					('</td>'),
				('</tr><tr>'),
					('<td class="fieldcell" style="text-align: right">'),
					('Download Limit:'),
					('</td>'),
					('<td class="fieldcell" style="text-align: left">'),
					('<select name="DownloadLimit">'),
					("<option value=\"$download1\">$download1"),
					("<option value=\"$download2\">$download2"),
					("<option value=\"$download3\">$download3"),
					('</td>');
					
					
					
	
	
	echo "</tr>";
	echo('<tr><td></td>');
	echo('<td class="fieldcell"');
	echo('<input type="hidden" name="buttonID" value="CR_group">');
	echo('<center>'),
		("<input type=\"submit\" name=\"submit\" value=\"CREATE $value\"/>"),
		('</center></td></tr>');
	echo "</table>";
	echo '</form>';
	}

	//////////////////////////////////////////////////////////
	//	END OF FORM LAYOUT				//
	//////////////////////////////////////////////////////////

?>
Return current item: phpMyPrepaid