source: extensions/cuise/admin/maintain.inc.php @ 19990

Last change on this file since 19990 was 19990, checked in by cljosse, 11 years ago
  • [style] cuise save
File size: 1.3 KB
Line 
1<?php
2
3function theme_activate($id, $version, &$errors){
4        global $conf;
5   global $nb_template;
6 $nb_template=5 ;
7
8        if (!isset($conf['cuise']))
9                {
10
11    $params['parent'] = "elegant";
12    $params['theme'] = 'cuise' ;
13
14    $name_img=array("cbmt.gif","bpv.jpg","bp3.jpg","bph.png","header.png");
15  for($id=0;$id<$nb_template;$id++){
16                $params  = array_merge($params,array(                   
17                                                "bg_cuise_$id"                    => '#d4d4d4',
18                                                "bgho_cuise_$id"                        => '#A0A0A0',
19                                                "bd_cuise_$id"                    => '#4F4F4F',
20                                                "bdho_cuise_$id"                        => '#4F4F4F',
21            "bd_width_cuise_$id"        => '0px',
22                                                "co_cuise_$id"              => '#4F4F4F',
23            "coho_cuise_$id"              => '#5f5f5f',
24            "img_cuise_$id"       => $name_img[$id],
25            "chk_cuise_x_$id"     => 'checked',
26            "chk_cuise_y_$id"     => '',
27            "rayon_cuise_$id"     => '8px',
28            "chk_cuise_$id"    => ''
29            ));
30            }
31
32$config=$params;
33                 
34                $query = "
35        INSERT INTO " . CONFIG_TABLE . " (param,value,comment)
36        VALUES ('cuise' , '".pwg_db_real_escape_string(serialize($config))."' , 'cuise theme parameters');";
37
38                pwg_query($query);
39                }
40        }
41
42function theme_deactivate()
43        {
44    $query = "DELETE FROM " . CONFIG_TABLE . " WHERE param='cuise';";
45        pwg_query($query);
46        }
47
48?>
Note: See TracBrowser for help on using the repository browser.