public function copyFromTo($sFrom, $sTo)
    {
        if (preg_match('/test/', $sFrom) or preg_match('/script/', $sFrom)) {
            return;
        }
        if (is_dir($sFrom)) {
            $oDir = new _dir($sFrom);
            try {
                mkdir($sTo);
            } catch (Exception $e) {
                throw new Exception('Erreur creation repertoire ' . $sTo . '
				Verifier les droits du repertoire ' . $this->sGenere . ' du mkf4builder
				On doit pouvoir ecrire dedans (generation de projet)
				');
            }
            chmod($sTo, 0777);
            foreach ($oDir->getList() as $oFile) {
                if (preg_match('/example/', $oFile->getAdresse())) {
                    continue;
                }
                self::copyFromTo($oFile->getAdresse(), $sTo . '/' . $oFile->getName());
            }
        } else {
            copy($sFrom, $sTo);
            chmod($sTo, 0666);
        }
    }
Exemple #2
0
 public function copyFromTo($sFrom, $sTo)
 {
     if (is_dir($sFrom)) {
         $oDir = new _dir($sFrom);
         mkdir($sTo);
         chmod($sTo, 0777);
         foreach ($oDir->getList() as $oFile) {
             self::copyFromTo($oFile->getAdresse(), $sTo . '/' . $oFile->getName());
         }
     } else {
         copy($sFrom, $sTo);
         chmod($sTo, 0777);
     }
 }
Exemple #3
0
 public function getListTable()
 {
     $oDir = new _dir($this->_tConfig[$this->_sConfig . '.database']);
     $tDir = $oDir->getList();
     $tSDir = array();
     foreach ($tDir as $oDir) {
         $tSDir[] = preg_replace('/\\.csv/', '', $oDir->getName());
     }
     return $tSDir;
 }
Exemple #4
0
<?php

$sPath = _root::getParam('path', '..');
$oDir = new _dir($sPath);
$tDir = $oDir->getList();
$sParent = '..';
if (preg_match('/\\//', $sPath)) {
    $tParent = explode('/', $sPath);
    array_pop($tParent);
    $sParent = implode('/', $tParent);
}
$tReturn = $this->tReturn;
if (isset($tReturn['error'])) {
    ?>
<p class="error" style="padding:8px;border:1px dotted red;margin:8px;"><strong>ERROR:</strong> <?php 
    echo $tReturn['error'];
    ?>
</p>
<?php 
}
?>
Vous allez exporter votre projet vers le r&eacute;pertoire ci-dessous:
<h2><?php 
echo $sPath;
?>
</h2>
<div class="smenu">
<ul>
<h3>S&eacute;lectionnez le r&eacute;pertoire o&ugrave; copier le projet:</h3>

<li><a href="<?php