2022-05-30 09:05:11 +02:00
< script src = " core/vendor/jspdf/jspdf.min.js " ></ script >
2022-03-06 13:35:21 +01:00
< ? php
// Lexique
$text = [];
$val = $this -> getData ([ 'config' , 'i18n' , 'langAdmin' ]);
switch ( $val ) {
case 'fr' :
$text [ 0 ] = 'Paramètres' ;
$text [ 1 ] = 'Mise à jour automatisée' ;
$text [ 2 ] = 'Maintenance' ;
$text [ 3 ] = 'Pensez à supprimer le cache de votre navigateur si la favicon ne change pas.' ;
$text [ 4 ] = 'Favicon' ;
$text [ 5 ] = 'Sélectionnez une icône adaptée à un thème sombre.<br>Pensez à supprimer le cache de votre navigateur si la favicon ne change pas.' ;
$text [ 6 ] = 'Favicon thème sombre' ;
$text [ 7 ] = 'Fuseau horaire' ;
$text [ 8 ] = 'Le fuseau horaire est utile au bon référencement' ;
$text [ 9 ] = 'Message de consentement aux cookies' ;
$text [ 10 ] = 'Activation obligatoire selon les lois françaises sauf si vous utilisez votre propre système de consentement.' ;
$text [ 11 ] = 'URL intelligentes' ;
$text [ 12 ] = 'Vérifiez d\'abord que votre serveur autorise l\'URL rewriting (ce qui n\'est pas le cas chez Free).' ;
$text [ 13 ] = 'Rechercher une mise à jour en ligne' ;
$text [ 14 ] = 'La vérification est quotidienne. Option désactivée si la configuration du serveur ne le permet pas.' ;
$text [ 15 ] = 'Préserver le fichier htaccess racine' ;
$text [ 16 ] = 'Lors d\'une mise à jour automatique, conserve le fichier htaccess de la racine du site.' ;
$text [ 17 ] = 'Réinstaller' ;
$text [ 18 ] = 'Sauvegarde automatique quotidienne du site' ;
$text [ 19 ] = 'Une archive contenant le dossier /site/data est copiée dans le dossier \'site/backup\'. La sauvegarde est conservée pendant 30 jours.</p><p>Les fichiers du site ne sont pas sauvegardés automatiquement. Activation recommandée.' ;
$text [ 20 ] = 'Site en maintenance' ;
$text [ 21 ] = 'Sauvegarder' ;
$text [ 22 ] = 'Restaurer' ;
$text [ 23 ] = 'Copie sauvegardes auto' ;
2022-05-30 09:05:11 +02:00
$text [ 24 ] = 'Informations à transmettre au support en cas de dysfonctionnement' ;
$text [ 25 ] = 'Version de Deltacms: ' ;
$text [ 26 ] = 'Version de PHP: ' ;
$text [ 27 ] = 'Type de serveur: ' ;
$text [ 28 ] = 'URL intelligentes: ' ;
$text [ 29 ] = 'oui' ;
$text [ 30 ] = 'non' ;
$text [ 31 ] = 'Modules PHP installés: ' ;
$text [ 32 ] = 'Module(s) absent(s): ' ;
$text [ 33 ] = 'Les modules nécessaires sont installés.' ;
$text [ 34 ] = 'Modules Deltacms installés: ' ;
$text [ 35 ] = 'Générer un pdf' ;
2022-06-21 07:53:00 +02:00
$text [ 36 ] = 'Directive ' ;
$text [ 37 ] = 'Fonction ' ;
2022-03-06 13:35:21 +01:00
break ;
case 'en' :
$text [ 0 ] = 'Parameters' ;
$text [ 1 ] = 'Automated update' ;
$text [ 2 ] = 'Maintenance' ;
$text [ 3 ] = 'Remember to clear your browser\'s cache if the favicon does not change' ;
$text [ 4 ] = 'Favicon' ;
$text [ 5 ] = 'Select a suitable icon for a dark theme.<br>Remember to clear your browser\'s cache if the favicon does not change.' ;
$text [ 6 ] = 'Favicon dark theme' ;
$text [ 7 ] = 'Time zone' ;
$text [ 8 ] = 'The time zone is useful for good referencing' ;
$text [ 9 ] = 'Cookie consent message' ;
$text [ 10 ] = 'Mandatory activation under French law unless you use your own consent system' ;
$text [ 11 ] = 'Smart URLs' ;
$text [ 12 ] = 'First check that your server allows URL rewriting (which is not the case with Free)' ;
$text [ 13 ] = 'Search for an online update' ;
$text [ 14 ] = 'The check is daily. Option disabled if server configuration does not allow it.' ;
$text [ 15 ] = 'Preserve the root htaccess file' ;
$text [ 16 ] = 'On auto-update, keep the root htaccess file' ;
$text [ 17 ] = 'Reinstall' ;
$text [ 18 ] = 'Automatic daily site backup' ;
$text [ 19 ] = 'An archive containing the folder /site/data is copied to the folder \'site/backup\'. The backup is kept for 30 days.</p><p>Site files are not backed up automatically. Activation recommended.' ;
$text [ 20 ] = 'Site under maintenance' ;
$text [ 21 ] = 'Save' ;
$text [ 22 ] = 'Restore' ;
$text [ 23 ] = 'Auto backup copy' ;
2022-05-30 09:05:11 +02:00
$text [ 24 ] = 'Information to send to support in case of malfunction' ;
$text [ 25 ] = 'Deltacms version: ' ;
$text [ 26 ] = 'PHP version: ' ;
$text [ 27 ] = 'Server type: ' ;
$text [ 28 ] = 'Smart URL: ' ;
$text [ 29 ] = 'yes' ;
$text [ 30 ] = 'no' ;
$text [ 31 ] = 'PHP modules installed: ' ;
$text [ 32 ] = 'Module(s) missing: ' ;
$text [ 33 ] = 'The necessary modules are installed.' ;
$text [ 34 ] = 'Deltacms modules installed: ' ;
$text [ 35 ] = 'Generate a pdf' ;
2022-06-21 07:53:00 +02:00
$text [ 36 ] = 'Directive ' ;
$text [ 37 ] = 'Function ' ;
2022-03-06 13:35:21 +01:00
break ;
}
?>
2022-01-31 09:10:49 +01:00
< div id = " setupContainer " >
< div class = " row " >
< div class = " col12 " >
< div class = " block " >
2022-03-06 13:35:21 +01:00
< h4 >< ? php echo $text [ 0 ]; ?>
2022-01-31 09:10:49 +01:00
< span id = " setupHelpButton " class = " helpDisplayButton " >
< a href = " https://doc.deltacms.fr/configuration " target = " _blank " >
< ? php echo template :: ico ( 'help' , 'left' ); ?>
</ a >
</ span >
</ h4 >
< div class = " row " >
< div class = " col4 " >
< ? php echo template :: file ( 'configFavicon' , [
'type' => 1 ,
2022-03-06 13:35:21 +01:00
'help' => $text [ 3 ],
'label' => $text [ 4 ],
2022-01-31 09:10:49 +01:00
'value' => $this -> getData ([ 'config' , 'favicon' ])
]); ?>
</ div >
< div class = " col4 " >
< ? php echo template :: file ( 'configFaviconDark' , [
'type' => 1 ,
2022-03-06 13:35:21 +01:00
'help' => $text [ 5 ],
'label' => $text [ 6 ],
2022-01-31 09:10:49 +01:00
'value' => $this -> getData ([ 'config' , 'faviconDark' ])
]); ?>
</ div >
< div class = " col4 " >
< ? php echo template :: select ( 'configTimezone' , $module :: $timezones , [
2022-03-06 13:35:21 +01:00
'label' => $text [ 7 ],
2022-01-31 09:10:49 +01:00
'selected' => $this -> getData ([ 'config' , 'timezone' ]),
2022-03-06 13:35:21 +01:00
'help' => $text [ 8 ]
2022-01-31 09:10:49 +01:00
]); ?>
</ div >
</ div >
< div class = " row " >
< div class = " col6 " >
2022-03-06 13:35:21 +01:00
< ? php echo template :: checkbox ( 'configCookieConsent' , true , $text [ 9 ], [
2022-01-31 09:10:49 +01:00
'checked' => $this -> getData ([ 'config' , 'cookieConsent' ]),
2022-03-06 13:35:21 +01:00
'help' => $text [ 10 ]
2022-01-31 09:10:49 +01:00
]); ?>
</ div >
< div class = " col6 " >
2022-03-06 13:35:21 +01:00
< ? php echo template :: checkbox ( 'configRewrite' , true , $text [ 11 ], [
2022-01-31 09:10:49 +01:00
'checked' => helper :: checkRewrite (),
2022-03-06 13:35:21 +01:00
'help' => $text [ 12 ]
2022-01-31 09:10:49 +01:00
]); ?>
</ div >
</ div >
</ div >
</ div >
</ div >
< div class = " row " >
< div class = " col12 " >
< div class = " block " >
2022-03-06 13:35:21 +01:00
< h4 >< ? php echo $text [ 1 ]; ?>
2022-01-31 09:10:49 +01:00
< span id = " updateHelpButton " class = " helpDisplayButton " >
< a href = " https://doc.deltacms.fr/configuration#mise-a-jour " target = " _blank " >
< ? php echo template :: ico ( 'help' , 'left' ); ?>
</ a >
</ span >
</ h4 >
< ? php $updateError = helper :: urlGetContents ( common :: DELTA_UPDATE_URL . common :: DELTA_UPDATE_CHANNEL . '/version' ); ?>
< div class = " row " >
< div class = " col4 " >
2022-03-06 13:35:21 +01:00
< ? php echo template :: checkbox ( 'configAutoUpdate' , true , $text [ 13 ], [
2022-01-31 09:10:49 +01:00
'checked' => $this -> getData ([ 'config' , 'autoUpdate' ]),
2022-03-06 13:35:21 +01:00
'help' => $text [ 14 ],
2022-01-31 09:10:49 +01:00
'disabled' => ! $updateError
]); ?>
</ div >
< div class = " col4 " >
2022-03-06 13:35:21 +01:00
< ? php echo template :: checkbox ( 'configAutoUpdateHtaccess' , true , $text [ 15 ], [
2022-01-31 09:10:49 +01:00
'checked' => $this -> getData ([ 'config' , 'autoUpdateHtaccess' ]),
2022-03-06 13:35:21 +01:00
'help' => $text [ 16 ],
2022-01-31 09:10:49 +01:00
'disabled' => ! $updateError
]); ?>
</ div >
< div class = " col2 offset1 " >
< ? php echo template :: button ( 'configUpdateForced' , [
'ico' => 'download-cloud' ,
'href' => helper :: baseUrl () . 'install/update' ,
2022-03-06 13:35:21 +01:00
'value' => $text [ 17 ],
2022-01-31 09:10:49 +01:00
'class' => 'buttonRed' ,
'disabled' => ! $updateError
]); ?>
</ div >
</ div >
</ div >
</ div >
</ div >
< div class = " row " >
< div class = " col12 " >
< div class = " block " >
2022-03-06 13:35:21 +01:00
< h4 >< ? php echo $text [ 2 ]; ?>
2022-01-31 09:10:49 +01:00
< span id = " maintenanceHelpButton " class = " helpDisplayButton " >
< a href = " https://doc.deltacms.fr/configuration#maintenance " target = " _blank " >
< ? php echo template :: ico ( 'help' , 'left' ); ?>
</ a >
</ span >
</ h4 >
< div class = " row " >
< div class = " col6 " >
2022-03-06 13:35:21 +01:00
< ? php echo template :: checkbox ( 'configAutoBackup' , true , $text [ 18 ], [
2022-01-31 09:10:49 +01:00
'checked' => $this -> getData ([ 'config' , 'autoBackup' ]),
2022-03-06 13:35:21 +01:00
'help' => $text [ 19 ]
2022-01-31 09:10:49 +01:00
]); ?>
</ div >
< div class = " col6 " >
2022-03-06 13:35:21 +01:00
< ? php echo template :: checkbox ( 'configMaintenance' , true , $text [ 20 ], [
2022-01-31 09:10:49 +01:00
'checked' => $this -> getData ([ 'config' , 'maintenance' ])
]); ?>
</ div >
</ div >
< div class = " rows textAlignCenter " >
< div class = " col3 " >
< ? php echo template :: button ( 'configBackupButton' , [
'href' => helper :: baseUrl () . 'config/backup' ,
2022-03-06 13:35:21 +01:00
'value' => $text [ 21 ],
2022-01-31 09:10:49 +01:00
'ico' => 'download-cloud'
]); ?>
</ div >
< div class = " col3 " >
< ? php echo template :: button ( 'configRestoreButton' , [
'href' => helper :: baseUrl () . 'config/restore' ,
2022-03-06 13:35:21 +01:00
'value' => $text [ 22 ],
2022-01-31 09:10:49 +01:00
'ico' => 'upload-cloud'
]); ?>
</ div >
< div class = " col3 " >
< ? php echo template :: button ( 'configBackupCopyButton' , [
'href' => helper :: baseUrl () . 'config/copyBackups' ,
2022-03-06 13:35:21 +01:00
'value' => $text [ 23 ],
2022-01-31 09:10:49 +01:00
'ico' => 'download-cloud'
]); ?>
</ div >
</ div >
</ div >
</ div >
</ div >
2022-05-30 09:05:11 +02:00
< div class = " row " >
< div class = " col12 " >
< div class = " block " >
< div id = " infotopdf " >
< h4 >< ? php echo $text [ 24 ]; ?> </h4>
< div class = " row " >
< div class = " col12 " >
< ? php $textRewrite = $text [ 30 ];
if ( helper :: checkRewrite () === true ) $textRewrite = $text [ 29 ];
$listText = $text [ 25 ] . common :: DELTA_VERSION . " \n " . $text [ 26 ] . phpversion () . " \n " . $text [ 27 ] . $_SERVER [ 'SERVER_SOFTWARE' ] . " \n " . $text [ 28 ] . $textRewrite ;
echo template :: textarea ( 'modulesPhp' ,[
'value' => $listText
]); ?>
</ div >
</ div >
< div class = " row " >
< div class = " col12 " >
< ? php $listMod = get_loaded_extensions ();
natcasesort ( $listMod );
$listModText = $text [ 31 ];
$listModSmall = [];
foreach ( $listMod as $key => $value ){
$listModText .= $value . ' - ' ;
$listModSmall [ $key ] = strtolower ( $value );
}
$listModText = substr ( $listModText , 0 , strlen ( $listModText ) - 3 );
$listModRequired = array ( 'exif' , 'gd' , 'mbstring' , 'xmlwriter' , 'zip' , 'date' , 'fileinfo' , 'phar' );
$listDiff = array_diff ( $listModRequired , $listModSmall );
if ( count ( $listDiff ) > 0 ) {
$listModText .= " \n \n " . $text [ 32 ];
foreach ( $listDiff as $key => $value ){
$listModText .= $value . ' - ' ;
}
$listModText = substr ( $listModText , 0 , strlen ( $listModText ) - 3 );
} else {
$listModText .= " \n \n " . $text [ 33 ];
}
echo template :: textarea ( 'modulesPhp' ,[
'value' => $listModText
]); ?>
</ div >
</ div >
2022-06-21 07:53:00 +02:00
< div class = " row " >
< div class = " col12 " >
< ? php
$texte = '' ;
// Tests des directives php
$directives = array ( 'allow_url_include' , 'allow_url_fopen' );
foreach ( $directives as $key => $value ){
if ( ini_get ( $value )) {
$texte .= $text [ 36 ] . $value . ' ON - ' ;
}
else {
$texte .= $text [ 36 ] . $value . ' OFF - ' ;
}
}
// Tests des fonctions php
$functions = array ( 'fopen' , 'file_get_contents' , 'curl_version' , 'stream_get_contents' , 'datefmt_create' );
foreach ( $functions as $key => $value ){
if ( function_exists ( $value )){
$texte .= $text [ 37 ] . $value . ' ON - ' ;
}
else {
$texte .= $text [ 37 ] . $value . ' OFF - ' ;
}
}
echo template :: textarea ( 'directivesFunctionsPhp' ,[
'value' => substr ( $texte , 0 , strlen ( $texte ) - 3 )
]);
?>
</ div >
</ div >
2022-05-30 09:05:11 +02:00
< div class = " row " >
< div class = " col12 " >
< ? php // $infoModules[nom_module]['realName'], ['version'], ['update'], ['delete'], ['dataDirectory']
$infoModules = helper :: getModules ();
$listModDeltaText = $text [ 34 ];
foreach ( $infoModules as $key => $value ){
$listModDeltaText .= $key . ' ' . $infoModules [ $key ][ 'version' ] . ' - ' ;
}
$listModDeltaText = substr ( $listModDeltaText , 0 , strlen ( $listModDeltaText ) - 3 );
echo template :: textarea ( 'modulesDeltacms' ,[
'value' => $listModDeltaText
]); ?>
</ div >
</ div >
</ div >
< div class = " row " >
< div class = " col2 offset5 " >
< ? php echo template :: button ( 'buttonHtmlToPdf' , [
'class' => 'buttontopdf' ,
'value' => $text [ 35 ]
]); ?>
</ div >
</ div >
</ div >
</ div >
</ div >
2022-01-31 09:10:49 +01:00
</ div >