trying to get acpmanage to work on source

Started by Bjw, July 20, 2011, 12:14:40 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Bjw

Duh thank you cherwonk rofl.I need some brain food

cherwonk

 :-\ oops

need to change the
admin.php?tool=acpmanage
to

admin.php?action=acpmanage

Bjw

Thankyou it really just did the same thing.It got rid of the errors but just sent me back to the staffpanel.I went ahead and added an array in the staffpanel for the tools and it appears to work now.So I just am using some tools in the admin.php and some in the staff panel array.

Thanks for replying it is appreciated and it did get rid of some of the errors :)

cherwonk

Had the same problem with a couple of the admin folder files. I had to play with the
Code (php) Select
$lang = array_merge( $lang );

$stdfoot = array(/** include js **/'js' => array('acp'));

if (!min_class(UC_STAFF)) // or just simply: if (!min_class(UC_STAFF))
header( "Location: {$TBDEV['baseurl']}/index.php");

$HTMLOUT="";


most of the time

Code (php) Select
$lang = array_merge( $lang );
$HTMLOUT="";
if (!min_class(UC_STAFF)) // or just simply: if (!min_class(UC_STAFF))
header( "Location: {$TBDEV['baseurl']}/index.php");

would work .

Bjw

I have this one from mindless and have been trying to get it to working with the u-232

now when I try this I get these errors

Notice: Undefined variable: bans in /home/xxxx/domains/xxxx.xxx/public_html/include/bittorrent.php on line 112

Notice: Undefined variable: lang in /home/xxxx/domains/xxx.xxx/public_html/include/bittorrent.php on line 784

Warning: array_merge() [function.array-merge]: Argument #1 is not an array in /home/xxx/domains/xxxxxxxx/public_html/staffpanel.php on line 30

Warning: Cannot modify header information - headers already sent by (output started at /home/xxx/domains/xxxxxxxx/public_html/include/bittorrent.php:112) in /home/xxxx/domains/xxxxxxxx/public_html/templates/6/template.php on line 6

Now I am using the staff panel so have it listed in the admin.php    'acpmanage'   => 'acpmanage',

and of coarse the shortcut in panel admin.php?tool=acpmanage

Now I have actually removed the admin checks etc and tries direct access.Still same errors.I have also tried adding the array in the staffpanel and using it staffpanel tools way but no go.

any help would be appreciated.I have u232V1 up and working also 232v2 fired up and work and all of the others that mindless and putyn have released.I do all this to learn my away around the releases but this ones got me a bit buggered lol so any help would be appreciated.

Thanks ahead of time

<?php
/**
 *   http://btdev.net:1337/svn/test/Installer09_Beta
 *   Licence Info: GPL
 *   Copyright (C) 2010 BTDev Installer v.1
 *   A bittorrent tracker source based on TBDev.net/tbsource/bytemonsoon.
 *   Project Leaders: Mindless,putyn.
 **/
if ( ! defined'IN_TBDEV_ADMIN' ) )
{
$HTMLOUT='';
$HTMLOUT .= "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\"
\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">
<html xmlns='http://www.w3.org/1999/xhtml'>
<head>
<title>Error!</title>
</head>
<body>
<div style='font-size:33px;color:white;background-color:red;text-align:center;'>Incorrect access<br />You cannot access this file directly.</div>
</body></html>"
;
print $HTMLOUT;
exit();
}

require_once(
INCL_DIR.'user_functions.php');
require_once(
INCL_DIR.'html_functions.php');
require_once(
INCL_DIR.'pager_functions.php');

$lang array_merge$lang );

$stdfoot = array(/** include js **/'js' => array('acp'));

if (!
min_class(UC_STAFF)) // or just simply: if (!min_class(UC_STAFF))
header"Location: {$TBDEV['baseurl']}/index.php");

