tak plik ma tajka sama nazwe i zastaopilem nim oryginalny plik bo tak to mod nie chcial dzialac tzn nie bylo opcji w acp
plik oryginalny zajmuje wiecej niz z moda
w ogole nie mam pojecia jak mam to zrobic wgralem ten program, ale jak tam praktycznie wszytko sie rozni inny plik z reszta sam zobacz
z moda
<?php
/*
+-------------------------------------------------
| Downloads Script
| © 2005 - 2006 Vietnamese - Invision Resources
| [url="http://www.invisionviet.net/"]http://www.invisionviet.net/[/url]
| ================================================
| Idea & Development:
| . Dzung Nguyen (ntd1712)
| . Vinny Truong (invisionviet)
| ================================================
| Date Started: Sun, 20 Nov 2005 10:54 (GMT+7)
| Last Updated: Fri, 15 Dec 2006 15:15 (GMT+7)
+-------------------------------------------------
*/
if (! defined('IN_ACP'))
{
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files.";
exit();
}
class ad_downloads
{
var $ipsclass;
function auto_run()
{
//-----------------------------------------
// Kill globals - globals bad, Homer good.
//-----------------------------------------
$tmp_in = array_merge($_GET, $_POST, $_COOKIE);
foreach ($tmp_in as $k => $v)
{
unset($$k);
}
$this->ipsclass->admin->page_title = "Downloads Script Manager";
$this->ipsclass->admin->page_detail = "You can set up and manage your Downloads Script in this section.";
$this->ipsclass->admin->nav[] = array('section=components&act=downloads', 'Downloads');
//-----------------------------------------
// Do some set up
//-----------------------------------------
if (! is_dir(ROOT_PATH.'/modules/downloads'))
{
$this->ipsclass->admin->show_inframe("http://www.invisionviet.net/license.php?id=1");
}
else
{
$req = array('groups' => 'ad_groups',
'settings' => ''
);
$cmd = strtolower($this->ipsclass->input['req']);
$cmd = (in_array($cmd, array_keys($req))) ? $cmd : 'settings';
if ($cmd == 'settings')
{
require_once(ROOT_PATH.'sources/action_admin/settings.php');
$lib = new ad_settings();
$lib->ipsclass = &$this->ipsclass;
$lib->get_by_key = 'dsconfig';
$lib->return_after_save = $this->ipsclass->form_code.'&req=settings';
$lib->setting_view();
}
else
{
require(ROOT_PATH."modules/downloads/admin/{$req[$cmd]}.php");
$obj = new $req[$cmd];
$obj->ipsclass = &$this->ipsclass;
$obj->run_me();
}
}
}
}
?>
<?php
/*
+--------------------------------------------------------------------------
| Invision Download Manager
| ========================================
| by Brandon Farber
| © 2005 - 2006 Invision Power Services
| [url="http://www.invisionpower.com"]http://www.invisionpower.com[/url]
| ========================================
| Web: [url="http://www.invisionpower.com"]http://www.invisionpower.com[/url]
| Email:
[email protected]
+---------------------------------------------------------------------------
|
| > Wrapper Admin Module
| > Script written by Brandon Farber
| > Script Started: Oct 24, 2005 5:48 PM EST
| > Last Updated On: Oct 24, 2005 5:48 PM EST
|
| > Module Version .01
|
+--------------------------------------------------------------------------
*/
if ( ! defined( 'IN_ACP' ) )
{
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'.";
exit();
}
define( 'DL_ADMIN_PATH' , ROOT_PATH.'sources/components_acp/downloads/' );
define( 'DL_PATH' , ROOT_PATH.'sources/components_public/downloads/' );
define( 'DL_VERSION' , '<#VERSION#>' );
define( 'DL_RVERSION' , '<#VERSION_LONG#>' );
define( 'DL_LINK' , 'http://www.invisionpower.com/latestversioncheck/ipdownloads.php?v=' );
class ad_downloads {
var $ipsclass;
var $base_url;
var $perm_main = 'components';
var $perm_child = 'downloads';
function auto_run()
{
//-----------------------------------------
// Kill globals - globals bad, Homer good.
//-----------------------------------------
$tmp_in = array_merge( $_GET, $_POST, $_COOKIE );
foreach ( $tmp_in as $k => $v )
{
unset($$k);
}
//-----------------------------------------
// Did we purchase yet?
//-----------------------------------------
if ( ! @is_dir( ROOT_PATH.'/sources/components_acp/downloads' ) )
{
$this->ipsclass->admin->show_inframe("http://www.invisionpower.com/community/downloads/index.html");
}
else
{
$this->base_url = $this->ipsclass->base_url."&".$this->ipsclass->form_code."&";
$this->ipsclass->admin->page_title = "IP.Downloads";
$this->ipsclass->admin->page_detail = "You can configure your Download Manager from this section.";
$this->ipsclass->admin->nav[] = array( 'section=components&act=downloads', 'IP.Downloads' );
$valid_reqs = array (
'idx' => array( 'ad_downloads_index' , '' ),
'settings' => array( '' , '' ),
'mime' => array( 'ad_downloads_mime' , '' ),
'customfields' => array( 'ad_downloads_cfields', '' ),
'categories' => array( 'ad_downloads_cats' , '' ),
'tools' => array( 'ad_downloads_tools' , '' ),
'stats' => array( 'ad_downloads_stats' , '' ),
'groups' => array( 'ad_downloads_groups' , '' ),
);
$req = isset( $valid_reqs[ $this->ipsclass->input['req'] ] ) ? strtolower($this->ipsclass->input['req']) : 'idx';
if ( $req == 'settings' )
{
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':settings' );
require_once( ROOT_PATH.'sources/action_admin/settings.php' );
$settings = new ad_settings();
$settings->ipsclass =& $this->ipsclass;
$settings->get_by_key = 'idm';
$settings->return_after_save = $this->ipsclass->form_code.'&req=settings';
$settings->setting_view();
}
else
{
// Require and run
require( DL_ADMIN_PATH . $valid_reqs[ $req ][0].'.php' );
$page = new $valid_reqs[ $req ][0];
$page->ipsclass =& $this->ipsclass;
$page->auto_run( $this, $valid_reqs[ $req ][1] );
}
}
}
}
?>