Pagina 1 van 1

password protected tropic password voor ieder een

Geplaatst: 03 sep 2005, 18:23
door supperbas
hallo

ik heb de password protected mod gedownload hij werkt aleen hoef je niet een wachtwoord in te voeren als je ingelocht bent
hoe kan ik zorgen dat je altijd een password moet invoeren
http://www.supperbas.com/pot.txt
(instalalatie)

ik zelf denk dat het in deze code zit

Code: Selecteer alles

if( !$is_auth['auth_mod'] && $userdata['user_level'] != ADMIN )
{
	$redirect = str_replace("&", "&", preg_replace('#.*?([a-z]+?\.' . $phpEx . '.*?)$#i', '\1', htmlspecialchars($HTTP_SERVER_VARS['REQUEST_URI'])));

	if( $HTTP_POST_VARS['cancel'] )
	{
		redirect(append_sid("index .$phpEx"));
	}
	else if( $HTTP_POST_VARS['pass_login'] )
	{
		if( $forum_topic_data['topic_password'] != '' )
		{
			password_check('topic', $topic_id, $HTTP_POST_VARS['password'], $redirect);
		}
		else if( $forum_topic_data['forum_password'] != '' )
		{
			password_check('forum', $forum_id, $HTTP_POST_VARS['password'], $redirect);
		}
	}

	if( $forum_topic_data['topic_password'] != '' )
	{
		$passdata = ( isset($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_tpass']) ) ? unserialize(stripslashes($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_tpass'])) : '';
		if( $passdata[$topic_id] != md5($forum_topic_data['topic_password']) )
		{
			password_box('topic', $redirect);
		}
	}
	else if( $forum_topic_data['forum_password'] != '' )
	{
		$passdata = ( isset($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_fpass']) ) ? unserialize(stripslashes($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_fpass'])) : '';
		if( $passdata[$forum_id] != md5($forum_topic_data['forum_password']) )
		{
			password_box('forum', $redirect);
		}
	}
}
//
// END: Password check
//
weet iemand waar het in zit?

bedankt supperbas :thumb:

Geplaatst: 03 sep 2005, 18:54
door Bas
Omdat je admin/mod bent? :D

Geplaatst: 03 sep 2005, 19:01
door supperbas
Bas schreef:Omdat je admin/mod bent? :D
nee het is ook als je aleen ingelocht bent (zonder moderator ""power"" e.d.)

als je gast ben dan moet je wel in loggen maar (ik wil dat je altijd een wachtwoord in moet voegen (als ik dat "aan" heb staan voor dat tropic)

Geplaatst: 04 sep 2005, 10:50
door Paul
Verander het dan eens naar:

Code: Selecteer alles

   $redirect = str_replace("&", "&", preg_replace('#.*?([a-z]+?\.' . $phpEx . '.*?)$#i', '\1', htmlspecialchars($HTTP_SERVER_VARS['REQUEST_URI'])));

   if( $HTTP_POST_VARS['cancel'] )
   {
      redirect(append_sid("index .$phpEx"));
   }
   else if( $HTTP_POST_VARS['pass_login'] )
   {
      if( $forum_topic_data['topic_password'] != '' )
      {
         password_check('topic', $topic_id, $HTTP_POST_VARS['password'], $redirect);
      }
      else if( $forum_topic_data['forum_password'] != '' )
      {
         password_check('forum', $forum_id, $HTTP_POST_VARS['password'], $redirect);
      }
   }

   if( $forum_topic_data['topic_password'] != '' )
   {
      $passdata = ( isset($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_tpass']) ) ? unserialize(stripslashes($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_tpass'])) : '';
      if( $passdata[$topic_id] != md5($forum_topic_data['topic_password']) )
      {
         password_box('topic', $redirect);
      }
   }
   else if( $forum_topic_data['forum_password'] != '' )
   {
      $passdata = ( isset($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_fpass']) ) ? unserialize(stripslashes($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_fpass'])) : '';
      if( $passdata[$forum_id] != md5($forum_topic_data['forum_password']) )
      {
         password_box('forum', $redirect);
      }
   }

//
// END: Password check
//
Dan moet je altijd inloggen voor elk topic, ook als je admin bent ;)

Geplaatst: 04 sep 2005, 11:28
door supperbas
euh???...

ik had dit al gedaan aleen toen deeed hij het niet maar nu opeens wel :s
heel vaag maar bedankt paul