phpgroupware-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Phpgroupware-cvs] comic admin_options.php


From: Dave Hall
Subject: [Phpgroupware-cvs] comic admin_options.php
Date: Mon, 02 Oct 2006 09:19:34 +0000

CVSROOT:        /cvsroot/phpgroupware
Module name:    comic
Changes by:     Dave Hall <skwashd>     06/10/02 09:19:34

Modified files:
        .              : admin_options.php 

Log message:
        notices and cleanup, also fix problems pointed out in patch #5436

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/comic/admin_options.php?cvsroot=phpgroupware&r1=1.7&r2=1.8

Patches:
Index: admin_options.php
===================================================================
RCS file: /cvsroot/phpgroupware/comic/admin_options.php,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -b -r1.7 -r1.8
--- admin_options.php   5 May 2005 16:33:09 -0000       1.7
+++ admin_options.php   2 Oct 2006 09:19:33 -0000       1.8
@@ -10,7 +10,7 @@
     *  option) any later version.                                              
*
     
\**************************************************************************/
 
-    /* $Id: admin_options.php,v 1.7 2005/05/05 16:33:09 powerstat Exp $ */
+    /* $Id: admin_options.php,v 1.8 2006/10/02 09:19:33 skwashd Exp $ */
 
        $GLOBALS['phpgw_info']['flags'] = array(
                                                'currentapp'    => 'comic',
@@ -19,17 +19,17 @@
        
        include('../header.inc.php');
 
-       if(address@hidden'phpgw_info']['user']['apps']['admin'])
+       if ( !isset($GLOBALS['phpgw_info']['user']['apps']['admin']) )
        {
-               Header('Location: ' . $GLOBALS['phpgw']->link('/home.php') );
+               $GLOBALS['phpgw']->redirect_link('/home.php');
        }
        
        // Incoming Form vals
-       $image_source           = intval($_POST['image_source']);
-       $censor_level           = intval($_POST['censor_level']);
-       $override_enabled       = intval($_POST['override_enabled']);
-       $remote_enabled         = intval($_POST['$remote_enabled']);
-       $filesize               = intval($_POST['$filesize']);
+       $image_source           = isset($_POST['image_source']) ? (int) 
$_POST['image_source'] : 0;
+       $censor_level           = isset($_POST['censor_level']) ? (int) 
$_POST['censor_level'] : 0;
+       $override_enabled       = isset($_POST['override_enabled']) ? (int) 
$_POST['override_enabled'] : 0;
+       $remote_enabled         = isset($_POST['remote_enabled']) ? (int) 
$_POST['remote_enabled'] : 0; 
+       $filesize                       = isset($_POST['filesize']) ? (int) 
$_POST['filesize'] : 0;
        
        $title             = lang("Daily Comics Global Options");
        $imgsrc_label      = lang("Image Source");
@@ -44,7 +44,7 @@
        $doneurl           = $GLOBALS['phpgw']->link('/admin/index.php') . 
'#comic';
        $message           = "";
 
-       if ($_POST['submit'])
+       if ( isset($_POST['submit']) && $_POST['submit'] )
        {
                $sql    = 'UPDATE phpgw_comic_admin SET'
                        . ' admin_imgsrc=' . $image_source . ','
@@ -102,7 +102,7 @@
                                                )
                                        );
                                        
-               $options_tpl->parse(option_list, "coptions", TRUE);
+               $options_tpl->parse(option_list, "coptions", true);
        }
        $censor_level_c = $options_tpl->get("option_list");
 
@@ -112,7 +112,7 @@
                
                if ($image_source == $loop)
                {
-                       $selected = "selected";
+                       $selected = 'selected';
                }
                
                $options_tpl->set_var(array(
@@ -164,8 +164,8 @@
                                )
                        );
                             
-       $body_tpl->parse(BODY, "body");
-       $body_tpl->p("BODY");
+       $body_tpl->parse('BODY', 'body');
+       $body_tpl->p('BODY');
 
        $GLOBALS['phpgw']->common->phpgw_footer();
 ?>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]