phpgroupware-cvs
[Top][All Lists]
Advanced

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

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


From: nomail
Subject: [Phpgroupware-cvs] comic/index.php, 1.7.4.1
Date: Wed, 14 Jul 2004 10:38:48 +0200

Update of /comic
Modified Files:
        Branch: Version-0_9_16-branch
          index.php

date: 2004/07/14 08:38:48;  author: skwashd;  state: Exp;  lines: +24 -25

Log Message:
GLOBALS, SQL and other fun stuff more to come :)
=====================================================================
Index: comic/index.php
diff -u comic/index.php:1.7 comic/index.php:1.7.4.1
--- comic/index.php:1.7 Wed Aug 15 08:46:56 2001
+++ comic/index.php     Wed Jul 14 08:38:48 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($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 ".
+        $GLOBALS['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("select * from phpgw_comic "
                           ."WHERE comic_owner='"
                           .$phpgw_info["user"]["account_id"]."'");
     }
 
-    $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");
+    $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");
     
-    $template_id    = $phpgw->db->f("comic_template");
+    $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]