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

Last change on this file since 19486 was 19486, checked in by cljosse, 11 years ago

[style cuise] create cuise

File size: 1.2 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_tpl=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"                  => '#FFA800',
18                                                "bgho_cuise_$id"                        => '#0072FF',
19                                                "bd_cuise_$id"                  => '#4F4F4F',
20                                                "co_cuise_$id"            => '#4F4F4F',
21            "coho_cuise_$id"              => '#F4F4F4',
22            "img_cuise_$id"    =>   $name_tpl[$id],
23            "chk_cuise_x_$id"    => 'checked',
24            "chk_cuise_y_$id"    => '',
25            "rayon_cuise_$id"    => '8px',
26            "chk_cuise_$id"    => ''
27            ));
28            }
29
30$config=$params;
31                 
32                $query = "
33        INSERT INTO " . CONFIG_TABLE . " (param,value,comment)
34        VALUES ('cuise' , '".pwg_db_real_escape_string(serialize($config))."' , 'cuise theme parameters');";
35
36                pwg_query($query);
37                }
38        }
39
40function theme_deactivate()
41        {
42    $query = "DELETE FROM " . CONFIG_TABLE . " WHERE param='cuise';";
43        pwg_query($query);
44        }
45
46?>
Note: See TracBrowser for help on using the repository browser.