Subversion Repositories ALCASAR

Rev

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

Rev 529 Rev 648
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 529 2011-04-05 18:28:37Z franck $
22
// $Id: portail.php 648 2011-06-25 21:31:06Z richard $
23
 
23
 
24
// xml_utilisateur()
24
// xml_utilisateur()
25
 
25
 
26
function request ($texte) {
26
function request ($texte) {
27
		$strResult = 0;
27
		$strResult = 0;
28
		// Déclaration des paramètres de connexion
28
		// Déclaration des paramètres de connexion
29
		$host = "localhost";
29
		$host = "localhost";
30
		$DB_USER = "radius";
30
		$DB_USER = "radius";
31
		$DB_RADIUS = "radius";
31
		$DB_RADIUS = "radius";
32
		$radiuspwd = "X01WDItQ";
32
		$radiuspwd = "JbzwD8FP";
33
		// Connexion au serveur
33
		// Connexion au serveur
34
		mysql_connect($host, $DB_USER,$radiuspwd) or die("erreur de connexion au serveur");
34
		mysql_connect($host, $DB_USER,$radiuspwd) or die("erreur de connexion au serveur");
35
		mysql_select_db($DB_RADIUS) or die("erreur de connexion a la base de donnees");
35
		mysql_select_db($DB_RADIUS) or die("erreur de connexion a la base de donnees");
36
		// Creation et envoi de la requete
36
		// Creation et envoi de la requete
37
		if ($texte == 'user') {$query = "SELECT UserName FROM userinfo";}
37
		if ($texte == 'user') {$query = "SELECT UserName FROM userinfo";}
Line 73... Line 73...
73
        } else {
73
        } else {
74
                fputs($sock,"GET http://$host/images/M_images/weblink.png HTTP/1.0\n\n");
74
                fputs($sock,"GET http://$host/images/M_images/weblink.png HTTP/1.0\n\n");
75
                fclose($sock);
75
                fclose($sock);
76
                return true;
76
                return true;
77
        }
77
        }
78
 
-
 
79
}
78
}
80
// Fonction de test du filtrage
79
// Fonction de test du filtrage
81
function filtrageTest($file, $search_regex){
80
function filtrageTest($file, $search_regex){
82
	$pointeur = fopen($file,"r");
81
	$pointeur = fopen($file,"r");
83
	$result = false;
82
	$result = false;
Line 130... Line 129...
130
		$internet_status =  "<img src='/images/state_error.gif'>".$text['disable'];
129
		$internet_status =  "<img src='/images/state_error.gif'>".$text['disable'];
131
		$AVAILABLEDVERSION = "-";
130
		$AVAILABLEDVERSION = "-";
132
	}
131
	}
133
	$_text = "<table border=\"0\" width=\"100%\" align=\"center\">\n"
132
	$_text = "<table border=\"0\" width=\"100%\" align=\"center\">\n"
134
		. "  <tr>\n"
133
		. "  <tr>\n"
-
 
134
		. "    <td valign=\"top\"><font size=\"-1\">" . $text['internet_link'] . "</font></td>\n"
-
 
135
		. "    <td><font size=\"-1\">" . $internet_status . "</font></td>\n"
-
 
136
		. "  </tr>\n"
-
 
137
		. "  <tr>\n"
135
		. "    <td valign=\"top\"><font size=\"-1\">" . $text['portail-version'] . "</font></td>\n"
138
		. "    <td valign=\"top\"><font size=\"-1\">" . $text['portail-version'] . "</font></td>\n"
136
		. "    <td><font size=\"-1\">" . $INSTALLEDVERSION . "</font></td>\n"
139
		. "    <td><font size=\"-1\">" . $INSTALLEDVERSION . "</font></td>\n"
137
		. "  </tr>\n"
140
		. "  </tr>\n"
138
		. "  <tr>\n"
141
		. "  <tr>\n"
139
		. "    <td valign=\"top\"><font size=\"-1\">" . $text['portail-disp'] . "</font></td>\n"
142
		. "    <td valign=\"top\"><font size=\"-1\">" . $text['portail-disp'] . "</font></td>\n"
Line 157... Line 160...
157
		. "  </tr>\n"
160
		. "  </tr>\n"
158
		. "  <tr>\n"
161
		. "  <tr>\n"
159
		. "    <td valign=\"top\"><font size=\"-1\">" . $text['bl-version'] . "</font></td>\n"
162
		. "    <td valign=\"top\"><font size=\"-1\">" . $text['bl-version'] . "</font></td>\n"
160
		. "    <td><font size=\"-1\">" . $VERSIONBL . "</font></td>\n"
163
		. "    <td><font size=\"-1\">" . $VERSIONBL . "</font></td>\n"
161
		. "  </tr>\n"
164
		. "  </tr>\n"
162
		. "  <tr>\n"
-
 
163
		. "    <td valign=\"top\"><font size=\"-1\">" . $text['internet_link'] . "</font></td>\n"
-
 
164
		. "    <td><font size=\"-1\">" . $internet_status . "</font></td>\n"
-
 
165
		. "  </tr>\n"
-
 
166
		. "</table>\n";
165
		. "</table>\n";
167
	return $_text;
166
	return $_text;
168
} 
167
} 
169
 
168
 
170
function wml_portail () {
169
function wml_portail () {