<?php
/**
* MiniClick
* Gestionnaire de tableau collaboratif
* Copyright (C) 2006 Guillaume Monet <gm@ibreizh.net>
*
* 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
* 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 
*
* @package miniclick
* @version 3.1.0
*/
//Creation d'une nouvelle application 
include("includes/connection.php");
mkdir(MINICLICK_INSTALL_PATH."apps/".$_POST['app_name']);
mkdir(MINICLICK_INSTALL_PATH."apps/".$_POST['app_name']."/css");
mkdir(MINICLICK_INSTALL_PATH."apps/".$_POST['app_name']."/img");
mkdir(MINICLICK_INSTALL_PATH."apps/".$_POST['app_name']."/modules");
mkdir(MINICLICK_INSTALL_PATH."apps/".$_POST['app_name']."/templates");
$config = fopen(MINICLICK_INSTALL_PATH."apps/".$_POST['app_name']."/app_config.php","w+");

fclose($config);
$defaut = fopen(MINICLICK_INSTALL_PATH."apps/".$_POST['app_name']."/default.php","w+");
fputs($defaut,'<?
session_start();
echo "Bonjour:".$_SESSION[\'role\'];
?>');
fclose($defaut);
?>