phpgroupware-cvs
[Top][All Lists]
Advanced

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

[Phpgroupware-cvs] old/brewer/std_test.php, 1.1


From: nomail
Subject: [Phpgroupware-cvs] old/brewer/std_test.php, 1.1
Date: Thu, 30 Dec 2004 08:50:59 +0100

Update of /old/brewer
Added Files:
        Branch: 
          std_test.php

date: 2004/12/30 07:50:59;  author: skwashd;  state: Exp;

Log Message:
keep a historic record of the app
=====================================================================
<?php
  /**************************************************************************\
  * phpGroupWare - Brewer Main Brew Calc                                     *
  * 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: std_test.php,v 1.1 2004/12/30 07:50:59 skwashd Exp $ */

        $phpgw_info["flags"] = array(
                'currentapp' => 'brewer',
                'enable_sbox_class' => True,
                'enable_nextmatchs_class' => True
        );

        include('../header.inc.php');

        $tbldef = array(
                'phpgw_brewer_recipes', array(
                        'id'             => 0,
                        'name'           => '',
                        'style'          => 0,
                        'total_vol'      => 0,
                        'vol_units'      => '',
                        'boil_vol'       => 0,
                        'boil_units'     => '',
                        'boil_time'      => 0,
                        'yeasts'         => array(),
                        'num_yeasts'     => 0,
                        'yeast_amounts'  => array(),
                        'yeast_units'    => '',
                        'malts'          => '',
                        'num_malts'      => 0,
                        'malt_amounts'   => array(),
                        'malt_colors'    => array(),
                        'malt_gravities' => array(),
                        'malt_units'     => '',
                        'hops'           => '',
                        'num_hops'       => 0,
                        'hop_amounts'    => array(),
                        'hop_units'      => '',
                        'hop_times'      => array(),
                        'hop_IBUs'       => array(),
                        'hop_bag'        => '',
                        'IBU_method'     => '',
                        'extraction_efficiency' => 0,
                        'apparent_attenuation'  => 0,
                        'real_attenuation'      => 0,
                        'original_gravity'      => 0,
                        'final_gravity'         => 0,
                        'alcohol_by_volume'     => 0,
                        'color'          => '',
                        'IBUs'           => ''
                )
        );
        $obj = CreateObject('brewer.std',$tbldef);
        $obj->debug = True;
        $obj->qfields = 'name,original_gravity,final_gravity';
        $obj->qstr = 'ale';

        $obj->get_list();

        if($obj->debug)
        {
                echo '<pre>';
                print_r($obj->data);
                echo '</pre>';
        }
        $info = $obj->db->metadata('phpgw_brewer_recipes');

        //$obj->qfields = '';
        $obj->qstr = '';
        $obj->get(5);

        if($obj->debug)
        {
                echo '<pre>';
                print_r($info);
                print_r($obj->data);
                echo '</pre>';
        }

        $phpgw->common->phpgw_footer();
?>




reply via email to

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