<?php

// $Id: sifr.install,v 1.3 2006/10/23 21:53:41 rz Exp $

function sifr_install(){
  switch ($GLOBALS['db_type']) {
    case 'mysql':
    case 'mysqli':
      db_query("CREATE TABLE {sifr} (
          rid int(10) NOT NULL default '0',
          name varchar(50) NOT NULL default '',
          font varchar(100) NOT NULL default '',
          selector varchar(50) NOT NULL default '',
          color varchar(10) NOT NULL default '',
          linkcolor varchar(10) NOT NULL default '',
          hovercolor varchar(10) NOT NULL default '',
          bgcolor varchar(10) NOT NULL default '',
          transparent tinyint(3) NOT NULL default '0',
          weight float NOT NULL default '0',
          letterspacing varchar(10) NOT NULL default '',
          fontsize varchar(10) NOT NULL default '',
          paddingtop varchar(10) NOT NULL default '',
          paddingright varchar(10) NOT NULL default '',
          paddingbottom varchar(10) NOT NULL default '',
          paddingleft varchar(10) NOT NULL default '',
          textalign varchar(10) NOT NULL default '',
          underline tinyint(3) NOT NULL default '0',
          lettercase varchar(10) NOT NULL default '',
          UNIQUE KEY rid (rid),
          KEY rid_2 (rid)
        ) TYPE=MyISAM /*!40100 DEFAULT CHARACTER SET utf8 */;");
      drupal_set_message(t('sIFR database table has been installed.'));
      break;
      
    case 'pgsql':
      
      break;
  }
}

function sifr_update_1(){
	$ret = array();
  switch ($GLOBALS['db_type']) {
    case 'mysql':
    case 'mysqli':
			$ret[] = update_sql("ALTER TABLE {sifr} 
      		ADD textalign varchar(10) NOT NULL default '',
					ADD underline tinyint(3) NOT NULL default '0',
					ADD lettercase varchar(10) NOT NULL default ''
				");
			drupal_set_message(t('sIFR module has been updated.'));
			break;

    case 'pgsql':
      
      break;
  }
  return $ret;
}