Mensagem sobre o tópico
Problema com Logoff
MIME-Version: 1.0
Received: by 10.100.135.11 with SMTP id i11mr186900and.27.1246379489505; Tue,
30 Jun 2009 09:31:29 -0700 (PDT)
Date: Tue, 30 Jun 2009 09:31:29 -0700 (PDT)
X-IP: 189.72.177.223
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/5.0 (X11; U; Linux i686; pt-BR; rv:1.9.0.11)
Gecko/2009060308 Ubuntu/9.04 (jaunty) Firefox/3.0.11,gzip(gfe),gzip(gfe)
Message-ID: <b1f1ffc3-57e2-49ec-8e61-43f344403d66@f10g2000vbf.googlegroups.com>
Subject: Problema com Logoff
From: Junior <admtem...@gmail.com>
To: GOPHP <gophp@googlegroups.com>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Boa tarde eu estou tentando fazer um logoff em um sistema de
autentica=E7=E3o usando o $_SERVER['PHP_AUTH_USER'] .
Ate aonde eu sei ele criar uma sess=E3o ate aqui tudo bem so que ele tb
cria um cookies que eu nao consigo apagar
o codigo seque abaixo
<?php
ob_start();
include( "config.php" );
include( "dbfuncs.php" );
include( "funcs.php" );
header( "Expires: Mon, 26 Jul 1997 05:00:00 GMT" );
header( "Cache-Control: no-store, no-cache, must-revalidate" );
header( "Cache-Control: post-check=3D0, pre-check=3D0", false );
header( "Pragma: no-cache" );
session_start( );
if ( !isset( $_SERVER['PHP_AUTH_USER'] ) || $_POST['SeenBefore'] =3D=3D 1
&& $_POST['OldAuth'] =3D=3D $_SERVER['PHP_AUTH_USER'] )
{
header( "WWW-Authenticate: Basic realm=3D\"Entre com seu usu=E1rio e
senha\"" );
header( "HTTP/1.0 401 Unauthorized" );
echo "Voc=EA deve Entrar com um usu=E1rio e uma senha v=E1lida para
entra no sistema.\n";
exit( );
}
if ( find_manager( $_SERVER['PHP_AUTH_USER'], $_SERVER
['PHP_AUTH_PW'] ) =3D=3D false )
{
echo "<form action=3D'{$_SERVER['PHP_SELF']}' METHOD=3D'post'>\n";
echo "<input type=3D'hidden' name=3D'SeenBefore' value=3D'1' />\n";
echo "<input type=3D'hidden' name=3D'OldAuth' value=3D'{$_SERVER
['PHP_AUTH_USER']}' />\n";
echo "<input type=3D'submit' value=3D'Re Autentica=E7=E3o' />\n";
echo "</form></p>\n";
exit( );
}
$filename =3D adminmain_tpl;
if ( file_exists( $filename ) )
{
$page =3D implode( "", file( $filename ) );
}
else
{
exit( "Can't find {$filename}" );
}
if ( $_REQUEST['cont'] =3D=3D "" )
{
$_REQUEST['cont'] =3D "principal";
}
switch ( $_REQUEST['cont'] )
{
case "edit_payment" :
$subpage =3D edit_payment( $_REQUEST['id'] );
break;
case "update_payment" :
$subpage =3D update_payment( $_REQUEST['id'], $_REQUEST
['comment'] );
break;
case "stats" :
$subpage =3D stats( );
break;
case "show_search_users" :
$subpage =3D show_search_users( );
break;
case "update_settings" :
$subpage =3D update_settings( $_REQUEST['happyratio'], $_REQUEST
['happystart'], $_REQUEST['happystop'] );
break;
case "show_settings" :
$subpage =3D show_settings( );
break;
case "list_users" :
$subpage =3D list_users( $_REQUEST['from'], $_REQUEST['username'],
$_REQUEST['status'], $_REQUEST['mac'], $_REQUEST['realname'], $_REQUEST
['cpf_cnpj'], $_REQUEST['rg_ie'], $_REQUEST['email'], $_REQUEST
['phone'], $_REQUEST['mobile'], $_REQUEST['address'], $_REQUEST
['bairro'], $_REQUEST['city'], $_REQUEST['zip'], $_REQUEST['profid'],
$_REQUEST['comment'], $_REQUEST['ordercol'], $_REQUEST['ordertype'],
$_REQUEST['chord'], $_REQUEST['lastorder'], $_REQUEST['staticip'],
$_REQUEST['usestaticip'] );
break;
case "browse_payments" :
$subpage =3D browse_payments( );
break;
case "browse_payouts" :
$subpage =3D browse_payouts( );
break;
case "list_payments" :
$subpage =3D list_payments( $_REQUEST['username'], $_REQUEST
['manager'], $_REQUEST['fromdate'], $_REQUEST['todate'], $_REQUEST
['from'], true );
break;
case "list_payments1" :
$subpage =3D list_payments1( $_REQUEST['username'], $_REQUEST
['manager'], $_REQUEST['year1'], $_REQUEST['month1'], $_REQUEST
['day1'], $_REQUEST['year2'], $_REQUEST['month2'], $_REQUEST['day2'],
$_REQUEST['from'] );
break;
case "list_payouts" :
$subpage =3D list_payouts( $_REQUEST['manager'], $_REQUEST
['fromdate'], $_REQUEST['todate'], $_REQUEST['from'], true );
break;
case "list_payouts1" :
$subpage =3D list_payouts1( $_REQUEST['manager'], $_REQUEST
['year1'], $_REQUEST['month1'], $_REQUEST['day1'], $_REQUEST['year2'],
$_REQUEST['month2'], $_REQUEST['day2'], $_REQUEST['from'] );
break;
case "show_buy_credits" :
$subpage =3D show_buy_credits( $_REQUEST['username'] );
break;
case "buy_credits" :
$subpage =3D buy_credits( $_REQUEST['username'], $_REQUEST
['megabytes'], $_REQUEST['hours'], $_REQUEST['expiration'], $_REQUEST
['price'], $_REQUEST['comment'], $_REQUEST['resettraffic'] );
break;
case "payout" :
$subpage =3D payout( $_REQUEST['manager'], $_REQUEST['payout'] );
break;
case "ask_closesess" :
$subpage =3D ask_closesess( $_REQUEST['sessid'], $_REQUEST
['username'] );
break;
case "ask_del_user" :
$subpage =3D ask_del_user( $_REQUEST['username'] );
break;
case "ask_del_profile" :
$subpage =3D ask_del_profile( $_REQUEST['profid'], $_REQUEST
['profname'] );
break;
case "ask_del_manager" :
$subpage =3D ask_del_manager( $_REQUEST['username'] );
break;
case "close_session" :
$subpage =3D close_session( $_REQUEST['sessid'] );
break;
case "online_users" :
$subpage =3D online_users( $_REQUEST['from'], $_REQUEST['ordercol'],
$_REQUEST['ordertype'], $_REQUEST['chord'], $_REQUEST['lastorder'] );
break;
case "traffic_report" :
$subpage =3D traffic_report( $_REQUEST['from'], $_REQUEST
['username'], $_REQUEST['listmode'], $_REQUEST['date'], true );
break;
case "daily_traffic_report" :
$subpage =3D daily_traffic_report( $_REQUEST['from'], $_REQUEST
['username'], $_REQUEST['date'], true );
break;
case "list_profiles" :
$subpage =3D list_profiles( $_REQUEST['from'] );
break;
case "new_profile" :
$subpage =3D new_profile( $_REQUEST['profname'], $_REQUEST
['downrate'], $_REQUEST['uprate'], $_REQUEST['limitdl'], $_REQUEST
['limitul'], $_REQUEST['limitexpiration'], $_REQUEST['limituptime'],
$_REQUEST['poolname'], $_REQUEST['valor'], $_REQUEST['error'] );
break;
case "list_managers" :
$subpage =3D list_managers( $_REQUEST['from'] );
break;
case "edit_profile" :
$subpage =3D edit_profile( $_REQUEST['profid'], $_REQUEST
['profname'], $_REQUEST['downrate'], $_REQUEST['uprate'], $_REQUEST
['limitdl'], $_REQUEST['limitul'], $_REQUEST['limitexpiration'],
$_REQUEST['limituptime'], $_REQUEST['poolname'], $_REQUEST['valor'],
$_REQUEST['error'] );
break;
case "update_profile" :
$subpage =3D update_profile( $_REQUEST['profid'], $_REQUEST
['profname'], $_REQUEST['downrate'], $_REQUEST['uprate'], $_REQUEST
['limitdl'], $_REQUEST['limitul'], $_REQUEST['limittime'], $_REQUEST
['poolname'], $_REQUEST['valor'] );
break;
case "store_profile" :
$subpage =3D store_profile( $_REQUEST['profname'], $_REQUEST
['downrate'], $_REQUEST['uprate'], $_REQUEST['limitdl'], $_REQUEST
['limitul'], $_REQUEST['limittime'], $_REQUEST['poolname'], $_REQUEST
['valor'] );
break;
case "edit_user" :
$subpage =3D edit_user( $_REQUEST['username'], $_REQUEST
['enableuser'], $_REQUEST['profid'], $_REQUEST['password1'], $_REQUEST
['password2'], $_REQUEST['mac'], $_REQUEST['usemacauth'], $_REQUEST
['realname'], $_REQUEST['cpf_cnpj'], $_REQUEST['rg_ie'], $_REQUEST
['email'], $_REQUEST['phone'], $_REQUEST['mobile'], $_REQUEST
['address'], $_REQUEST['bairro'], $_REQUEST['city'], $_REQUEST['zip'],
$_REQUEST['downlimit'], $_REQUEST['uplimit'], $_REQUEST
['nolimitdown'], $_REQUEST['nolimitup'], $_REQUEST['downrate'],
$_REQUEST['uprate'], $_REQUEST['oridedownrate'], $_REQUEST
['orideuprate'], $_REQUEST['expiration'], $_REQUEST['noexpiration'],
$_REQUEST['uptimelimit'], $_REQUEST['nolimituptime'], $_REQUEST
['comment'], $_REQUEST['staticip'], $_REQUEST['usestaticip'], $_REQUEST
['simuse'], $_REQUEST['error'] );
break;
case "new_user" :
$subpage =3D new_user( $_REQUEST['username'], $_REQUEST
['enableuser'], $_REQUEST['profid'], $_REQUEST['password1'], $_REQUEST
['password2'], $_REQUEST['mac'], $_REQUEST['usemacauth'], $_REQUEST
['realname'], $_REQUEST['cpf_cnpj'], $_REQUEST['rg_ie'], $_REQUEST
['email'], $_REQUEST['phone'], $_REQUEST['mobile'], $_REQUEST
['address'], $_REQUEST['bairro'], $_REQUEST['city'], $_REQUEST['zip'],
$_REQUEST['downlimit'], $_REQUEST['uplimit'], $_REQUEST['expiration'],
$_REQUEST['uptimelimit'], $_REQUEST['comment'], $_REQUEST['staticip'],
$_REQUEST['usestaticip'], $_REQUEST['simuse'], $_REQUEST
['maconlyauth'], $_REQUEST['error'] );
break;
case "store_user" :
$subpage =3D store_user( $_REQUEST['username'], $_REQUEST
['enableuser'], $_REQUEST['profid'], $_REQUEST['password1'], $_REQUEST
['password2'], $_REQUEST['mac'], $_REQUEST['usemacauth'], $_REQUEST
['realname'], $_REQUEST['cpf_cnpj'], $_REQUEST['rg_ie'], $_REQUEST
['email'], $_REQUEST['phone'], $_REQUEST['mobile'], $_REQUEST
['address'], $_REQUEST['bairro'], $_REQUEST['city'], $_REQUEST['zip'],
$_REQUEST['downlimit'], $_REQUEST['uplimit'], $_REQUEST
['nolimitdown'], $_REQUEST['nolimitup'], $_REQUEST['downrate'],
$_REQUEST['uprate'], $_REQUEST['oridedownrate'], $_REQUEST
['orideuprate'], $_REQUEST['expiration'], $_REQUEST['noexpiration'],
$_REQUEST['uptimelimit'], $_REQUEST['nolimituptime'], $_REQUEST
['comment'], $_REQUEST['staticip'], $_REQUEST['usestaticip'], $_REQUEST
['simuse'], $_REQUEST['maconlyauth'] );
break;
case "new_manager" :
$subpage =3D new_manager( $_REQUEST['username'], $_REQUEST
['password1'], $_REQUEST['password2'], $_REQUEST['realname'], $_REQUEST
['phone'], $_REQUEST['mobile'], $_REQUEST['address'], $_REQUEST
['city'], $_REQUEST['zip'], $_REQUEST['comment'], $_REQUEST
['perm_listusers'], $_REQUEST['perm_createusers'], $_REQUEST
['perm_editusers'], $_REQUEST['perm_deleteusers'], $_REQUEST
['perm_listmanagers'], $_REQUEST['perm_createmanagers'], $_REQUEST
['perm_editmanagers'], $_REQUEST['perm_deletemanagers'], $_REQUEST
['perm_listprofiles'], $_REQUEST['perm_createprofiles'], $_REQUEST
['perm_editprofiles'], $_REQUEST['perm_deleteprofiles'], $_REQUEST
['perm_listonlineusers'], $_REQUEST['perm_listpayments'], $_REQUEST
['perm_listpayouts'], $_REQUEST['perm_searchusers'], $_REQUEST
['perm_trafficreport'], $_REQUEST['perm_addcredits'], $_REQUEST
['perm_makepayouts'], $_REQUEST['perm_logout'], $_REQUEST
['perm_listallpayments'], $_REQUEST['error'] );
break;
case "store_manager" :
$subpage =3D store_manager( $_REQUEST['username'], $_REQUEST
['password1'], $_REQUEST['password2'], $_REQUEST['realname'], $_REQUEST
['phone'], $_REQUEST['mobile'], $_REQUEST['address'], $_REQUEST
['city'], $_REQUEST['zip'], $_REQUEST['comment'], $_REQUEST
['perm_listusers'], $_REQUEST['perm_createusers'], $_REQUEST
['perm_editusers'], $_REQUEST['perm_deleteusers'], $_REQUEST
['perm_listmanagers'], $_REQUEST['perm_createmanagers'], $_REQUEST
['perm_editmanagers'], $_REQUEST['perm_deletemanagers'], $_REQUEST
['perm_listprofiles'], $_REQUEST['perm_createprofiles'], $_REQUEST
['perm_editprofiles'], $_REQUEST['perm_deleteprofiles'], $_REQUEST
['perm_listonlineusers'], $_REQUEST['perm_listpayments'], $_REQUEST
['perm_listpayouts'], $_REQUEST['perm_searchusers'], $_REQUEST
['perm_trafficreport'], $_REQUEST['perm_addcredits'], $_REQUEST
['perm_makepayouts'], $_REQUEST['perm_logout'], $_REQUEST
['perm_listallpayments'] );
break;
case "edit_manager" :
$subpage =3D edit_manager( $_REQUEST['username'], $_REQUEST
['password1'], $_REQUEST['password2'], $_REQUEST['realname'], $_REQUEST
['phone'], $_REQUEST['mobile'], $_REQUEST['address'], $_REQUEST
['city'], $_REQUEST['zip'], $_REQUEST['comment'], $_REQUEST
['perm_listusers'], $_REQUEST['perm_createusers'], $_REQUEST
['perm_editusers'], $_REQUEST['perm_deleteusers'], $_REQUEST
['perm_listmanagers'], $_REQUEST['perm_createmanagers'], $_REQUEST
['perm_editmanagers'], $_REQUEST['perm_deletemanagers'], $_REQUEST
['perm_listprofiles'], $_REQUEST['perm_createprofiles'], $_REQUEST
['perm_editprofiles'], $_REQUEST['perm_deleteprofiles'], $_REQUEST
['perm_listonlineusers'], $_REQUEST['perm_listpayments'], $_REQUEST
['perm_listpayouts'], $_REQUEST['perm_searchusers'], $_REQUEST
['perm_trafficreport'], $_REQUEST['perm_addcredits'], $_REQUEST
['perm_makepayouts'], $_REQUEST['perm_logout'], $_REQUEST
['perm_listallpayments'], $_REQUEST['error'] );
break;
case "del_user" :
$subpage =3D del_user( $_REQUEST['username'] );
break;
case "del_profile" :
$subpage =3D del_profile( $_REQUEST['profid'] );
break;
case "del_manager" :
$subpage =3D del_manager( $_REQUEST['username'] );
break;
case "update_user" :
$subpage =3D update_user( $_REQUEST['username'], $_REQUEST
['enableuser'], $_REQUEST['profid'], $_REQUEST['password1'], $_REQUEST
['password2'], $_REQUEST['mac'], $_REQUEST['usemacauth'], $_REQUEST
['realname'], $_REQUEST['cpf_cnpj'], $_REQUEST['rg_ie'], $_REQUEST
['email'], $_REQUEST['phone'], $_REQUEST['mobile'], $_REQUEST
['address'], $_REQUEST['bairro'], $_REQUEST['city'], $_REQUEST['zip'],
$_REQUEST['downlimit'], $_REQUEST['uplimit'], $_REQUEST['expiration'],
$_REQUEST['uptimelimit'], $_REQUEST['comment'], $_REQUEST['staticip'],
$_REQUEST['usestaticip'], $_REQUEST['simuse'] );
break;
case "update_manager" :
$subpage =3D update_manager( $_REQUEST['username'], $_REQUEST
['password1'], $_REQUEST['password2'], $_REQUEST['realname'], $_REQUEST
['phone'], $_REQUEST['mobile'], $_REQUEST['address'], $_REQUEST
['city'], $_REQUEST['zip'], $_REQUEST['comment'], $_REQUEST
['perm_listusers'], $_REQUEST['perm_createusers'], $_REQUEST
['perm_editusers'], $_REQUEST['perm_deleteusers'], $_REQUEST
['perm_listmanagers'], $_REQUEST['perm_createmanagers'], $_REQUEST
['perm_editmanagers'], $_REQUEST['perm_deletemanagers'], $_REQUEST
['perm_listprofiles'], $_REQUEST['perm_createprofiles'], $_REQUEST
['perm_editprofiles'], $_REQUEST['perm_deleteprofiles'], $_REQUEST
['perm_listonlineusers'], $_REQUEST['perm_listpayments'], $_REQUEST
['perm_listpayouts'], $_REQUEST['perm_searchusers'], $_REQUEST
['perm_trafficreport'], $_REQUEST['perm_addcredits'], $_REQUEST
['perm_makepayouts'], $_REQUEST['perm_logout'], $_REQUEST
['perm_listallpayments'] );
break;
default :
if ( $_REQUEST['cont'] !=3D "" )
{
$filename =3D $_REQUEST['cont'].".htm";
if ( file_exists( $filename ) )
{
$subpage =3D implode( "", file( $filename ) );
}
else
{
exit( "Can't find {$filename}" );
}
}
}
$page =3D str_replace( "{CONTENT}", $subpage, $page );
print $page;
ob_end_flush();
?>