<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML xmlns="http://www.w3.org/TR/REC-html40" xmlns:v =
"urn:schemas-microsoft-com:vml" xmlns:o =
"urn:schemas-microsoft-com:office:office" xmlns:w =
"urn:schemas-microsoft-com:office:word" xmlns:m =
"http://schemas.microsoft.com/office/2004/12/omml"><HEAD>
<META content="text/html; charset=iso-8859-1" http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 8.00.6001.18904"><!--[if !mso]>
<STYLE>v\:* {
        BEHAVIOR: url(#default#VML)
}
o\:* {
        BEHAVIOR: url(#default#VML)
}
w\:* {
        BEHAVIOR: url(#default#VML)
}
.shape {
        BEHAVIOR: url(#default#VML)
}
</STYLE>
<![endif]-->
<STYLE>
<!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
        {mso-style-priority:99;
        mso-style-link:"Texte de bulles Car";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:8.0pt;
        font-family:"Tahoma","sans-serif";}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
span.TextedebullesCar
        {mso-style-name:"Texte de bulles Car";
        mso-style-priority:99;
        mso-style-link:"Texte de bulles";
        font-family:"Tahoma","sans-serif";}
.MsoChpDefault
        {mso-style-type:export-only;}
@page Section1
        {size:612.0pt 792.0pt;
        margin:70.85pt 70.85pt 70.85pt 70.85pt;}
div.Section1
        {page:Section1;}
-->
</STYLE>
<!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="2050" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></HEAD>
<BODY lang=FR link=blue bgColor=#ffffff vLink=purple>
<DIV><FONT size=2>Hi Jérémie</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>the simplest way is to add "?reset_session" (or
"&reset_session" if you already have other parameters) in the url which
allow the user to access the application.</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>otherwise, </FONT><FONT size=2>the reset_session parameter
being used very very early in the whole workflow, you can not set it using the
existing filtering mecanismes (im talking about the
filterGetRequest/filterPostRequest) but what you could do is add some code in
the client.php file, which is the default entry point for the application, or,
if you used a redirector entry point (see "Project Shortcut" in <A
href="http://www.cartoweb.org/cwiki/HowToCreateANewProject">http://www.cartoweb.org/cwiki/HowToCreateANewProject</A>)
you can add that code there instead.</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>$_REQUEST can be very easily manipulated, all you have to do
is something like this:</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>$_REQUEST['reset_session'] = 1; </FONT></DIV>
<DIV><FONT size=2>(the assignated value has no real importance, it is not
evaluated)</FONT></DIV>
<DIV><FONT size=2>enclosed in some condition so you can set it or not depending
of what you need, for example by checking the referer or something like
that</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>regards</FONT></DIV>
<DIV><FONT size=2>Oliver</FONT></DIV>
<BLOCKQUOTE
style="BORDER-LEFT: #000000 2px solid; PADDING-LEFT: 5px; PADDING-RIGHT: 0px; MARGIN-LEFT: 5px; MARGIN-RIGHT: 0px">
<DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
<DIV
style="FONT: 10pt arial; BACKGROUND: #e4e4e4; font-color: black"><B>From:</B>
<A title=j.joalland@memoris.fr href="mailto:j.joalland@memoris.fr">JOALLAND
jérémie</A> </DIV>
<DIV style="FONT: 10pt arial"><B>To:</B> <A
title=cartoweb-users@lists.maptools.org
href="mailto:cartoweb-users@lists.maptools.org">cartoweb-users@lists.maptools.org</A>
</DIV>
<DIV style="FONT: 10pt arial"><B>Sent:</B> Monday, April 26, 2010 2:13
PM</DIV>
<DIV style="FONT: 10pt arial"><B>Subject:</B> [Cartoweb-users] Need to reset
the session by PHP code</DIV>
<DIV><BR></DIV>
<DIV class=Section1>
<P class=MsoNormal><SPAN lang=EN-US>I am using CartoWeb 3.5 in a CMS (Joomla),
as I have several different cartographic menus.<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN lang=EN-US><o:p> </o:p></SPAN></P>
<P class=MsoNormal><SPAN lang=EN-US>My problem is that my Cartoweb page is
keeping the session information all the time.<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN lang=EN-US>When the user is accessing one
cartographic project for the first time, he can for example zoom in and change
the layer visibility settings.<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN lang=EN-US>Then he’s accessing other parts of the web
site.<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN lang=EN-US><o:p> </o:p></SPAN></P>
<P class=MsoNormal><SPAN lang=EN-US>Problem : when he comes back to the same
cartographic project for the second time, the cartoweb project page is not
opened with default setting (initial extent, initial layers setting), but as
it was after the first access : extent from zoom in and last layer visibility
settings.<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN lang=EN-US><o:p> </o:p></SPAN></P>
<P class=MsoNormal><SPAN lang=EN-US>Question : how can I reset the cartoweb
session when opening my cartographic project page ?<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN lang=EN-US>I am currently using this code to call the
project (from php page in /htdocs/) : <o:p></o:p></SPAN></P>
<P style="MARGIN-LEFT: 35.4pt" class=MsoNormal><SPAN
style="COLOR: #7030a0"><?php<o:p></o:p></SPAN></P>
<P style="MARGIN-LEFT: 35.4pt" class=MsoNormal><SPAN
style="COLOR: #7030a0">$_ENV['CW3_PROJECT'] =
'recherche_auvergne';<o:p></o:p></SPAN></P>
<P style="MARGIN-LEFT: 35.4pt" class=MsoNormal><SPAN style="COLOR: #7030a0"
lang=EN-US>require_once('client.php');<o:p></o:p></SPAN></P>
<P style="MARGIN-LEFT: 35.4pt" class=MsoNormal><SPAN style="COLOR: #7030a0"
lang=EN-US>?><o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN lang=EN-US><o:p> </o:p></SPAN></P>
<P class=MsoNormal><SPAN lang=EN-US>Thanks for you help.<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN lang=EN-US><o:p> </o:p></SPAN></P>
<P class=MsoNormal><A
title=""Ajouter ce contact a votre carnet d'adresse." "
href="JJO.vcf"><SPAN
style="FONT-FAMILY: 'Times New Roman','serif'; COLOR: blue; FONT-SIZE: 12pt; TEXT-DECORATION: none"><IMG
id=_x0000_i1025 border=0 src="cid:FDEC02BD04AE44FA954CE18BD44A9FD2@maunakea"
width=200 height=270></SPAN></A><o:p></o:p></P></DIV>
<P>
<HR>
<P></P>_______________________________________________<BR>Cartoweb-users
mailing
list<BR>Cartoweb-users@lists.maptools.org<BR>http://lists.maptools.org/mailman/listinfo/cartoweb-users<BR></BLOCKQUOTE></BODY></HTML>