hello,<br>I implemented en authentication with Authenticator.php, I use a postgres database to register users and passwords,<br>here are the modified scripts:<br><br>login.html <br><br><span style="font-family: monospace;">
&lt;html&gt;<br>&lt;head&gt;<br>&lt;title&gt;*****&lt;/title&gt;<br>&lt;link href=&quot;samplelogin.css&quot; rel=&quot;stylesheet&quot; type=&quot;text/css&quot;&gt;<br>&lt;/head&gt;<br>&lt;body&gt;<br>&lt;form method=&quot;POST&quot;&gt;
<br>&lt;input type=&#39;hidden&#39; name=&#39;sid&#39; value=&#39;[$SID$]&#39;&gt;<br><br>&lt;div id=&quot;conteneur&quot; name=&quot;conteneur&quot;&gt;<br>&lt;div id=&quot;TitleLayer&quot; name=&quot;TitleLayer&quot;&gt;
<br>&lt;br&gt;&lt;b&gt;&lt;u&gt;&lt;center&gt;&lt;FONT SIZE=&quot;+1&quot;&gt;Please authenticate to access*****&lt;/center&gt;&lt;/u&gt;&lt;/br&gt;<br>&lt;/div&gt;<br><br>&lt;div id=&quot;IconLayer&quot;&gt;<br>&lt;IMG SRC=&quot;./logo1.jpg&quot; align = middle &gt;
<br>&lt;/div&gt;<br><br>&lt;div id=&quot;InboxLayer&quot; name=&quot;InboxLayer&quot;&gt;<br>&lt;TABLE&gt;<br>&lt;TR&gt;&lt;TD&gt;User :&lt;/TD&gt;&lt;TD&gt;&lt;input type=&quot;text&quot; name=&quot;username&quot; value=&quot;&quot;&gt;&lt;/TD&gt;&lt;/TR&gt;
<br>&lt;TR&gt;&lt;TD&gt;Password : &lt;/TD&gt;&lt;TD&gt;&lt;input type=&quot;password&quot; name=&quot;password&quot; value=&quot;&quot;&gt;&lt;/TD&gt;&lt;/TR&gt;<br>&lt;TR&gt;&lt;TD&gt;&lt;input type=&quot;submit&quot; name=&quot;submit&quot; value=&quot;submit&quot;&gt;&lt;/TD&gt;&lt;TD&gt;&lt;a href=&quot;
help.html&quot; target=&quot;_blank&quot;&gt;?&lt;/TD&gt;&lt;/TR&gt;<br>&lt;/TABLE&gt;<br>&lt;/div&gt;<br>&lt;/div&gt;<br><br>&lt;/form&gt;<br>&lt;/body&gt;<br>&lt;/html&gt;<br><br><br></span>index.phtml <br><span style="font-family: monospace;">
<br><br>&lt;?php<br>/*<br>&nbsp;* <br>&nbsp;*/<br>include( &quot;../../htdocs/chameleon.php&quot; );<br><br>$szTemplate = &quot;./template.html&quot;;<br>$szMapFile = &quot;../map/chameleon.map&quot;;<br><br>class SampleApp extends Chameleon
<br>{<br>&nbsp;&nbsp;&nbsp; function SampleApp()<br>&nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; parent::Chameleon();<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $this-&gt;moMapSession = new MapSession_RW;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $this-&gt;moMapSession-&gt;setTempDir( getSessionSavePath());<br>&nbsp;&nbsp;&nbsp; }<br>}<br>//creation d&#39;une nouvelle session
<br>$oApp =&nbsp; new SampleApp();<br>//appel pour l&#39;authetification<br>$oApp-&gt;moAuthenticator = new Authenticator(&#39;login.html&#39; );<br>//renseignement des chemins pour les fichiers importants<br>$oApp-&gt;registerSkin( &#39;skins/sample&#39; );
<br>$oApp-&gt;CWCInitialize( $szTemplate, $szMapFile&nbsp; );<br>//acceptation des widgets ayant un niveau de maturité alpha (developpement)<br>$oApp-&gt;mnMinimumMaturityLevel = MATURITY_ALPHA;<br>$oApp-&gt;CWCExecute();<br>?&gt;
<br><br><br></span>in the file Authenticator.php :<br><br><span style="font-family: monospace;">function Authenticator($szLoginTemplate) {<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $this-&gt;mszLoginTemplate = $szLoginTemplate;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>
&nbsp;&nbsp;&nbsp; }<br>
&nbsp;&nbsp;&nbsp; <br>
&nbsp;&nbsp;&nbsp; function authenticate( $user, $password )<br>
&nbsp;&nbsp;&nbsp; {<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $_SESSION[&#39;CWCAuthentication&#39;] = false;<br>
&nbsp;&nbsp;&nbsp; <br>
&nbsp;&nbsp;&nbsp; $user=&quot;&#39;$user&#39;&quot;;<br>
&nbsp;&nbsp;&nbsp; $password=&quot;&#39;$password&#39;&quot;;<br>
<br>
&nbsp;&nbsp;&nbsp; $_SESSION[&#39;user&#39;] = $user;<br>
<br>
&nbsp;&nbsp;&nbsp; //echo $user.&quot;&lt;/br&gt;&quot;;<br>
&nbsp;&nbsp;&nbsp; //echo $password.&quot;&lt;/br&gt;&quot;;<br>
<br>
&nbsp;&nbsp;&nbsp; $conn = pg_connect(&quot;host=** port=** dbname=** user=** password=***&quot;);<br>
<br>
&nbsp;&nbsp;&nbsp; if (!$conn) {<br>
&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; return &quot;Autentification error occured.\n&quot;;<br>
&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; exit;<br>
&nbsp;&nbsp;&nbsp; }<br>
<br>
&nbsp;&nbsp;&nbsp; $result = pg_query($conn, &quot;SELECT *** FROM *** where (****=$user and ****=$password)&quot;);<br>
<br>
<br>
&nbsp;&nbsp;&nbsp; $nb_resultat = pg_num_rows($result);<br>
<br>
//echo $nb_resultat.&quot;&lt;/br&gt;&quot;;<br>
<br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if ($nb_resultat==1)&nbsp; <br>
&nbsp;&nbsp;&nbsp; {<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; <br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; $_SESSION[&#39;CWCAuthentication&#39;] = true;<br>
<br>
&nbsp;&nbsp;&nbsp; &nbsp; <br>
&nbsp;&nbsp;&nbsp; }<br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; else {$_SESSION[&#39;CWCAuthentication&#39;] = false;}<br>
<br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return $_SESSION[&#39;CWCAuthentication&#39;];<br>
&nbsp;&nbsp; }<br>
&nbsp;&nbsp;&nbsp; </span><br><br>cheers<br>dominique<br><div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">----------------------------------------------------------
<br><br>Message: 1<br>Date: Wed, 28 Nov 2007 12:03:53 -0800 (PST)<br>From: Minerva Duran Martinez &lt;<a href="mailto:mine_tod@yahoo.com.mx">mine_tod@yahoo.com.mx</a>&gt;<br>Subject: [Chameleon] I need help with Authenticator.php
<br>To: <a href="mailto:chameleon@lists.maptools.org">chameleon@lists.maptools.org</a><br>Message-ID: &lt;<a href="mailto:554011.93015.qm@web34413.mail.mud.yahoo.com">554011.93015.qm@web34413.mail.mud.yahoo.com</a>&gt;<br>
Content-Type: text/plain; charset=&quot;utf-8&quot;<br><br>Hi<br><br>I need help,<br>Someone Authenticator.php&nbsp;&nbsp;implemented in their applications chameleon, because I want to implement but I don&#39;t know as.<br><br>Regards,
<br><br>Minerva<br><br><br><br></blockquote></div><br>