[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] old/brewer/malts.php, 1.1
From: |
nomail |
Subject: |
[Phpgroupware-cvs] old/brewer/malts.php, 1.1 |
Date: |
Thu, 30 Dec 2004 08:50:59 +0100 |
Update of /old/brewer
Added Files:
Branch:
malts.php
date: 2004/12/30 07:50:59; author: skwashd; state: Exp;
Log Message:
keep a historic record of the app
=====================================================================
<?php
/**************************************************************************\
* phpGroupWare - Brewer malts *
* http://www.phpgroupware.org *
* Written by Miles Lott <address@hidden> *
* ----------------------------------------------- *
* This program is free software; you can redistribute it and/or modify it *
* under the terms of the GNU General Public License as published by the *
* Free Software Foundation; either version 2 of the License, or (at your *
* option) any later version. *
\**************************************************************************/
/* $Id: malts.php,v 1.1 2004/12/30 07:50:59 skwashd Exp $ */
$GLOBALS['phpgw_info']['flags'] = array(
'currentapp' => 'brewer',
'enable_nextmatchs_class' => True
);
include('../header.inc.php');
$GLOBALS['phpgw']->template->set_file(array(
'item_list_t' => 'listitem.tpl',
'item_list' => 'listitem.tpl'));
$GLOBALS['phpgw']->template->set_block('item_list_t','item_list','list');
$common_hidden_vars =
'<input type="hidden" name="sort" value="' . $sort . '">'
. "\n"
. '<input type="hidden" name="order" value="' . $order . '">'
. "\n"
. '<input type="hidden" name="query" value="' . $query . '">'
. "\n"
. '<input type="hidden" name="start" value="' . $start . '">'
. "\n"
. '<input type="hidden" name="filter" value="' . $filter . '">'
. "\n";
$GLOBALS['phpgw']->template->set_var('lang_action',lang('Malts List'));
$GLOBALS['phpgw']->template->set_var('add_action',$GLOBALS['phpgw']->link('/brewer/add.php','type=malt'));
$GLOBALS['phpgw']->template->set_var('lang_add',lang('Add'));
$GLOBALS['phpgw']->template->set_var('title',lang('Malts'));
$GLOBALS['phpgw']->template->set_var('lang_search',lang('Search'));
$GLOBALS['phpgw']->template->set_var('query',$query);
$GLOBALS['phpgw']->template->set_var('actionurl',$GLOBALS['phpgw']->link('/brewer/malts.php'));
$GLOBALS['phpgw']->template->set_var('lang_done',lang('Done'));
$GLOBALS['phpgw']->template->set_var('doneurl',$GLOBALS['phpgw']->link('/brewer/index.php'));
if (!$start)
{
$start = 0;
}
if (!$sort)
{
$sort = "ASC";
}
$b = CreateObject('brewer.brew','malt');
$malts = $b->malt->get_list($start,$query,$sort,$order);
$total_records = $b->malt->total;
//--------------------------------- nextmatch
--------------------------------------------
$left =
$GLOBALS['phpgw']->nextmatchs->left('/brewer/malts.php',$start,$total_records,"&mode=$mode");
$right =
$GLOBALS['phpgw']->nextmatchs->right('/brewer/malts.php',$start,$total_records,"&mode=$mode");
$GLOBALS['phpgw']->template->set_var('left',$left);
$GLOBALS['phpgw']->template->set_var('right',$right);
$GLOBALS['phpgw']->template->set_var('lang_showing',$GLOBALS['phpgw']->nextmatchs->show_hits($total_records,
$start));
//------------------------------ end nextmatch
------------------------------------------
//------------------- list header variable template-declarations
-------------------------
$GLOBALS['phpgw']->template->set_var('th_bg',$GLOBALS['phpgw_info']["theme"][th_bg]);
$GLOBALS['phpgw']->template->set_var('lang_name',$GLOBALS['phpgw']->nextmatchs->show_sort_order($sort,'name',$order,"/brewer/malts.php",lang('Malt
Name')));
$GLOBALS['phpgw']->template->set_var('lang_view',lang('View'));
$GLOBALS['phpgw']->template->set_var('lang_edit',lang('Edit'));
$GLOBALS['phpgw']->template->set_var('lang_delete',lang('Delete'));
$GLOBALS['phpgw']->template->set_var('th_bg',$GLOBALS['phpgw_info']['theme']['th_bg']);
$GLOBALS['phpgw']->template->set_var('th_text',$GLOBALS['phpgw_info']['theme']['th_text']);
$GLOBALS['phpgw']->template->set_var('row_on',$GLOBALS['phpgw_info']['theme']['row_on']);
$GLOBALS['phpgw']->template->set_var('row_off',$GLOBALS['phpgw_info']['theme']['row_off']);
//-------------------------- end header declaration
--------------------------------------
@reset($malt);
while (list($key,$malt) = @each($malts))
{
$tr_color =
$GLOBALS['phpgw']->nextmatchs->alternate_row_color($tr_color);
$GLOBALS['phpgw']->template->set_var(tr_color,$tr_color);
$id = $malt['id'];
$name = $GLOBALS['phpgw']->strip_html($malt['name']);
//-------------------------- template declaration for list
records ---------------------------
$GLOBALS['phpgw']->template->set_var('name',$name);
if(!$mode)
{
$GLOBALS['phpgw']->template->set_var('view',$GLOBALS['phpgw']->link('/brewer/view.php',"id=$id&type=malt&start=$start&query=$query&sort=$sort&order=$order&filter=$filter"));
$GLOBALS['phpgw']->template->set_var('lang_view_entry',lang('View'));
$GLOBALS['phpgw']->template->set_var('edit',$GLOBALS['phpgw']->link('/brewer/edit.php',"id=$id&type=malt&start=$start&query=$query&sort=$sort&order=$order&filter=$filter"));
$GLOBALS['phpgw']->template->set_var('lang_edit_entry',lang('Edit'));
$GLOBALS['phpgw']->template->set_var('delete',$GLOBALS['phpgw']->link('/brewer/delete.php',"id=$id&type=malt&start=$start&query=$query&sort=$sort&order=$order&filter=$filter"));
$GLOBALS['phpgw']->template->set_var('lang_delete_entry',lang('Delete'));
}
else
{
$GLOBALS['phpgw']->template->set_var('view',$GLOBALS['phpgw']->link('/brewer/beer.php',"action=addingredient&type=malt&id=$id"));
$GLOBALS['phpgw']->template->set_var('lang_view_entry',lang('Add to Recipe'));
$GLOBALS['phpgw']->template->set_var('lang_edit_entry',' ');
$GLOBALS['phpgw']->template->set_var('lang_delete_entry',' ');
}
$GLOBALS['phpgw']->template->parse('list','item_list',True);
}
// ---------------------------- end record declaration
-----------------------------------------
$GLOBALS['phpgw']->template->parse('out','item_list_t',True);
$GLOBALS['phpgw']->template->p('out');
$GLOBALS['phpgw']->common->phpgw_footer();
?>
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] old/brewer/malts.php, 1.1,
nomail <=