Subversion-Projekte lars-tiefland.inventar

Revision

Revision 14 | Revision 19 | Zur aktuellen Revision | Blame | Vergleich mit vorheriger | Letzte Änderung | Log anzeigen | RSS feed

<?php

        //$Id: os.class.php 16 2008-05-15 18:30:54Z lars $

        /**
         * @package     Inventar Datenbank
         * @author Lars Tiefland <ltiefland@gmail.com>
         * @copyright 2008
         **/

        class os
        {
                private $id;
                private $name;
                function __construct($id=0)
                {
                        if($os_id)
                        {
                                $res=$GLOBALS["db"]->query("SELECT * FROM os WHERE id=$id");
                                $this->id=$id;
                                $row=$res->fetchRow();
                                $this->name=$row["name"];       
                        }
                        else
                        {
                                $this->id=0;
                                $this->name='';
                        }
                }
                
                function getName()
                {
                        return $this->name;
                }
        }

?>