source: trunk/news_admin/inc/class.soexport.inc.php @ 45

Revision 45, 2.0 KB checked in by niltonneto, 17 years ago (diff)

Implementação do FCKEDITOR na edição de artigos no news_admin, para permitir texto rico.

  • Property svn:eol-style set to native
  • Property svn:executable set to *
Line 
1<?php
2        /**************************************************************************\
3        * eGroupWare - News                                                        *
4        * http://www.egroupware.org                                                *
5        * --------------------------------------------                             *
6        *  This program is free software; you can redistribute it and/or modify it *
7        *  under the terms of the GNU General Public License as published by the   *
8        *  Free Software Foundation; either version 2 of the License, or (at your  *
9        *  option) any later version.                                              *
10        * --------------------------------------------                             *
11        \**************************************************************************/
12
13        /* $Id$ */
14
15        class soexport
16        {
17                var $db;
18
19                function soexport()
20                {
21                        $this->db = $GLOBALS['phpgw']->db;
22                }
23
24                function readconfig($cat_id)
25                {
26                        $sql = "SELECT * FROM phpgw_news_export where cat_id = $cat_id";
27                        $this->db->query($sql,__LINE__,__FILE__);
28                        if ($this->db->next_record())
29                        {
30                                $result = array();
31                                foreach (array('type','itemsyntax','title','link','description','img_title','img_url','img_link') as $config)
32                                {
33                                        $result[$config] = $this->db->f('export_'.$config);
34                                }
35                                return $result;
36                        }
37                        else
38                        {
39                                return false;
40                        }
41                }
42
43                function saveconfig($cat_id,$config)
44                {
45                        $sql = "DELETE FROM phpgw_news_export where cat_id = $cat_id";
46                        $this->db->query($sql,__LINE__,__FILE__);
47                        $sql = "INSERT INTO phpgw_news_export " .
48                                "(cat_id,export_type,export_itemsyntax,export_title,export_link,export_description,export_img_title,export_img_url,export_img_link) " .
49                                "VALUES ($cat_id,'" . $config['type']  . "','" . $config['itemsyntax'] . "','" . $config['title'] .
50                                "','" . $config['link'] . "','" . $config['description'] . "','" . $config['img_title'] .
51                                "','" . $config['img_url'] . "','" . $config['img_link'] . "')";
52                        $this->db->query($sql,__LINE__,__FILE__);
53                }
54
55        }
Note: See TracBrowser for help on using the repository browser.