phpgroupware-cvs
[Top][All Lists]
Advanced

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

[Phpgroupware-cvs] CVS: mediadb/inc format.inc.php,1.4,1.4.2.1 functions


From: Mark A Peters <address@hidden>
Subject: [Phpgroupware-cvs] CVS: mediadb/inc format.inc.php,1.4,1.4.2.1 functions.inc.php,1.15,1.15.2.1
Date: Sun, 27 Jan 2002 08:53:17 -0500

Update of /cvsroot/phpgroupware/mediadb/inc
In directory subversions:/tmp/cvs-serv31680/mediadb/inc

Modified Files:
      Tag: Version-0_9_14-branch
        format.inc.php functions.inc.php 
Log Message:
Not sure what I did, but some of it works now.

Index: format.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/mediadb/inc/format.inc.php,v
retrieving revision 1.4
retrieving revision 1.4.2.1
diff -C2 -r1.4 -r1.4.2.1
*** format.inc.php      17 Jun 2001 20:49:29 -0000      1.4
--- format.inc.php      27 Jan 2002 13:53:15 -0000      1.4.2.1
***************
*** 15,50 ****
  function add_format_entry($order, $sort, $filter, $start, $query, $qfield)
  {
!     global $phpgw, $phpgw_info;
! 
!     $color = $phpgw_info["theme"]["th_bg"];
      
      printf("<form method=POST action=\"%s\">\n",
!            $phpgw->link("/mediadb/format.php",
!                         "act=add"
!                         ."&start=$start&order=$order&filter=$filter"
!                         ."&sort=$sort"
!                         ."&query=".urlencode($query)
!                       ."&qfield=$qfield"));
      printf("  <table border=\"0\" cellpadding=\"0\""
             . " cellspacing=\"0\" width=90%% align=center>\n");
      printf("    <tr bgcolor=%s>\n", $color);
      printf("      <td align=left width=15%%>\n");
!     printf("        <input type=\"submit\" name=\"submit\" 
value=\"%s\">\n",lang("Add"));
      printf("      </td>\n");
!     printf("      <td align=right width=10%%>%s:</td>\n",lang("Desc"));
      printf("      <td align=left>\n");
      printf("        <input type=\"text\" name=\"format_desc\""
             ." value=\"%s\" maxlength=30>\n", $fdesc);
      printf("      </td>\n");
!     printf("      <td align=center width=10%%>%s<br>\n",lang("Files"));
      printf("        <input type=\"checkbox\" name=\"format_efiles\" 
value=\"1\">\n");
      printf("      </td>\n");
!     printf("      <td align=center width=10%%>%s<br>\n",lang("Pages"));
      printf("        <input type=\"checkbox\" name=\"format_pages\" 
value=\"1\">\n");
      printf("      </td>\n");
!     printf("      <td align=center width=10%%>%s<br>\n",lang("Regions"));
      printf("        <input type=\"checkbox\" name=\"format_regions\" 
value=\"1\">\n");
      printf("      </td>\n");
!     printf("      <td align=center width=10%%>%s<br>\n",lang("Scores"));
      printf("        <input type=\"checkbox\" name=\"format_hscores\" 
value=\"1\">\n");
      printf("      </td>\n");
--- 15,49 ----
  function add_format_entry($order, $sort, $filter, $start, $query, $qfield)
  {
!     $color = $GLOBALS['phpgw_info']['theme']['th_bg'];
      
      printf("<form method=POST action=\"%s\">\n",
!            $GLOBALS['phpgw']->link('/mediadb/format.php',
!                         'act=add'
!                         .'&start='.$start.'&order='.$order.'&filter='.$filter
!                         .'&sort='.$sort
!                         .'&query='.urlencode($query)
!                         .'&qfield='.$qfield)
!            );
      printf("  <table border=\"0\" cellpadding=\"0\""
             . " cellspacing=\"0\" width=90%% align=center>\n");
      printf("    <tr bgcolor=%s>\n", $color);
      printf("      <td align=left width=15%%>\n");
!     printf("        <input type=\"submit\" name=\"submit\" 
value=\"%s\">\n",lang('Add'));
      printf("      </td>\n");
!     printf("      <td align=right width=10%%>%s:</td>\n",lang('Desc'));
      printf("      <td align=left>\n");
      printf("        <input type=\"text\" name=\"format_desc\""
             ." value=\"%s\" maxlength=30>\n", $fdesc);
      printf("      </td>\n");
!     printf("      <td align=center width=10%%>%s<br>\n",lang('Files'));
      printf("        <input type=\"checkbox\" name=\"format_efiles\" 
value=\"1\">\n");
      printf("      </td>\n");
!     printf("      <td align=center width=10%%>%s<br>\n",lang('Pages'));
      printf("        <input type=\"checkbox\" name=\"format_pages\" 
value=\"1\">\n");
      printf("      </td>\n");
!     printf("      <td align=center width=10%%>%s<br>\n",lang('Regions'));
      printf("        <input type=\"checkbox\" name=\"format_regions\" 
value=\"1\">\n");
      printf("      </td>\n");
!     printf("      <td align=center width=10%%>%s<br>\n",lang('Scores'));
      printf("        <input type=\"checkbox\" name=\"format_hscores\" 
value=\"1\">\n");
      printf("      </td>\n");
***************
*** 53,62 ****
      printf("        <select name=\"cat_id\" size=1>\n");
      
!     $phpgw->db->query("select * from phpgw_mediadb_cat where cat_id > 1");
!     while ($phpgw->db->next_record())
      {
!         printf("          <option value=\"%s\"", $phpgw->db->f("cat_id"));
          
!         printf(">%s</option>\n", lang($phpgw->db->f("cat_name")));
      }
      
--- 52,61 ----
      printf("        <select name=\"cat_id\" size=1>\n");
      
!     $GLOBALS['phpgw']->db->query('select * from phpgw_mediadb_cat where 
cat_id > 1');
!     while ($GLOBALS['phpgw']->db->next_record())
      {
!         printf("          <option value=\"%s\"", 
$GLOBALS['phpgw']->db->f('cat_id'));
          
!         printf(">%s</option>\n", lang($GLOBALS['phpgw']->db->f('cat_name')));
      }
      
***************
*** 71,120 ****
  function modify_format_entry($con, $act, $order, $sort, $filter, $start, 
$query, $qfield)
  {
!     global $phpgw, $phpgw_info;
! 
!     $phpgw->db->query("select * from phpgw_mediadb_format where 
format_id=$con");
!     $phpgw->db->next_record();
  
!     $fdesc  = $phpgw->db->f("format_desc");
!     $cat    = $phpgw->db->f("cat_id");
      
!     if ($phpgw->db->f("format_efiles"))
      {
!         $fchecked = "checked";
      }
!     if ($phpgw->db->f("format_pages"))
      {
!         $pchecked = "checked";
      }
!     if ($phpgw->db->f("format_regions"))
      {
!         $rchecked = "checked";
      }
!     if ($phpgw->db->f("format_hscores"))
      {
!         $schecked = "checked";
      }
      
      switch($act)
      {
!       case "delete":
!         {
!             $color = $phpgw_info["theme"]["bg07"];
!         }
          break;
        default:
!         {
!             $color = $phpgw_info["theme"]["table_bg"];
!         }
          break;
      }
      
      printf("<form method=POST action=\"%s\">\n",
!            $phpgw->link("/mediadb/format.php",
!                         "act=$act"
!                         ."&start=$start&order=$order&filter=$filter"
!                         ."&sort=$sort"
!                         ."&query=".urlencode($query)
!                       ."&qfield=$qfield"));
      printf("<input type=\"hidden\" name=\"format_id\" value=\"%s\">\n",$con);
      printf("  <table border=\"0\" cellpadding=\"0\""
--- 70,114 ----
  function modify_format_entry($con, $act, $order, $sort, $filter, $start, 
$query, $qfield)
  {
!     $GLOBALS['phpgw']->db->query('select * from phpgw_mediadb_format where 
format_id='.$con);
!     $GLOBALS['phpgw']->db->next_record();
  
!     $fdesc  = $GLOBALS['phpgw']->db->f('format_desc');
!     $cat    = $GLOBALS['phpgw']->db->f('cat_id');
      
!     if ($GLOBALS['phpgw']->db->f('format_efiles'))
      {
!         $fchecked = 'checked';
      }
!     if ($GLOBALS['phpgw']->db->f('format_pages'))
      {
!         $pchecked = 'checked';
      }
!     if ($GLOBALS['phpgw']->db->f('format_regions'))
      {
!         $rchecked = 'checked';
      }
!     if ($GLOBALS['phpgw']->db->f('format_hscores"))
      {
!         $schecked = 'checked';
      }
      
      switch($act)
      {
!       case 'delete':
!         $color = $GLOBALS['phpgw_info']['theme']['bg07'];
          break;
        default:
!         $color = $GLOBALS['phpgw_info']['theme']['table_bg'];
          break;
      }
      
      printf("<form method=POST action=\"%s\">\n",
!            $GLOBALS['phpgw']->link('/mediadb/format.php',
!                         'act='.$act
!                         .'&start='.$start.'&order='.$order.'&filter='.$filter
!                         .'&sort='.$sort
!                         .'&query='.urlencode($query)
!                         .'&qfield='.$qfield)
!            );
      printf("<input type=\"hidden\" name=\"format_id\" value=\"%s\">\n",$con);
      printf("  <table border=\"0\" cellpadding=\"0\""
***************
*** 124,145 ****
      printf("        <input type=\"submit\" name=\"submit\" 
value=\"%s\">\n",lang($act));
      printf("      </td>\n");
!     printf("      <td align=right width=10%%>%s:</td>\n",lang("Desc"));
      printf("      <td align=left>\n");
      printf("        <input type=\"text\" name=\"format_desc\""
             ." value=\"%s\" maxlength=30>\n", $fdesc);
      printf("      </td>\n");
!     printf("      <td align=center width=10%%>%s<br>\n",lang("Files"));
      printf("        <input type=\"checkbox\" %s name=\"format_efiles\" 
value=\"1\">\n",
             $fchecked);
      printf("      </td>\n");
!     printf("      <td align=center width=10%%>%s<br>\n",lang("Pages"));
      printf("        <input type=\"checkbox\" %s name=\"format_pages\" 
value=\"1\">\n",
             $pchecked);
      printf("      </td>\n");
!     printf("      <td align=center width=10%%>%s<br>\n",lang("Regions"));
      printf("        <input type=\"checkbox\" %s name=\"format_regions\" 
value=\"1\">\n",
             $rchecked);
      printf("      </td>\n");
!     printf("      <td align=center width=10%%>%s<br>\n",lang("Scores"));
      printf("        <input type=\"checkbox\" %s name=\"format_hscores\" 
value=\"1\">\n",
             $schecked);
--- 118,139 ----
      printf("        <input type=\"submit\" name=\"submit\" 
value=\"%s\">\n",lang($act));
      printf("      </td>\n");
!     printf("      <td align=right width=10%%>%s:</td>\n",lang('Desc'));
      printf("      <td align=left>\n");
      printf("        <input type=\"text\" name=\"format_desc\""
             ." value=\"%s\" maxlength=30>\n", $fdesc);
      printf("      </td>\n");
!     printf("      <td align=center width=10%%>%s<br>\n",lang('Files'));
      printf("        <input type=\"checkbox\" %s name=\"format_efiles\" 
value=\"1\">\n",
             $fchecked);
      printf("      </td>\n");
!     printf("      <td align=center width=10%%>%s<br>\n",lang('Pages'));
      printf("        <input type=\"checkbox\" %s name=\"format_pages\" 
value=\"1\">\n",
             $pchecked);
      printf("      </td>\n");
!     printf("      <td align=center width=10%%>%s<br>\n",lang('Regions'));
      printf("        <input type=\"checkbox\" %s name=\"format_regions\" 
value=\"1\">\n",
             $rchecked);
      printf("      </td>\n");
!     printf("      <td align=center width=10%%>%s<br>\n",lang('Scores'));
      printf("        <input type=\"checkbox\" %s name=\"format_hscores\" 
value=\"1\">\n",
             $schecked);
***************
*** 148,162 ****
      printf("        <select name=\"cat_id\" size=1>\n");
  
!     $phpgw->db->query("select * from phpgw_mediadb_cat where cat_id > 1");
!     while ($phpgw->db->next_record())
      {
!         printf("          <option value=\"%s\"", $phpgw->db->f("cat_id"));
  
!         if ($cat == $phpgw->db->f("cat_id"))
          {
!             printf(" selected");
          }
          
!         printf(">%s</option>\n", lang($phpgw->db->f("cat_name")));
      }
      
--- 142,156 ----
      printf("        <select name=\"cat_id\" size=1>\n");
  
!     $GLOBALS['phpgw']->db->query('select * from phpgw_mediadb_cat where 
cat_id > 1');
!     while ($GLOBALS['phpgw']->db->next_record())
      {
!         printf("          <option value=\"%s\"", 
$GLOBALS['phpgw']->db->f('cat_id'));
  
!         if ($cat == $GLOBALS['phpgw']->db->f('cat_id'))
          {
!             printf(' selected');
          }
          
!         printf(">%s</option>\n", lang($GLOBALS['phpgw']->db->f('cat_name')));
      }
      

Index: functions.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/mediadb/inc/functions.inc.php,v
retrieving revision 1.15
retrieving revision 1.15.2.1
diff -C2 -r1.15 -r1.15.2.1
*** functions.inc.php   17 Jun 2001 20:49:29 -0000      1.15
--- functions.inc.php   27 Jan 2002 13:53:15 -0000      1.15.2.1
***************
*** 38,44 ****
         if ($loop < (int)($rating / 10))
         {
!            echo "<img src='"
!                . $phpgw_info["server"]["app_images"]
!                . "/redstar.gif'>";
         }
         else
--- 38,42 ----
         if ($loop < (int)($rating / 10))
         {
!            echo '<img 
src="'.$GLOBALS['phpgw']->common->image('mediadb','redstar').'">';
         }
         else
***************
*** 46,59 ****
             if ($usehalf != 0)
             {
!                echo "<img src='"
!                    . $phpgw_info["server"]["app_images"]
!                    . "/halfstar.gif'>";
                 $usehalf = 0;
             }
             else
             {
!                echo "<img src='"
!                    . $phpgw_info["server"]["app_images"]
!                    . "/blackstar.gif'>";
                 $usehalf = 0;
             }
--- 44,53 ----
             if ($usehalf != 0)
             {
!                                       echo '<img 
src="'.$GLOBALS['phpgw']->common->image('mediadb','halfstar').'">';
                 $usehalf = 0;
             }
             else
             {
!                                       echo '<img 
src="'.$GLOBALS['phpgw']->common->image('mediadb','blackstar').'">';
                 $usehalf = 0;
             }
***************
*** 99,105 ****
  function cat_table()
  {
!    global $phpgw, $phpgw_info;
! 
!    $phpgw->db->query("select cat_name from phpgw_mediadb_cat where 
cat_enabled=1");
  
     // open the table
--- 93,97 ----
  function cat_table()
  {
!    $GLOBALS['phpgw']->db->query('select cat_name from phpgw_mediadb_cat where 
cat_enabled=1',__LINE__,__FILE__);
  
     // open the table
***************
*** 107,125 ****
            . " cellspacing=\"1\" width=\"95%%\" align=\"center\">\n");
     printf("  <tr bgcolor=\"%s\" align=\"center\">\n",
!           $phpgw_info["theme"]["navbar_bg"]);
  
     // the home column page link
     printf("    <td bgcolor=\"%s\">\n", page_color("home"));
!    printf("      <a href=" . $phpgw->link("/mediadb/index.php", "cat=home>")
!           . lang("Home") . "</a>\n");
     printf("    </td>\n");
  
     // create the media type column page links
!    while ($phpgw->db->next_record()) 
     {
!       printf("    <td bgcolor=\"%s\">\n", page_color($phpgw->db->f(0)));
        printf("      <a href=" 
!              . $phpgw->link("/mediadb/index.php", "cat=" . $phpgw->db->f(0))
!              . "&act=list&list=new>" . lang($phpgw->db->f(0)) . "</a>\n");
        printf("    </td>\n");
     }
--- 99,117 ----
            . " cellspacing=\"1\" width=\"95%%\" align=\"center\">\n");
     printf("  <tr bgcolor=\"%s\" align=\"center\">\n",
!           $GLOBALS['phpgw_info']['theme']['navbar_bg']);
  
     // the home column page link
     printf("    <td bgcolor=\"%s\">\n", page_color("home"));
!    printf("      <a href=" . 
$GLOBALS['phpgw']->link('/mediadb/index.php','cat=home')
!           . lang('Home') . "</a>\n");
     printf("    </td>\n");
  
     // create the media type column page links
!    while ($GLOBALS['phpgw']->db->next_record()) 
     {
!       printf("    <td bgcolor=\"%s\">\n", 
page_color($GLOBALS['phpgw']->db->f(0)));
        printf("      <a href=" 
!              . 
$GLOBALS['phpgw']->link('/mediadb/index.php','cat='.$GLOBALS['phpgw']->db->f(0)
!              . '&act=list&list=new') . $GLOBALS['phpgw']->db->f(0) . 
'</a>'."\n");
        printf("    </td>\n");
     }
***************
*** 132,138 ****
  function act_table()
  {
!    global $phpgw_info, $phpgw, $cat;
  
!    $list_type = array("new", "all", "borrowed", "loaned", "requested");
  
     // the start of the table
--- 124,136 ----
  function act_table()
  {
!    global $cat;
  
!    $list_type = Array(
!       'new',
!       'all',
!       'borrowed',
!       'loaned',
!       'requested'
!    );
  
     // the start of the table
***************
*** 142,146 ****
     // begin row
     printf("  <tr bgcolor=\"%s\" align=\"center\">\n",
!           $phpgw_info["theme"]["navbar_bg"]);
  
     // list columns
--- 140,144 ----
     // begin row
     printf("  <tr bgcolor=\"%s\" align=\"center\">\n",
!           $GLOBALS['phpgw_info']['theme']['navbar_bg']);
  
     // list columns
***************
*** 151,157 ****
               action_color("list", $list_type[$index]));
        printf("      <a href=\"%s\">%s %s</a>\n", 
!              $phpgw->link("/mediadb/index.php", 
!                           "cat=$cat&act=list&list=$list_type[$index]"),
!              lang("list"),
               lang($list_type[$index]));
        printf("    </td>\n");
--- 149,155 ----
               action_color("list", $list_type[$index]));
        printf("      <a href=\"%s\">%s %s</a>\n", 
!              $GLOBALS['phpgw']->link('/mediadb/index.php', 
!                           'cat='.$cat.'&act=list&list='.$list_type[$index]),
!              lang('list'),
               lang($list_type[$index]));
        printf("    </td>\n");
***************
*** 162,168 ****
            action_color("stats", ""));
     printf("      <a href=\"%s\">%s</a>\n", 
!           $phpgw->link("/mediadb/index.php", 
!                        "cat=$cat&act=stats"),
!           lang("stats"));
     printf("    </td>\n");
  
--- 160,166 ----
            action_color("stats", ""));
     printf("      <a href=\"%s\">%s</a>\n", 
!           $GLOBALS['phpgw']->link('/mediadb/index.php', 
!                        'cat='.$cat.'&act=stats'),
!           lang('stats'));
     printf("    </td>\n");
  
***************
*** 175,203 ****
  function list_default($cat1, $list)
  {
!    global $phpgw_info, $phpgw, $cat, $sort;
  
!    $phpgw->db->query("select * from phpgw_mediadb_cat where cat_name='" . 
$cat1 . "'");
!    if ($phpgw->db->next_record())
     {
!        $column = explode(",", $phpgw->db->f("cat_fname"));
     }
     else
     {
!        $phpgw->db->query("select * from phpgw_mediadb_cat where cat_id='1'");
!        $phpgw->db->next_record();
!        $column = array("title", "artist", "format", "year", "date", "genre", 
!                        "rating", "score", "owner", "comments", "imdb", 
"edit", 
!                        "avail");
!        $sortfields = explode(",", $phpgw->db->f("cat_fname"));
!    }
!    $enable = explode(",", $phpgw->db->f("cat_fenabled"));
!    $width  = explode(",", $phpgw->db->f("cat_fwidth"));
!    $sortby = explode(",", $phpgw->db->f("cat_fsort"));
! 
!    if ($phpgw->db->f("cat_id") != "1")
!    {
!        $phpgw->db->query("select * from phpgw_mediadb_cat where cat_id='1'");
!        $phpgw->db->next_record();
!        $sortfields = explode(",", $phpgw->db->f("cat_fname"));
     }
  
--- 173,213 ----
  function list_default($cat1, $list)
  {
!    global $cat, $sort;
  
!    $GLOBALS['phpgw']->db->query("select * from phpgw_mediadb_cat where 
cat_name='" . $cat1 . "'");
!    if ($GLOBALS['phpgw']->db->next_record())
     {
!        $column = explode(',', $GLOBALS['phpgw']->db->f('cat_fname'));
     }
     else
     {
!        $GLOBALS['phpgw']->db->query("select * from phpgw_mediadb_cat where 
cat_id='1'");
!        $GLOBALS['phpgw']->db->next_record();
!        $column = array(
!               'title',
!               'artist',
!               'format',
!               'year',
!               'date',
!               'genre',
!               'rating',
!               'score',
!               'owner',
!               'comments',
!               'imdb',
!               'edit',
!               'avail'
!        );
!        $sortfields = explode(',', $GLOBALS['phpgw']->db->f('cat_fname'));
!    }
!    $enable = explode(',', $GLOBALS['phpgw']->db->f('cat_fenabled'));
!    $width  = explode(',', $GLOBALS['phpgw']->db->f('cat_fwidth'));
!    $sortby = explode(',', $GLOBALS['phpgw']->db->f('cat_fsort'));
! 
!    if ($GLOBALS['phpgw']->db->f('cat_id') != '1')
!    {
!        $GLOBALS['phpgw']->db->query("select * from phpgw_mediadb_cat where 
cat_id='1'");
!        $GLOBALS['phpgw']->db->next_record();
!        $sortfields = explode(',', $GLOBALS['phpgw']->db->f('cat_fname'));
     }
  
***************
*** 211,215 ****
     {  
        printf("  <tr bgcolor=\"%s\" align=\"center\">\n",
!              $phpgw_info["theme"]["table_bg"]);
        printf("    <td width=\"%d%%\" align=\"left\" colspan=2>%s %s</td>\n",
               $checksize,
--- 221,225 ----
     {  
        printf("  <tr bgcolor=\"%s\" align=\"center\">\n",
!              $GLOBALS['phpgw_info']['theme']['table_bg']);
        printf("    <td width=\"%d%%\" align=\"left\" colspan=2>%s %s</td>\n",
               $checksize,
***************
*** 221,225 ****
     // header row
     printf("  <tr bgcolor=\"%s\" align=\"center\">\n",
!           $phpgw_info["theme"]["th_bg"]);
  
     // the check column
--- 231,235 ----
     // header row
     printf("  <tr bgcolor=\"%s\" align=\"center\">\n",
!           $GLOBALS['phpgw_info']['theme']['th_bg']);
  
     // the check column
***************
*** 239,249 ****
            {
                printf("      <a href=\"%s\">%s</a>\n", 
!                      $phpgw->link("/mediadb/index.php", 
!                                   
"cat=$cat&act=list&list=$list&sort=$sortfields[$index]"),
!                      lang("$column[$index]"));
            }
            else
            {
!               printf("%s\n", lang("$column[$index]"));
            }
            
--- 249,259 ----
            {
                printf("      <a href=\"%s\">%s</a>\n", 
!                      $GLOBALS['phpgw']->link('/mediadb/index.php', 
!                                   
'cat='.$cat.'&act=list&list='.$list.'&sort='.$sortfields[$index]),
!                      lang($column[$index]));
            }
            else
            {
!               printf("%s\n", lang($column[$index]));
            }
            
***************
*** 258,262 ****
           printf("    <td width=\"%d%%\">%s</td>\n",
                  $width[$index],
!                 lang("$column[$index]"));
        }
     }
--- 268,272 ----
           printf("    <td width=\"%d%%\">%s</td>\n",
                  $width[$index],
!                 lang($column[$index]));
        }
     }
***************
*** 487,500 ****
  function home_body()
  {
!    global $phpgw;
! 
!    $section = array("borrowed", "loaned");
  
!    $phpgw->db->query("select cat_name from phpgw_mediadb_cat where 
cat_enabled=1");
  
     $index = 0;
!    while ($phpgw->db->next_record()) 
     {
!       $category[$index] = $phpgw->db->f(0);
        $index++;
     }
--- 497,511 ----
  function home_body()
  {
!    $section = Array(
!       'borrowed',
!       'loaned'
!    );
  
!    $GLOBALS['phpgw']->db->query("select cat_name from phpgw_mediadb_cat where 
cat_enabled=1");
  
     $index = 0;
!    while ($GLOBALS['phpgw']->db->next_record()) 
     {
!       $category[$index] = $GLOBALS['phpgw']->db->f(0);
        $index++;
     }
***************
*** 505,509 ****
     for($index=0; $index < $indexlimit; $index++)
     {
!       list_requests($category[$index], "requested", "borrower");
     }
  
--- 516,520 ----
     for($index=0; $index < $indexlimit; $index++)
     {
!       list_requests($category[$index], 'requested', 'borrower');
     }
  
***************
*** 518,522 ****
     }
  
- 
     for($index=0; $index < $indexlimit; $index++)
     {
--- 529,532 ----
***************
*** 527,531 ****
  function list_body($str)
  {
!    global $phpgw, $phpgw_info, $cat, $list;
     
     // section and search count
--- 537,541 ----
  function list_body($str)
  {
!    global $cat, $list;
     
     // section and search count
***************
*** 535,549 ****
     switch($list)
     {
!      case "loaned":
!      case "borrowed":
         list_loaner($cat, $list);
         break;
!      case "requested":
!        list_requests($cat, $list, "borrower");
!        list_requests($cat, $list, "owner");
         break;
!      case "new":
!      case "own":
!      case "others":
       default:
         list_default($cat, $list);
--- 545,559 ----
     switch($list)
     {
!      case 'loaned':
!      case 'borrowed':
         list_loaner($cat, $list);
         break;
!      case 'requested':
!        list_requests($cat, $list, 'borrower');
!        list_requests($cat, $list, 'owner');
         break;
!      case 'new':
!      case 'own':
!      case 'others':
       default:
         list_default($cat, $list);
***************
*** 551,556 ****
     }
     
!    $link =  $phpgw->link("/mediadb/add.php","phase=1&cat=$cat");
!    $title = lang("add")."_".lang($cat)."_"."Wizard";
  
     // start the form
--- 561,566 ----
     }
     
!    $link =  $GLOBALS['phpgw']->link('/mediadb/add.php','phase=1&cat='.$cat);
!    $title = lang('add').'_'.lang($cat).'_'."Wizard";
  
     // start the form
***************
*** 563,572 ****
     // begin row
     printf("    <tr bgcolor=\"%s\" align=\"center\" valign=\"center\">\n",
!           $phpgw_info["theme"]["navbar_bg"]);
  
     printf("      <td width=\"10%%\" height=\"15\" bgcolor=\"%s\" 
valign=\"center\">\n", 
!           action_color("add", ""));
     printf("        <input type=\"button\" value=\""
!           .lang("add")
            ."\" onclick=\"launch_wizard('$link', '$title');\">");
     printf("      </td>\n");
--- 573,582 ----
     // begin row
     printf("    <tr bgcolor=\"%s\" align=\"center\" valign=\"center\">\n",
!           $GLOBALS['phpgw_info']['theme']['navbar_bg']);
  
     printf("      <td width=\"10%%\" height=\"15\" bgcolor=\"%s\" 
valign=\"center\">\n", 
!           action_color('add', ""));
     printf("        <input type=\"button\" value=\""
!           .lang('add')
            ."\" onclick=\"launch_wizard('$link', '$title');\">");
     printf("      </td>\n");
***************
*** 589,594 ****
  function list_feature($order, $sort, $filter, $start, $query)
  {
-    global $phpgw, $phpgw_info;
- 
     if ($order)
     {
--- 599,602 ----
***************
*** 607,646 ****
     printf("<p>\n");
     printf("<table border=\"0\" width=\"65%%\" align=\"center\">\n");
!    printf("  <tr bgcolor=\"%s\">\n", $phpgw_info["theme"]["bg_color"]);
!    printf("    <td align=\"center\" colspan=5><b>%s</b></td>\n", 
lang("Features"));
     printf("  </tr>\n");
     printf("  <tr>\n");
     printf("    <td colspan=5>&nbsp;</td>\n");
     printf("  </tr>\n");
!    printf("  <tr bgcolor=\"%s\">\n", $phpgw_info["theme"]["th_bg"]);
     printf("    <td>%s</td>\n",
!           
$phpgw->nextmatchs->show_sort_order($sort,"feature_id",$order,"feature.php",
!                                               lang("ID")));
     printf("    <td>%s</td>\n",
!           
$phpgw->nextmatchs->show_sort_order($sort,"feature_type",$order,"feature.php",
!                                               lang("Type")));
     printf("    <td>%s</td>\n",
!           
$phpgw->nextmatchs->show_sort_order($sort,"feature_desc",$order,"feature.php",
!                                               lang("Description")));
!    printf("    <td>%s</td>\n", lang("Edit"));
!    printf("    <td>%s</td>\n", lang("Delete"));
     printf("  </tr>\n");
  
!    $phpgw->db->query("select * from phpgw_mediadb_feature $ordermethod");
  
!    while ($phpgw->db->next_record()) 
     {
!       $tr_color = $phpgw->nextmatchs->alternate_row_color($tr_color);
  
!       $name = $phpgw->db->f("feature_type");
        if (! $name)
        {
!          $name = "&nbsp;";
        }
  
!       $desc = $phpgw->db->f("feature_desc");
        if (! $desc)
        {
!          $desc = "&nbsp;";
        }
  
--- 615,654 ----
     printf("<p>\n");
     printf("<table border=\"0\" width=\"65%%\" align=\"center\">\n");
!    printf("  <tr bgcolor=\"%s\">\n", 
$GLOBALS['phpgw_info']['theme']['bg_color']);
!    printf("    <td align=\"center\" colspan=5><b>%s</b></td>\n", 
lang('Features'));
     printf("  </tr>\n");
     printf("  <tr>\n");
     printf("    <td colspan=5>&nbsp;</td>\n");
     printf("  </tr>\n");
!    printf("  <tr bgcolor=\"%s\">\n", $phpgw_info['theme']['th_bg']);
     printf("    <td>%s</td>\n",
!           
$GLOBALS['phpgw']->nextmatchs->show_sort_order($sort,"feature_id",$order,"feature.php",
!                                               lang('ID')));
     printf("    <td>%s</td>\n",
!           
$GLOBALS['phpgw']->nextmatchs->show_sort_order($sort,"feature_type",$order,"feature.php",
!                                               lang('Type')));
     printf("    <td>%s</td>\n",
!           
$GLOBALS['phpgw']->nextmatchs->show_sort_order($sort,"feature_desc",$order,"feature.php",
!                                               lang('Description')));
!    printf("    <td>%s</td>\n", lang('Edit'));
!    printf("    <td>%s</td>\n", lang('Delete'));
     printf("  </tr>\n");
  
!    $GLOBALS['phpgw']->db->query("select * from phpgw_mediadb_feature 
$ordermethod");
  
!    while ($GLOBALS['phpgw']->db->next_record()) 
     {
!       $tr_color = 
$GLOBALS['phpgw']->nextmatchs->alternate_row_color($tr_color);
  
!       $name = $GLOBALS['phpgw']->db->f('feature_type');
        if (! $name)
        {
!          $name = '&nbsp;';
        }
  
!       $desc = $GLOBALS['phpgw']->db->f('feature_desc');
        if (! $desc)
        {
!          $desc = '&nbsp;';
        }
  
***************
*** 649,661 ****
        printf("    <td>%s</td>\n", lang($desc));
        printf("    <td width=5%%><a href=\"%s\">%s</a></td>\n",
!              $phpgw->link("/mediadb/feature.php",
!                           "con=" . urlencode($phpgw->db->f("feature_id")) . 
"&act=edit"),
!              lang("Edit"));
!       if ($phpgw->db->f("cat_id") != "1")
        {
           printf("    <td width=5%%><a href=\"%s\">%s</a></td>\n",
!                 $phpgw->link("/mediadb/feature.php",
!                              "con=" . urlencode($phpgw->db->f("feature_id")) 
. "&act=delete"),
!                 lang("Delete"));
        }
        else
--- 657,669 ----
        printf("    <td>%s</td>\n", lang($desc));
        printf("    <td width=5%%><a href=\"%s\">%s</a></td>\n",
!              $GLOBALS['phpgw']->link('/mediadb/feature.php',
!                           'con=' . 
urlencode($GLOBALS['phpgw']->db->f('feature_id')) . '&act=edit'),
!              lang('Edit'));
!       if ($GLOBALS['phpgw']->db->f('cat_id') != '1')
        {
           printf("    <td width=5%%><a href=\"%s\">%s</a></td>\n",
!                 $GLOBALS['phpgw']->link('/mediadb/feature.php',
!                              'con=' . 
urlencode($GLOBALS['phpgw']->db->f('feature_id')) . '&act=delete'),
!                 lang('Delete'));
        }
        else
***************
*** 668,674 ****
     printf("</table>\n");
     
!    printf("<form method=POST 
action=\"%s\">\n",$phpgw->link("/mediadb/feature.php","act=add"));
     printf("  <table border=0 width=65%% align=center>\n");
!    printf("    <tr><td align=left><input type=\"submit\" 
value=\"%s\"></td></tr>\n",lang("Add"));
     printf("  </table>\n");
     printf("</form>\n");
--- 676,682 ----
     printf("</table>\n");
     
!    printf("<form method=POST 
action=\"%s\">\n",$GLOBALS['phpgw']->link('/mediadb/feature.php','act=add'));
     printf("  <table border=0 width=65%% align=center>\n");
!    printf("    <tr><td align=left><input type=\"submit\" 
value=\"%s\"></td></tr>\n",lang('Add'));
     printf("  </table>\n");
     printf("</form>\n");




reply via email to

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