Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > General > Testing Zone
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
test Details »»
test
Version: , by Atian Atian is offline
Developer Last Online: Dec 2002 Show Printable Version Email this Page

Version: Unknown Rating:
Released: 03-27-2002 Last Update: Never Installs: 0
 
No support by the author.

<?php
$usergroupida = 6 ;
$usergroupidb = 7 ;
$usergroupidc = 5 ;
if(!isset($PHP_AUTH_USER)) {
header("WWW-Authenticate: Basic realm=\"Karma Login\"");
header("HTTP/1.0 401 Unauthorized");
echo "Sorry no instant windows network login cancel authority allowed\n";
exit;
} else {
$link = mysql_connect("localhost", "peerbooks_zack", "rpm123123") //mysql server address , login name , password
or die ("Could not connect");
print ("Connected successfully");
echo "<br>";
mysql_select_db ("ffu_vb") //this shouldn't need changing unless you have it in a different database
or die ("Could not select database");

$query = ("SELECT password FROM user WHERE username='$PHP_AUTH_USER'");
$result = mysql_query ($query)
or die ("Query failed");
while ($line = mysql_fetch_array($result)) {
while(list($col_name, $col_value) = each($line)) {
$password = $col_value ;
}
}
if ($password != $PHP_AUTH_PW) {
echo "You must enter a valid login ID and password to access this
resource\n";
exit;
}
else {
mysql_free_result ($result);
$query = "SELECT usergroupid FROM user WHERE username='$PHP_AUTH_USER'";
$result = mysql_query ($query)
or die ("Query failed");
while ($line = mysql_fetch_array($result)) {
while(list($col_name, $col_value) = each($line)) {
$turkpower = $col_value ;
}
}
}
mysql_free_result ($result);
if ($turkpower = 1) {
echo "You are not permitted to do this action. Please go back.\n";
exit;
}
else {
if ($turkpower = 2) {
echo "You are not permitted to do this action. Please go back.\n";
exit;
}
else {
if ($turkpower = 3) {
echo "You are not permitted to do this action. Please go back.\n";
exit;
}
else {
if ($turkpower = 4) {
echo "You are not permitted to do this action. Please go back.\n";
exit;
}
else {
if ($turkpower = 5) {
echo "</p>Welcome: $PHP_AUTH_USER<br>";
}
}
mysql_close ($link);
echo "<form action=\"karma2.php\" method=\"post\">";
echo "<input type=\"hidden\" name=\"auth\" value=\"'yes'\">";
echo "<input type=\"text\" name=\"username\"><br>";
echo "<input type=\"submit\">";
echo "</form>";
}
else {
if ($turkpower = 6) {
echo "</p>Welcome: $PHP_AUTH_USER<br>";
}
}
mysql_close ($link);
echo "<form action=\"karma2.php\" method=\"post\">";
echo "<input type=\"hidden\" name=\"auth\" value=\"'yes'\">";
echo "<input type=\"text\" name=\"username\"><br>";
echo "<input type=\"submit\">";
echo "</form>";
}
else {
if ($turkpower = 6) {
echo "</p>Welcome: $PHP_AUTH_USER<br>";
}
}
mysql_close ($link);
echo "<form action=\"karma2.php\" method=\"post\">";
echo "<input type=\"hidden\" name=\"auth\" value=\"'yes'\">";
echo "<input type=\"text\" name=\"username\"><br>";
echo "<input type=\"submit\">";
echo "</form>";
}
?>

does it work??

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #22  
Old 03-30-2002, 10:36 PM
bigmattyh's Avatar
bigmattyh bigmattyh is offline
 
Join Date: Nov 2001
Posts: 141
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

post
Reply With Quote
  #23  
Old 03-30-2002, 10:36 PM
bigmattyh's Avatar
bigmattyh bigmattyh is offline
 
Join Date: Nov 2001
Posts: 141
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

another post
Reply With Quote
  #24  
Old 03-31-2002, 01:18 AM
Kyomu Kyomu is offline
 
Join Date: Mar 2002
Posts: 28
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

fgdfgfd
Reply With Quote
  #25  
Old 03-31-2002, 08:42 PM
boatdesign's Avatar
boatdesign boatdesign is offline
 
Join Date: Nov 2001
Posts: 116
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

and now it's working
Reply With Quote
  #26  
Old 03-31-2002, 08:43 PM
boatdesign's Avatar
boatdesign boatdesign is offline
 
Join Date: Nov 2001
Posts: 116
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

much better - taken to the last page of the thread as expected.
Reply With Quote
  #27  
Old 04-04-2002, 11:02 PM
unclejojo16's Avatar
unclejojo16 unclejojo16 is offline
 
Join Date: Mar 2002
Location: VBulletin.org
Posts: 36
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

1
Reply With Quote
  #28  
Old 04-04-2002, 11:03 PM
unclejojo16's Avatar
unclejojo16 unclejojo16 is offline
 
Join Date: Mar 2002
Location: VBulletin.org
Posts: 36
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

2
Reply With Quote
  #29  
Old 04-04-2002, 11:03 PM
unclejojo16's Avatar
unclejojo16 unclejojo16 is offline
 
Join Date: Mar 2002
Location: VBulletin.org
Posts: 36
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

3
Reply With Quote
  #30  
Old 04-04-2002, 11:03 PM
unclejojo16's Avatar
unclejojo16 unclejojo16 is offline
 
Join Date: Mar 2002
Location: VBulletin.org
Posts: 36
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

4
Reply With Quote
  #31  
Old 04-04-2002, 11:04 PM
unclejojo16's Avatar
unclejojo16 unclejojo16 is offline
 
Join Date: Mar 2002
Location: VBulletin.org
Posts: 36
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

5
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 10:47 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04779 seconds
  • Memory Usage 2,302KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete