[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] CVS: mediadb/inc artist.inc.php,1.6,1.7
From: |
Mark A Peters <address@hidden> |
Subject: |
[Phpgroupware-cvs] CVS: mediadb/inc artist.inc.php,1.6,1.7 |
Date: |
Thu, 14 Feb 2002 07:24:19 -0500 |
Update of /cvsroot/phpgroupware/mediadb/inc
In directory subversions:/tmp/cvs-serv18190/mediadb/inc
Modified Files:
artist.inc.php
Log Message:
Changed over to use GLOBALS.
Index: artist.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/mediadb/inc/artist.inc.php,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -r1.6 -r1.7
*** artist.inc.php 17 Jun 2001 20:49:29 -0000 1.6
--- artist.inc.php 14 Feb 2002 12:24:16 -0000 1.7
***************
*** 13,238 ****
/* $Id$ */
! function list_artist($order, $sort, $filter, $start, $query, $qfield)
! {
! global $phpgw, $phpgw_info;
!
! $search_obj = array(array("artist_fname","first name"),
! array("artist_lname","last name"));
! if ($order)
! {
! $ordermethod = "order by $order $sort";
! }
! else
! {
! $ordermethod = "order by artist_lname asc";
! }
!
! if (! $sort)
! {
! $sort = "desc";
! }
!
! if (! $start)
! {
! $start = 0;
! }
!
! if (! $qfield)
! {
! $qfield = "artist_fname";
! }
! if (! $filter)
! {
! $filter = "none";
! }
! $limit =$phpgw->db->limit($start);
! if (!$query)
! {
! $phpgw->db->query("select count(*) from phpgw_mediadb_artist "
! .$ordermethod);
! }
! else
! {
! $phpgw->db->query("select count(*) from phpgw_mediadb_artist "
! ."WHERE $qfield like '%$query%' "
! .$ordermethod);
! }
!
! $phpgw->db->next_record();
! if ($phpgw->db->f(0) >
$phpgw_info["user"]["preferences"]["common"]["maxmatchs"])
! {
! printf("<center>%s</center>\n",
! lang("showing x - x of x",($start + 1),
! ($start +
$phpgw_info["user"]["preferences"]["common"]["maxmatchs"]),
! $phpgw->db->f(0)));
! }
! else
! {
! printf("<center>%s</center>\n", lang("showing x",$phpgw->db->f(0)));
! }
! printf("<center>\n");
!
!
$phpgw->nextmatchs->show_tpl("/mediadb/artist.php",$start,$phpgw->db->f(0), "",
! "75%",
$phpgw_info["theme"]["th_bg"],$search_obj,0);
! printf("</center>\n");
!
! printf("<table border=\"0\" width=\"75%%\" align=\"center\">\n");
! printf(" <tr>\n");
! printf(" <td colspan=4> </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,"artist_lname",$order,"artist.php",
! lang("Last Name")));
! printf(" <td>%s</td>\n",
!
$phpgw->nextmatchs->show_sort_order($sort,"artist_fname",$order,"artist.php",
! lang("First Name")));
! printf(" <td>%s</td>\n", lang("Edit"));
! printf(" <td>%s</td>\n", lang("Delete"));
! printf(" </tr>\n");
! if (!$query)
! {
! $phpgw->db->query("select * from phpgw_mediadb_artist "
! .$ordermethod
! ." ".$limit);
! }
! else
! {
! $phpgw->db->query("select * from phpgw_mediadb_artist "
! ."WHERE $qfield like '%$query%' "
! .$ordermethod
! ." ".$limit);
! }
!
! while ($phpgw->db->next_record())
! {
! $tr_color = $phpgw->nextmatchs->alternate_row_color($tr_color);
!
! $fname = $phpgw->db->f("artist_fname");
! if (! $fname)
! {
! $fname = " ";
! }
!
! $lname = $phpgw->db->f("artist_lname");
! if (! $lname)
! {
! $lname = " ";
! }
!
! printf(" <tr bgcolor=$tr_color>\n");
! printf(" <td>%s</td>\n", $lname);
! printf(" <td>%s</td>\n", $fname);
! printf(" <td width=5%%><a href=\"%s\">%s</a></td>\n",
! $phpgw->link("/mediadb/artist.php",
! "con=" . urlencode($phpgw->db->f("artist_id"))
! ."&act=edit"
!
."&start=$start&order=$order&filter=$filter&qfield=$qfield"
! ."&sort=$sort"
! ."&query=".urlencode($query)),
! lang("Edit"));
! printf(" <td width=5%%><a href=\"%s\">%s</a></td>\n",
! $phpgw->link("/mediadb/artist.php",
! "con=" . urlencode($phpgw->db->f("artist_id"))
! ."&act=delete"
!
."&start=$start&order=$order&filter=$filter&qfield=$qfield"
! ."&sort=$sort"
! ."&query=".urlencode($query)),
! lang("Delete"));
!
! printf(" </tr>\n");
! }
! printf("</table>\n");
! }
!
! function add_artist_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/artist.php",
! "act=add"
!
."&start=$start&order=$order&filter=$filter&qfield=$qfield"
! ."&sort=$sort"
! ."&query=".urlencode($query)));
! printf(" <table border=\"0\" cellpadding=\"0\""
! . " cellspacing=\"0\" width=75%% 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 width=10%%>%s:</td>\n",lang("First"));
! printf(" <td>\n");
! printf(" <input type=\"text\" name=\"artist_fname\""
! ." value=\"%s\" maxlength=30>\n", $afname);
! printf(" </td>\n");
! printf(" <td width=10%%>%s:</td>\n",lang("Last"));
! printf(" <td>\n");
! printf(" <input type=\"text\" name=\"artist_lname\""
! ." value=\"%s\" maxlength=50>\n", $alname);
! printf(" </td>\n");
! printf(" </tr>\n");
! printf(" </table>\n");
! printf("</form>\n");
! }
!
! function modify_artist_entry($con, $act, $order, $sort, $filter, $start,
$query, $qfield)
! {
! global $phpgw, $phpgw_info;
!
! $phpgw->db->query("select * from phpgw_mediadb_artist where
artist_id=$con");
! $phpgw->db->next_record();
! $afname = $phpgw->db->f("artist_fname");
! $alname = $phpgw->db->f("artist_lname");
!
! 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/artist.php",
! "act=$act"
!
."&start=$start&order=$order&filter=$filter&qfield=$qfield"
! ."&sort=$sort"
! ."&query=".urlencode($query)));
! printf("<input type=\"hidden\" name=\"artist_id\" value=\"%s\">\n",$con);
! printf(" <table border=\"0\" cellpadding=\"0\""
! . " cellspacing=\"0\" width=75%% 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($act));
! printf(" </td>\n");
! printf(" <td width=10%%>%s:</td>\n",lang("First"));
! printf(" <td>\n");
! printf(" <input type=\"text\" name=\"artist_fname\""
! ." value=\"%s\" maxlength=30>\n", $afname);
! printf(" </td>\n");
! printf(" <td width=10%%>%s:</td>\n",lang("Last"));
! printf(" <td>\n");
! printf(" <input type=\"text\" name=\"artist_lname\""
! ." value=\"%s\" maxlength=50>\n", $alname);
! printf(" </td>\n");
! printf(" </tr>\n");
! printf(" </table>\n");
! printf("</form>\n");
! }
?>
--- 13,203 ----
/* $Id$ */
! function list_artist($order, $sort, $filter, $start, $query, $qfield)
! {
! $search_obj = Array(
! Array(
! 'artist_fname',
! 'first name'
! ),
! Array(
! 'artist_lname',
! 'last name'
! )
! );
! if($order)
! {
! $ordermethod = 'order by '.$order.' '.$sort;
! }
! else
! {
! $ordermethod = 'order by artist_lname asc';
! }
!
! if(!$sort)
! {
! $sort = 'desc';
! }
!
! if(!$start)
! {
! $start = 0;
! }
!
! if(!$qfield)
! {
! $qfield = 'artist_fname';
! }
! if(!$filter)
! {
! $filter = 'none';
! }
!
! if(!$query)
! {
! $GLOBALS['phpgw']->db->query('select count(*) from
phpgw_mediadb_artist '.$ordermethod);
! }
! else
! {
! $GLOBALS['phpgw']->db->query('select count(*) from
phpgw_mediadb_artist WHERE '.$qfield." like '%".$query."%'".$ordermethod);
! }
!
! $GLOBALS['phpgw']->db->next_record();
! if($GLOBALS['phpgw']->db->f(0) >
$GLOBALS['phpgw_info']['user']['preferences']['common']['maxmatchs'])
! {
! echo '<center>'.lang('showing x - x of x',($start + 1),
! ($start +
$GLOBALS['phpgw_info']['user']['preferences']['common']['maxmatchs']),
! $GLOBALS['phpgw']->db->f(0)).'</center>'."\n";
! }
! else
! {
! echo '<center>'.lang('showing
x',$GLOBALS['phpgw']->db->f(0)).'</center>'."\n";
! }
! echo '<center>'."\n";
!
$GLOBALS['phpgw']->nextmatchs->show_tpl('/mediadb/artist.php',$start,$GLOBALS['phpgw']->db->f(0),'','75%',
$GLOBALS['phpgw_info']['theme']['th_bg'],$search_obj,0);
! echo '</center>'."\n";
! echo '<table border="0" width="75%" align="center">'."\n"
! .' <tr>'."\n"
! .' <td colspan="4"> </td>'."\n"
! .' </tr>'."\n"
! .' <tr
bgcolor="'.$GLOBALS['phpgw_info']['theme']['th_bg'].'">'."\n"
! .'
<td>'.$GLOBALS['phpgw']->nextmatchs->show_sort_order($sort,'artist_lname',$order,'artist.php',lang('Last
Name')).'</td>'."\n"
! .'
<td>'.$GLOBALS['phpgw']->nextmatchs->show_sort_order($sort,'artist_fname',$order,'artist.php',lang('First
Name')).'</td>'."\n"
! .' <td>'.lang('Edit').'</td>'."\n"
! .' <td>'.lang('Delete').'</td>'."\n"
! .' </tr>'."\n";
! if(!$query)
! {
! $GLOBALS['phpgw']->db->limit_query('select * from
phpgw_mediadb_artist '.$ordermethod,$start);
! }
! else
! {
! $GLOBALS['phpgw']->db->limit_query('select * from
phpgw_mediadb_artist WHERE '.$qfield." like '%".$query."%'
".$ordermethod,$start);
! }
!
! while($GLOBALS['phpgw']->db->next_record())
! {
! $tr_color =
$GLOBALS['phpgw']->nextmatchs->alternate_row_color($tr_color);
!
! $fname = $GLOBALS['phpgw']->db->f('artist_fname');
! if(!$fname)
! {
! $fname = ' ';
! }
!
! $lname = $GLOBALS['phpgw']->db->f('artist_lname');
! if (! $lname)
! {
! $lname = ' ';
! }
!
! echo ' <tr bgcolor="'.$tr_color.'">'."\n"
! .' <td>'.$lname.'</td>'."\n"
! .' <td>'.$fname.'</td>'."\n"
! .' <td width="5%"><a
href="'.$GLOBALS['phpgw']->link('/mediadb/artist.php',
!
'con='.urlencode($GLOBALS['phpgw']->db->f('artist_id'))
!
.'&act=edit&start='.$start.'&order='.$order.'&filter='.$filter.'&qfield='.$qfield.'&sort='.$sort
! .'&query='.urlencode($query)
! ).'">'.lang('Edit').'</a></td>'."\n"
! .' <td width="5%"><a
href="'.$GLOBALS['phpgw']->link('/mediadb/artist.php',
!
'con='.urlencode($GLOBALS['phpgw']->db->f('artist_id'))
!
.'&act=delete&start='.$start.'&order='.$order.'&filter='.$filter.'&qfield='.$qfield.'&sort='.$sort
! .'&query='.urlencode($query)
! ).'">'.lang('Delete').'</a></td>'."\n"
! .' </tr>'."\n";
! }
! echo '</table>'."\n";
! }
!
! function add_artist_entry($order, $sort, $filter, $start, $query,
$qfield)
! {
! $color = $GLOBALS['phpgw_info']['theme']['th_bg'];
! echo '<form method="POST"
action="'.$GLOBALS['phpgw']->link('/mediadb/artist.php',
!
'act=add&start='.$start.'&order='.$order.'&filter='.$filter.'&qfield='.$qfield.'&sort='.$sort
! .'&query='.urlencode($query)
! ).'">'."\n"
! .' <table border="0" cellpadding="0" cellspacing="0"
width="75%" align="center">'."\n"
! .' <tr bgcolor="'.$color.'">'."\n"
! .' <td align="left" width="15%">'."\n"
! .' <input type="submit" name="submit"
value="'.lang('Add').'">'."\n"
! .' </td>'."\n"
! .' <td width="10%">'.lang('First').':</td>'."\n"
! .' <td>'."\n"
! .' <input type="text" name="artist_fname"
value="'.$afname.'" maxlength="30">'."\n"
! .' </td>'."\n"
! .' <td width="10%">'.lang('Last').':</td>'."\n"
! .' <td>'."\n"
! .' <input type="text" name="artist_lname"
value="'.$alname.'" maxlength="50">'."\n"
! .' </td>'."\n"
! .' </tr>'."\n"
! .' </table>'."\n"
! .'</form>'."\n";
! }
!
! function modify_artist_entry($con, $act, $order, $sort, $filter,
$start, $query, $qfield)
! {
! $GLOBALS['phpgw']->db->query('select * from
phpgw_mediadb_artist where artist_id='.$con,__LINE__,__FILE__);
! $GLOBALS['phpgw']->db->next_record();
! $afname = $GLOBALS['phpgw']->db->f('artist_fname');
! $alname = $GLOBALS['phpgw']->db->f('artist_lname');
!
! switch($act)
! {
! case 'delete':
! $color =
$GLOBALS['phpgw_info']['theme']['bg07'];
! break;
! default:
! $color =
$GLOBALS['phpgw_info']['theme']['table_bg'];
! break;
! }
! echo '<form method="POST"
action="'.$GLOBALS['phpgw']->link('/mediadb/artist.php',
!
'act='.$act.'&start='.$start.'&order='.$order.'&filter='.$filter.'&qfield='.$qfield.'&sort='.$sort
! .'&query='.urlencode($query)
! ).'">'."\n"
! .'<input type="hidden" name="artist_id"
value="'.$con.'">'."\n"
! .' <table border="0" cellpadding="0" cellspacing="0"
width="75" align="center">'."\n"
! .' <tr bgcolor="'.$color.'">'."\n"
! .' <td align="left" width="15%">'."\n"
! .' <input type="submit" name="submit"
value="'.lang($act).'">'."\n"
! .' </td>'."\n"
! .' <td width="10%">'.lang('First').':</td>'."\n"
! .' <td>'."\n"
! .' <input type="text" name="artist_fname"
value="'.$afname.'" maxlength="30">'."\n"
! .' </td>'."\n"
! .' <td width="10%">'.lang('Last').':</td>'."\n"
! .' <td>'."\n"
! .' <input type="text" name="artist_lname"
value="'.$alname.'" maxlength="50">'."\n"
! .' </td>'."\n"
! .' </tr>'."\n"
! .' </table>'."\n"
! .'</form>'."\n";
! }
?>
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] CVS: mediadb/inc artist.inc.php,1.6,1.7,
Mark A Peters <address@hidden> <=
- Prev by Date:
[Phpgroupware-cvs] CVS: cdb/doc cdb.views.txt,NONE,1.1
- Next by Date:
[Phpgroupware-cvs] CVS: email addressbook.php,1.32.2.2,1.32.2.3 attach_file.php,1.24.2.1,1.24.2.2 index.php,1.86.2.1,1.86.2.2 view_image.php,1.13.2.1,1.13.2.2
- Previous by thread:
[Phpgroupware-cvs] CVS: cdb/doc cdb.views.txt,NONE,1.1
- Next by thread:
[Phpgroupware-cvs] CVS: email addressbook.php,1.32.2.2,1.32.2.3 attach_file.php,1.24.2.1,1.24.2.2 index.php,1.86.2.1,1.86.2.2 view_image.php,1.13.2.1,1.13.2.2
- Index(es):