PEEL Shopping
Open source ecommerce : PEEL Shopping
check-php-integrity.php
Go to the documentation of this file.
1 <?php
2 // +----------------------------------------------------------------------+
3 // | Copyright (c) 2004-2015 Advisto SAS, service PEEL - contact@peel.fr |
4 // +----------------------------------------------------------------------+
5 // | This file is part of PEEL Shopping 8.0.0, which is subject to an |
6 // | opensource GPL license: you are allowed to customize the code |
7 // | for your own needs, but must keep your changes under GPL |
8 // | More information: https://www.peel.fr/lire/licence-gpl-70.html |
9 // +----------------------------------------------------------------------+
10 // | Author: Advisto SAS, RCS 479 205 452, France, https://www.peel.fr/ |
11 // +----------------------------------------------------------------------+
12 // $Id: check-php-integrity.php 46935 2015-09-18 08:49:48Z gboussin $
13 define('IN_PEEL_ADMIN', true);
14 include("../configuration.inc.php");
16 necessite_priv("admin");
17 
18 include $GLOBALS['dirroot'] . '/lib/class/Integrity.php';
19 
20 $GLOBALS['DOC_TITLE'] = 'Vérification de l\'existence de fichiers dans upload/ et suppression de la base de données si absents';
21 $menu_selected='index-various.php';
22 $output = '';
24 $file_path = './integrity-hash.txt';
25 
26 if(!file_exists($file_path) || !empty($_GET['update'])) {
27  if($integrity_object->getMd5Hashes('integrity-hash.txt') > 0){
28  echo $GLOBALS['tplEngine']->createTemplate('global_success.tpl', array('message_to_escape' => "MD5 File Hashes Generated"))->fetch();
29  } else {
30  echo $GLOBALS['tplEngine']->createTemplate('global_error.tpl', array('message_to_escape' => "Error"))->fetch();
31  }
32 }
33 
34 $files = $integrity->checkMD5Hashes('integrity-hash.txt');
35 unset($integrity_object);
36 
37 $output .= '
38 <h2>Modified Files</h2>
39  <table>
40  <thead>
41  <tr>
42  <th>File</th>
43  <th>State</th>
44  <th>User ID</th>
45  <th>Group ID</th>
46  <th>Last Access</th>
47  <th>Last Modified</th>
48  </tr>
49  </thead>
50  <tbody>
51 ';
52 foreach($files as $file) {
53  $output .= '
54 <tr>
55  <td>' . $file['filename'] . '</td>
56  <td>' . $file['stat'] . '</td>
57  <td>' . $file['uid'] . '</td>
58  <td>' . $file['gid'] . '</td>
59  <td>' . $file['lastAccess'] . '</td>
60  <td>' . $file['lastModification'] . '</td>
61  </tr>
62 ';
63 }
64 $output .= '
65  </tbody>
66  </table>
67 ';
68 include($GLOBALS['repertoire_modele'] . "/admin_haut.php");
69 echo $output;
70 include($GLOBALS['repertoire_modele'] . "/admin_bas.php");
71 
if(!file_exists($file_path)||!empty($_GET['update'])) $files
$integrity_object
necessite_priv($priv, $demo_allowed=true, $configuration_modification=false)
Cette fonction vérifie si l'utilisateur a les privilèges de $priv.
Definition: fonctions.php:1575
necessite_identification()
Si l'utilisateur n'est pas connecté à un compte, on affiche une page d'identification et arrête le sc...
Definition: fonctions.php:1596
$GLOBALS['DOC_TITLE']

This documentation for Open ecommerce PEEL Shopping and PEEL.fr has been generated by Doxygen on Thu Oct 15 2015 14:29:00 - Peel ecommerce is a product of Agence web Advisto SAS. All rights reserved.