Subversion-Projekte lars-tiefland.ci

Revision

Revision 2020 | Blame | Vergleich mit vorheriger | Letzte Änderung | Log anzeigen | RSS feed

<?php

class Design_model extends CI_Model
{
        private $upd_settings = "";
        public function __construct()
        {
                parent::__construct();
                $this->upd_settings = "UPDATE
                                web_settings
                        SET
                                inhalt=?,
                                letzte_aenderung_von='".$_SESSION["username"]."'
                        WHERE
                                id=?
                        AND
                                bestellart_id=1
                        AND
                                shops_id=".$GLOBALS["INI"]["shops_ID"]."
                ";
        }
        public function get_list()
        {
                $sql = "SELECT
                                *
                        FROM
                                web_settings
                        WHERE
                                shops_id=".$GLOBALS["INI"]["shops_ID"]."
                        AND
                                typ IN ('varchar','text','static','date','select')
                        AND
                                bestellart_id=1
                        ORDER BY
                                id
                ";
                $res = $this->db->query($sql);
                $dirs = $res->result_array();
                return $dirs;
        }

        public function get($id)
        {
        }

        public function save()
        {
                $daten = $this->input->post('setting');
                foreach ($daten as $id => $row)
                {
                        $this->db->query($this->upd_settings, array(
                                $row,
                                $id,
                                ));
                }
        }

        public function del($id)
        {
        }

}