コード例 #1
0
ファイル: install.php プロジェクト: robmat/samplebator
         if (!fclose($fp)) {
             $ret = false;
         }
     } else {
         $ret = false;
     }
     if ($ret == false) {
         echo '<br><strong>' . $lang['L_ERRORMAN'] . ' config.php ' . $lang['L_MANUELL'] . '.';
         die;
     }
 }
 echo '<h6>' . $lang['L_CREATEDIRS'] . '</h6>';
 $check_dirs = array("work/", "work/config/", "work/log/", "work/backup/");
 $msg = '';
 foreach ($check_dirs as $d) {
     $success = SetFileRechte($d, 1, 0777);
     if ($success != 1) {
         $msg .= $success . '<br>';
     }
 }
 if ($msg > '') {
     echo '<b>' . $msg . '</b>';
 }
 $iw[0] = IsWritable("work");
 $iw[1] = IsWritable("work/config");
 $iw[2] = IsWritable("work/log");
 $iw[3] = IsWritable("work/backup");
 // save manual_db
 if ($manual_db > '') {
     if (file_exists('./' . $config['files']['dbs_manual'])) {
         @unlink('./' . $config['files']['dbs_manual']);
コード例 #2
0
function TestWorkDir()
{
    global $config;
    //echo "work_chmod: $config['paths']['work']_chmod<br>";
    SetFileRechte($config['paths']['work']);
    SetFileRechte($config['paths']['backup']);
    SetFileRechte($config['paths']['structure']);
    SetFileRechte($config['paths']['log']);
    SetFileRechte($config['paths']['config']);
    if (!file_exists($config['files']['parameter'])) {
        SetDefault(true);
    }
    if (!file_exists($config['files']['log'])) {
        DeleteLog();
    }
}
コード例 #3
0
ファイル: functions_global.php プロジェクト: thaian2009/php
function TestWorkDir()
{
    global $config;
    $ret = SetFileRechte($config['paths']['work']);
    if ($ret === true) {
        $ret = SetFileRechte($config['paths']['backup']);
    }
    if ($ret === true) {
        $ret = SetFileRechte($config['paths']['log']);
    }
    if ($ret === true) {
        $ret = SetFileRechte($config['paths']['config']);
    }
    if ($ret === true) {
        if (!file_exists($config['files']['parameter'])) {
            SetDefault(true);
        }
        if (!file_exists($config['files']['log'])) {
            DeleteLog();
        }
    }
    return $ret;
}
コード例 #4
0
ファイル: install.php プロジェクト: BackupTheBerlios/oos-svn
     }
     if ($ret == false) {
         echo '<br><strong>' . $lang['errorman'] . ' config.php ' . $lang['manuell'] . '.';
         die;
     }
 }
 echo '<h6>' . $lang['createdirs'] . '</h6>';
 SetFileRechte("work/");
 @chmod("work", 0777);
 SetFileRechte("work/config/");
 @chmod("work/config", 0777);
 SetFileRechte("work/log/");
 @chmod("work/log", 0777);
 SetFileRechte("work/backup/");
 @chmod("work/backup", 0777);
 SetFileRechte("work/structure/");
 @chmod("work/structure", 0777);
 $iw[0] = IsWritable("work");
 $iw[1] = IsWritable("work/config");
 $iw[2] = IsWritable("work/log");
 $iw[3] = IsWritable("work/backup");
 $iw[4] = IsWritable("work/structure");
 if ($iw[0] && $iw[1] && $iw[2] && $iw[3] && $iw[4]) {
     echo '<script language="javascript">';
     echo 'self.location.href=\'install.php?language=' . $language . '&phase=5&connstr=' . $connstr . '\'';
     echo '</script>';
 }
 echo '<form action="install.php?language=' . $language . '&phase=4" method="post"><table class="border"><tr class="thead">';
 echo '<th>' . $lang['dir'] . '</th><th>' . $lang['rechte'] . '</th><th>' . $lang['status'] . '</th></tr>';
 echo '<tr><td><strong>work</strong></td><td>' . Rechte("work") . '</td><td>' . ($iw[0] ? $img_ok : $img_failed) . '</td></tr>';
 echo '<tr><td><strong>work/config</strong></td><td>' . Rechte("work/config") . '</td><td>' . ($iw[1] ? $img_ok : $img_failed) . '</td></tr>';