Webmaster Forum


Go Back   Webmaster Forum > Web Development > Web Design Lobby > Coding Forum
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Coding Forum Problems with your code? Let's hear about it.

Easy Date   I Sell Pagerank   V7N Directory

Reply
 
LinkBack Thread Tools Display Modes
Old 04-06-2004, 10:59 AM   #1 (permalink)
Inactive
 
Join Date: 04-06-04
Posts: 6
iTrader: 0 / 0%
Latest Blog:
None

TinEastwood is liked by many
Can`t get this to work

I can`t get the last stuff to work - last part Change Steam id

<?php

define('IN_PHPBB', 1);

//
// First we do the setmodules stuff for the admin cp.
//
if( !empty($setmodules) )
{
$filename = basename(__FILE__);
$module['Users']['Manage Players'] = $filename;

return;
}


define('IN_PHPBB', true);
$phpbb_root_path = './../';
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);

//
// Start session management
//
$userdata = session_pagestart($user_ip, PAGE_INDEX);
init_userprefs($userdata);
//
// End session management

// Change this to the Group ID
$secure_against_group_name = ('9');


// Group ID, Make 0
$name_or_id = "0";

// Only change this if you have changed the default
// Prefix in your phpBB2 installation
$table_prefix2 = "phpbb_";

// Put the Message you want for when the User to see if he is not a member of any of the groups.
$notamemberofgroup = "<p align='center'>You do not have access to this area";

?>
<body bgcolor="676767" text="FFFFFF" alink="FFE081" vlink="FFE081" link="FFE081">
<?
if($name_or_id == "0")
{
$secure_against_group_no = $secure_against_group_name;
}
else
{
// Move to different Variable
$secure_against_group_no = $idsandstuff;
}

