Location: PHPKode > projects > @1 File Store > control/users/const.php
<?
$MustLogin=2|4;
require_once("../../libs/header.php");
$user_groups=array();
if($CurUser->getlevel()<0)
{
 $user_groups[-1]=$lang['admin'];
 $user_groups[0]=$lang['sub_admin'];
}
$SQL="SELECT * FROM `".DB_PREFIX."user_groups`";
if(!$mysql->query($SQL))
{
 exit($mysql->error);
}
while(!$mysql->EOF)
{
 $user_groups[$mysql->field("id")]=$mysql->field("group_name");
 $mysql->movenext();
}
$form=array(
	"method"=>"POST",
	"action"=>"",
	"message"=>"",
	"errorcount"=>0,
	"fields"=>array(
		       	"real_name"=>array("type"=>"text",
			       "description"=>$lang['real_name'],
			       "error"=>$lang['enter']." ".$lang['real_name']
			      ),
				"company"=>array("type"=>"text",
			       "description"=>$lang['company_name'],
			       "empty"=>"Yes"
			      ),
				"address1"=>array("type"=>"text",
			       "description"=>$lang['address_1'],
			       "empty"=>"Yes"
			      ),
				"address2"=>array("type"=>"text",
			       "description"=>$lang['address_2'],
			       "empty"=>"Yes"
			      ),
				"city"=>array("type"=>"text",
			       "description"=>$lang['city'],
			       "empty"=>"Yes"
			      ),
				"state"=>array("type"=>"text",
			       "description"=>$lang['state'],
			       "empty"=>"Yes"
			      ),
				"postcode"=>array("type"=>"text",
			       "description"=>$lang['postcode'],
			       "empty"=>"Yes"
			      ),
				"country"=>array("type"=>"text",
			       "description"=>$lang['country'],
			       "empty"=>"Yes"
	    		  ),
				"telephone"=>array("type"=>"text",
		    	   "description"=>$lang['phone_number'],
			       "empty"=>"Yes"
			      ),
		       "email"=>array("type"=>"text",
			       "description"=>$lang['email'],
			       "error"=>$lang['enter']." ".$lang['email']
			      ),
		       "login"=>array("type"=>"text",
			       "description"=>$lang['login'],
			       "error"=>$lang['enter']." ".$lang['login']
			      ),
		       "password"=>array("type"=>"text",
			       "description"=>$lang['password'],
			       "error"=>$lang['enter']." ".$lang['password']
			      ),
		       "level"=>array("type"=>"select",
		       		"description"=>$lang['group'],
		       		"error"=>$lang['enter']." ".$lang['group'],
		       		"extra"=>$user_groups
		       	      ),
			   "allow_upload"=>array("type"=>"select",
			   		"description"=>$lang['can_upload'],
			   		"error"=>$lang['enter']." ".$lang['allow_upload'],
			   		"extra"=>array("Y"=>"Yes", "N"=>"No")
					  ),
		       "confirm"=>array("type"=>"select",
		       	       "description"=>$lang['confirm'],
		       	       "error"=>$lang['enter']." ".$lang['confirm'],
		       	       "extra"=>array("Y"=>"Yes", "N"=>"No")
		       	     ),
				"subscription"=>array("type"=>"select",
					   "description"=>$lang['subscription'],
					   "error"=>$lang['enter']." ".$lang['subscription'],
					   "extra"=>array("Y"=>"Yes", "N"=>"No")
			  		)
		      ),
	"submit"=>$lang['go']
);
$userform=new UserForms($form["fields"]);
?>
Return current item: @1 File Store