<script type="text/javascript">
	function generer_app(){
		var inpNodes = document.getElementsByTagName('input');
		for(var i in inpNodes){
			var inp = inpNodes[i];
			if ( inp.type == 'checkbox'){
				if(inp.checked == true){
					var cellname = ""+inp.name;
					cellname = cellname.replace(/CK/,"");
					var fenetre=window.open("main.php?page=apps/Admin/scripts/gestion_app.php&newapp=1&id="+cellname, "Generer nouvelle application", "width=500,height=800,scrollbars");
 					fenetre.focus();
				}
			}
		}
	}
</script>
<script type="text/javascript">
	function supp_app_user(){
		var inpNodes = document.getElementsByTagName('input');
		for(var i in inpNodes){
			var inp = inpNodes[i];
			if ( inp.type == 'checkbox'){
				if(inp.checked == true){
					var cellname = ""+inp.name;
					cellname = cellname.replace(/CK/,"");
					var fenetre=window.open("main.php?page=apps/Admin/scripts/gestion_app.php&suppapp=1&id="+cellname, "Supprimer l'application d'un user", "width=500,height=800,scrollbars");
 					fenetre.focus();
				}
			}
		}
	}
</script>
<?php
$_SESSION['database']="MINICLICK";
include ("includes/connection.php");
include("engine/miniclic/miniclick.class.php");
echo $_GET['where'];
/**
if($_GET['where'] != ""){
	$Client_Id=$_GET['where'];
	$_GET['where'] = " User_Id IN (SELECT User_id FROM USER WHERE ".$Client_Id.") ";
}
if($_GET['Client_Id'] != ""){
	" AND Client_Id IN (SELECT USER.Client_Id FROM USER, APP WHERE APP.User_Id=USER.User_Id AND USER.Client_Id=".$_GET['Client_Id'].") ";
}*/
$mini = new miniclick("APP");
?>
<br />
&nbsp;<input type="button" name="bout" class="bouton" value="Generer une application" onClick="javascript:generer_app()" />
&nbsp;<input type="button" name="bout" class="bouton" value="Supprimer un user d'une application" onClick="javascript:supp_app_user()" />