$sql88="SELECT * FROM " . $table_prefix . "user_group WHERE group_id='" . $secure_against_group_no . "' AND user_id='" . $userdata[user_id] . "' LIMIT 1";
if ( !($result = $db->sql_query($sql8) )
{
die("<B>Error:</B> Could not get user information<BR>SQL: $sql");
}

if ($db->sql_numrows($result) == 0)
{
echo "You do not have access to this area!";
}
else
{

$result3 = mysql_query("SELECT user_id, group_id FROM phpbb_user_group WHERE group_id='4' AND user_pending='0' OR group_id='5' AND user_pending='0' ORDER BY group_id DESC");

while ($r = mysql_fetch_array($result3))
{
$id = $r["user_id"];
$groupid = $r['group_id'];

if ($groupid == 4) {
$team = 1;
} else if ($groupid == 5) {
$team = 2;
}

$sql5="SELECT username, user_email, user_pass, user_access FROM phpbb_users WHERE user_id='$id'";
$sql_result3 = mysql_query($sql5) or die ("$text_noquery - 11");
$num = mysql_num_rows($sql_result3);
$row5 = mysql_fetch_array($sql_result3);
$fname = $row5['username'];
$femail = $row5['user_email'];
$fpass = $row5['user_pass'];
$faccess = $row5['user_access'];

if (!$page) {
if ($team == 1) { $teamname = "Colonist"; } else if ($team == 2) { $teamname = "British"; } else { $teamname = "error 5"; }
echo ("<table border='0' cellpadding='0' cellspacing='0' width='100%'>
<tr>
<td align='left' width='15%'>$fname</td>
<td align='left' width='5%'>$teamname</td>
<td align='left' width='15%'><a href='$PHP_SELF?page=changeteam&id2=$id&groupid2=$ groupid'>Change Team</a> : <a href='$PHP_SELF?page=delete&id2=$id&groupid2=$grou pid'>Delete User</a></td>
<td align='left' width='10%'>$fpass</td>
<td align='left' width='5%'> - $faccess</td>
<td align='left' width='5%'><a href='$PHP_SELF?page=changesteam'>Steam_id</a></td>
</tr>
</table>");
}
}
#----------------------------Start Delete--------------------#
if ($page == "delete") {
if ($confirm == "yes") {
$sql9 = "DELETE FROM phpbb_user_group WHERE user_id='$id2' AND group_id='$groupid2' AND user_pending='0'";
$sql_result9 = mysql_query($sql9) or die ("$text_noquery - 12");


if (!$sql_result9) {
echo ("<p>Could not delete user</p>"); }
else {
echo("<p><center>User Deleted Successfully! <a href=$PHP_SELF>Back to the Main Page</a></center></p>"); }
}
else {
echo ("<center>Are you sure you want to delete this user?&nbsp;&nbsp;<a href='$PHP_SELF?page=delete&id2=$id2&groupid2=$gro upid&confirm=yes'>YES</a></center>");
}
}
#-------------------------------End Delete-------------------#
#---------------------------INFO-----------------------------#
if ($page == "info") {
?>
<p align="center"><br>
</p>
<p align="center">This script was created by <a href="mailto:ggg@agg.com"><font color="#FF0000">ggg</font></a></p>
<p align="center"><a href="http://www.ggg.com">www.ggg.com</a></p>
<p align="center">&nbsp;</p>
<p align="center">&nbsp;</p>
<p align="center"><a href="<?php echo"$PHP_SELF"; ?>">Go Back To Main</a></p>
<?php
}
#-------------------------END INFO---------------------------#
#------------------------Start Change Team-------------------#
if ($page == "changeteam") {
if($confirm == "yes") {
if ($groupid2 == 4) {
$sql10 = "UPDATE phpbb_user_group SET group_id='5' WHERE user_id='$id2' AND group_id='4' AND user_pending='0'";
$sql_result10 = mysql_query($sql10) or die ("$text_noquery - 13"); }
if ($groupid2 == 5) {
$sql10 = "UPDATE phpbb_user_group SET group_id='4' WHERE user_id='$id2' AND group_id='5' AND user_pending='0'";
$sql_result10 = mysql_query($sql10) or die ("$text_noquery - 13"); }

if (!$sql_result10) {
echo ("<p><center>Could not change team</center></p>"); }
else {
echo("<p><center>Team Changed Successfully! <a href=$PHP_SELF>Back to the Main Page</a></center></p>"); }
}
else {
echo ("<center>Are you sure you want to change this user's team?&nbsp;&nbsp;<a href='$PHP_SELF?page=changeteam&id2=$id2&groupid2= $groupid2&confirm=yes'>YES</a></center>");
}
}
#------------------------End Change Team---------------------#
#------------------------Start Change Steam id-------------------#
if ($page == "changesteam") {

echo ("<form method='POST' action='$PHP_SELF'>");
echo ("<p><input type='text' name='$fpass' size='20' value='$user_pass'></p>");
echo ("<p><input type='submit' value='submit' name='submit'><input type='hidden' name='page' value='steam'></p>"); }
if ($page == steam) {
$sqladd = "UPDATE phpbb_users SET $user_pass='$fpass' WHERE user_id='$id'";
$sql_result22 = mysql_query($sqladd) or die ("$text_noquery - steam");
if (!$sql_result22) {
echo "there was an error while submitting the info";
} else {
echo "Info inserted successfully! Click <a href='$PHP_SELF'>here</a> to return to the main page";
}
}
#------------------------End Change steam id---------------------#
?><br><br><br><br><br><br><br><br><br><center><a href="<?php echo"$PHP_SELF"; ?>?page=info">info</a></center><?php

}



?>
TinEastwood is offline  
Add Post to del.icio.us
Reply With Quote
Sponsored Links
SEO Hosting by HostGator  Advertise Here  Buy Blog Links
Go Back   Webmaster Forum > Web Development > Web Design Lobby > Coding Forum

Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Do you work on personal web projects while you are at work? dndoseller Forum Lobby 12 02-10-2008 10:55 AM


Sponsor Links
Get exposure! Get exposure! Find Scripts Web Hosting Directory Get exposure! SEO Blog


All times are GMT -7. The time now is 09:35 PM.
© Copyright 2008 V7 Inc