$HTMLOUT="";
 
    if (isset(
$_POST['ids'])) { 
    
$ids $_POST["ids"];
  
    foreach (
$ids as $id)
    if (!
is_valid_id($id))
        
stderr('Error...''Invalid ID!');

    
$do = isset($_POST["do"]) ? htmlspecialchars(trim($_POST["do"])) : '';

    if (
$do == 'enabled')
        
sql_query("UPDATE users SET enabled = 'yes' WHERE ID IN(" join(', '$ids) . ") AND enabled = 'no'");
    elseif (
$do == 'confirm')
        
sql_query("UPDATE users SET status = 'confirmed' WHERE ID IN(" join(', '$ids) . ") AND status = 'pending'");
    elseif (
$do == 'delete')
        
sql_query("DELETE FROM users WHERE ID IN(" join(', '$ids) . ")");
    else {
        
header('Location: ' $_SERVER['PHP_SELF']);
        exit;
    }


$disabled number_format(get_row_count("users""WHERE enabled='no'"));
$pending number_format(get_row_count("users""WHERE status='pending'"));

$count number_format(get_row_count("users""WHERE enabled='no' OR status='pending' ORDER BY username DESC"));
$perpage '25';
$pager pager($perpage$count"admin.php?action=acpmanage&amp;");

$res sql_query("SELECT id, username, added, downloaded, uploaded, last_access, class, donor, warned, enabled, status FROM users WHERE enabled='no' OR status='pending' ORDER BY username DESC {$pager['limit']}");

$HTMLOUT .= begin_main_frame("Disabled Users: [$disabled] | Pending Users: [$pending]");


if (
mysql_num_rows($res) != 0) {
    
$HTMLOUT .= $pager['pagertop'];
    
    
$HTMLOUT .="<form action='admin.php?action=acpmanage' method='post'>";
    
$HTMLOUT .= begin_table(''true);

  
$HTMLOUT .="
<tr align='center'>
<td class='colhead'>

<input style='margin:0' type='checkbox' title='Mark All' value='Mark All' onclick=\"this.value=check(form);\" /></td>
<td class='colhead'>Username</td>
<td class='colhead'>Registered</td>
<td class='colhead' style='white-space: nowrap;'>Last access</td>
<td class='colhead' style='white-space: nowrap;'>Class</td>
<td class='colhead'>Downloaded</td>
<td class='colhead'>UpLoaded</td>
<td class='colhead'>Ratio</td>
<td class='colhead'>Status</td>
<td class='colhead' style='white-space: nowrap;'>Enabled</td>
</tr>"
;
 
  while ($arr mysql_fetch_assoc($res)) {
        
$uploaded mksize($arr["uploaded"]);
        
$downloaded mksize($arr["downloaded"]);
        
$ratio $arr['downloaded'] > $arr['uploaded'] / $arr['downloaded'] : 0;
        
$ratio number_format($ratio2);
        
$color get_ratio_color($ratio);
        if (
$color)
        
$ratio "<font color='$color'>$ratio</font>";
        
$added get_date($arr['added'], 'LONG',0,1);
        
$last_access get_date($arr['last_access'], 'LONG',0,1);
        
$class get_user_class_name($arr["class"]);
 
    
$HTMLOUT .="<tr align='center'><td><input type=\"checkbox\" name=\"ids[]\" value=\"{$arr['id']}\" /></td><td><a href='/userdetails.php?id={$arr['id']}'><b>{$arr['username']}</b></a>" . ($arr["donor"] == "yes" "<img src='pic/star.gif' border='0' alt='Donor' />" "") . ($arr["warned"] == "yes" "<img src='pic/warned.gif' border='0' alt='Warned' />" "") . "</td>
<td style='white-space: nowrap;'>
{$added}</td>
<td style='white-space: nowrap;'>
{$last_access}</td>
<td>
{$class}</td>
<td>
{$downloaded}</td>
<td>
{$uploaded}</td>
<td>
{$ratio}</td>
<td>
{$arr['status']}</td>
<td>
{$arr['enabled']}</td>
</tr>\n"
;
    }
    
$HTMLOUT .="<tr><td colspan='10' align='center'><select name='do'><option value='enabled' disabled='disabled' selected='selected'>What to do?</option><option value='enabled'>Enable selected</option><option value='confirm'>Confirm selected</option><option value='delete'>Delete selected</option></select><input type='submit' value='Submit' /></td></tr>";
    
$HTMLOUT .= end_table();
    
$HTMLOUT .="</form>";
    
$HTMLOUT .= $pager['pagerbottom'];
} else
    
$HTMLOUT .= stdmsg('Sorry''Nothing found!');

$HTMLOUT .= end_main_frame();
print 
stdhead('Account manage') . $HTMLOUT stdfoot($stdfoot);
?>