aboutsummaryrefslogtreecommitdiffstats
path: root/themes/elegant/admin/maintain.inc.php
blob: 6a531ea09e2993ea6a73931c51edca28d46ae04f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<?php

function theme_activate($id, $version, &$errors)
{
  global $prefixeTable, $conf;

  if (!isset($conf['elegant']))
  {
    $config = array(
      'p_main_menu'            => 'on',//on - off - disabled
      'p_pict_descr'            => 'on',//on - off - disabled
      'p_pict_comment'            => 'off',//on - off - disabled
    );
      
    $query = "
INSERT INTO " . CONFIG_TABLE . " (param,value,comment)
VALUES ('elegant' , '".pwg_db_real_escape_string(serialize($config))."' , 'p_main_menu#p_pict_descr#p_pict_comment');";
    pwg_query($query);
  }
}

function theme_delete()
{
  global $prefixeTable;

  $query = 'DELETE FROM ' . CONFIG_TABLE . ' WHERE param="elegant" ;';
  pwg_query($query);
}

?>