Version 1.3.0

This commit is contained in:
Neo committed 2025-12-19 00:17:06 -08:00
1 parent 7ef3d1712a
commit f87d29ba65
290 files changed
+50206 -17930

No files matched your search

+127 -25
View File
@@ -2,15 +2,17 @@
/*
+--------------------------------------------------------------------------
| IBFORUMS v1
| Invision Power Board v1.3 Final
| ========================================
| by Matthew Mecham and David Baxter
| (c) 2001,2002 IBForums
| http://www.ibforums.com
| by Matthew Mecham
| (c) 2001 - 2003 Invision Power Services
| http://www.invisionpower.com
| ========================================
| Web: http://www.ibforums.com
| Email: phpboards@ibforums.com
| Licence Info: phpib-licence@ibforums.com
| Web: http://www.invisionboard.com
| Time: Sun, 04 Jan 2004 00:30:16 GMT
| Release: 28e7bfb25f08ac72a789cb1b172fa185
| Email: matt@invisionpower.com
| Licence Info: http://www.invisionboard.com/?license
+---------------------------------------------------------------------------
|
| > Admin wrapper script
@@ -31,7 +33,7 @@ $is_on_tripod = 0;
// Root path
$root_path = "./";
define( 'ROOT_PATH', './' );
// Check IP address to see if they match?
// this may cause problems for users on proxies
@@ -43,8 +45,13 @@ $check_ip = 1;
// in the admin center?
$use_gzip = 1;
// Enable module usage?
// (Vital for some mods and IPB enhancements)
define ( 'USE_MODULES', 1 );
/*-----------------------------------------------
NO USER EDITABLE SECTIONS BELOW
------------------------------------------------*/
@@ -52,6 +59,8 @@ $use_gzip = 1;
error_reporting (E_ERROR | E_WARNING | E_PARSE);
set_magic_quotes_runtime(0);
define ( 'IN_ACP', 1 );
if ( $is_on_tripod != 1 )
{
if (function_exists('ini_get'))
@@ -97,14 +106,22 @@ class Debug {
class info {
var $vars = "";
var $version = '1.0';
var $vars = "";
var $version = '1.3';
var $acpversion = '13005';
var $base_url = '';
function info($INFO)
{
//global $INFO;
$this->vars = $INFO;
$this->vars['TEAM_ICON_URL'] = $INFO['html_url'] . '/team_icons';
$this->vars['AVATARS_URL'] = $INFO['html_url'] . '/avatars';
$this->vars['EMOTICONS_URL'] = $INFO['html_url'] . '/emoticons';
$this->vars['mime_img'] = $INFO['html_url'] . '/mime_types';
$this->base_url = $INFO['board_url']."/index.".$INFO['php_ext'].'?';
}
}
@@ -114,7 +131,7 @@ class info {
Import $INFO
------------------------------------------------*/
require $root_path."conf_global.php";
require ROOT_PATH."conf_global.php";
$ibforums = new info($INFO);
@@ -140,7 +157,7 @@ $PassWord = "";
Load up our classes (compiled into one package)
------------------------------------------------*/
require $root_path."sources/functions.php";
require ROOT_PATH."sources/functions.php";
$std = new FUNC;
@@ -152,26 +169,30 @@ $IN = $std->parse_incoming();
$IN['AD_SESS'] = $HTTP_POST_VARS['adsess'] ? $HTTP_POST_VARS['adsess'] : $HTTP_GET_VARS['adsess'];
$IN['AD_SESS'] = $std->clean_value( $IN['AD_SESS'] );
/*-----------------------------------------------
Import $PAGES and $CATS
------------------------------------------------*/
require $root_path."sources/Admin/admin_pages.php";
require ROOT_PATH."sources/Admin/admin_pages.php";
/*-----------------------------------------------
Import Skinable elements
------------------------------------------------*/
require $root_path."sources/Admin/admin_skin.php";
require ROOT_PATH."sources/Admin/admin_skin.php";
$SKIN = new admin_skin();
$skin_universal = &$SKIN; //To keep functions.php happy
/*-----------------------------------------------
Import Admin Functions
------------------------------------------------*/
require $root_path."sources/Admin/admin_functions.php";
require ROOT_PATH."sources/Admin/admin_functions.php";
$ADMIN = new admin_functions();
@@ -181,7 +202,7 @@ $ADMIN = new admin_functions();
$INFO['sql_driver'] = !$INFO['sql_driver'] ? 'mySQL' : $INFO['sql_driver'];
$to_require = $root_path."sources/Drivers/".$INFO['sql_driver'].".php";
$to_require = ROOT_PATH."sources/Drivers/".$INFO['sql_driver'].".php";
require ($to_require);
$DB = new db_driver;
@@ -205,6 +226,30 @@ $DB->connect();
// Good eh?
//------------------------------------------------
//------------------------------------------------
// Sort out settings cookie
//------------------------------------------------
$INFO['menu'] = 0;
$INFO['tx'] = 80;
$INFO['ty'] = 40;
$INFO['preview'] = "";
if ( $cookie = $std->my_getcookie('acpprefs') )
{
list( $INFO['menu'], $INFO['tx'], $INFO['ty'], $INFO['preview'] ) = explode( ",", $cookie );
}
//------------------------------------------------
// ME 'N U!
//------------------------------------------------
if ( ! isset($IN['show']) )
{
$IN['show'] = $std->my_getcookie('acpmenu');
}
if ($IN['show'] == 'none')
{
$IN['show'] = "";
@@ -372,7 +417,9 @@ else
// DB
//----------------------------------
$DB->query("SELECT name, password, id, mgroup FROM ibf_members WHERE LOWER(name)='".strtolower($IN['username'])."'");
$username = strtolower(str_replace( '|', '|', $IN['username']) );
$DB->query("SELECT name, password, id, mgroup FROM ibf_members WHERE LOWER(name)='".$username."'");
$mem = $DB->fetch_row();
if ( empty($mem['id']) )
@@ -502,7 +549,7 @@ else
function do_login($message="") {
global $IN, $DB, $ADMIN, $SKIN;
global $IN, $DB, $ADMIN, $SKIN, $std;
//-------------------------------------------------------
// Remove all out of date sessions, like a good boy. Woof.
@@ -527,6 +574,29 @@ function do_login($message="") {
//-->
</script>
";
//+------------------------------------------------------
//| SEMI-AUTO Log in ma-thingy?
//+------------------------------------------------------
$name = "";
$extra = "";
$mid = intval( $std->my_getcookie('member_id') );
if ( $mid > 0 )
{
$DB->query("SELECT m.id, m.name, m.mgroup, g.g_access_cp FROM ibf_members m, ibf_groups g WHERE m.id=$mid AND g.g_id=m.mgroup AND g.g_access_cp=1");
if ( $r = $DB->fetch_row() )
{
$name = $r['name'];
$extra = 'onload="document.theAdminForm.password.focus();"';
}
}
//+------------------------------------------------------
//| SHW DA FRM (txt msg stylee)
//+------------------------------------------------------
$ADMIN->html .= $SKIN->start_form( array( 1 => array('login', 'yes') ) );
@@ -536,7 +606,7 @@ function do_login($message="") {
$ADMIN->html .= $SKIN->start_table( "Verification Required" );
$ADMIN->html .= $SKIN->add_td_row( array( "Your Forums Username:",
"<input type='text' style='width:100%' name='username' value=''>",
"<input type='text' style='width:100%' name='username' value='$name'>",
) );
$ADMIN->html .= $SKIN->add_td_row( array( "Your Forums Password:",
@@ -546,6 +616,10 @@ function do_login($message="") {
$ADMIN->html .= $SKIN->end_form("Log in");
$ADMIN->html .= $SKIN->end_table();
$SKIN->top_extra = $extra;
$ADMIN->no_jump = 1;
$ADMIN->output();
@@ -556,7 +630,20 @@ function do_login($message="") {
function do_admin_stuff() {
global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP, $ibforums;
global $IN, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP, $ibforums;
if ( $INFO['ipb_reg_number'] )
{
list( $a, $b, $c, $d, $e ) = explode( '-', $INFO['ipb_reg_number'] );
if ( strlen($e) > 9 )
{
if ( time() > $e )
{
$ADMIN->rebuild_config( array( 'ipb_reg_number' => '' ) );
}
}
}
/*----------------------------------
@@ -590,6 +677,16 @@ function do_admin_stuff() {
'adminlog' => "adminlogs",
'ips' => 'ips',
'mysql' => 'mysql',
'pin' => 'plugins',
'emaillog' => 'emaillogs',
'multimod' => 'multi_moderate',
'prefs' => "prefs",
'spiderlog' => "spiderlogs",
'warnlog' => "warnlogs",
'csite' => 'ad_dynamiclite',
'msubs' => 'subsmanager',
'mtools' => 'member_tools',
'skinfix' => 'skinfix',
);
@@ -598,7 +695,8 @@ function do_admin_stuff() {
$IN['act'] = $IN['act'] == '' ? "idx" : $IN['act'];
// Check to make sure the array key exits..
if (! isset($choice[$IN['act']]) ) {
if (! isset($choice[$IN['act']]) )
{
$IN['act'] = 'idx';
}
@@ -613,9 +711,13 @@ function do_admin_stuff() {
{
$ADMIN->menu();
}
else if ($IN['act'] == 'csite')
{
require ROOT_PATH."sources/dynamiclite/ad_dynamiclite.php";
}
else
{
require $root_path."sources/Admin/ad_".$choice[$IN['act']].".php";
require ROOT_PATH."sources/Admin/ad_".$choice[$IN['act']].".php";
}
}