phpgroupware-cvs
[Top][All Lists]
Advanced

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

[Phpgroupware-cvs] comic/index.php, 1.8


From: nomail
Subject: [Phpgroupware-cvs] comic/index.php, 1.8
Date: Wed, 21 Jul 2004 01:51:54 +0200

Update of /comic
Modified Files:
        Branch: 
          index.php

date: 2004/07/20 23:51:54;  author: skwashd;  state: Exp;  lines: +27 -28

Log Message:
merge from 16 and image clean up
=====================================================================
Index: comic/index.php
diff -u comic/index.php:1.7 comic/index.php:1.8
--- comic/index.php:1.7 Wed Aug 15 08:46:56 2001
+++ comic/index.php     Tue Jul 20 23:51:54 2004
@@ -11,34 +11,35 @@
     
\**************************************************************************/
 
     /* $Id$ */
-{
-    $phpgw_info["flags"] = array("currentapp" => "comic",
-                                 "enable_nextmatchs_class" => True,
-                                 "enable_network_class" => True);
+
+       $GLOBALS['phpgw_info']['flags'] = array(
+                                               'currentapp'            => 
'comic',
+                                               'enable_nextmatchs_class'=> 
True,
+                                               'enable_network_class'  => True
+                                               );
 
     include("../header.inc.php");
     
-    $phpgw->db->query("select * from phpgw_comic "
-                      ."WHERE comic_owner='"
-                      .$phpgw_info["user"]["account_id"]."'");
+    $GLOBALS['phpgw']->db->query('SELECT * FROM phpgw_comic '
+                      . 'WHERE comic_owner=' . 
intval($GLOBALS['phpgw_info']['user']['account_id'] ), __LINE__, __FILE__);
 
-    if ($phpgw->db->num_rows() == 0)
+    if ($GLOBALS['phpgw']->db->num_rows() == 0)
     {
-        $phpgw->db->query("insert into phpgw_comic (comic_owner) values ".
-                          "('".$phpgw_info["user"]["account_id"]."')");
-        $phpgw->db->query("select * from phpgw_comic "
+        $GLOBALS['phpgw']->db->query("insert into phpgw_comic (comic_owner, 
comic_list) values ".
+                          
"('".$GLOBALS['phpgw_info']["user"]["account_id"]."','')", __LINE__,__FILE__);
+        $GLOBALS['phpgw']->db->query("select * from phpgw_comic "
                           ."WHERE comic_owner='"
-                          .$phpgw_info["user"]["account_id"]."'");
+                          .$GLOBALS['phpgw_info']["user"]["account_id"]."'", 
__LINE__, __FILE__);
     }
 
-    $phpgw->db->next_record();
+    $GLOBALS['phpgw']->db->next_record();
 
-    $comic_list     = explode(":", $phpgw->db->f("comic_list"));
-    $comic_scale    = $phpgw->db->f("comic_scale");
-    $comic_perpage  = $phpgw->db->f("comic_perpage");
-    $user_censorlvl = $phpgw->db->f("comic_censorlvl");
-    
-    $template_id    = $phpgw->db->f("comic_template");
+    $comic_list                = explode(":", 
$GLOBALS['phpgw']->db->f("comic_list"));
+    $comic_scale       = $GLOBALS['phpgw']->db->f("comic_scale");
+    $comic_perpage     = $GLOBALS['phpgw']->db->f("comic_perpage");
+    $user_censorlvl    = $GLOBALS['phpgw']->db->f("comic_censorlvl");
+    $start             = $_POST['start'];
+    $template_id       = $GLOBALS['phpgw']->db->f("comic_template");
     
     if (!$page_number)
     {
@@ -52,9 +53,9 @@
     /**************************************************************************
      * determine the output template
      *************************************************************************/
-    $template_format     = sprintf("format%02d", $template_id);
-    if (!(file_exists($phpgw_info["server"]["app_tpl"]
-                      ."/".$template_format.".comic.tpl")))
+    $template_format   = sprintf("format%02d", $template_id);
+    if (!(file_exists($GLOBALS['phpgw_info']['server']['app_tpl']
+                      .'/'.$template_format.'.comic.tpl')))
     {
         $template_format = "format00";
     }
@@ -62,10 +63,10 @@
     /**************************************************************************
      * pull it all together
      *************************************************************************/
-    $body_tpl = $phpgw->template;
+    $body_tpl = $GLOBALS['phpgw']->template;
     $body_tpl->set_unknowns("remove");
     $body_tpl->set_file(body, $template_format.".comic.tpl");
-    $body_tpl->set_var(array(title        => lang("PhpGroupWare Daily Comics"),
+    $body_tpl->set_var(array(title        => lang('phpGroupWare Daily Comics'),
                              matchs       => $matchs_c,
                              comic_left   => $comic_left_c,
                              comic_center => $comic_center_c,
@@ -73,7 +74,5 @@
     $body_tpl->parse(BODY, "body");
     $body_tpl->p("BODY");
         
-    $phpgw->common->phpgw_footer();
-}
-
+    $GLOBALS['phpgw']->common->phpgw_footer();
 ?>




reply via email to

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