Example #1
0
}
$db = cge_utils::get_db();
$taboptarray = array('mysql' => 'TYPE=MyISAM');
$dict = NewDataDictionary($db);
// tables
$flds = "id   I KEY AUTO,\n         code C(2) KEY,\n         name C(50),\n         sorting I DEFAULT 0";
$sqlarray = $dict->CreateTableSQL(CGEXTENSIONS_TABLE_COUNTRIES, $flds, $taboptarray);
$dict->ExecuteSQLArray($sqlarray);
$sqlarray = $dict->CreateTableSQL(CGEXTENSIONS_TABLE_STATES, $flds, $taboptarray);
$dict->ExecuteSQLArray($sqlarray);
$flds = "id I KEY AUTO,\n         key1 C(255),\n         key2 C(255),\n         key3 C(255),\n         key4 C(255),\n         data X,\n         type C(20),\n         expiry C(20),\n         create_date " . CMS_ADODB_DT . ",\n         modified_date " . CMS_ADODB_DT;
$sqlarray = $dict->CreateTableSQL(CGEXTENSIONS_TABLE_ASSOCDATA, $flds, $taboptarray);
$dict->ExecuteSQLArray($sqlarray);
// default content
\CGExtensions\internals::reset_countries();
\CGExtensions\internals::reset_states();
// Preferences
$this->SetPreference('imageextensions', 'jpg,png,gif');
$this->SetPreference('thumbnailsize', 75);
$this->SetPreference('watermark_text', get_site_preference('sitename', 'CMSMS Site'));
$this->SetPreference('watermark_textsize', 12);
$this->SetPreference('watermark_angle', 0);
$this->SetPreference('watermark_font', 'ARIAL.TTF');
$this->SetPreference('watermark_bgcolor', '#FFFFFF');
$this->SetPreference('watermark_textcolor', '#000000');
$this->SetPreference('watermark_transparent', 1);
// templates
$this->ResetErrorTemplate();
$fn = dirname(__FILE__) . '/templates/orig_sortablelist_template.tpl';
if (file_exists($fn)) {
    $template = @file_get_contents($fn);