Subversion Repositories ALCASAR

Rev

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

Rev 2926 Rev 2929
Line 5... Line 5...
5
require('../lib/acctshow.php');
5
require('../lib/acctshow.php');
6
?>
6
?>
7
<!DOCTYPE html>
7
<!DOCTYPE html>
8
<html>
8
<html>
9
<head>
9
<head>
10
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
10
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
11
<?php
11
<?php
12
#choice of language
12
#choice of language
13
$Language = 'en';
13
$Language = 'en';
14
if(isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])) {
14
if(isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])) {
15
	$Langue = explode(',', $_SERVER['HTTP_ACCEPT_LANGUAGE']);
15
	$Langue = explode(',', $_SERVER['HTTP_ACCEPT_LANGUAGE']);
16
	$Language = strtolower(substr(chop($Langue[0]), 0, 2)); 
16
	$Language = strtolower(substr(chop($Langue[0]), 0, 2)); 
17
}
17
}
18
if ($Language === 'fr') {
18
if ($Language === 'fr') {
19
	$l_title	= "Journal des connexions";
19
	$l_title	= "Journal des connexions";
20
	$l_select_attributes	= "Sélectionnez les attributs à afficher";
20
	$l_attributes	= "Attributs à afficher";
21
	$l_ordered	= "Classé par :";
21
	$l_ordered	= "Classé par :";
22
	$l_max_return	= "Nbr. max. de résultats retournés :";
22
	$l_max_return	= "Nbr. max. de résultats retournés :";
23
	$l_criteria	= "Critère de sélection :";
23
	$l_criteria	= "Critère de sélection :";
24
	$l_not_valid =	"L'opération demandé n'est pas valide. Sortie anormale.";
24
	$l_not_valid 	= "L'opération demandé n'est pas valide. Sortie anormale.";
25
	$l_delete =	"Supprimer";
25
	$l_delete	= "Supprimer";
26
	$l_edit_user	= "Éditer l'utilisateur :";
26
	$l_edit_user	= "Éditer l'utilisateur :";
27
} else if($Language === 'es') {
27
} else if($Language === 'es') {
28
	$l_title	= "Registro de conexión";
28
	$l_title		= "Registro de conexión";
29
	$l_select_attributes	= "Seleccione los atributos que desea mostrar";
29
	$l_attributes	= "Atributos a mostrar";
30
	$l_ordered	= "ordenada por :";
30
	$l_ordered	= "ordenada por :";
31
	$l_max_return	= "Máximo número de resultados devueltos :";
31
	$l_max_return	= "Máximo número de resultados devueltos :";
32
	$l_criteria	= "Criterios de selección :";
32
	$l_criteria	= "Criterios de selección :";
33
	$l_not_valid =	"La operación solicitada no es válida. Salida anormal.";
33
	$l_not_valid	= "La operación solicitada no es válida. Salida anormal.";
34
	$l_delete =	"Eliminar";
34
	$il_delete	= "Eliminar";
35
	$l_edit_user	= "Editar usuario :";
35
	$l_edit_user	= "Editar usuario :";
36
} else {
36
} else {
37
	$l_title	= "Connections log";
37
	$l_title	= "Connections log";
38
	$l_select_attributes	= "Select the attributes you want to display";
38
	$l_attributes	= "Attributes to display";
39
	$l_ordered	= "Ordered by :";
39
	$l_ordered	= "Ordered by :";
40
	$l_max_return	= "Max. no. of results returned :";
40
	$l_max_return	= "Max. no. of results returned :";
41
	$l_criteria	= "Selection Criteria :";
41
	$l_criteria	= "Selection Criteria :";
42
	$l_not_valid =	"The requested operation is not valid. Abnormal exit.";
42
	$l_not_valid	= "The requested operation is not valid. Abnormal exit.";
43
	$l_delete =	"Delete";
43
	$l_delete	= "Delete";
44
	$l_edit_user	= "Edit user :";
44
	$l_edit_user	= "Edit user :";
45
}
45
}
46
 
46
 
47
if (is_file("../lib/sql/drivers/$config[sql_type]/functions.php"))
47
if (is_file("../lib/sql/drivers/$config[sql_type]/functions.php"))
48
	include_once("../lib/sql/drivers/$config[sql_type]/functions.php");
48
	include_once("../lib/sql/drivers/$config[sql_type]/functions.php");
Line 57... Line 57...
57
</body>
57
</body>
58
</html>
58
</html>
59
EOM;
59
EOM;
60
	exit();
60
	exit();
61
}
61
}
-
 
62
 
62
$operators=array( '=','<', '>', '<=', '>=', 'regexp', 'like' );
63
$operators=array( '=','<', '>', '<=', '>=', 'regexp', 'like' );
63
if ($config['sql_type'] == 'pg'){
64
if ($config['sql_type'] == 'pg'){
64
	$operators=array( '=','<', '>', '<=', '>=', '~', 'like', '~*', '~~*', '<<=' );
65
	$operators=array( '=','<', '>', '<=', '>=', '~', 'like', '~*', '~~*', '<<=' );
65
}
66
}
66
$link = da_sql_pconnect ($config) or die('cannot connect to sql databse');
67
$link = da_sql_pconnect ($config) or die('cannot connect to sql databse');
Line 92... Line 93...
92
				$this->operator=$operator;
93
				$this->operator=$operator;
93
	}
94
	}
94
 
95
 
95
	function show() {	global $operators;
96
	function show() {	global $operators;
96
				global $items;
97
				global $items;
-
 
98
				global $l_delete;
97
		$nam = $this->item;
99
		$nam = $this->item;
98
			echo <<<EOM
100
			echo <<<EOM
99
	<tr><td align=left>
101
	<tr><td align=left>
100
	<i>$items[$nam]</i>
102
	<i>$items[$nam]</i>
101
	<input type=hidden name="item_of_$this->name" value="$this->item">
103
	<input type=hidden name="item_of_$this->name" value="$this->item">
Line 153... Line 155...
153
	echo <<<EOM
155
	echo <<<EOM
154
<form method=post>
156
<form method=post>
155
<table border=0 width=740 cellpadding=1 cellspacing=1>
157
<table border=0 width=740 cellpadding=1 cellspacing=1>
156
<tr>
158
<tr>
157
<td>
159
<td>
158
<b>$l_select_attributes</b><br>
160
<b>$l_attributes</b><br>
159
<select name="accounting_show_attrs[]" size=5 multiple>
161
<select name="accounting_show_attrs[]" size=5 multiple>
160
EOM;
162
EOM;
161
foreach($items as $key => $val)
163
foreach($items as $key => $val)
162
	echo <<<EOM
164
	echo <<<EOM
163
<option $selected[$key] value="$key">$val</option>
165
<option $selected[$key] value="$key">$val</option>