LOGOUT (link)"
The same as Bytes, when u login, u dont see the form anymore, u just see a link written "Sign out".
But there are a few pages that still show the Login Form, I don't know why, They show the login form, but the user is logged already, so, it wont force them login again, anyway, that's weird.
Here the code of the page that's working fine
Expand|Select|Wrap|Line Numbers
- <script language="JavaScript1.2">
- var ie=document.all
- var dom=document.getElementById
- var ns4=document.layers
- var bouncelimit=32 //(must be divisible by 8)
- var direction="up"
- function initbox(){
- if (!dom&&!ie&&!ns4)
- return
- crossobj=(dom)?document.getElementById("dropin").style : ie? document.all.dropin : document.dropin
- scroll_top=(ie)? document.body.scrollTop : window.pageYOffset
- crossobj.top=scroll_top-250
- crossobj.visibility=(dom||ie)? "visible" : "show"
- dropstart=setInterval("dropin()",5)
- }
- function dropin(){
- scroll_top=(ie)? document.body.scrollTop : window.pageYOffset
- if (parseInt(crossobj.top)<300+scroll_top) //(vertical position, the horizontal position can be changed directly on the layer)
- crossobj.top=parseInt(crossobj.top)+90
- else{
- clearInterval(dropstart)
- bouncestart=setInterval("bouncein()",50)
- }
- }
- function bouncein(){
- crossobj.top=parseInt(crossobj.top)-bouncelimit
- if (bouncelimit<0)
- bouncelimit+=8
- bouncelimit=bouncelimit*-1
- if (bouncelimit==0){
- clearInterval(bouncestart)
- }
- }
- function dismissbox(){
- if (window.bouncestart) clearInterval(bouncestart)
- crossobj.visibility="hidden"
- }
- function get_cookie(Name) {
- var search = Name + "="
- var returnvalue = ""
- if (document.cookie.length > 0) {
- offset = document.cookie.indexOf(search)
- if (offset != -1) {
- offset += search.length
- end = document.cookie.indexOf(";", offset)
- if (end == -1)
- end = document.cookie.length;
- returnvalue=unescape(document.cookie.substring(offset, end))
- }
- }
- return returnvalue;
- }
- function dropornot(){
- if (get_cookie("droppedin")==""){
- window.onload=initbox
- document.cookie="droppedin=yes"
- }
- }
- dropornot()
- function redo(){
- bouncelimit=32
- direction="up"
- initbox()
- }
- window.onload=initbox
- </script>
- </HEAD>
- <BODY>
- <div id="dropin" style="position:absolute; left:230px; top:0px; width:500; height:150; background-color:#FFFFFF; z-index: ;visibility: hidden; z-index: 9999; background-image: url(http://lucrebem.com.br/spacer.gif); layer-background-image: url(spacer.gif); border: 1px none #000000;">
- <TABLE WIDTH="100%" HEIGHT="100%" BORDER="1" CELLPADDING="0" CELLSPACING="0" BORDERCOLOR="#000000">
- <TR>
- <TD valign="top"><div align="right"><a class="link" href="javascript:dismissbox()"><FONT FACE="Verdana" SIZE="-2"><B>X</B></FONT></a> </div>
- <FONT FACE="Verdana" SIZE="-1" COLOR="DODGERBLUE">
- <p><FONT FACE="Verdana" SIZE="2"> <strong>Insira seu anúncio aqui, e aumente seus lucros agora mesmo! <a href="http://lucrebem.com.br/promote_your_ad.php">Saiba mais...</a></strong></FONT></p>
- <p align="center"><img src="/business_people_jumping.jpg" width="300" height="300"></p></TD> </TR>
- </TABLE>
- </div>
- <?
- require_once 'path_cnfg.php';
- require_once(path_cnfg('pathToLibDir').'func_common.php');
- require_once(path_cnfg('pathToLibDir').'func_checkUser.php');
- require_once(path_cnfg('pathToCnfgDir').'cnfg_vars.php');
- require_once(path_cnfg('pathToLibDir').'vars_gbl.php');
- $cookie = $HTTP_COOKIE_VARS['log_in_cookie'];
- $myDB = db_connect();
- checkUser('', '');
- $content = array();
- $content[] = 'doMain();';
- // This line brings in the template file.
- // If you want to use a different template file
- // simply change this line to require the template
- // file that you want to use.
- require_once(path_cnfg('pathToTemplatesDir').cnfg('tmplt_index'));
- db_disconnect($myDB);
- # --- START FUNCTIONS ---
- // *********** START FUNCTION doMain() *************
- function doMain(){
- ?>
- <?
- $a = file_get_contents("http://lucrebem.com.br/showCatJobs.php?cat_id=159");
- echo ($a);
- ?>
- <STYLE>
- A.link:link {color: black; text-decoration: none}
- A.link:visited {color: black; text-decoration: none}
- A.link:active {color: black; text-decoration: none}
- A.link:hover {color: black; text-decoration : none;}
- </STYLE>
- <?
- } // end function doMain()
- // *********** END FUNCTION doMain() *************
- ?>
Here a page that keeps showing the login form
Expand|Select|Wrap|Line Numbers
- <?php
- require_once 'path_cnfg.php';
- require_once(path_cnfg('pathToLibDir').'func_common.php');
- require_once(path_cnfg('pathToLibDir').'func_checkUser.php');
- require_once(path_cnfg('pathToLibDir').'func_tree.php');
- require_once(path_cnfg('pathToCnfgDir').'cnfg_vars.php');
- require_once(path_cnfg('pathToLibDir').'vars_add_edit.php');
- require_once(path_cnfg('pathToLibDir').'vars_gbl.php');
- $myDB = db_connect();
- $content = array();
- $cookie = $HTTP_COOKIE_VARS['log_in_cookie'];
- if (isset($cat_id) )
- { $content[] = '$path;' ;
- $gbl["func_arg_arr"] = array("cat_id"=>$cat_id);
- $content[] = 'checkUser(\'ask_to_add($cat_id)\', \'você precisa efetuar log in.\', $gbl["func_arg_arr"]); ' ;
- }
- else
- { $content[] = 'checkUser(\'get_tree(select_to_add)\', \'você precisa efetuar log in, se ainda não é cadastrado, clique <a href="register.php">aqui.\');';
- }
- // This line brings in the template file.
- // If you want to use a different template file
- // simply change this line to require the template
- // file that you want to use.
- require_once(path_cnfg('pathToTemplatesDir').cnfg('tmplt_select_to_add'));
- db_disconnect($myDB);
- # ------- START FUNCTIONS ------
- // ************* START FUNCTION ask_to_add() *************
- function ask_to_add($cat_id)
- {
- GLOBAL $myDB ;
- echo 'Abaixo está o caminho para a categoria que você escolher:<BR><BR>';
- $path = climb_tree($cat_id, 'select_add') ;
- $path_arr = split("\!\@\#_SPLIT_\!\@\#", $path);
- for ($i=0; $i<count($path_arr); $i++)
- { echo $path_arr[$i] ;
- if($i < count($path_arr)-2)
- { echo '<FONT CLASS="subCat" COLOR="#FF0000"><B>>> </B></FONT>' ;
- }
- }
- echo '<BR><BR>';
- echo '<a href="add_item.php?cat_id='.$cat_id.'"><img src="lucrebemicons/additemtothiscategory.png" border="0"/> <FONT CLASS="subCat">Clique aqui para adicionar um item à esta categoria</FONT></a>';
- echo '<P>';
- echo '<NOSCRIPT>';
- echo '<a href="select_to_add.php"><FONT CLASS="subCat">Clique aqui para escolher uma categoria diferente</FONT></a><BR>';
- echo '</FONT>';
- echo '</NOSCRIPT>';
- echo '<SCRIPT LANGUAGE="JAVASCRIPT">';
- echo 'document.write(\'<a href="javascript:history.go(-1);"><FONT CLASS="subCat"><img src="lucrebemicons/chooseanothercategory.png" border="0"/> Clique aqui para escolher uma categoria diferente</FONT></a><BR>\');';
- echo '</SCRIPT>';
- } // end function ask_to_add()
- // ************* END FUNCTION ask_to_add() *************
- ?>
The template file (It contains the login form)
Expand|Select|Wrap|Line Numbers
- <html>
- <head>
- <title>Lucre Bem - Por que o céu é o limite.</title>
- <META NAME="DESCRIPTION" CONTENT="Anuncie completamente grátis, por que aqui você pode.">
- <META NAME="ABSTRACT" CONTENT="Site de anúncios grátis, e concursos públicos.">
- <META NAME="KEYWORDS" CONTENT="anuncios de classificados, anuncios classificados, de graça, que barato, meu site, anuncie, anunciar, classificados de carros, anuncios de emprego, anuncios de carros, classificados de imoveis, classificados de empregos.">
- <META NAME="LANGUAGE" CONTENT="PT">
- <meta name="google-site-verification" content="rR2J7YCNNtCUv739KCRQnsiT5X-1mcU8lMo-BlzifIk" />
- <style type="text/css">
- <!--
- .style1 {
- font-family: tahoma;
- font-size: 12px;
- }
- -->
- </style>
- </head>
- <style type="text/css">
- <!--
- body {
- margin-left: 0px;
- margin-top: 0px;
- margin-right: 0px;
- margin-bottom: 0px;
- }
- .style3 {
- font-size: 12px;
- color: #006600;
- font-family: Tahoma;
- font-weight: bold;
- }
- .style6 {
- font-family: Georgia, "Times New Roman", Times, serif;
- font-size: 12px;
- font-weight: bold;
- color: #006600;
- }
- -->
- </style>
- <body>
- <?php main_css(); ?>
- <style type="text/css">
- <!--
- body {
- background-image: url();
- margin-left: 0px;
- margin-right: 0px;
- margin-top: 0px;
- margin-bottom: 0px;
- }
- .style2 {color: #000000; font-family: Geneva, Arial, Helvetica, sans-serif;}
- #Layer1 {
- position:absolute;
- left:51px;
- top:421px;
- width:70px;
- height:85px;
- z-index:1;
- }
- #Layer2 { position:absolute;
- left:337px;
- top:-57px;
- width:247px;
- height:102px;
- z-index:1;
- }
- -->
- </style>
- <script src="http://lucrebem.com.br/templates/Scripts/AC_RunActiveContent.js" type="text/javascript"></script>
- <script src="http://lucrebem.com.br/templates/Scripts/AC_ActiveX.js" type="text/javascript"></script>
- <table width="834" border="0" cellpadding="0" cellspacing="0">
- <!--DWLayoutTable-->
- <tr>
- <td height="24" colspan="5" align="right" valign="top" bgcolor="DEEDFF"><?php main_header(); ?> </td>
- </tr>
- <tr>
- <td height="30" colspan="5" align="right" valign="top" bgcolor="DEEDFF"><?php top_nav(); ?></td>
- </tr>
- <tr>
- <td height="24" colspan="4" align="center" valign="top" bgcolor="DEEDFF">
- <FORM ACTION="<?=cnfg('deDir')?>search.php?doSearch=1" METHOD="POST">
- <input name="search" type="text" size="50" />
- <select name="category">
- <option value="none">Todas as categorias</option>
- <?php
- get_cat_optionshome();
- ?>
- </select>
- <input type="submit" name="submit" value="Pesquisar" />
- <input type="hidden" name="searchType" value="keyword" />
- <?php
- // end function search_by_keyword_form()
- // *********** END FUNCTION search_by_keyword_form() *************
- // *********** START FUNCTION get_cat_optionshome() *************
- function get_cat_optionshome()
- {
- $query = 'SELECT cat_name, cat_id
- FROM std_categories
- WHERE parent_id=0 ORDER BY cat_name ASC ';
- $result = mysql_query($query);
- while ($row = mysql_fetch_array($result) )
- { echo '<OPTION VALUE="'.$row['cat_id'].'">';
- echo $row['cat_name'] ;
- echo "</OPTION>" ;
- }
- } // end function get_cat_optionshome()
- // *********** END FUNCTION get_cat_optionshome() *************
- ?>
- </FORM></td>
- <td width="154" rowspan="3" align="left" valign="top" bgcolor="DEEDFF"> <p>
- <?
- log_in_form_and_status();
- /*
- require "adrotator/ad.php";
- echo show_ad();
- */
- ?>
- <br>
- <span class="style3"><font type="tahoma">Vagas de emprego na área tecnológica.</font></span></p>
- <p><span class="style3"><font type="tahoma">São Paulo</font></span>
- <iframe src="iframe.html" width="150" height="780" scrolling="no"></iframe>
- </p></td>
- </tr>
- <tr>
- <td width="11" rowspan="3" valign="top"><!--DWLayoutEmptyCell--> </td>
- <td width="17" rowspan="3" valign="top" background="/images/bg_leftNav.gif"><?php display_cats_main(); ?></td>
- <td height="19" colspan="2" align="left" valign="top" bgcolor="#DEEDFF">
- <script type="text/javascript">
- var _gaq = _gaq || [];
- _gaq.push(['_setAccount', 'UA-8104996-4']);
- _gaq.push(['_trackPageview']);
- (function() {
- var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
- ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
- var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
- })();
- </script>
- <script type="text/javascript"><!--
- google_ad_client = "pub-1337074307357116";
- /* 728x90, criado 21/12/09 */
- google_ad_slot = "3197427874";
- google_ad_width = 728;
- google_ad_height = 90;
- //-->
- </script>
- <script type="text/javascript"
- src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
- </script>
- </td>
- </tr>
- <tr>
- <td height="949" colspan="2" valign="top"><?php content($content); ?></td>
- </tr>
- <tr>
- <td width="645" height="212" align="right" valign="middle" bgcolor="DEEDFF">
- <!--
- <a href="http://www.permutalivre.com.br/indicacao/?id=189985"><img src="http://www.permutalivre.com.br/images/banner_afiliados.gif" alt="Compre e venda produtos novos e usados" width="580" height="160" border="0" align="absmiddle"></a>
- --> </td>
- <td colspan="2" align="right" valign="top" bgcolor="DEEDFF"><img src="http://lucrebem.com.br/templates/template/knowhow.gif" width="161" height="212" border="0" usemap="#1Map" />
- <map name="1Map" id="Map">
- <area shape="poly" coords="78,52" href="#" />
- <area shape="rect" coords="2,-2,160,207" href="promote_your_ad.php" />
- </map> </td>
- </tr>
- <tr>
- <td height="19" colspan="5" valign="top" bgcolor="DEEDFF"><!--DWLayoutEmptyCell--> </td>
- </tr>
- <tr>
- <td height="56" colspan="5" align="center" valign="top"> <span class="style1">2009 - 2011<br />
- Lucre Bem <br />
- Todos os direitos reservados <br />
- Desenvolvido por <a href="http://matheusgrafix.com">MatheusGrafix.coM</a> - Hospedado por <a href="http://mghospedagem.com">MGhospedagem</a>
- </span></td>
- </tr>
- <tr>
- <td height="1"></td>
- <td></td>
- <td></td>
- <td width="7"></td>
- <td></td>
- </tr>
- </table>
- </body>
- </html>
I think that the part responsible for the cookies is just in the begining of each code. Sorry for providing such a huge code, it's cause I just dont know exactly where the issue is located.