[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] comic/inc/class.uiadmin.inc.php, 1.3
From: |
nomail |
Subject: |
[Phpgroupware-cvs] comic/inc/class.uiadmin.inc.php, 1.3 |
Date: |
Wed, 21 Jul 2004 01:51:54 +0200 |
Update of /comic/inc
Modified Files:
Branch:
class.uiadmin.inc.php
date: 2004/07/20 23:51:54; author: skwashd; state: Exp; lines: +39 -43
Log Message:
merge from 16 and image clean up
=====================================================================
Index: comic/inc/class.uiadmin.inc.php
diff -u comic/inc/class.uiadmin.inc.php:1.2 comic/inc/class.uiadmin.inc.php:1.3
--- comic/inc/class.uiadmin.inc.php:1.2 Tue Apr 30 19:46:55 2002
+++ comic/inc/class.uiadmin.inc.php Tue Jul 20 23:51:54 2004
@@ -33,18 +33,19 @@
function global_options()
{
- $submit = get_var('submit',Array('POST'));
- if($submit!='')
+ global $phpgw, $phpgw_info;
+
+ if ($_POST['submit']!='')
{
- if($submit==lang('Submit'))
+ if ($_POST['submit']==lang("Submit"))
{
$field = $this->get_form();
// checks can be added here.
$field['message'] =
$this->bo->update_global_options($field);
}
- if($submit==lang('Done'))
+ if ($_POST['submit']==lang("Done"))
{
- header('Location:
'.$GLOBALS['phpgw']->link('/admin/index.php'));
+ header('Location:
'.$phpgw->link('/admin/index.php'));
}
}
else
@@ -56,24 +57,24 @@
$g_censor_level =
$this->functions->select_box('g_censor_level');
$g_image_source =
$this->functions->select_box('g_image_source');
- $field['title'] = lang('Daily Comics - Global
Options');
- $field['image_source_label'] = lang('Image Source');
- $field['remote_enabled_label'] = lang('Remote (Parse/Snarf)
Enabled');
- $field['censor_level_label'] = lang('Censorship Level');
- $field['filesize_label'] = lang('Max File size');
- $field['override_enabled_label'] = lang('Censorship Override
Enabled');
- $field['submit'] = lang('Submit');
- $field['reset'] = lang('Reset');
- $field['done'] = lang('Done');
- $field['action_url'] =
$GLOBALS['phpgw']->link('/index.php','menuaction=comic.uiadmin.global_options');
+ $field['title'] = lang("Daily Comics - Global
Options");
+ $field['image_source_label'] = lang("Image Source");
+ $field['remote_enabled_label'] = lang("Remote (Parse/Snarf)
Enabled");
+ $field['censor_level_label'] = lang("Censorship Level");
+ $field['filesize_label'] = lang("Max File size");
+ $field['override_enabled_label'] = lang("Censorship Override
Enabled");
+ $field['submit'] = lang("Submit");
+ $field['reset'] = lang("Reset");
+ $field['done'] = lang("Done");
+ $field['action_url'] =
$phpgw->link('/index.php','menuaction=comic.uiadmin.global_options');
- $GLOBALS['phpgw']->common->phpgw_header();
+ $phpgw->common->phpgw_header();
// echo parse_navbar();
print(parse_navbar());
if ($field['remote_enabled'] == 1)
{
- $field['remote_enabled'] = 'checked';
+ $field['remote_enabled'] = "checked";
}
else
{
@@ -82,15 +83,15 @@
if ($field['override_enabled'] == 1)
{
- $field['override_enabled'] = 'checked';
+ $field['override_enabled'] = "checked";
}
else
{
$field['override_enabled'] = '';
}
- $options_tpl =
CreateObject('phpgwapi.Template',$GLOBALS['phpgw']->common->get_tpl_dir('comic'));
- $options_tpl->set_unknowns('remove');
+ $options_tpl =
CreateObject('phpgwapi.Template',$phpgw->common->get_tpl_dir('comic'));
+ $options_tpl->set_unknowns("remove");
$options_tpl->set_file(array(coptions => 'option.common.tpl'));
for ($loop = 0; $loop < count($g_censor_level); $loop++)
@@ -98,33 +99,33 @@
$selected = '';
if ($field['censor_level'] == $loop)
{
- $selected = 'selected';
+ $selected = "selected";
}
$options_tpl->set_var(array(OPTION_VALUE => $loop,
OPTION_SELECTED => $selected,
OPTION_NAME => $g_censor_level[$loop]));
- $options_tpl->parse(option_list, 'coptions', TRUE);
+ $options_tpl->parse(option_list, "coptions", TRUE);
}
- $field['censor_level_options'] =
$options_tpl->get('option_list');
+ $field['censor_level_options'] =
$options_tpl->get("option_list");
for ($loop = 0; $loop < count($g_image_source); $loop++)
{
$selected = '';
if ($field['image_source'] == $loop)
{
- $selected = 'selected';
+ $selected = "selected";
}
$options_tpl->set_var(array(OPTION_VALUE => $loop,
OPTION_SELECTED => $selected,
OPTION_NAME => $g_image_source[$loop]));
- $options_tpl->parse(option_list2, 'coptions', TRUE);
+ $options_tpl->parse(option_list2, "coptions", TRUE);
}
- $field['image_source_options'] =
$options_tpl->get('option_list2');
+ $field['image_source_options'] =
$options_tpl->get("option_list2");
-
$GLOBALS['phpgw']->template->set_file(array('main'=>'admin_global_options.tpl'));
- $GLOBALS['phpgw']->template->set_var(array(
+
$phpgw->template->set_file(array('main'=>'admin_global_options.tpl'));
+ $phpgw->template->set_var(array(
'action_url' => $field['action_url'],
- 'title_color' =>
$GLOBALS['phpgw_info']['theme']['th_bg'],
+ 'title_color' =>
$phpgw_info['theme']['th_bg'],
'title' => $field['title'],
'row_1_color' =>
$this->functions->row_color(),
'message' => $field['message'],
@@ -147,23 +148,18 @@
'submit' => $field['submit'],
'reset' => $field['reset'],
'done' => $field['done']));
- $GLOBALS['phpgw']->template->parse('out', 'main', TRUE);
- $GLOBALS['phpgw']->template->p('out');
+ $phpgw->template->parse('out', 'main', TRUE);
+ $phpgw->template->p('out');
}
function get_form()
{
- $flist = Array(
- 'censor_level',
- 'override_enabled',
- 'image_source',
- 'remote_enabled',
- 'filesize'
- );
- for($i=0;$i<count($flist);$i++)
- {
- $field[$flist[$i]] = get_var($flist[$i],Array('POST'));
- }
+ $field['censor_level'] = $_POST['censor_level'];
+ $field['override_enabled'] = $_POST['override_enabled'];
+ $field['image_source'] = $_POST['image_source'];
+ $field['remote_enabled'] = $_POST['remote_enabled'];
+ $field['filesize'] = $_POST['filesize'];
+
return ($field);
}
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] comic/inc/class.uiadmin.inc.php, 1.3,
nomail <=