if (!$prefix_table == '') {
    $prefix_table = $prefix_table . '_';
}
$table = $prefix_table . 'eazysales_adminsession';
$flds = "\n    cSessionId C(255) DEFAULT NULL,\n    nSessionExpires I UNSIGNED DEFAULT '0' NULL,\n    cSessionData X\n  ";
dosql($table, $flds);
$table = $prefix_table . 'eazysales_einstellungen';
$flds = "\n    currencies_id I2 DEFAULT NULL,\n    languages_id I2 DEFAULT NULL,\n    mappingEndkunde C(255) DEFAULT NULL,\n    mappingHaendlerkunde C(255) DEFAULT NULL,\n    shopURL C(255) DEFAULT NULL,\n    tax_class_id I DEFAULT NULL,\n    tax_zone_id I DEFAULT NULL,\n    tax_priority I DEFAULT NULL,\n    shipping_status_id I DEFAULT NULL,\n    versandMwst N '15.4' NOTNULL DEFAULT '0.0000',\n    cat_listing_template C(255) DEFAULT NULL,\n    cat_category_template C(255) DEFAULT NULL,\n    cat_sorting C(255) DEFAULT NULL,\n    cat_sorting2 C(255) DEFAULT NULL,\n    prod_product_template C(255) DEFAULT NULL,\n    prod_options_template C(255) DEFAULT NULL,\n    StatusAbgeholt I1 UNSIGNED NOT NULL DEFAULT '0',\n    StatusVersendet I1 UNSIGNED NOT NULL DEFAULT '0'\n  ";
dosql($table, $flds);
$table = $prefix_table . 'eazysales_mbestellpos';
$flds = "\n    kBestellPos I UNSIGNED NOTNULL AUTO PRIMARY,\n    orders_products_id I UNSIGNED DEFAULT NULL\n  ";
dosql($table, $flds);
$table = $prefix_table . 'eazysales_martikel';
$flds = "\n    products_id I UNSIGNED NOT NULL PRIMARY,\n    kArtikel I UNSIGNED DEFAULT NULL\n  ";
dosql($table, $flds);
$table = $prefix_table . 'eazysales_mkategorie';
$flds = "\n    categories_id I UNSIGNED NOT NULL PRIMARY,\n    kKategorie I UNSIGNED DEFAULT NULL\n  ";
dosql($table, $flds);
$table = $prefix_table . 'eazysales_mvariation';
$flds = "\n    kEigenschaft I UNSIGNED NOT NULL PRIMARY,\n    products_options_id I UNSIGNED DEFAULT NULL,\n    kArtikel int(11) DEFAULT NULL\n  ";
dosql($table, $flds);
$table = $prefix_table . 'eazysales_mvariationswert';
$flds = "\n    products_attributes_id I UNSIGNED NOT NULL PRIMARY,\n    kEigenschaftsWert I UNSIGNED DEFAULT NULL,\n    kArtikel I DEFAULT NULL\n  ";
dosql($table, $flds);
$table = $prefix_table . 'eazysales_sentorders';
$flds = "\n    orders_id I UNSIGNED NOT NULL PRIMARY,\n    dGesendet T DEFAULT NULL\n  ";
dosql($table, $flds);
$table = $prefix_table . 'eazysales_sync';
$flds = "\n    cName C(255) DEFAULT NULL,\n    cPass C(255) DEFAULT NULL\n  ";
dosql($table, $flds);
Example #2
0
}
while ($row = mysql_fetch_array($getmults)) {
    $itemid = $row['itemid'];
    $fieldid = $row['fieldid'];
    $datatxt = $row['data_txt'];
    $fid = $fieldx[$fieldid];
    $sid = $entryx[$itemid];
    $sql = "INSERT INTO `" . $NPREFIX . "_field_option_selected` (`fid`, `sid`, `optValue`, `params`, `copy`) VALUES ('" . $fid . "', '" . $sid . "', '" . $datatxt . "', '', 0)";
    // If for some reason we run into a field we have not mapped we need to skip
    // it here otherwise we'll enter multiple blank rows and error.  If you
    // saw this error, you need to align the mismatched fields earlier in
    // the script.
    if (!$fid || !$sid) {
        print "error: Skipping fieldid {$fieldid}, itemid {$itemid}. (Couldn't translate one of the two)\n";
    } else {
        $optres = dosql($sql);
    }
}
if ($verbose) {
    print "Final: If everything went right you probably have exactly {$total_entries} entries in this section of SobiPro now...\n";
}
//// some functions ////
function strtotitle($title)
{
    // Our array of 'small words' which shouldn't be capitalised if
    // they aren't the first word. Add your own words to taste.
    $smallwordsarray = array('of', 'a', 'the', 'and', 'an', 'or', 'nor', 'but', 'is', 'if', 'then', 'else', 'when', 'at', 'from', 'by', 'on', 'off', 'for', 'in', 'out', 'over', 'to', 'into', 'with');
    // Split the string into separate words
    $words = explode(' ', $title);
    foreach ($words as $key => $word) {
        // If this word is the first, or it's not one of our small words, capitalise it
$table = $prefix . '_administrators_info';
$sql = "\nCREATE TABLE " . $prefix . "_administrators_info (\n  admin_info_id int NOT NULL,\n  admin_info_date_of_last_logon datetime,\n  admin_info_number_of_logons int(5),\n  admin_info_date_account_created datetime,\n  admin_info_date_account_last_modified datetime,\n  PRIMARY KEY (admin_info_id)\n)\n";
dosql($table, $sql);
$table = $prefix . '_configuration';
$sql = "\nCREATE TABLE " . $prefix . "_configuration (\n  configuration_id int(11) NOT NULL auto_increment,\n  configuration_title varchar(64) NOT NULL default '',\n  configuration_key varchar(64) NOT NULL default '',\n  configuration_value varchar(255) NOT NULL default '',\n  configuration_description varchar(255) NOT NULL default '',\n  configuration_group_id int(11) NOT NULL default '0',\n  sort_order int(5) default NULL,\n  last_modified datetime default NULL,\n  date_added datetime NOT NULL default '0000-00-00 00:00:00',\n  use_function varchar(255) default NULL,\n  set_function varchar(255) default NULL,\n  PRIMARY KEY (configuration_id)\n) \n";
dosql($table, $sql);
$table = $prefix . '_configuration_group';
$sql = "\n CREATE TABLE " . $prefix . "_configuration_group (\n   configuration_group_id int(11) NOT NULL auto_increment,\n   configuration_group_title varchar(64) NOT NULL default '',\n   configuration_group_description varchar(255) NOT NULL default '',\n   sort_order int(5) default NULL,\n   visible int(1) default '1',\n   PRIMARY KEY (configuration_group_id)\n   )\n";
dosql($table, $sql);
$table = $prefix . '_countries';
$sql = "\n CREATE TABLE " . $prefix . "_countries (\n  countries_id int NOT NULL auto_increment,\n  countries_name varchar(64) NOT NULL,\n  countries_iso_code_2 char(2) NOT NULL,\n  countries_iso_code_3 char(3) NOT NULL,\n  address_format_id int NOT NULL,\n  PRIMARY KEY (countries_id),\n  KEY IDX_COUNTRIES_NAME (countries_name)\n   )\n";
dosql($table, $sql);
$table = $prefix . '_languages';
$sql = "\nCREATE TABLE " . $prefix . "_languages (\n  languages_id int(11) NOT NULL,\n  name varchar(32) NOT NULL default '',\n  iso_639_2 char(3) NOT NULL default '',\n  iso_639_1 char(2) NOT NULL default '',\n  charset varchar(16) NOT NULL default '',\n  text_direction char(3) NOT NULL default 'ltr',\n  active int(1) default '0',\n  sort_order int(3) default NULL,\n  PRIMARY KEY  (languages_id)\n)\n";
dosql($table, $sql);
$table = $prefix . '_newsletters';
$sql = "\nCREATE TABLE " . $prefix . "_newsletters (\n  newsletters_id int NOT NULL,\n  title varchar(255) NOT NULL,\n  content text NOT NULL,\n  module varchar(255) NOT NULL,\n  date_added datetime NOT NULL,\n  date_sent datetime,\n  status int(1),\n  locked int(1) default '0',\n  PRIMARY KEY (newsletters_id)\n)\n";
dosql($table, $sql);
$table = $prefix . '_sequence_languages';
$sql = "\nCREATE TABLE " . $prefix . "_sequence_languages (\n  id int(11) NOT NULL default '0'\n)\n";
dosql($table, $sql);
$table = $prefix . '_sessions';
$sql = "\nCREATE TABLE " . $prefix . "_sessions (\n  SESSKEY char(32) not null,\n  EXPIRY int(11) unsigned not null,\n  DATA text not null,\n  PRIMARY KEY (sesskey)\n)\n";
dosql($table, $sql);
$table = $prefix . '_whos_online';
$sql = "\nCREATE TABLE " . $prefix . "_whos_online (\n  user_id int,\n  full_name varchar(64) NOT NULL,\n  session_id varchar(128) NOT NULL,\n  ip_address varchar(15) NOT NULL,\n  time_entry varchar(14) NOT NULL,\n  time_last_click varchar(14) NOT NULL,\n  last_page_url varchar(64) NOT NULL\n)\n";
dosql($table, $sql);
$table = $prefix . '_zones';
$sql = "\nCREATE TABLE " . $prefix . "_zones (\n  zone_id int NOT NULL auto_increment,\n  zone_country_id int NOT NULL,\n  zone_code varchar(32) NOT NULL,\n  zone_name varchar(32) NOT NULL,\n  PRIMARY KEY (zone_id)\n)\n";
dosql($table, $sql);
 function install()
 {
     // Get database information
     $dbconn =& oosDBGetConn();
     $oostable =& oosDBGetTables();
     $admin_filestable = $oostable['admin_files'];
     $query = "UPDATE {$admin_filestable}\n                SET admin_groups_id = 1\n                WHERE admin_files_name = 'stats_referer'";
     $dbconn->Execute($query);
     $table = $oostable['referer'];
     $flds = "\n        referer_id I NOTNULL AUTO PRIMARY,\n        url C(255) NOTNULL,\n        frequency I DEFAULT '0' NOTNULL\n      ";
     dosql($table, $flds);
     return true;
 }
Example #5
0
switch ($action) {
    case 'show':
        $show_fun = "showstep" . $step;
        $content = $show_fun();
        showmain($content);
        break;
    case 'check':
        $check_fun = "checkstep" . $step;
        $result = $check_fun();
        steupgo($step);
        break;
    case 'del':
        dodel();
        //删除安装目录
        break;
    case 'out':
        doout();
        //退出安装
        break;
    case 'svn':
        dosvn();
        //退出安装
        break;
    case 'sql':
        dosql();
        //退出安装
        break;
    default:
        header("location:./index.php?action=show&step=0");
        break;
}
Example #6
0
<?php

require_once 'def.inc';
require_once 'regsql.inc';
ini_set("track_errors", "1");
error_reporting(0);
$trans = NULL;
if (isset($_GET["query"])) {
    $trans = $_GET["query"];
}
dosql($trans);