1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
|
<?php
/**
*
* @package acp
* @version $Id: v3_modules.xml 52 2008-08-05 18:55:00Z hatkirby $
* @copyright (c) 2008 Starla Insigna
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*
*/
/**
* @package acp
*/
class acp_instadisc
{
var $u_action;
function main($id, $mode)
{
global $db, $user, $auth, $template;
global $config, $phpbb_root_path, $phpbb_admin_path, $phpEx;
$user->add_lang('mods/instadisc');
// Set up the page
$this->tpl_name = 'acp_instadisc';
$this->page_title = 'ACP_INSTADISC';
$submit = isset($_POST['submit']) ? true : false;
if ($submit)
{
// Add config to the database
set_config('id_subscription_title', $_POST['subscription_title']);
set_config('id_series_url', $_POST['series_url']);
set_config('id_subscription_id', $_POST['subscription_id']);
set_config('id_encryption_key', $_POST['encryption_key']);
trigger_error($user->lang['ID_CHANGES_SAVED'] . adm_back_link($this->u_action), E_USER_NOTICE);
} else {
$idst = isset($config['id_subscription_title']) ? $config['id_subscription_title'] : $config['sitename'];
$idsu = isset($config['id_series_url']) ? $config['id_series_url'] : '';
$idsi = isset($config['id_subscription_id']) ? $config['id_subscription_id'] : '';
$idec = isset($config['id_encryption_key']) ? $config['id_encryption_key'] : '';
$template->assign_vars(array(
'S_SUBSCRIPTION_TITLE' => $idst,
'S_SERIES_URL' => $idsu,
'S_SUBSCRIPTION_ID' => $idsi,
'S_ENCRYPTION_KEY' => $idec,
'S_SUBMIT' => $this->u_action
));
}
}
}
|