コード例 #1
0
ファイル: sysinfo.php プロジェクト: GaelGRIFFON/core
<?php

if (!hasRight('sysinfo', true)) {
    throw new Exception('{{401 - Accès non autorisé}}');
}
?>
<iframe id="frame_sysinfo" src="<?php 
echo jeedom::getCurrentSysInfoFolder();
?>
/index.php" style="width : 100%;height : 1200px;border : none;"></iframe>

<script>
  var hWindow = $(window).height() - $('header').height() - $('footer').height() - 50;
  $('#frame_sysinfo').height(hWindow);
</script>
コード例 #2
0
ファイル: backup.php プロジェクト: GaelGRIFFON/core
 if (!file_exists($backup_dir)) {
     mkdir($backup_dir, 0770, true);
 }
 if (!is_writable($backup_dir)) {
     throw new Exception(__('Le dossier des sauvegardes n\'est pas accessible en écriture. Vérifiez les droits : ', __FILE__) . $backup_dir);
 }
 try {
     echo __("Mise à plat des droits...", __FILE__);
     jeedom::cleanFileSytemRight();
     echo __("OK\n", __FILE__);
 } catch (Exception $e) {
     echo __('***ERREUR*** ', __FILE__) . $e->getMessage();
 }
 $bakcup_name = 'backup-' . jeedom::version() . '-' . date("Y-m-d-H\\hi") . '.tar.gz';
 echo __('Sauvegarde des fichiers...', __FILE__);
 $exclude = array('tmp', 'backup', 'log', 'ngrok', '.git', realpath(dirname(__FILE__) . '/../core/nodeJS/node_modules'), realpath(dirname(__FILE__) . '/../doc'), realpath(dirname(__FILE__) . '/../core/img'), str_replace('/', '', jeedom::getCurrentSysInfoFolder()), str_replace('/', '', jeedom::getCurrentAdminerFolder()));
 if (strpos('/', config::byKey('backup::path')) === false) {
     $exclude[] = config::byKey('backup::path');
 }
 foreach (plugin::listPlugin() as $plugin) {
     if (!$plugin->isActive()) {
         $exclude[] = realpath(dirname(__FILE__) . '/../plugins/' . $plugin->getId());
     } else {
         $exclude[] = realpath(dirname(__FILE__) . '/../plugins/' . $plugin->getId() . '/doc/fr_FR');
         $exclude[] = realpath(dirname(__FILE__) . '/../plugins/' . $plugin->getId() . '/doc/us_US');
         foreach (ls(dirname(__FILE__) . '/../plugins/' . $plugin->getId() . '/doc/images', '*') as $file) {
             if (strpos($file, 'icon') === false) {
                 $exclude[] = realpath(dirname(__FILE__) . '/../plugins/' . $plugin->getId() . '/doc/images/' . $file);
             }
         }
     }