Subversion Repositories ALCASAR

Rev

Rev 2006 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log

Rev 2006 Rev 2171
Line 17... Line 17...
17
 *   along with this program; if not, write to the                         *
17
 *   along with this program; if not, write to the                         *
18
 *   Free Software Foundation, Inc.,                                       *
18
 *   Free Software Foundation, Inc.,                                       *
19
 *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
19
 *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
20
 ***************************************************************************/
20
 ***************************************************************************/
21
 
21
 
22
// $Id: portail.php 2006 2016-07-22 13:07:10Z raphael.pion $
22
// $Id: portail.php 2171 2017-04-21 17:39:13Z tom.houdayer $
23
 
23
 
24
// xml_utilisateur()
24
// xml_utilisateur()
25
 
25
 
26
function request ($texte) {
26
function request ($texte) {
27
		$strResult = 0;
27
		$strResult = 0;
Line 97... Line 97...
97
function html_portail () {
97
function html_portail () {
98
	global $webpath;
98
	global $webpath;
99
	global $XPath;
99
	global $XPath;
100
	global $text;
100
	global $text;
101
	exec ("sudo /usr/local/bin/alcasar-watchdog.sh -lt");
101
	exec ("sudo /usr/local/bin/alcasar-watchdog.sh -lt");
102
	$file_version = "/var/www/html/VERSION";
-
 
103
	$handle = fopen ($file_version, "r");
102
	// Get current version
104
	$INSTALLEDVERSION = fread ($handle, filesize ($file_version));
103
	$INSTALLEDVERSION = trim(exec("grep ^VERSION /usr/local/etc/alcasar.conf | cut -d'=' -f2"));
105
	fclose ($handle);
-
 
106
	$VERSIONBL = date ("F d Y", filemtime ('/etc/dansguardian/lists/blacklists/README'));
104
	$VERSIONBL = date ("F d Y", filemtime ('/etc/dansguardian/lists/blacklists/README'));
107
	$nbr_user = request ('user');
105
	$nbr_user = request ('user');
108
	$nbr_grp  = request ('group');
106
	$nbr_grp  = request ('group');
109
	$nbr_user_online = exec ("sudo /usr/sbin/chilli_query list | cut -d\" \" -f5 | grep \"1\" | wc -l");
107
	$nbr_user_online = exec ("sudo /usr/sbin/chilli_query list | cut -d\" \" -f5 | grep \"1\" | wc -l");
110
	if ((filtrageTest("/var/www/html/index.php","/network_pb = False/")) && (internetTest($INSTALLEDVERSION))){
108
	if ((filtrageTest("/var/www/html/index.php","/network_pb = False/")) && (internetTest($INSTALLEDVERSION))){