[ PHPXref.com ] [ Generated: Sun Jul 20 16:25:17 2008 ] [ ActionApps 2.8.1b ]
[ Index ]     [ Variables ]     [ Functions ]     [ Classes ]     [ Constants ]     [ Statistics ]

title

Body

[close]

/ -> sql_update.php3 (source)

   1  <?php
   2  //$Id: sql_update.php3,v 1.77 2005/06/28 01:18:30 honzam Exp $
   3  /*
   4  Copyright (C) 1999, 2000 Association for Progressive Communications
   5  http://www.apc.org/
   6  
   7      This program is free software; you can redistribute it and/or modify
   8      it under the terms of the GNU General Public License as published by
   9      the Free Software Foundation; either version 2 of the License, or
  10      (at your option) any later version.
  11  
  12      This program is distributed in the hope that it will be useful,
  13      but WITHOUT ANY WARRANTY; without even the implied warranty of
  14      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  15      GNU General Public License for more details.
  16  
  17      You should have received a copy of the GNU General Public License
  18      along with this program (LICENSE); if not, write to the Free Software
  19      Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  20  */
  21  
  22  
  23  
  24  // script for MySQL database update
  25  
  26  // this script updates the database to last structure, create all tables, ...
  27  // can be used for upgrade from apc-aa v. >= 1.5 or for create new database
  28  
  29  // handle with PHP magic quotes - quote the variables if quoting is set off
  30  function Myaddslashes($val, $n=1) {
  31    if (!is_array($val)) {
  32      return addslashes($val);
  33    }
  34    for (reset($val); list($k, $v) = each($val); )
  35      $ret[$k] = Myaddslashes($v, $n+1);
  36    return $ret;
  37  }
  38  
  39  if (!get_magic_quotes_gpc()) {
  40    // Overrides GPC variables
  41    if ( isset($HTTP_GET_VARS) AND is_array($HTTP_GET_VARS))
  42      for (reset($HTTP_GET_VARS); list($k, $v) = each($HTTP_GET_VARS); )
  43        $$k = Myaddslashes($v);
  44    if ( isset($HTTP_POST_VARS) AND is_array($HTTP_POST_VARS))
  45      for (reset($HTTP_POST_VARS); list($k, $v) = each($HTTP_POST_VARS); )
  46        $$k = Myaddslashes($v);
  47    if ( isset($HTTP_COOKIE_VARS) AND is_array($HTTP_COOKIE_VARS))
  48      for (reset($HTTP_COOKIE_VARS); list($k, $v) = each($HTTP_COOKIE_VARS); )
  49        $$k = Myaddslashes($v);
  50  }
  51  
  52  // need config.php3 to set db access, and phplib, and probably other stuff
  53  $AA_INC_PATH = "./include/";
  54  //$AA_INC_PATH = "/home/groups/a/ap/apc-aa/htdocs/apc-aa/include/";
  55  
  56  require_once $GLOBALS['AA_INC_PATH']."config.php3";
  57  
  58  require_once $GLOBALS['AA_INC_PATH']."locsess.php3";   // DB_AA definition
  59  require_once $GLOBALS['AA_INC_PATH']."util.php3";
  60  require_once $GLOBALS['AA_INC_PATH']."constants.php3";
  61  require_once $GLOBALS['AA_INC_PATH']."formutil.php3";
  62  
  63  //function Links_Category2SliceID($cid) definition
  64  require_once $GLOBALS["AA_BASE_PATH"]."modules/links/util.php3";
  65  
  66  // init used objects
  67  $db = new DB_AA;
  68  $db2 = new DB_AA;
  69  $err["Init"] = "";          // error array (Init - just for initializing variable
  70  
  71  $AA_IMG_URL = '/'. $GLOBALS["AA_BASE_DIR"] ."images/";
  72  $AA_DOC_URL = '/'. $GLOBALS["AA_BASE_DIR"] ."doc/";
  73  // $AA_HTTP_DOMAIN        - also used in SQL queries
  74  // ERROR_REPORTING_EMAIL  - also used in SQL queries
  75  $now = now();
  76  
  77  set_time_limit(360);
  78  
  79  function IsPaired($field, $fld_array) {
  80    reset( $fld_array );
  81    while ( list( ,$fld_info) = each( $fld_array ) ) {   // copy all tables
  82      if ( $fld_info[name] == $field )
  83        return true;
  84    }
  85    return false;
  86  }
  87  
  88  function safe_echo ($txt) {
  89    echo htmlspecialchars($txt);
  90    echo "<br>";
  91  }
  92  
  93  function myquery($db, $SQL) {
  94      global $fire;
  95      if ($fire) {
  96          $db->query($SQL);
  97      } else {
  98      }
  99  }
 100  
 101  // table definitions
 102  $tablelist = array(   'active_sessions' => "(
 103                            sid varchar(32) NOT NULL default '',
 104                            name varchar(32) NOT NULL default '',
 105                            val text,
 106                            `changed` varchar(14) NOT NULL default '',
 107                            PRIMARY KEY  (name,sid),
 108                            KEY changed (changed)
 109                        )",
 110                        'alerts_admin' => "(
 111                            id int(10) NOT NULL auto_increment,
 112                            last_mail_confirm int(10) NOT NULL default '0',
 113                            mail_confirm int(4) NOT NULL default '3',
 114                            delete_not_confirmed int(4) NOT NULL default '10',
 115                            last_delete int(10) NOT NULL default '0',
 116                            PRIMARY KEY  (id)
 117                        )",
 118                        'alerts_collection' => "(
 119                            id char(6) NOT NULL default '',
 120                            module_id char(16) NOT NULL default '',
 121                            emailid_welcome int(11) default NULL,
 122                            emailid_alert int(11) default NULL,
 123                            slice_id char(16) default NULL,
 124                            PRIMARY KEY  (id),
 125                            UNIQUE KEY module_id (module_id)
 126                        )",
 127                        'alerts_collection_filter' => "(
 128                            collectionid char(6) NOT NULL default '',
 129                            filterid int(11) NOT NULL default '0',
 130                            myindex tinyint(4) NOT NULL default '0',
 131                            PRIMARY KEY  (collectionid,filterid)
 132                        )",
 133                        'alerts_collection_howoften' => "(
 134                            collectionid char(6) NOT NULL default '',
 135                            howoften char(20) NOT NULL default '',
 136                            `last` int(10) NOT NULL default '0',
 137                            PRIMARY KEY  (collectionid,howoften)
 138                        )",
 139                        'alerts_filter' => "(
 140                            id int(11) NOT NULL auto_increment,
 141                            vid int(11) NOT NULL default '0',
 142                            conds text NOT NULL,
 143                            description text NOT NULL,
 144                            PRIMARY KEY  (id)
 145                        )",
 146                        'auth_group' => "(
 147                            username varchar(50) NOT NULL default '',
 148                            groups varchar(50) NOT NULL default '',
 149                            last_changed int(11) NOT NULL default '0',
 150                            PRIMARY KEY  (username,groups)
 151                        )",
 152                        'auth_log' => "(
 153                            result text NOT NULL,
 154                            created int(11) NOT NULL default '0',
 155                            PRIMARY KEY  (created)
 156                        )",
 157                        'auth_user' => "(
 158                            username varchar(50) NOT NULL default '',
 159                            passwd varchar(50) NOT NULL default '',
 160                            last_changed int(11) NOT NULL default '0',
 161                            PRIMARY KEY  (username)
 162                        )",
 163                        'constant' => "(
 164                            id char(16) NOT NULL default '',
 165                            group_id char(16) NOT NULL default '',
 166                            name char(150) NOT NULL default '',
 167                            `value` char(255) NOT NULL default '',
 168                            class char(16) default NULL,
 169                            pri smallint(5) NOT NULL default '100',
 170                            ancestors char(160) default NULL,
 171                            description char(250) default NULL,
 172                            short_id int(11) NOT NULL auto_increment,
 173                            PRIMARY KEY  (id),
 174                            KEY group_id (group_id),
 175                            KEY short_id (short_id)
 176                        )",
 177                        'constant_slice' => "(
 178                            slice_id char(16) default NULL,
 179                            group_id char(16) NOT NULL default '',
 180                            propagate tinyint(1) NOT NULL default '1',
 181                            levelcount tinyint(2) NOT NULL default '2',
 182                            horizontal tinyint(1) NOT NULL default '0',
 183                            hidevalue tinyint(1) NOT NULL default '0',
 184                            hierarch tinyint(1) NOT NULL default '0',
 185                            PRIMARY KEY  (group_id)
 186                        )",
 187                        'content' => "(
 188                           item_id varchar(16) NOT NULL default '',
 189                           field_id varchar(16) NOT NULL default '',
 190                           number bigint(20) default NULL,
 191                           text mediumtext,
 192                           flag smallint(6) default NULL,
 193                           KEY item_id (item_id,field_id,text(16)),
 194                           KEY text (text(10))
 195                       )",
 196                       'cron' => "(
 197                            id bigint(30) NOT NULL auto_increment,
 198                            minutes varchar(30) default NULL,
 199                            hours varchar(30) default NULL,
 200                            mday varchar(30) default NULL,
 201                            mon varchar(30) default NULL,
 202                            wday varchar(30) default NULL,
 203                            script varchar(100) default NULL,
 204                            params varchar(200) default NULL,
 205                            last_run bigint(30) default NULL,
 206                            PRIMARY KEY  (id)
 207                        )",
 208                        'db_sequence' => "(
 209                            seq_name varchar(127) NOT NULL default '',
 210                            nextid int(10) unsigned NOT NULL default '0',
 211                            PRIMARY KEY  (seq_name)
 212                        )",
 213                        'discussion' => "(
 214                            id varchar(16) NOT NULL default '',
 215                            parent varchar(16) NOT NULL default '',
 216                            item_id varchar(16) NOT NULL default '',
 217                            `date` bigint(20) NOT NULL default '0',
 218                            `subject` text,
 219                            author varchar(255) default NULL,
 220                            e_mail varchar(80) default NULL,
 221                            body text,
 222                            state int(11) NOT NULL default '0',
 223                            flag int(11) NOT NULL default '0',
 224                            url_address varchar(255) default NULL,
 225                            url_description text,
 226                            remote_addr varchar(255) default NULL,
 227                            free1 text,
 228                            free2 text,
 229                            PRIMARY KEY  (id)
 230                        )",
 231                        'ef_categories' => "(
 232                            category varchar(255) NOT NULL default '',
 233                            category_name varchar(255) NOT NULL default '',
 234                            category_id varchar(16) NOT NULL default '',
 235                            feed_id int(11) NOT NULL default '0',
 236                            target_category_id varchar(16) NOT NULL default '',
 237                            approved int(11) NOT NULL default '0',
 238                            PRIMARY KEY  (category_id,feed_id)
 239                        )",
 240                        'ef_permissions' => "(
 241                            slice_id varchar(16) NOT NULL default '',
 242                            node varchar(150) NOT NULL default '',
 243                            `user` varchar(50) NOT NULL default '',
 244                            PRIMARY KEY  (slice_id,node,user)
 245                        )",
 246                        'email' => "(
 247                            id int(11) NOT NULL auto_increment,
 248                            description varchar(255) NOT NULL default '',
 249                            `subject` text NOT NULL,
 250                            body text NOT NULL,
 251                            header_from text NOT NULL,
 252                            reply_to text NOT NULL,
 253                            errors_to text NOT NULL,
 254                            sender text NOT NULL,
 255                            lang char(2) NOT NULL default 'en',
 256                            owner_module_id varchar(16) NOT NULL default '',
 257                            html smallint(1) NOT NULL default '1',
 258                            `type` varchar(20) NOT NULL default '',
 259                            PRIMARY KEY  (id)
 260                        )",
 261                        'email_auto_user' => "(
 262                            uid char(50) NOT NULL default '',
 263                            creation_time bigint(20) NOT NULL default '0',
 264                            last_change bigint(20) NOT NULL default '0',
 265                            clear_pw char(40) default NULL,
 266                            confirmed smallint(5) NOT NULL default '0',
 267                            confirm_key char(16) default NULL,
 268                            PRIMARY KEY  (uid)
 269                        )",
 270                        'email_notify' => "(
 271                            slice_id char(16) NOT NULL default '',
 272                            uid char(60) NOT NULL default '',
 273                            `function` smallint(5) NOT NULL default '0',
 274                            PRIMARY KEY  (slice_id,uid,function),
 275                            KEY slice_id (slice_id)
 276                        )",
 277                        'external_feeds' => "(
 278                            feed_id int(11) NOT NULL auto_increment,
 279                            slice_id varchar(16) NOT NULL default '',
 280                            node_name varchar(150) NOT NULL default '',
 281                            remote_slice_id varchar(16) NOT NULL default '',
 282                            user_id varchar(200) NOT NULL default '',
 283                            newest_item varchar(40) NOT NULL default '',
 284                            remote_slice_name varchar(200) NOT NULL default '',
 285                            feed_mode varchar(10) NOT NULL default '',
 286                            PRIMARY KEY  (feed_id)
 287                        )",
 288                        'feedmap' => "(
 289                            from_slice_id varchar(16) NOT NULL default '',
 290                            from_field_id varchar(16) NOT NULL default '',
 291                            to_slice_id varchar(16) NOT NULL default '',
 292                            to_field_id varchar(16) NOT NULL default '',
 293                            flag int(11) default NULL,
 294                            `value` mediumtext,
 295                            from_field_name varchar(255) NOT NULL default '',
 296                            KEY from_slice_id (from_slice_id,to_slice_id)
 297                        )",
 298                        'feedperms' => "(
 299                            from_id varchar(16) NOT NULL default '',
 300                            to_id varchar(16) NOT NULL default '',
 301                            flag int(11) default NULL
 302                        )",
 303                        'feeds' => "(
 304                            from_id varchar(16) NOT NULL default '',
 305                            to_id varchar(16) NOT NULL default '',
 306                            category_id varchar(16) default NULL,
 307                            all_categories smallint(5) default NULL,
 308                            to_approved smallint(5) default NULL,
 309                            to_category_id varchar(16) default NULL,
 310                            KEY from_id (from_id)
 311                        )",
 312                        'field' => "(
 313                            id varchar(16) NOT NULL default '',
 314                            `type` varchar(16) NOT NULL default '',
 315                            slice_id varchar(16) NOT NULL default '',
 316                            name varchar(255) NOT NULL default '',
 317                            input_pri smallint(5) NOT NULL default '100',
 318                            input_help varchar(255) default NULL,
 319                            input_morehlp text,
 320                            input_default mediumtext,
 321                            required smallint(5) default NULL,
 322                            feed smallint(5) default NULL,
 323                            multiple smallint(5) default NULL,
 324                            input_show_func varchar(255) default NULL,
 325                            content_id varchar(16) default NULL,
 326                            search_pri smallint(5) NOT NULL default '100',
 327                            search_type varchar(16) default NULL,
 328                            search_help varchar(255) default NULL,
 329                            search_before text,
 330                            search_more_help text,
 331                            search_show smallint(5) default NULL,
 332                            search_ft_show smallint(5) default NULL,
 333                            search_ft_default smallint(5) default NULL,
 334                            alias1 varchar(10) default NULL,
 335                            alias1_func varchar(255) default NULL,
 336                            alias1_help varchar(255) default NULL,
 337                            alias2 varchar(10) default NULL,
 338                            alias2_func varchar(255) default NULL,
 339                            alias2_help varchar(255) default NULL,
 340                            alias3 varchar(10) default NULL,
 341                            alias3_func varchar(255) default NULL,
 342                            alias3_help varchar(255) default NULL,
 343                            input_before text,
 344                            aditional text,
 345                            content_edit smallint(5) default NULL,
 346                            html_default smallint(5) default NULL,
 347                            html_show smallint(5) default NULL,
 348                            in_item_tbl varchar(16) default NULL,
 349                            input_validate varchar(255) NOT NULL default '',
 350                            input_insert_func varchar(255) NOT NULL default '',
 351                            input_show smallint(5) default NULL,
 352                            text_stored smallint(5) default '1',
 353                            KEY slice_id (slice_id,id)
 354                        )",
 355                        'groups' => "(
 356                            name varchar(32) NOT NULL default '',
 357                            description varchar(255) NOT NULL default '',
 358                            PRIMARY KEY  (name)
 359                        )",
 360                        'item' => "(
 361                            id char(16) NOT NULL default '',
 362                            short_id int(11) NOT NULL auto_increment,
 363                            slice_id char(16) NOT NULL default '',
 364                            status_code smallint(5) NOT NULL default '0',
 365                            post_date bigint(20) NOT NULL default '0',
 366                            publish_date bigint(20) default NULL,
 367                            expiry_date bigint(20) default NULL,
 368                            highlight smallint(5) default NULL,
 369                            posted_by char(60) default NULL,
 370                            edited_by char(60) default NULL,
 371                            last_edit bigint(20) default NULL,
 372                            display_count int(11) NOT NULL default '0',
 373                            flags char(30) default NULL,
 374                            disc_count int(11) default '0',
 375                            disc_app int(11) default '0',
 376                            externally_fed char(150) NOT NULL default '',
 377                            moved2active int(10) NOT NULL default '0',
 378                            PRIMARY KEY  (id),
 379                            KEY short_id (short_id),
 380                            KEY slice_id_2 (slice_id,status_code,publish_date),
 381                            KEY expiry_date (expiry_date)
 382                        )",
 383                        'jump' => "(
 384                            slice_id varchar(16) NOT NULL default '',
 385                            destination varchar(255) default NULL,
 386                            dest_slice_id varchar(16) default NULL,
 387                            PRIMARY KEY  (slice_id)
 388                        )",
 389                        'links' => "(
 390                            id char(16) NOT NULL default '',
 391                            start_id int(10) NOT NULL default '0',
 392                            tree_start int(11) NOT NULL default '0',
 393                            select_start int(11) default NULL,
 394                            default_cat_tmpl char(60) NOT NULL default '',
 395                            link_tmpl char(60) NOT NULL default '',
 396                            PRIMARY KEY  (id)
 397                        )",
 398                        'links_cat_cat' => "(
 399                            category_id int(10) unsigned NOT NULL default '0',
 400                            what_id int(10) unsigned NOT NULL default '0',
 401                            base enum('n','y') NOT NULL default 'y',
 402                            state enum('hidden','highlight','visible') NOT NULL default 'visible',
 403                            proposal enum('n','y') NOT NULL default 'n',
 404                            priority float(10,2) default NULL,
 405                            proposal_delete enum('n','y') NOT NULL default 'n',
 406                            a_id int(10) unsigned NOT NULL auto_increment,
 407                            PRIMARY KEY  (a_id),
 408                            KEY what_id (what_id)
 409                        )",
 410                        'links_categories' => "(
 411                            id int(10) unsigned NOT NULL auto_increment,
 412                            name varchar(255) default NULL,
 413                            html_template varchar(255) default NULL,
 414                            deleted enum('n','y') NOT NULL default 'n',
 415                            path varchar(255) default NULL,
 416                            inc_file1 varchar(255) default NULL,
 417                            link_count mediumint(9) NOT NULL default '0',
 418                            inc_file2 varchar(255) default NULL,
 419                            banner_file varchar(255) default NULL,
 420                            description text,
 421                            additional text,
 422                            note text,
 423                            nolinks tinyint(4) NOT NULL default '0',
 424                            PRIMARY KEY  (id),
 425                            KEY path (path),
 426                            KEY id (id,path)
 427                        )",
 428                        'links_changes' => "(
 429                            changed_link_id int(10) unsigned NOT NULL default '0',
 430                            proposal_link_id int(10) unsigned NOT NULL default '0',
 431                            rejected enum('n','y') NOT NULL default 'n',
 432                            KEY proposal_link_id (proposal_link_id),
 433                            KEY rejected (rejected),
 434                            KEY changed_link_id (changed_link_id,rejected)
 435                        )",
 436                        'links_languages' => "(
 437                            id int(10) unsigned NOT NULL default '0',
 438                            name varchar(20) NOT NULL default '',
 439                            short_name varchar(5) NOT NULL default '',
 440                            PRIMARY KEY  (id),
 441                            KEY name (name)
 442                        )",
 443                        'links_link_cat' => "(
 444                            category_id int(10) unsigned NOT NULL default '0',
 445                            what_id int(10) unsigned NOT NULL default '0',
 446                            base enum('n','y') NOT NULL default 'y',
 447                            state enum('hidden','highlight','visible') NOT NULL default 'visible',
 448                            proposal enum('n','y') NOT NULL default 'n',
 449                            priority float(10,2) default NULL,
 450                            proposal_delete enum('n','y') NOT NULL default 'n',
 451                            a_id int(10) unsigned NOT NULL auto_increment,
 452                            PRIMARY KEY  (a_id),
 453                            KEY proposal (proposal,base,state),
 454                            KEY category_id (category_id,proposal,base,state),
 455                            KEY what_id (what_id,proposal,base,state)
 456                        )",
 457                        'links_link_lang' => "(
 458                            link_id int(10) unsigned NOT NULL default '0',
 459                            lang_id int(10) unsigned NOT NULL default '0',
 460                            KEY link_id (link_id,lang_id)
 461                        )",
 462                        'links_link_reg' => "(
 463                            link_id int(10) unsigned NOT NULL default '0',
 464                            region_id int(10) unsigned NOT NULL default '0',
 465                            KEY link_id (link_id,region_id)
 466                        )",
 467                        'links_links' => "(
 468                            id int(10) unsigned NOT NULL auto_increment,
 469                            name varchar(255) default NULL,
 470                            description text,
 471                            rate int(10) default NULL,
 472                            votes int(11) NOT NULL default '0',
 473                            plus_votes int(11) NOT NULL default '0',
 474                            created_by varchar(60) default NULL,
 475                            edited_by varchar(60) default NULL,
 476                            checked_by varchar(60) default NULL,
 477                            initiator varchar(255) default NULL,
 478                            url text NOT NULL,
 479                            created int(11) NOT NULL default '0',
 480                            last_edit int(11) NOT NULL default '0',
 481                            checked int(11) NOT NULL default '0',
 482                            voted int(11) NOT NULL default '0',
 483                            flag int(11) default NULL,
 484                            original_name varchar(255) default NULL,
 485                            `type` varchar(120) default NULL,
 486                            org_city varchar(255) default NULL,
 487                            org_post_code varchar(20) default NULL,
 488                            org_phone varchar(120) default NULL,
 489                            org_fax varchar(120) default NULL,
 490                            org_email varchar(120) default NULL,
 491                            org_street varchar(255) default NULL,
 492                            folder int(11) NOT NULL default '1',
 493                            note text,
 494                            validated int(11) NOT NULL default '0',
 495                            valid_codes text,
 496                            valid_rank int(11) NOT NULL default '0',
 497                            PRIMARY KEY  (id),
 498                            KEY checked (checked),
 499                            KEY type (type),
 500                            KEY validated (validated),
 501                            KEY valid_rank (valid_rank),
 502                            KEY name (name),
 503                            KEY id (id,folder),
 504                            KEY folder (folder,id)
 505                        )",
 506                        'links_regions' => "(
 507                            id int(10) unsigned NOT NULL default '0',
 508                            name varchar(60) NOT NULL default '',
 509                            `level` tinyint(4) NOT NULL default '1',
 510                            PRIMARY KEY  (id),
 511                            KEY name (name)
 512                        )",
 513                        'log' => "(
 514                            id int(11) NOT NULL auto_increment,
 515                            `time` bigint(20) NOT NULL default '0',
 516                            `user` varchar(60) NOT NULL default '',
 517                            `type` varchar(10) NOT NULL default '',
 518                            selector varchar(255) default NULL,
 519                            params varchar(128) default NULL,
 520                            PRIMARY KEY  (id),
 521                            KEY time (time)
 522                        )",
 523                        'membership' => "(
 524                            groupid int(11) NOT NULL default '0',
 525                            memberid int(11) NOT NULL default '0',
 526                            last_mod timestamp(14) NOT NULL,
 527                            PRIMARY KEY  (groupid,memberid),
 528                            KEY memberid (memberid)
 529                        )",
 530                        'module' => "(
 531                            id char(16) NOT NULL default '',
 532                            name char(100) NOT NULL default '',
 533                            deleted smallint(5) default NULL,
 534                            `type` char(16) default 'S',
 535                            slice_url char(255) default NULL,
 536                            lang_file char(50) default NULL,
 537                            created_at bigint(20) NOT NULL default '0',
 538                            created_by char(255) NOT NULL default '',
 539                            owner char(16) NOT NULL default '',
 540                            flag int(11) default '0',
 541                            PRIMARY KEY  (id)
 542                        )",
 543                        'mysql_auth_group' => "(
 544                            slice_id varchar(16) NOT NULL default '',
 545                            groupparent varchar(30) NOT NULL default '',
 546                            groups varchar(30) NOT NULL default ''
 547                        )",
 548                        'mysql_auth_user' => "(
 549                            uid int(10) NOT NULL default '0',
 550                            username char(30) NOT NULL default '',
 551                            passwd char(30) NOT NULL default '',
 552                            PRIMARY KEY  (uid),
 553                            UNIQUE KEY username (username)
 554                        )",
 555                        'mysql_auth_user_group' => "(
 556                            username char(30) NOT NULL default '',
 557                            groups char(30) NOT NULL default '',
 558                            PRIMARY KEY  (username,groups)
 559                        )",
 560                        'mysql_auth_userinfo' => "(
 561                            slice_id varchar(16) NOT NULL default '',
 562                            uid int(10) NOT NULL auto_increment,
 563                            first_name varchar(20) default NULL,
 564                            last_name varchar(30) default NULL,
 565                            organisation varchar(50) default NULL,
 566                            start_date bigint(20) default NULL,
 567                            renewal_date bigint(20) default NULL,
 568                            email varchar(50) default '',
 569                            membership_type varchar(50) default NULL,
 570                            status_code smallint(5) default '2',
 571                            todo varchar(250) default NULL,
 572                            PRIMARY KEY  (uid)
 573                        )",
 574                        'mysql_auth_userlog' => "(
 575                            uid int(10) NOT NULL default '0',
 576                            `time` int(10) NOT NULL default '0',
 577                            from_bin smallint(6) NOT NULL default '0',
 578                            to_bin smallint(6) NOT NULL default '0',
 579                            organisation varchar(50) default NULL,
 580                            membership_type varchar(50) default NULL
 581                        )",
 582                        'nodes' => "(
 583                            name varchar(150) NOT NULL default '',
 584                            server_url varchar(200) NOT NULL default '',
 585                            `password` varchar(50) NOT NULL default '',
 586                            PRIMARY KEY  (name)
 587                        )",
 588                        'offline' => "(
 589                            id char(16) NOT NULL default '',
 590                            digest char(32) NOT NULL default '',
 591                            flag int(11) default NULL,
 592                            PRIMARY KEY  (id),
 593                            KEY digest (digest)
 594                        )",
 595                        'pagecache' => "(
 596                            id varchar(32) NOT NULL default '',
 597                            content longtext,
 598                            stored bigint(20) NOT NULL default '0',
 599                            flag int(11) default NULL,
 600                            PRIMARY KEY  (id),
 601                            KEY stored (stored)
 602                        )",
 603                        'pagecache_str2find' => "(
 604                            id bigint(20) NOT NULL auto_increment,
 605                            pagecache_id varchar(32) NOT NULL default '',
 606                            str2find text NOT NULL,
 607                            PRIMARY KEY  (id),
 608                            KEY pagecache_id (pagecache_id),
 609                            KEY str2find (str2find(20))
 610                        )",
 611                        'perms' => "(
 612                            object_type char(30) NOT NULL default '',
 613                            objectid char(32) NOT NULL default '',
 614                            userid int(11) NOT NULL default '0',
 615                            perm char(32) NOT NULL default '',
 616                            last_mod timestamp(14) NOT NULL,
 617                            PRIMARY KEY  (objectid,userid,object_type),
 618                            KEY userid (userid)
 619                        )",
 620                        'polls' => "(
 621                            id varchar(16) NOT NULL default '',
 622                            pollID int(11) NOT NULL auto_increment,
 623                            status_code tinyint(4) NOT NULL default '1',
 624                            pollTitle varchar(100) NOT NULL default '',
 625                            startDate int(11) NOT NULL default '0',
 626                            endDate int(11) NOT NULL default '0',
 627                            defaults tinyint(1) default NULL,
 628                            Logging tinyint(1) default NULL,
 629                            IPLocking tinyint(1) default NULL,
 630                            IPLockTimeout int(4) default NULL,
 631                            setCookies tinyint(1) default NULL,
 632                            cookiesPrefix varchar(16) default NULL,
 633                            designID int(11) default NULL,
 634                            params text NOT NULL,
 635                            PRIMARY KEY  (pollID)
 636                        )",
 637                        'polls_data' => "(
 638                            pollID int(11) NOT NULL default '0',
 639                            optionText char(50) NOT NULL default '',
 640                            optionCount int(11) NOT NULL default '0',
 641                            voteID int(11) NOT NULL default '0'
 642                        )",
 643                        'polls_designs' => "(
 644                            designID int(11) NOT NULL auto_increment,
 645                            pollsModuleID varchar(16) NOT NULL default '',
 646                            name text NOT NULL,
 647                            `comment` text NOT NULL,
 648                            resultBarFile text NOT NULL,
 649                            resultBarWidth int(4) NOT NULL default '0',
 650                            resultBarHeight int(4) NOT NULL default '0',
 651                            top text NOT NULL,
 652                            answer text NOT NULL,
 653                            bottom text NOT NULL,
 654                            params text NOT NULL,
 655                            PRIMARY KEY  (designID)
 656                        )",
 657                        'polls_ip_lock' => "(
 658                            pollID int(11) NOT NULL default '0',
 659                            voteID int(11) NOT NULL default '0',
 660                            votersIP char(16) NOT NULL default '',
 661                            `timeStamp` int(11) NOT NULL default '0'
 662                        )",
 663                        'polls_log' => "(
 664                            logID int(11) NOT NULL auto_increment,
 665                            pollID int(11) NOT NULL default '0',
 666                            voteID int(11) NOT NULL default '0',
 667                            votersIP char(16) NOT NULL default '',
 668                            `timeStamp` int(11) NOT NULL default '0',
 669                            PRIMARY KEY  (logID)
 670                        )",
 671                        'post2shtml' => "(
 672                            id varchar(32) NOT NULL default '',
 673                            vars text NOT NULL,
 674                            `time` int(11) NOT NULL default '0',
 675                            PRIMARY KEY  (id)
 676                        )",
 677                        'profile' => "(
 678                            id int(11) NOT NULL auto_increment,
 679                            slice_id varchar(16) NOT NULL default '',
 680                            uid varchar(60) NOT NULL default '*',
 681                            property varchar(20) NOT NULL default '',
 682                            selector varchar(255) default NULL,
 683                            `value` text,
 684                            PRIMARY KEY  (id),
 685                            KEY slice_user_id (slice_id,uid)
 686                        )",
 687                        'relation' => "(
 688                            source_id char(16) NOT NULL default '',
 689                            destination_id char(32) NOT NULL default '',
 690                            flag int(11) default NULL,
 691                            KEY source_id (source_id),
 692                            KEY destination_id (destination_id)
 693                        )",
 694                        'rssfeeds' => "(
 695                            feed_id int(11) NOT NULL auto_increment,
 696                            name varchar(150) NOT NULL default '',
 697                            server_url varchar(200) NOT NULL default '',
 698                            slice_id varchar(16) NOT NULL default '',
 699                            PRIMARY KEY  (feed_id)
 700                        )",
 701                        'searchlog' => "(
 702                            id int(11) NOT NULL auto_increment,
 703                            `date` int(14) default NULL,
 704                            `query` text,
 705                            found_count int(11) default NULL,
 706                            search_time int(11) default NULL,
 707                            `user` text,
 708                            additional1 text,
 709                            PRIMARY KEY  (id),
 710                            KEY date (date)
 711                        )",
 712                        'site' => "(
 713                            id varchar(16) NOT NULL default '',
 714                            state_file varchar(255) NOT NULL default '',
 715                            structure longtext,
 716                            flag int(11) default NULL,
 717                            PRIMARY KEY  (id)
 718                        )",
 719                        'site_spot' => "(
 720                            id int(11) NOT NULL auto_increment,
 721                            spot_id int(11) NOT NULL default '0',
 722                            site_id varchar(16) NOT NULL default '',
 723                            content longtext NOT NULL,
 724                            flag bigint(20) default NULL,
 725                            PRIMARY KEY  (id),
 726                            KEY spot (site_id,spot_id)
 727                        )",
 728                        'slice' => "(
 729                            id varchar(16) NOT NULL default '',
 730                            name varchar(100) NOT NULL default '',
 731                            owner varchar(16) default NULL,
 732                            deleted smallint(5) default NULL,
 733                            created_by varchar(255) default NULL,
 734                            created_at bigint(20) default NULL,
 735                            export_to_all smallint(5) default NULL,
 736                            `type` varchar(16) default NULL,
 737                            template smallint(5) default NULL,
 738                            fulltext_format_top longtext,
 739                            fulltext_format longtext,
 740                            fulltext_format_bottom longtext,
 741                            odd_row_format longtext,
 742                            even_row_format longtext,
 743                            even_odd_differ smallint(5) default NULL,
 744                            compact_top longtext,
 745                            compact_bottom longtext,
 746                            category_top longtext,
 747                            category_format longtext,
 748                            category_bottom longtext,
 749                            category_sort smallint(5) default NULL,
 750                            slice_url varchar(255) default NULL,
 751                            d_listlen smallint(5) default NULL,
 752                            lang_file varchar(50) default NULL,
 753                            fulltext_remove longtext,
 754                            compact_remove longtext,
 755                            email_sub_enable smallint(5) default NULL,
 756                            exclude_from_dir smallint(5) default NULL,
 757                            notify_sh_offer longtext,
 758                            notify_sh_accept longtext,
 759                            notify_sh_remove longtext,
 760                            notify_holding_item_s longtext,
 761                            notify_holding_item_b longtext,
 762                            notify_holding_item_edit_s longtext,
 763                            notify_holding_item_edit_b longtext,
 764                            notify_active_item_edit_s longtext,
 765                            notify_active_item_edit_b longtext,
 766                            notify_active_item_s longtext,
 767                            notify_active_item_b longtext,
 768                            noitem_msg longtext,
 769                            admin_format_top longtext,
 770                            admin_format longtext,
 771                            admin_format_bottom longtext,
 772                            admin_remove longtext,
 773                            admin_noitem_msg longtext,
 774                            permit_anonymous_post smallint(5) default NULL,
 775                            permit_anonymous_edit smallint(5) default NULL,
 776                            permit_offline_fill smallint(5) default NULL,
 777                            aditional longtext,
 778                            flag int(11) NOT NULL default '0',
 779                            vid int(11) default '0',
 780                            gb_direction tinyint(4) default NULL,
 781                            group_by varchar(16) default NULL,
 782                            gb_header tinyint(4) default NULL,
 783                            gb_case varchar(15) default NULL,
 784                            javascript longtext,
 785                            fileman_access varchar(20) default NULL,
 786                            fileman_dir varchar(50) default NULL,
 787                            auth_field_group varchar(16) NOT NULL default '',
 788                            mailman_field_lists varchar(16) NOT NULL default '',
 789                            reading_password varchar(100) NOT NULL default '',
 790                            mlxctrl varchar(32) NOT NULL default '',
 791                            PRIMARY KEY  (id),
 792                            KEY type (type)
 793                        )",
 794                        'slice_owner' => "(
 795                            id char(16) NOT NULL default '',
 796                            name char(80) NOT NULL default '',
 797                            email char(80) NOT NULL default '',
 798                            PRIMARY KEY  (id)
 799                        )",
 800                        'subscriptions' => "(
 801                            uid char(50) NOT NULL default '',
 802                            category char(16) default NULL,
 803                            content_type char(16) default NULL,
 804                            slice_owner char(16) default NULL,
 805                            frequency smallint(5) NOT NULL default '0',
 806                            last_post bigint(20) NOT NULL default '0',
 807                            KEY uid (uid,frequency)
 808                        )",
 809                        'toexecute' => "(
 810                            id int(11) NOT NULL auto_increment,
 811                            created bigint(20) NOT NULL default '0',
 812                            execute_after bigint(20) NOT NULL default '0',
 813                            aa_user varchar(60) NOT NULL default '',
 814                            priority int(11) NOT NULL default '0',
 815                            selector varchar(255) NOT NULL default '',
 816                            object longtext NOT NULL,
 817                            params longtext NOT NULL,
 818                            PRIMARY KEY  (id),
 819                            KEY time (execute_after,priority),
 820                            KEY priority (priority),
 821                            KEY selector (selector)
 822                        )",
 823                        'users' => "(
 824                            id int(11) NOT NULL auto_increment,
 825                            `type` char(10) NOT NULL default '',
 826                            `password` char(30) NOT NULL default '',
 827                            uid char(40) NOT NULL default '',
 828                            mail char(40) NOT NULL default '',
 829                            name char(80) NOT NULL default '',
 830                            description char(255) NOT NULL default '',
 831                            givenname char(40) NOT NULL default '',
 832                            sn char(40) NOT NULL default '',
 833                            last_mod timestamp(14) NOT NULL,
 834                            PRIMARY KEY  (id),
 835                            KEY type (type),
 836                            KEY mail (mail),
 837                            KEY name (name),
 838                            KEY sn (sn)
 839                        )",
 840                        'view' => "(
 841                            id int(10) unsigned NOT NULL auto_increment,
 842                            slice_id varchar(16) NOT NULL default '',
 843                            name varchar(50) default NULL,
 844                            `type` varchar(10) default NULL,
 845                            `before` longtext,
 846                            even longtext,
 847                            odd longtext,
 848                            even_odd_differ tinyint(3) unsigned default NULL,
 849                            row_delimiter longtext,
 850                            `after` longtext,
 851                            remove_string longtext,
 852                            group_title longtext,
 853                            order1 varchar(16) default NULL,
 854                            o1_direction tinyint(3) unsigned default NULL,
 855                            order2 varchar(16) default NULL,
 856                            o2_direction tinyint(3) unsigned default NULL,
 857                            group_by1 varchar(16) default NULL,
 858                            g1_direction tinyint(3) unsigned default NULL,
 859                            group_by2 varchar(16) default NULL,
 860                            g2_direction tinyint(3) unsigned default NULL,
 861                            cond1field varchar(16) default NULL,
 862                            cond1op varchar(10) default NULL,
 863                            cond1cond varchar(255) default NULL,
 864                            cond2field varchar(16) default NULL,
 865                            cond2op varchar(10) default NULL,
 866                            cond2cond varchar(255) default NULL,
 867                            cond3field varchar(16) default NULL,
 868                            cond3op varchar(10) default NULL,
 869                            cond3cond varchar(255) default NULL,
 870                            listlen int(10) unsigned default NULL,
 871                            scroller tinyint(3) unsigned default NULL,
 872                            selected_item tinyint(3) unsigned default NULL,
 873                            modification int(10) unsigned default NULL,
 874                            parameter varchar(255) default NULL,
 875                            img1 varchar(255) default NULL,
 876                            img2 varchar(255) default NULL,
 877                            img3 varchar(255) default NULL,
 878                            img4 varchar(255) default NULL,
 879                            flag int(10) unsigned default NULL,
 880                            aditional longtext,
 881                            aditional2 longtext,
 882                            aditional3 longtext,
 883                            aditional4 longtext,
 884                            aditional5 longtext,
 885                            aditional6 longtext,
 886                            noitem_msg longtext,
 887                            group_bottom longtext,
 888                            field1 varchar(16) default NULL,
 889                            field2 varchar(16) default NULL,
 890                            field3 varchar(16) default NULL,
 891                            calendar_type varchar(100) default 'mon',
 892                            PRIMARY KEY  (id),
 893                            KEY slice_id (slice_id)
 894                        )",
 895                        'wizard_template' => "(
 896                            id tinyint(10) NOT NULL auto_increment,
 897                            dir char(100) NOT NULL default '',
 898                            description char(255) NOT NULL default '',
 899                            PRIMARY KEY  (id),
 900                            UNIQUE KEY dir (dir)
 901                        )",
 902                        'wizard_welcome' => "(
 903                            id int(11) NOT NULL auto_increment,
 904                            description varchar(200) NOT NULL default '',
 905                            email longtext,
 906                            subject varchar(255) NOT NULL default '',
 907                            mail_from varchar(255) NOT NULL default '_#ME_MAIL_',
 908                            PRIMARY KEY  (id)
 909                        )"
 910  );
 911  
 912  
 913  $SQL_constants[] = "DELETE FROM constant WHERE group_id IN ('lt_codepages', 'lt_languages', 'AA_Core_Bins....')";
 914  $SQL_constants[] = "INSERT INTO constant (id, group_id, name, value, class, pri) VALUES( 'AA-predefined000', 'lt_codepages', 'iso8859-1', 'iso8859-1', '', '100')";
 915  $SQL_constants[] = "INSERT INTO constant (id, group_id, name, value, class, pri) VALUES( 'AA-predefined001', 'lt_codepages', 'iso8859-2', 'iso8859-2', '', '100')";
 916  $SQL_constants[] = "INSERT INTO constant (id, group_id, name, value, class, pri) VALUES( 'AA-predefined002', 'lt_codepages', 'windows-1250', 'windows-1250', '', '100')";
 917  $SQL_constants[] = "INSERT INTO constant (id, group_id, name, value, class, pri) VALUES( 'AA-predefined003', 'lt_codepages', 'windows-1253', 'windows-1253', '', '100')";
 918  $SQL_constants[] = "INSERT INTO constant (id, group_id, name, value, class, pri) VALUES( 'AA-predefined004', 'lt_codepages', 'windows-1254', 'windows-1254', '', '100')";
 919  $SQL_constants[] = "INSERT INTO constant (id, group_id, name, value, class, pri) VALUES( 'AA-predefined005', 'lt_codepages', 'koi8-r', 'koi8-r', '', '100')";
 920  $SQL_constants[] = "INSERT INTO constant (id, group_id, name, value, class, pri) VALUES( 'AA-predefined006', 'lt_codepages', 'ISO-8859-8', 'ISO-8859-8', '', '100')";
 921  $SQL_constants[] = "INSERT INTO constant (id, group_id, name, value, class, pri) VALUES( 'AA-predefined007', 'lt_codepages', 'windows-1258', 'windows-1258', '', '100')";
 922  $SQL_constants[] = "INSERT INTO constant (id, group_id, name, value, class, pri) VALUES( 'AA-predefined008', 'lt_languages', 'Afrikaans', 'AF', '', '100')";
 923  $SQL_constants[] = "INSERT INTO constant (id, group_id, name, value, class, pri) VALUES( 'AA-predefined009', 'lt_languages', 'Arabic', 'AR', '', '100')";
 924  $SQL_constants[] = "INSERT INTO constant (id, group_id, name, value, class, pri) VALUES( 'AA-predefined010', 'lt_languages', 'Basque', 'EU', '', '100')";
 925  $SQL_constants[] = "INSERT INTO constant (id, group_id, name, value, class, pri) VALUES( 'AA-predefined011', 'lt_languages', 'Byelorussian', 'BE', '', '100')";
 926  $SQL_constants[] = "INSERT INTO constant (id, group_id, name, value, class, pri) VALUES( 'AA-predefined012', 'lt_languages', 'Bulgarian', 'BG', '', '100')";
 927  $SQL_constants[] = "INSERT INTO constant (id, group_id, name, value, class, pri) VALUES( 'AA-predefined013', 'lt_languages', 'Catalan', 'CA', '', '100')";
 928  $SQL_constants[] = "INSERT INTO constant (id, group_id, name, value, class, pri) VALUES( 'AA-predefined014', 'lt_languages', 'Chinese (ZH-CN)', 'ZH', '', '100')";
 929  $SQL_constants[] = "INSERT INTO constant (id, group_id, name, value, class, pri) VALUES( 'AA-predefined015', 'lt_languages', 'Chinese', 'ZH-TW', '', '100')";
 930  $SQL_constants[] = "INSERT INTO constant (id, group_id, name, value, class, pri) VALUES( 'AA-predefined016', 'lt_languages', 'Croatian', 'HR', '', '100')";
 931  $SQL_constants[] = "INSERT INTO constant (id, group_id, name, value, class, pri) VALUES( 'AA-predefined017', 'lt_languages', 'Czech', 'CS', '', '100')";
 932  $SQL_constants[] = "INSERT INTO constant (id, group_id, name, value, class, pri) VALUES( 'AA-predefined018', 'lt_languages', 'Danish', 'DA', '', '100')";
 933  $SQL_constants[] = "INSERT INTO constant (id, group_id, name, value, class, pri) VALUES( 'AA-predefined019', 'lt_languages', 'Dutch', 'NL', '', '100')";
 934  $SQL_constants[] = "INSERT INTO constant (id, group_id, name, value, class, pri) VALUES( 'AA-predefined020', 'lt_languages', 'English', 'EN-GB', '', '100')";
 935  $SQL_constants[] = "INSERT INTO constant (id, group_id, name, value, class, pri) VALUES( 'AA-predefined021', 'lt_languages', 'English (EN-US)', 'EN', '', '100')";
 936  $SQL_constants[] = "INSERT INTO constant (id, group_id, name, value, class, pri) VALUES( 'AA-predefined022', 'lt_languages', 'Estonian', 'ET', '', '100')";
 937  $SQL_constants[] = "INSERT INTO constant (id, group_id, name, value, class, pri) VALUES( 'AA-predefined023', 'lt_languages', 'Faeroese', 'FO', '', '100')";
 938  $SQL_constants[] = "INSERT INTO constant (id, group_id, name, value, class, pri) VALUES( 'AA-predefined024', 'lt_languages', 'Finnish', 'FI', '', '100')";
 939  $SQL_constants[] = "INSERT INTO constant (id, group_id, name, value, class, pri) VALUES( 'AA-predefined025', 'lt_languages', 'French (FR-FR)', 'FR', '', '100')";
 940  $SQL_constants[] = "INSERT INTO constant (id, group_id, name, value, class, pri) VALUES( 'AA-predefined026', 'lt_languages', 'French', 'FR-CA', '', '100')";
 941  $SQL_constants[] = "INSERT INTO constant (id, group_id, name, value, class, pri) VALUES( 'AA-predefined027', 'lt_languages', 'German', 'DE', '', '100')";
 942  $SQL_constants[] = "INSERT INTO constant (id, group_id, name, value, class, pri) VALUES( 'AA-predefined028', 'lt_languages', 'Greek', 'EL', '', '100')";
 943  $SQL_constants[] = "INSERT INTO constant (id, group_id, name, value, class, pri) VALUES( 'AA-predefined029', 'lt_languages', 'Hebrew (IW)', 'HE', '', '100')";
 944  $SQL_constants[] = "INSERT INTO constant (id, group_id, name, value, class, pri) VALUES( 'AA-predefined030', 'lt_languages', 'Hungarian', 'HU', '', '100')";
 945  $SQL_constants[] = "INSERT INTO constant (id, group_id, name, value, class, pri) VALUES( 'AA-predefined031', 'lt_languages', 'Icelandic', 'IS', '', '100')";
 946  $SQL_constants[] = "INSERT INTO constant (id, group_id, name, value, class, pri) VALUES( 'AA-predefined032', 'lt_languages', 'Indonesian (IN)', 'ID', '', '100')";
 947  $SQL_constants[] = "INSERT INTO constant (id, group_id, name, value, class, pri) VALUES( 'AA-predefined033', 'lt_languages', 'Italian', 'IT', '', '100')";
 948  $SQL_constants[] = "INSERT INTO constant (id, group_id, name, value, class, pri) VALUES( 'AA-predefined034', 'lt_languages', 'Japanese', 'JA', '', '100')";
 949  $SQL_constants[] = "INSERT INTO constant (id, group_id, name, value, class, pri) VALUES( 'AA-predefined035', 'lt_languages', 'Korean', 'KO', '', '100')";
 950  $SQL_constants[] = "INSERT INTO constant (id, group_id, name, value, class, pri) VALUES( 'AA-predefined036', 'lt_languages', 'Latvian', 'LV', '', '100')";
 951  $SQL_constants[] = "INSERT INTO constant (id, group_id, name, value, class, pri) VALUES( 'AA-predefined037', 'lt_languages', 'Lithuanian', 'LT', '', '100')";
 952  $SQL_constants[] = "INSERT INTO constant (id, group_id, name, value, class, pri) VALUES( 'AA-predefined038', 'lt_languages', 'Neutral', 'NEUTRAL', '', '100')";
 953  $SQL_constants[] = "INSERT INTO constant (id, group_id, name, value, class, pri) VALUES( 'AA-predefined039', 'lt_languages', 'Norwegian', 'NO', '', '100')";
 954  $SQL_constants[] = "INSERT INTO constant (id, group_id, name, value, class, pri) VALUES( 'AA-predefined040', 'lt_languages', 'Polish', 'PL', '', '100')";
 955  $SQL_constants[] = "INSERT INTO constant (id, group_id, name, value, class, pri) VALUES( 'AA-predefined041', 'lt_languages', 'Portuguese', 'PT', '', '100')";
 956  $SQL_constants[] = "INSERT INTO constant (id, group_id, name, value, class, pri) VALUES( 'AA-predefined042', 'lt_languages', 'Portuguese', 'PT-BR', '', '100')";
 957  $SQL_constants[] = "INSERT INTO constant (id, group_id, name, value, class, pri) VALUES( 'AA-predefined043', 'lt_languages', 'Romanian', 'RO', '', '100')";
 958  $SQL_constants[] = "INSERT INTO constant (id, group_id, name, value, class, pri) VALUES( 'AA-predefined044', 'lt_languages', 'Russian', 'RU', '', '100')";
 959  $SQL_constants[] = "INSERT INTO constant (id, group_id, name, value, class, pri) VALUES( 'AA-predefined045', 'lt_languages', 'Serbian', 'SR', '', '100')";
 960  $SQL_constants[] = "INSERT INTO constant (id, group_id, name, value, class, pri) VALUES( 'AA-predefined046', 'lt_languages', 'Slovak', 'SK', '', '100')";
 961  $SQL_constants[] = "INSERT INTO constant (id, group_id, name, value, class, pri) VALUES( 'AA-predefined047', 'lt_languages', 'Slovenian', 'SL', '', '100')";
 962  $SQL_constants[] = "INSERT INTO constant (id, group_id, name, value, class, pri) VALUES( 'AA-predefined048', 'lt_languages', 'Spanish (ES-ES)', 'ES', '', '100')";
 963  $SQL_constants[] = "INSERT INTO constant (id, group_id, name, value, class, pri) VALUES( 'AA-predefined049', 'lt_languages', 'Swedish', 'SV', '', '100')";
 964  $SQL_constants[] = "INSERT INTO constant (id, group_id, name, value, class, pri) VALUES( 'AA-predefined050', 'lt_languages', 'Thai', 'TH', '', '100')";
 965  $SQL_constants[] = "INSERT INTO constant (id, group_id, name, value, class, pri) VALUES( 'AA-predefined051', 'lt_languages', 'Turkish', 'TR', '', '100')";
 966  $SQL_constants[] = "INSERT INTO constant (id, group_id, name, value, class, pri) VALUES( 'AA-predefined052', 'lt_languages', 'Ukrainian', 'UK', '', '100')";
 967  $SQL_constants[] = "INSERT INTO constant (id, group_id, name, value, class, pri) VALUES( 'AA-predefined053', 'lt_languages', 'Vietnamese', 'VI', '', '100')";
 968  $SQL_constants[] = "REPLACE INTO constant (id, group_id, name, value, class, pri) VALUES( 'AA-predefined054', 'lt_groupNames', 'Code Pages', 'lt_codepages', '', '0')";
 969  $SQL_constants[] = "REPLACE INTO constant (id, group_id, name, value, class, pri) VALUES( 'AA-predefined055', 'lt_groupNames', 'Languages Shortcuts', 'lt_languages', '', '1000')";
 970  $SQL_constants[] = "REPLACE INTO constant (id, group_id, name, value, class, pri) VALUES( 'AA-predefined057', 'lt_groupNames', 'AA Core Bins', 'AA_Core_Bins....', '', '10000')";
 971  $SQL_constants[] = "REPLACE INTO constant (id, group_id, name, value, class, pri) VALUES( 'AA-predefined058', 'AA_Core_Bins....', 'Approved', '1', '', '100')";
 972  $SQL_constants[] = "REPLACE INTO constant (id, group_id, name, value, class, pri) VALUES( 'AA-predefined059', 'AA_Core_Bins....', 'Holding Bin', '2', '', '200')";
 973  $SQL_constants[] = "REPLACE INTO constant (id, group_id, name, value, class, pri) VALUES( 'AA-predefined060', 'AA_Core_Bins....', 'Trash Bin', '3', '', '300')";
 974  $SQL_constants[] = "INSERT INTO constant (id, group_id, name, value, class, pri) VALUES( 'AA-predefined061', 'lt_codepages', 'windows-1251', 'windows-1251', '', '100')";
 975  
 976  $SQL_apc_categ[] = "DELETE FROM constant WHERE group_id = 'lt_apcCategories'";
 977  $SQL_apc_categ[] = "INSERT INTO constant (id, group_id, name, value, class, pri) VALUES( 'AA-predefined100', 'lt_apcCategories', 'Internet & ICT', 'Internet & ICT', '', '100')";
 978  $SQL_apc_categ[] = "INSERT INTO constant (id, group_id, name, value, class, pri) VALUES( 'AA-predefined101', 'lt_apcCategories', 'Internet & ICT - Free software & Open Source', 'Internet & ICT - Free software & Open Source', '', '110')";
 979  $SQL_apc_categ[] = "INSERT INTO constant (id, group_id, name, value, class, pri) VALUES( 'AA-predefined102', 'lt_apcCategories', 'Internet & ICT - Access', 'Internet & ICT - Access', '', '120')";
 980  $SQL_apc_categ[] = "INSERT INTO constant (id, group_id, name, value, class, pri) VALUES( 'AA-predefined103', 'lt_apcCategories', 'Internet & ICT - Connectivity', 'Internet & ICT - Connectivity', '', '130')";
 981  $SQL_apc_categ[] = "INSERT INTO constant (id, group_id, name, value, class, pri) VALUES( 'AA-predefined104', 'lt_apcCategories', 'Internet & ICT - Women and ICT', 'Internet & ICT - Women and ICT', '', '140')";
 982  $SQL_apc_categ[] = "INSERT INTO constant (id, group_id, name, value, class, pri) VALUES( 'AA-predefined105', 'lt_apcCategories', 'Internet & ICT - Rights', 'Internet & ICT - Rights', '', '150')";
 983  $SQL_apc_categ[] = "INSERT INTO constant (id, group_id, name, value, class, pri) VALUES( 'AA-predefined106', 'lt_apcCategories', 'Internet & ICT - Governance', 'Internet & ICT - Governance', '', '160')";
 984  $SQL_apc_categ[] = "INSERT INTO constant (id, group_id, name, value, class, pri) VALUES( 'AA-predefined107', 'lt_apcCategories', 'Development', 'Development', '', '200')";
 985  $SQL_apc_categ[] = "INSERT INTO constant (id, group_id, name, value, class, pri) VALUES( 'AA-predefined108', 'lt_apcCategories', 'Development - Resources', 'Development - Resources', '', '210')";
 986  $SQL_apc_categ[] = "INSERT INTO constant (id, group_id, name, value, class, pri) VALUES( 'AA-predefined109', 'lt_apcCategories', 'Development - Structural adjustment', 'Development - Structural adjustment', '', '220')";
 987  $SQL_apc_categ[] = "INSERT INTO constant (id, group_id, name, value, class, pri) VALUES( 'AA-predefined110', 'lt_apcCategories', 'Development - Sustainability', 'Development - Sustainability', '', '230')";
 988  $SQL_apc_categ[] = "INSERT INTO constant (id, group_id, name, value, class, pri) VALUES( 'AA-predefined111', 'lt_apcCategories', 'News and media', 'News and media', '', '300')";
 989  $SQL_apc_categ[] = "INSERT INTO constant (id, group_id, name, value, class, pri) VALUES( 'AA-predefined112', 'lt_apcCategories', 'News and media - Alternative', 'News and media - Alternative', '', '310')";
 990  $SQL_apc_categ[] = "INSERT INTO constant (id, group_id, name, value, class, pri) VALUES( 'AA-predefined113', 'lt_apcCategories', 'News and media - Internet', 'News and media - Internet', '', '320')";
 991  $SQL_apc_categ[] = "INSERT INTO constant (id, group_id, name, value, class, pri) VALUES( 'AA-predefined114', 'lt_apcCategories', 'News and media - Training', 'News and media - Training', '', '330')";
 992  $SQL_apc_categ[] = "INSERT INTO constant (id, group_id, name, value, class, pri) VALUES( 'AA-predefined115', 'lt_apcCategories', 'News and media - Traditional', 'News and media - Traditional', '', '340')";
 993  $SQL_apc_categ[] = "INSERT INTO constant (id, group_id, name, value, class, pri) VALUES( 'AA-predefined116', 'lt_apcCategories', 'Environment', 'Environment', '', '400')";
 994  $SQL_apc_categ[] = "INSERT INTO constant (id, group_id, name, value, class, pri) VALUES( 'AA-predefined117', 'lt_apcCategories', 'Environment - Agriculture', 'Environment - Agriculture', '', '410')";
 995  $SQL_apc_categ[] = "INSERT INTO constant (id, group_id, name, value, class, pri) VALUES( 'AA-predefined118', 'lt_apcCategories', 'Environment - Animal rights/protection', 'Environment - Animal rights/protection', '', '420')";
 996  $SQL_apc_categ[] = "INSERT INTO constant (id, group_id, name, value, class, pri) VALUES( 'AA-predefined119', 'lt_apcCategories', 'Environment - Climate', 'Environment - Climate', '', '430')";
 997  $SQL_apc_categ[] = "INSERT INTO constant (id, group_id, name, value, class, pri) VALUES( 'AA-predefined120', 'lt_apcCategories', 'Environment - Biodiversity/conservetion', 'Environment - Biodiversity/conservetion', '', '440')";
 998  $SQL_apc_categ[] = "INSERT INTO constant (id, group_id, name, value, class, pri) VALUES( 'AA-predefined121', 'lt_apcCategories', 'Environment - Energy', 'Environment - Energy', '', '450')";
 999  $SQL_apc_categ[] = "INSERT INTO constant (id, group_id, name, value, class, pri) VALUES( 'AA-predefined122', 'lt_apcCategories', 'Environment - Campaigns', 'Environment - Campaigns', '', '455')";
1000  $SQL_apc_categ[] = "INSERT INTO constant (id, group_id, name, value, class, pri) VALUES( 'AA-predefined123', 'lt_apcCategories', 'Environment - Legislation', 'Environment - Legislation', '', '460')";
1001  $SQL_apc_categ[] = "INSERT INTO constant (id, group_id, name, value, class, pri) VALUES( 'AA-predefined124', 'lt_apcCategories', 'Environment - Genetics', 'Environment - Genetics', '', '465')";
1002  $SQL_apc_categ[] = "INSERT INTO constant (id, group_id, name, value, class, pri) VALUES( 'AA-predefined125', 'lt_apcCategories', 'Environment - Natural resources', 'Environment - Natural resources', '', '470')";
1003  $SQL_apc_categ[] = "INSERT INTO constant (id, group_id, name, value, class, pri) VALUES( 'AA-predefined126', 'lt_apcCategories', 'Environment - Rural development', 'Environment - Rural development', '', '475')";
1004  $SQL_apc_categ[] = "INSERT INTO constant (id, group_id, name, value, class, pri) VALUES( 'AA-predefined127', 'lt_apcCategories', 'Environment - Transport', 'Environment - Transport', '', '480')";
1005  $SQL_apc_categ[] = "INSERT INTO constant (id, group_id, name, value, class, pri) VALUES( 'AA-predefined128', 'lt_apcCategories', 'Environment - Urban ecology', 'Environment - Urban ecology', '', '485')";
1006  $SQL_apc_categ[] = "INSERT INTO constant (id, group_id, name, value, class, pri) VALUES( 'AA-predefined129', 'lt_apcCategories', 'Environment - Pollution & waste', 'Environment - Pollution & waste', '', '490')";
1007  $SQL_apc_categ[] = "INSERT INTO constant (id, group_id, name, value, class, pri) VALUES( 'AA-predefined130', 'lt_apcCategories', 'NGOs', 'NGOs', '', '500')";
1008  $SQL_apc_categ[] = "INSERT INTO constant (id, group_id, name, value, class, pri) VALUES( 'AA-predefined131', 'lt_apcCategories', 'NGOs - Fundraising', 'NGOs - Fundraising', '', '510')";
1009  $SQL_apc_categ[] = "INSERT INTO constant (id, group_id, name, value, class, pri) VALUES( 'AA-predefined132', 'lt_apcCategories', 'NGOs - Funding agencies', 'NGOs - Funding agencies', '', '520')";
1010  $SQL_apc_categ[] = "INSERT INTO constant (id, group_id, name, value, class, pri) VALUES( 'AA-predefined133', 'lt_apcCategories', 'NGOs - Grants/scholarships', 'NGOs - Grants/scholarships', '', '530')";
1011  $SQL_apc_categ[] = "INSERT INTO constant (id, group_id, name, value, class, pri) VALUES( 'AA-predefined134', 'lt_apcCategories', 'NGOs - Jobs', 'NGOs - Jobs', '', '540')";
1012  $SQL_apc_categ[] = "INSERT INTO constant (id, group_id, name, value, class, pri) VALUES( 'AA-predefined135', 'lt_apcCategories', 'NGOs - Management', 'NGOs - Management', '', '550')";
1013  $SQL_apc_categ[] = "INSERT INTO constant (id, group_id, name, value, class, pri) VALUES( 'AA-predefined136', 'lt_apcCategories', 'NGOs - Volunteers', 'NGOs - Volunteers', '', '560')";
1014  $SQL_apc_categ[] = "INSERT INTO constant (id, group_id, name, value, class, pri) VALUES( 'AA-predefined137', 'lt_apcCategories', 'Society', 'Society', '', '600')";
1015  $SQL_apc_categ[] = "INSERT INTO constant (id, group_id, name, value, class, pri) VALUES( 'AA-predefined138', 'lt_apcCategories', 'Society - Charities', 'Society - Charities', '', '610')";
1016  $SQL_apc_categ[] = "INSERT INTO constant (id, group_id, name, value, class, pri) VALUES( 'AA-predefined139', 'lt_apcCategories', 'Society - Community', 'Society - Community', '', '620')";
1017  $SQL_apc_categ[] = "INSERT INTO constant (id, group_id, name, value, class, pri) VALUES( 'AA-predefined140', 'lt_apcCategories', 'Society - Crime & rehabilitation', 'Society - Crime & rehabilitation', '', '630')";
1018  $SQL_apc_categ[] = "INSERT INTO constant (id, group_id, name, value, class, pri) VALUES( 'AA-predefined141', 'lt_apcCategories', 'Society - Disabilities', 'Society - Disabilities', '', '640')";
1019  $SQL_apc_categ[] = "INSERT INTO constant (id, group_id, name, value, class, pri) VALUES( 'AA-predefined142', 'lt_apcCategories', 'Society - Drugs', 'Society - Drugs', '', '650')";
1020  $SQL_apc_categ[] = "INSERT INTO constant (id, group_id, name, value, class, pri) VALUES( 'AA-predefined143', 'lt_apcCategories', 'Society - Ethical business', 'Society - Ethical business', '', '660')";
1021  $SQL_apc_categ[] = "INSERT INTO constant (id, group_id, name, value, class, pri) VALUES( 'AA-predefined144', 'lt_apcCategories', 'Society - Health', 'Society - Health', '', '670')";
1022  $SQL_apc_categ[] = "INSERT INTO constant (id, group_id, name, value, class, pri) VALUES( 'AA-predefined145', 'lt_apcCategories', 'Society - Law and legislation', 'Society - Law and legislation', '', '675')";
1023  $SQL_apc_categ[] = "INSERT INTO constant (id, group_id, name, value, class, pri) VALUES( 'AA-predefined146', 'lt_apcCategories', 'Society - Migration', 'Society - Migration', '', '680')";
1024  $SQL_apc_categ[] = "INSERT INTO constant (id, group_id, name, value, class, pri) VALUES( 'AA-predefined147', 'lt_apcCategories', 'Society - Sexuality', 'Society - Sexuality', '', '685')";
1025  $SQL_apc_categ[] = "INSERT INTO constant (id, group_id, name, value, class, pri) VALUES( 'AA-predefined148', 'lt_apcCategories', 'Society - Social services and welfare', 'Society - Social services and welfare', '', '690')";
1026  $SQL_apc_categ[] = "INSERT INTO constant (id, group_id, name, value, class, pri) VALUES( 'AA-predefined149', 'lt_apcCategories', 'Economy & Work', 'Economy & Work', '', '700')";
1027  $SQL_apc_categ[] = "INSERT INTO constant (id, group_id, name, value, class, pri) VALUES( 'AA-predefined150', 'lt_apcCategories', 'Economy & Work - Informal Sector', 'Economy & Work - Informal Sector', '', '710')";
1028  $SQL_apc_categ[] = "INSERT INTO constant (id, group_id, name, value, class, pri) VALUES( 'AA-predefined151', 'lt_apcCategories', 'Economy & Work - Labour', 'Economy & Work - Labour', '', '720')";
1029  $SQL_apc_categ[] = "INSERT INTO constant (id, group_id, name, value, class, pri) VALUES( 'AA-predefined152', 'lt_apcCategories', 'Culture', 'Culture', '', '800')";
1030  $SQL_apc_categ[] = "INSERT INTO constant (id, group_id, name, value, class, pri) VALUES( 'AA-predefined153', 'lt_apcCategories', 'Culture - Arts and literature', 'Culture - Arts and literature', '', '810')";
1031  $SQL_apc_categ[] = "INSERT INTO constant (id, group_id, name, value, class, pri) VALUES( 'AA-predefined154', 'lt_apcCategories', 'Culture - Heritage', 'Culture - Heritage', '', '820')";
1032  $SQL_apc_categ[] = "INSERT INTO constant (id, group_id, name, value, class, pri) VALUES( 'AA-predefined155', 'lt_apcCategories', 'Culture - Philosophy', 'Culture - Philosophy', '', '830')";
1033  $SQL_apc_categ[] = "INSERT INTO constant (id, group_id, name, value, class, pri) VALUES( 'AA-predefined156', 'lt_apcCategories', 'Culture - Religion', 'Culture - Religion', '', '840')";
1034  $SQL_apc_categ[] = "INSERT INTO constant (id, group_id, name, value, class, pri) VALUES( 'AA-predefined157', 'lt_apcCategories', 'Culture - Ethics', 'Culture - Ethics', '', '850')";
1035  $SQL_apc_categ[] = "INSERT INTO constant (id, group_id, name, value, class, pri) VALUES( 'AA-predefined158', 'lt_apcCategories', 'Culture - Leisure', 'Culture - Leisure', '', '860')";
1036  $SQL_apc_categ[] = "INSERT INTO constant (id, group_id, name, value, class, pri) VALUES( 'AA-predefined159', 'lt_apcCategories', 'Human rights', 'Human rights', '', '900')";
1037  $SQL_apc_categ[] = "INSERT INTO constant (id, group_id, name, value, class, pri) VALUES( 'AA-predefined160', 'lt_apcCategories', 'Human rights - Consumer Protection', 'Human rights - Consumer Protection', '', '910')";
1038  $SQL_apc_categ[] = "INSERT INTO constant (id, group_id, name, value, class, pri) VALUES( 'AA-predefined161', 'lt_apcCategories', 'Human rights - Democracy', 'Human rights - Democracy', '', '920')";
1039  $SQL_apc_categ[] = "INSERT INTO constant (id, group_id, name, value, class, pri) VALUES( 'AA-predefined162', 'lt_apcCategories', 'Human rights - Minorities', 'Human rights - Minorities', '', '930')";
1040  $SQL_apc_categ[] = "INSERT INTO constant (id, group_id, name, value, class, pri) VALUES( 'AA-predefined163', 'lt_apcCategories', 'Human rights - Peace', 'Human rights - Peace', '', '940')";
1041  $SQL_apc_categ[] = "INSERT INTO constant (id, group_id, name, value, class, pri) VALUES( 'AA-predefined164', 'lt_apcCategories', 'Education', 'Education', '', '1000')";
1042  $SQL_apc_categ[] = "INSERT INTO constant (id, group_id, name, value, class, pri) VALUES( 'AA-predefined165', 'lt_apcCategories', 'Education - Distance learning', 'Education - Distance learning', '', '1010')";
1043  $SQL_apc_categ[] = "INSERT INTO constant (id, group_id, name, value, class, pri) VALUES( 'AA-predefined166', 'lt_apcCategories', 'Education - Non-formal education', 'Education - Non-formal education', '', '1020')";
1044  $SQL_apc_categ[] = "INSERT INTO constant (id, group_id, name, value, class, pri) VALUES( 'AA-predefined167', 'lt_apcCategories', 'Education - Schools', 'Education - Schools', '', '1030')";
1045  $SQL_apc_categ[] = "INSERT INTO constant (id, group_id, name, value, class, pri) VALUES( 'AA-predefined168', 'lt_apcCategories', 'Politics & Government', 'Politics & Government', '', '1100')";
1046  $SQL_apc_categ[] = "INSERT INTO constant (id, group_id, name, value, class, pri) VALUES( 'AA-predefined169', 'lt_apcCategories', 'Politics & Government - Internet', 'Politics & Government - Internet', '', '1110')";
1047  $SQL_apc_categ[] = "INSERT INTO constant (id, group_id, name, value, class, pri) VALUES( 'AA-predefined170', 'lt_apcCategories', 'Politics & Government - Local', 'Politics & Government - Local', '', '1120')";
1048  $SQL_apc_categ[] = "INSERT INTO constant (id, group_id, name, value, class, pri) VALUES( 'AA-predefined171', 'lt_apcCategories', 'Politics & Government - Policies', 'Politics & Government - Policies', '', '1130')";
1049  $SQL_apc_categ[] = "INSERT INTO constant (id, group_id, name, value, class, pri) VALUES( 'AA-predefined172', 'lt_apcCategories', 'Politics & Government - Administration', 'Politics & Government - Administration', '', '1140')";
1050  $SQL_apc_categ[] = "INSERT INTO constant (id, group_id, name, value, class, pri) VALUES( 'AA-predefined173', 'lt_apcCategories', 'People', 'People', '', '1200')";
1051  $SQL_apc_categ[] = "INSERT INTO constant (id, group_id, name, value, class, pri) VALUES( 'AA-predefined174', 'lt_apcCategories', 'People - Children', 'People - Children', '', '1210')";
1052  $SQL_apc_categ[] = "INSERT INTO constant (id, group_id, name, value, class, pri) VALUES( 'AA-predefined175', 'lt_apcCategories', 'People - Adolescents/teenagers', 'People - Adolescents/teenagers', '', '1220')";
1053  $SQL_apc_categ[] = "INSERT INTO constant (id, group_id, name, value, class, pri) VALUES( 'AA-predefined176', 'lt_apcCategories', 'People - Gender', 'People - Gender', '', '1230')";
1054  $SQL_apc_categ[] = "INSERT INTO constant (id, group_id, name, value, class, pri) VALUES( 'AA-predefined177', 'lt_apcCategories', 'People - Older people', 'People - Older people', '', '1240')";
1055  $SQL_apc_categ[] = "INSERT INTO constant (id, group_id, name, value, class, pri) VALUES( 'AA-predefined178', 'lt_apcCategories', 'People - Family', 'People - Family', '', '1250')";
1056  $SQL_apc_categ[] = "INSERT INTO constant (id, group_id, name, value, class, pri) VALUES( 'AA-predefined179', 'lt_apcCategories', 'World', 'World', '', '1300')";
1057  $SQL_apc_categ[] = "INSERT INTO constant (id, group_id, name, value, class, pri) VALUES( 'AA-predefined180', 'lt_apcCategories', 'World - Globalization', 'World - Globalization', '', '1310')";
1058  $SQL_apc_categ[] = "INSERT INTO constant (id, group_id, name, value, class, pri) VALUES( 'AA-predefined181', 'lt_apcCategories', 'World - Debt', 'World - Debt', '', '1320')";
1059  $SQL_apc_categ[] = "REPLACE INTO constant (id, group_id, name, value, class, pri) VALUES( 'AA-predefined056', 'lt_groupNames', 'APC-wide Categories', 'lt_apcCategories', '', '1000')";
1060  
1061  
1062  $SQL_aacore[] = "DELETE FROM field WHERE slice_id='AA_Core_Fields..'";
1063  $SQL_aacore[] = "REPLACE INTO slice_owner (id, name, email) VALUES ('AA_Core.........', 'Action Aplications System', '".ERROR_REPORTING_EMAIL."')";
1064  $SQL_aacore[] = "REPLACE INTO slice (id, name, owner, deleted, created_by, created_at, export_to_all, type, template, fulltext_format_top, fulltext_format, fulltext_format_bottom, odd_row_format, even_row_format, even_odd_differ, compact_top, compact_bottom, category_top, category_format, category_bottom, category_sort, slice_url, d_listlen, lang_file, fulltext_remove, compact_remove, email_sub_enable, exclude_from_dir, notify_sh_offer, notify_sh_accept, notify_sh_remove, notify_holding_item_s, notify_holding_item_b, notify_holding_item_edit_s, notify_holding_item_edit_b, notify_active_item_edit_s, notify_active_item_edit_b, notify_active_item_s, notify_active_item_b, noitem_msg, admin_format_top, admin_format, admin_format_bottom, admin_remove, permit_anonymous_post, permit_offline_fill, aditional, flag, vid, gb_direction, group_by, gb_header, gb_case, javascript)
1065                               VALUES ('AA_Core_Fields..', 'Action Aplication Core', 'AA_Core_Fields..', 0, '', $now, 0, 'AA_Core_Fields..', 0, '', '',       '',                     '',             '',              0,               '',          '',             '',           '',              '',              1,             '$AA_HTTP_DOMAIN', 10000, 'en_news_lang.php3', '()', '()', 1, 0, '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 0, 0, '', 0, 0, NULL, NULL, NULL, NULL,'')";
1066  $SQL_aacore[] = "INSERT INTO field (id, type, slice_id, name, input_pri, input_help, input_morehlp, input_default, required, feed, multiple, input_show_func, content_id, search_pri, search_type, search_help, search_before, search_more_help, search_show, search_ft_show, search_ft_default, alias1, alias1_func, alias1_help, alias2, alias2_func, alias2_help, alias3, alias3_func, alias3_help, input_before, aditional, content_edit, html_default, html_show, in_item_tbl, input_validate, input_insert_func, input_show, text_stored) VALUES( 'headline', '', 'AA_Core_Fields..', 'Headline', '100', 'Headline', '$AA_DOC_URL}help.html', 'qte', '1', '0', '0', 'fld', '', '100', '', '', '', '', '1', '1', '1', '_#UNDEFINE', 'f_h', 'alias undefined - see Admin pages - Field setting', '', '', '', '', '', '', '', '', '0', '0', '0', '', 'text', 'qte', '1', '1')";
1067  $SQL_aacore[] = "INSERT INTO field (id, type, slice_id, name, input_pri, input_help, input_morehlp, input_default, required, feed, multiple, input_show_func, content_id, search_pri, search_type, search_help, search_before, search_more_help, search_show, search_ft_show, search_ft_default, alias1, alias1_func, alias1_help, alias2, alias2_func, alias2_help, alias3, alias3_func, alias3_help, input_before, aditional, content_edit, html_default, html_show, in_item_tbl, input_validate, input_insert_func, input_show, text_stored) VALUES( 'abstract', '', 'AA_Core_Fields..', 'Abstract', '189', 'Abstract', '$AA_DOC_URL}help.html', 'qte', '0', '0', '0', 'txt:8', '', '100', '', '', '', '', '0', '1', '1', '_#UNDEFINE', 'f_t', 'alias undefined - see Admin pages - Field setting', '', '', '', '', '', '', '', '', '0', '0', '1', '', 'text', 'qte', '1', '1')";
1068  $SQL_aacore[] = "INSERT INTO field (id, type, slice_id, name, input_pri, input_help, input_morehlp, input_default, required, feed, multiple, input_show_func, content_id, search_pri, search_type, search_help, search_before, search_more_help, search_show, search_ft_show, search_ft_default, alias1, alias1_func, alias1_help, alias2, alias2_func, alias2_help, alias3, alias3_func, alias3_help, input_before, aditional, content_edit, html_default, html_show, in_item_tbl, input_validate, input_insert_func, input_show, text_stored) VALUES( 'full_text', '', 'AA_Core_Fields..', 'Fulltext', '300', 'Fulltext', '$AA_DOC_URL}help.html', 'qte', '0', '0', '0', 'txt:8', '', '100', '', '', '', '', '0', '1', '1', '_#UNDEFINE', 'f_t', 'alias undefined - see Admin pages - Field setting', '', '', '', '', '', '', '', '', '0', '0', '1', '', 'text', 'qte', '1', '1')";
1069  $SQL_aacore[] = "INSERT INTO field (id, type, slice_id, name, input_pri, input_help, input_morehlp, input_default, required, feed, multiple, input_show_func, content_id, search_pri, search_type, search_help, search_before, search_more_help, search_show, search_ft_show, search_ft_default, alias1, alias1_func, alias1_help, alias2, alias2_func, alias2_help, alias3, alias3_func, alias3_help, input_before, aditional, content_edit, html_default, html_show, in_item_tbl, input_validate, input_insert_func, input_show, text_stored) VALUES( 'hl_href', '', 'AA_Core_Fields..', 'Headline URL', '1655', 'Link for the headline (for external links)', '$AA_DOC_URL}help.html', 'qte', '0', '0', '0', 'fld', '', '100', '', '', '', '', '1', '1', '1', '_#UNDEFINE', 'f_f:link_only.......', 'alias undefined - see Admin pages - Field setting', '', '', '', '', '', '', '', '', '0', '0', '0', '', 'url', 'qte', '1', '1')";
1070  $SQL_aacore[] = "INSERT INTO field (id, type, slice_id, name, input_pri, input_help, input_morehlp, input_default, required, feed, multiple, input_show_func, content_id, search_pri, search_type, search_help, search_before, search_more_help, search_show, search_ft_show, search_ft_default, alias1, alias1_func, alias1_help, alias2, alias2_func, alias2_help, alias3, alias3_func, alias3_help, input_before, aditional, content_edit, html_default, html_show, in_item_tbl, input_validate, input_insert_func, input_show, text_stored) VALUES( 'link_only', '', 'AA_Core_Fields..', 'External item', '1755', 'Use External link instead of fulltext?', '$AA_DOC_URL}help.html', 'qte', '0', '0', '0', 'chb', '', '100', '', '', '', '', '0', '0', '1', '', '', '', '', '', '', '', '', '', '', '', '0', '0', '0', '', 'bool', 'boo', '1', '1')";
1071  $SQL_aacore[] = "INSERT INTO field (id, type, slice_id, name, input_pri, input_help, input_morehlp, input_default, required, feed, multiple, input_show_func, content_id, search_pri, search_type, search_help, search_before, search_more_help, search_show, search_ft_show, search_ft_default, alias1, alias1_func, alias1_help, alias2, alias2_func, alias2_help, alias3, alias3_func, alias3_help, input_before, aditional, content_edit, html_default, html_show, in_item_tbl, input_validate, input_insert_func, input_show, text_stored) VALUES( 'place', '', 'AA_Core_Fields..', 'Locality', '2155', 'Item locality', '$AA_DOC_URL}help.html', 'qte', '0', '0', '0', 'fld', '', '100', '', '', '', '', '0', '0', '0', '_#UNDEFINE', 'f_h', 'alias undefined - see Admin pages - Field setting', '', '', '', '', '', '', '', '', '0', '0', '0', '', 'text', 'qte', '1', '1')";
1072  $SQL_aacore[] = "INSERT INTO field (id, type, slice_id, name, input_pri, input_help, input_morehlp, input_default, required, feed, multiple, input_show_func, content_id, search_pri, search_type, search_help, search_before, search_more_help, search_show, search_ft_show, search_ft_default, alias1, alias1_func, alias1_help, alias2, alias2_func, alias2_help, alias3, alias3_func, alias3_help, input_before, aditional, content_edit, html_default, html_show, in_item_tbl, input_validate, input_insert_func, input_show, text_stored) VALUES( 'source', '', 'AA_Core_Fields..', 'Source', '1955', 'Source of the item', '$AA_DOC_URL}help.html', 'qte', '0', '0', '0', 'fld', '', '100', '', '', '', '', '0', '0', '0', '_#UNDEFINE', 'f_h', 'alias undefined - see Admin pages - Field setting', '', '', '', '', '', '', '', '', '0', '0', '0', '', 'text', 'qte', '1', '1')";
1073  $SQL_aacore[] = "INSERT INTO field (id, type, slice_id, name, input_pri, input_help, input_morehlp, input_default, required, feed, multiple, input_show_func, content_id, search_pri, search_type, search_help, search_before, search_more_help, search_show, search_ft_show, search_ft_default, alias1, alias1_func, alias1_help, alias2, alias2_func, alias2_help, alias3, alias3_func, alias3_help, input_before, aditional, content_edit, html_default, html_show, in_item_tbl, input_validate, input_insert_func, input_show, text_stored) VALUES( 'source_href', '', 'AA_Core_Fields..', 'Source URL', '2055', 'URL of the source', '$AA_DOC_URL}help.html', 'qte', '0', '0', '0', 'fld', '', '100', '', '', '', '', '1', '1', '1', '_#UNDEFINE', 'f_s:javascript: window.alert(\'No source url specified\')', 'alias undefined - see Admin pages - Field setting', '', '', '', '', '', '', '', '', '0', '0', '0', '', 'url', 'qte', '1', '1')";
1074  $SQL_aacore[] = "INSERT INTO field (id, type, slice_id, name, input_pri, input_help, input_morehlp, input_default, required, feed, multiple, input_show_func, content_id, search_pri, search_type, search_help, search_before, search_more_help, search_show, search_ft_show, search_ft_default, alias1, alias1_func, alias1_help, alias2, alias2_func, alias2_help, alias3, alias3_func, alias3_help, input_before, aditional, content_edit, html_default, html_show, in_item_tbl, input_validate, input_insert_func, input_show, text_stored) VALUES( 'lang_code', '', 'AA_Core_Fields..', 'Language Code', '1700', 'Code of used language', '$AA_DOC_URL}help.html', 'txt:EN', '0', '0', '0', 'sel:lt_languages', '', '100', '', '', '', '', '0', '0', '0', '', '', '', '', '', '', '', '', '', '', '', '0', '0', '0', '', 'text', 'qte', '1', '1')";
1075  $SQL_aacore[] = "INSERT INTO field (id, type, slice_id, name, input_pri, input_help, input_morehlp, input_default, required, feed, multiple, input_show_func, content_id, search_pri, search_type, search_help, search_before, search_more_help, search_show, search_ft_show, search_ft_default, alias1, alias1_func, alias1_help, alias2, alias2_func, alias2_help, alias3, alias3_func, alias3_help, input_before, aditional, content_edit, html_default, html_show, in_item_tbl, input_validate, input_insert_func, input_show, text_stored) VALUES( 'cp_code', '', 'AA_Core_Fields..', 'Code Page', '1800', 'Language Code Page', '$AA_DOC_URL}help.html', 'txt:iso8859-1', '0', '0', '0', 'sel:lt_codepages', '', '100', '', '', '', '', '0', '0', '0', '', '', '', '', '', '', '', '', '', '', '', '0', '0', '0', '', 'text', 'qte', '1', '1')";
1076  $SQL_aacore[] = "INSERT INTO field (id, type, slice_id, name, input_pri, input_help, input_morehlp, input_default, required, feed, multiple, input_show_func, content_id, search_pri, search_type, search_help, search_before, search_more_help, search_show, search_ft_show, search_ft_default, alias1, alias1_func, alias1_help, alias2, alias2_func, alias2_help, alias3, alias3_func, alias3_help, input_before, aditional, content_edit, html_default, html_show, in_item_tbl, input_validate, input_insert_func, input_show, text_stored) VALUES( 'category', '', 'AA_Core_Fields..', 'Category', '1000', 'Category', '$AA_DOC_URL}help.html', 'txt:', '0', '0', '0', 'sel:lt_apcCategories', '', '100', '', '', '', '', '1', '1', '1', '_#UNDEFINE', 'f_h', 'alias undefined - see Admin pages - Field setting', '', '', '', '', '', '', '', '', '0', '0', '0', '', 'text', 'qte', '1', '1')";
1077  $SQL_aacore[] = "INSERT INTO field (id, type, slice_id, name, input_pri, input_help, input_morehlp, input_default, required, feed, multiple, input_show_func, content_id, search_pri, search_type, search_help, search_before, search_more_help, search_show, search_ft_show, search_ft_default, alias1, alias1_func, alias1_help, alias2, alias2_func, alias2_help, alias3, alias3_func, alias3_help, input_before, aditional, content_edit, html_default, html_show, in_item_tbl, input_validate, input_insert_func, input_show, text_stored) VALUES( 'img_src', '', 'AA_Core_Fields..', 'Image URL', '2055', 'URL of the image', '$AA_DOC_URL}help.html', 'qte', '0', '0', '0', 'fld', '', '100', '', '', '', '', '0', '0', '0', '_#UNDEFINE', 'f_i', 'alias undefined - see Admin pages - Field setting', '', '', '', '', '', '', '', '', '0', '0', '0', '', 'url', 'qte', '1', '1')";
1078  $SQL_aacore[] = "INSERT INTO field (id, type, slice_id, name, input_pri, input_help, input_morehlp, input_default, required, feed, multiple, input_show_func, content_id, search_pri, search_type, search_help, search_before, search_more_help, search_show, search_ft_show, search_ft_default, alias1, alias1_func, alias1_help, alias2, alias2_func, alias2_help, alias3, alias3_func, alias3_help, input_before, aditional, content_edit, html_default, html_show, in_item_tbl, input_validate, input_insert_func, input_show, text_stored) VALUES( 'img_width', '', 'AA_Core_Fields..', 'Image width', '2455', 'Width of image (like: 100, 50%)', '$AA_DOC_URL}help.html', 'qte', '0', '0', '0', 'fld', '', '100', '', '', '', '', '0', '0', '0', '_#UNDEFINE', 'f_w', 'alias undefined - see Admin pages - Field setting', '', '', '', '', '', '', '', '', '0', '0', '0', '', 'text', 'qte', '1', '1')";
1079  $SQL_aacore[] = "INSERT INTO field (id, type, slice_id, name, input_pri, input_help, input_morehlp, input_default, required, feed, multiple, input_show_func, content_id, search_pri, search_type, search_help, search_before, search_more_help, search_show, search_ft_show, search_ft_default, alias1, alias1_func, alias1_help, alias2, alias2_func, alias2_help, alias3, alias3_func, alias3_help, input_before, aditional, content_edit, html_default, html_show, in_item_tbl, input_validate, input_insert_func, input_show, text_stored) VALUES( 'img_height', '', 'AA_Core_Fields..', 'Image height', '2555', 'Height of image (like: 100, 50%)', '$AA_DOC_URL}help.html', 'qte', '0', '0', '0', 'fld', '', '100', '', '', '', '', '0', '0', '0', '_#UNDEFINE', 'f_g', 'alias undefined - see Admin pages - Field setting', '', '', '', '', '', '', '', '', '0', '0', '0', '', 'text', 'qte', '1', '1')";
1080  $SQL_aacore[] = "INSERT INTO field (id, type, slice_id, name, input_pri, input_help, input_morehlp, input_default, required, feed, multiple, input_show_func, content_id, search_pri, search_type, search_help, search_before, search_more_help, search_show, search_ft_show, search_ft_default, alias1, alias1_func, alias1_help, alias2, alias2_func, alias2_help, alias3, alias3_func, alias3_help, input_before, aditional, content_edit, html_default, html_show, in_item_tbl, input_validate, input_insert_func, input_show, text_stored) VALUES( 'e_posted_by', '', 'AA_Core_Fields..', 'Author`s e-mail', '2255', 'E-mail to author', '$AA_DOC_URL}help.html', 'qte', '0', '0', '0', 'fld', '', '100', '', '', '', '', '0', '0', '0', '_#UNDEFINE', 'f_h', 'alias undefined - see Admin pages - Field setting', '', '', '', '', '', '', '', '', '0', '0', '0', '', 'email', 'qte', '1', '1')";
1081  $SQL_aacore[] = "INSERT INTO field (id, type, slice_id, name, input_pri, input_help, input_morehlp, input_default, required, feed, multiple, input_show_func, content_id, search_pri, search_type, search_help, search_before, search_more_help, search_show, search_ft_show, search_ft_default, alias1, alias1_func, alias1_help, alias2, alias2_func, alias2_help, alias3, alias3_func, alias3_help, input_before, aditional, content_edit, html_default, html_show, in_item_tbl, input_validate, input_insert_func, input_show, text_stored) VALUES( 'created_by', '', 'AA_Core_Fields..', 'Created By', '2355', 'Identification of creator', '$AA_DOC_URL}help.html', 'qte', '0', '0', '0', 'nul', '', '100', '', '', '', '', '0', '0', '0', '_#UNDEFINE', 'f_h', 'alias undefined - see Admin pages - Field setting', '', '', '', '', '', '', '', '', '0', '0', '0', '', 'text', 'uid', '1', '1')";
1082  $SQL_aacore[] = "INSERT INTO field (id, type, slice_id, name, input_pri, input_help, input_morehlp, input_default, required, feed, multiple, input_show_func, content_id, search_pri, search_type, search_help, search_before, search_more_help, search_show, search_ft_show, search_ft_default, alias1, alias1_func, alias1_help, alias2, alias2_func, alias2_help, alias3, alias3_func, alias3_help, input_before, aditional, content_edit, html_default, html_show, in_item_tbl, input_validate, input_insert_func, input_show, text_stored) VALUES( 'edit_note', '', 'AA_Core_Fields..', 'Editor`s note', '2355', 'Here you can write your note (not displayed on the web)', '$AA_DOC_URL}help.html', 'qte', '0', '0', '0', 'txt', '', '100', '', '', '', '', '0', '0', '0', '_#UNDEFINE', 'f_h', 'alias undefined - see Admin pages - Field setting', '', '', '', '', '', '', '', '', '0', '0', '0', '', 'text', 'qte', '1', '1')";
1083  $SQL_aacore[] = "INSERT INTO field (id, type, slice_id, name, input_pri, input_help, input_morehlp, input_default, required, feed, multiple, input_show_func, content_id, search_pri, search_type, search_help, search_before, search_more_help, search_show, search_ft_show, search_ft_default, alias1, alias1_func, alias1_help, alias2, alias2_func, alias2_help, alias3, alias3_func, alias3_help, input_before, aditional, content_edit, html_default, html_show, in_item_tbl, input_validate, input_insert_func, input_show, text_stored) VALUES( 'img_upload', '', 'AA_Core_Fields..', 'Image upload', '2222', 'Select Image for upload', '$AA_DOC_URL}help.html', 'qte', '1', '0', '0', 'fil:image/*', '', '100', '', '', '', '', '1', '1', '1', '_#UNDEFINE', 'f_h', 'alias undefined - see Admin pages - Field setting', '', '', '', '', '', '', '', '', '0', '0', '0', '', 'text', 'fil', '1', '1')";
1084  $SQL_aacore[] = "INSERT INTO field (id, type, slice_id, name, input_pri, input_help, input_morehlp, input_default, required, feed, multiple, input_show_func, content_id, search_pri, search_type, search_help, search_before, search_more_help, search_show, search_ft_show, search_ft_default, alias1, alias1_func, alias1_help, alias2, alias2_func, alias2_help, alias3, alias3_func, alias3_help, input_before, aditional, content_edit, html_default, html_show, in_item_tbl, input_validate, input_insert_func, input_show, text_stored) VALUES( 'source_desc', '', 'AA_Core_Fields..', 'Source description', '100', '', '${AA_DOC_URL}help.html', 'qte', '1', '0', '0', 'fld', '', '100', '', '', '', '', '1', '1', '1', '_#UNDEFINE', 'f_h', 'alias undefined - see Admin pages - Field setting', '', '', '', '', '', '', '', '', '0', '0', '0', '', 'text', 'qte', '1', '1')";
1085  $SQL_aacore[] = "INSERT INTO field (id, type, slice_id, name, input_pri, input_help, input_morehlp, input_default, required, feed, multiple, input_show_func, content_id, search_pri, search_type, search_help, search_before, search_more_help, search_show, search_ft_show, search_ft_default, alias1, alias1_func, alias1_help, alias2, alias2_func, alias2_help, alias3, alias3_func, alias3_help, input_before, aditional, content_edit, html_default, html_show, in_item_tbl, input_validate, input_insert_func, input_show, text_stored) VALUES( 'source_addr', '', 'AA_Core_Fields..', 'Source address', '100', '', '${AA_DOC_URL}help.html', 'qte', '1', '0', '0', 'fld', '', '100', '', '', '', '', '1', '1', '1', '_#UNDEFINE', 'f_h', 'alias undefined - see Admin pages - Field setting', '', '', '', '', '', '', '', '', '0', '0', '0', '', 'text', 'qte', '1', '1')";
1086  $SQL_aacore[] = "INSERT INTO field (id, type, slice_id, name, input_pri, input_help, input_morehlp, input_default, required, feed, multiple, input_show_func, content_id, search_pri, search_type, search_help, search_before, search_more_help, search_show, search_ft_show, search_ft_default, alias1, alias1_func, alias1_help, alias2, alias2_func, alias2_help, alias3, alias3_func, alias3_help, input_before, aditional, content_edit, html_default, html_show, in_item_tbl, input_validate, input_insert_func, input_show, text_stored) VALUES( 'source_city', '', 'AA_Core_Fields..', 'Source city', '100', '', '${AA_DOC_URL}help.html', 'qte', '1', '0', '0', 'fld', '', '100', '', '', '', '', '1', '1', '1', '_#UNDEFINE', 'f_h', 'alias undefined - see Admin pages - Field setting', '', '', '', '', '', '', '', '', '0', '0', '0', '', 'text', 'qte', '1', '1')";
1087  $SQL_aacore[] = "INSERT INTO field (id, type, slice_id, name, input_pri, input_help, input_morehlp, input_default, required, feed, multiple, input_show_func, content_id, search_pri, search_type, search_help, search_before, search_more_help, search_show, search_ft_show, search_ft_default, alias1, alias1_func, alias1_help, alias2, alias2_func, alias2_help, alias3, alias3_func, alias3_help, input_before, aditional, content_edit, html_default, html_show, in_item_tbl, input_validate, input_insert_func, input_show, text_stored) VALUES( 'source_prov', '', 'AA_Core_Fields..', 'Source province', '100', '', '${AA_DOC_URL}help.html', 'qte', '1', '0', '0', 'fld', '', '100', '', '', '', '', '1', '1', '1', '_#UNDEFINE', 'f_h', 'alias undefined - see Admin pages - Field setting', '', '', '', '', '', '', '', '', '0', '0', '0', '', 'text', 'qte', '1', '1')";
1088  $SQL_aacore[] = "INSERT INTO field (id, type, slice_id, name, input_pri, input_help, input_morehlp, input_default, required, feed, multiple, input_show_func, content_id, search_pri, search_type, search_help, search_before, search_more_help, search_show, search_ft_show, search_ft_default, alias1, alias1_func, alias1_help, alias2, alias2_func, alias2_help, alias3, alias3_func, alias3_help, input_before, aditional, content_edit, html_default, html_show, in_item_tbl, input_validate, input_insert_func, input_show, text_stored) VALUES( 'source_cntry', '', 'AA_Core_Fields..', 'Source country', '100', '', '${AA_DOC_URL}help.html', 'qte', '1', '0', '0', 'fld', '', '100', '', '', '', '', '1', '1', '1', '_#UNDEFINE', 'f_h', 'alias undefined - see Admin pages - Field setting', '', '', '', '', '', '', '', '', '0', '0', '0', '', 'text', 'qte', '1', '1')";
1089  $SQL_aacore[] = "INSERT INTO field (id, type, slice_id, name, input_pri, input_help, input_morehlp, input_default, required, feed, multiple, input_show_func, content_id, search_pri, search_type, search_help, search_before, search_more_help, search_show, search_ft_show, search_ft_default, alias1, alias1_func, alias1_help, alias2, alias2_func, alias2_help, alias3, alias3_func, alias3_help, input_before, aditional, content_edit, html_default, html_show, in_item_tbl, input_validate, input_insert_func, input_show, text_stored) VALUES( 'time', '', 'AA_Core_Fields..', 'Time', '100', '', '${AA_DOC_URL}help.html', 'qte', '1', '0', '0', 'fld', '', '100', '', '', '', '', '1', '1', '1', '_#UNDEFINE', 'f_h', 'alias undefined - see Admin pages - Field setting', '', '', '', '', '', '', '', '', '0', '0', '0', '', 'text', 'qte', '1', '0')";
1090  $SQL_aacore[] = "INSERT INTO field (id, type, slice_id, name, input_pri, input_help, input_morehlp, input_default, required, feed, multiple, input_show_func, content_id, search_pri, search_type, search_help, search_before, search_more_help, search_show, search_ft_show, search_ft_default, alias1, alias1_func, alias1_help, alias2, alias2_func, alias2_help, alias3, alias3_func, alias3_help, input_before, aditional, content_edit, html_default, html_show, in_item_tbl, input_validate, input_insert_func, input_show, text_stored) VALUES( 'con_name', '', 'AA_Core_Fields..', 'Contact name', '100', '', '${AA_DOC_URL}help.html', 'qte', '1', '0', '0', 'fld', '', '100', '', '', '', '', '1', '1', '1', '_#UNDEFINE', 'f_h', 'alias undefined - see Admin pages - Field setting', '', '', '', '', '', '', '', '', '0', '0', '0', '', 'text', 'qte', '1', '1')";
1091  $SQL_aacore[] = "INSERT INTO field (id, type, slice_id, name, input_pri, input_help, input_morehlp, input_default, required, feed, multiple, input_show_func, content_id, search_pri, search_type, search_help, search_before, search_more_help, search_show, search_ft_show, search_ft_default, alias1, alias1_func, alias1_help, alias2, alias2_func, alias2_help, alias3, alias3_func, alias3_help, input_before, aditional, content_edit, html_default, html_show, in_item_tbl, input_validate, input_insert_func, input_show, text_stored) VALUES( 'con_email', '', 'AA_Core_Fields..', 'Contact e-mail', '100', '', '${AA_DOC_URL}help.html', 'qte', '1', '0', '0', 'fld', '', '100', '', '', '', '', '1', '1', '1', '_#UNDEFINE', 'f_h', 'alias undefined - see Admin pages - Field setting', '', '', '', '', '', '', '', '', '0', '0', '0', '', 'text', 'qte', '1', '1')";
1092  $SQL_aacore[] = "INSERT INTO field (id, type, slice_id, name, input_pri, input_help, input_morehlp, input_default, required, feed, multiple, input_show_func, content_id, search_pri, search_type, search_help, search_before, search_more_help, search_show, search_ft_show, search_ft_default, alias1, alias1_func, alias1_help, alias2, alias2_func, alias2_help, alias3, alias3_func, alias3_help, input_before, aditional, content_edit, html_default, html_show, in_item_tbl, input_validate, input_insert_func, input_show, text_stored) VALUES( 'con_phone', '', 'AA_Core_Fields..', 'Contact phone', '100', '', '${AA_DOC_URL}help.html', 'qte', '1', '0', '0', 'fld', '', '100', '', '', '', '', '1', '1', '1', '_#UNDEFINE', 'f_h', 'alias undefined - see Admin pages - Field setting', '', '', '', '', '', '', '', '', '0', '0', '0', '', 'text', 'qte', '1', '1')";
1093  $SQL_aacore[] = "INSERT INTO field (id, type, slice_id, name, input_pri, input_help, input_morehlp, input_default, required, feed, multiple, input_show_func, content_id, search_pri, search_type, search_help, search_before, search_more_help, search_show, search_ft_show, search_ft_default, alias1, alias1_func, alias1_help, alias2, alias2_func, alias2_help, alias3, alias3_func, alias3_help, input_before, aditional, content_edit, html_default, html_show, in_item_tbl, input_validate, input_insert_func, input_show, text_stored) VALUES( 'con_fax', '', 'AA_Core_Fields..', 'Contact fax', '100', '', '${AA_DOC_URL}help.html', 'qte', '1', '0', '0', 'fld', '', '100', '', '', '', '', '1', '1', '1', '_#UNDEFINE', 'f_h', 'alias undefined - see Admin pages - Field setting', '', '', '', '', '', '', '', '', '0', '0', '0', '', 'text', 'qte', '1', '1')";
1094  $SQL_aacore[] = "INSERT INTO field (id, type, slice_id, name, input_pri, input_help, input_morehlp, input_default, required, feed, multiple, input_show_func, content_id, search_pri, search_type, search_help, search_before, search_more_help, search_show, search_ft_show, search_ft_default, alias1, alias1_func, alias1_help, alias2, alias2_func, alias2_help, alias3, alias3_func, alias3_help, input_before, aditional, content_edit, html_default, html_show, in_item_tbl, input_validate, input_insert_func, input_show, text_stored) VALUES( 'loc_name', '', 'AA_Core_Fields..', 'Location name', '100', '', '${AA_DOC_URL}help.html', 'qte', '1', '0', '0', 'fld', '', '100', '', '', '', '', '1', '1', '1', '_#UNDEFINE', 'f_h', 'alias undefined - see Admin pages - Field setting', '', '', '', '', '', '', '', '', '0', '0', '0', '', 'text', 'qte', '1', '1')";
1095  $SQL_aacore[] = "INSERT INTO field (id, type, slice_id, name, input_pri, input_help, input_morehlp, input_default, required, feed, multiple, input_show_func, content_id, search_pri, search_type, search_help, search_before, search_more_help, search_show, search_ft_show, search_ft_default, alias1, alias1_func, alias1_help, alias2, alias2_func, alias2_help, alias3, alias3_func, alias3_help, input_before, aditional, content_edit, html_default, html_show, in_item_tbl, input_validate, input_insert_func, input_show, text_stored) VALUES( 'loc_address', '', 'AA_Core_Fields..', 'Location address', '100', '', '${AA_DOC_URL}help.html', 'qte', '1', '0', '0', 'fld', '', '100', '', '', '', '', '1', '1', '1', '_#UNDEFINE', 'f_h', 'alias undefined - see Admin pages - Field setting', '', '', '', '', '', '', '', '', '0', '0', '0', '', 'text', 'qte', '1', '1')";
1096  $SQL_aacore[] = "INSERT INTO field (id, type, slice_id, name, input_pri, input_help, input_morehlp, input_default, required, feed, multiple, input_show_func, content_id, search_pri, search_type, search_help, search_before, search_more_help, search_show, search_ft_show, search_ft_default, alias1, alias1_func, alias1_help, alias2, alias2_func, alias2_help, alias3, alias3_func, alias3_help, input_before, aditional, content_edit, html_default, html_show, in_item_tbl, input_validate, input_insert_func, input_show, text_stored) VALUES( 'loc_city', '', 'AA_Core_Fields..', 'Location city', '100', '', '${AA_DOC_URL}help.html', 'qte', '1', '0', '0', 'fld', '', '100', '', '', '', '', '1', '1', '1', '_#UNDEFINE', 'f_h', 'alias undefined - see Admin pages - Field setting', '', '', '', '', '', '', '', '', '0', '0', '0', '', 'text', 'qte', '1', '1')";
1097  $SQL_aacore[] = "INSERT INTO field (id, type, slice_id, name, input_pri, input_help, input_morehlp, input_default, required, feed, multiple, input_show_func, content_id, search_pri, search_type, search_help, search_before, search_more_help, search_show, search_ft_show, search_ft_default, alias1, alias1_func, alias1_help, alias2, alias2_func, alias2_help, alias3, alias3_func, alias3_help, input_before, aditional, content_edit, html_default, html_show, in_item_tbl, input_validate, input_insert_func, input_show, text_stored) VALUES( 'loc_prov', '', 'AA_Core_Fields..', 'Location province', '100', '', '${AA_DOC_URL}help.html', 'qte', '1', '0', '0', 'fld', '', '100', '', '', '', '', '1', '1', '1', '_#UNDEFINE', 'f_h', 'alias undefined - see Admin pages - Field setting', '', '', '', '', '', '', '', '', '0', '0', '0', '', 'text', 'qte', '1', '1')";
1098  $SQL_aacore[] = "INSERT INTO field (id, type, slice_id, name, input_pri, input_help, input_morehlp, input_default, required, feed, multiple, input_show_func, content_id, search_pri, search_type, search_help, search_before, search_more_help, search_show, search_ft_show, search_ft_default, alias1, alias1_func, alias1_help, alias2, alias2_func, alias2_help, alias3, alias3_func, alias3_help, input_before, aditional, content_edit, html_default, html_show, in_item_tbl, input_validate, input_insert_func, input_show, text_stored) VALUES( 'loc_cntry', '', 'AA_Core_Fields..', 'Location country', '100', '', '${AA_DOC_URL}help.html', 'qte', '1', '0', '0', 'fld', '', '100', '', '', '', '', '1', '1', '1', '_#UNDEFINE', 'f_h', 'alias undefined - see Admin pages - Field setting', '', '', '', '', '', '', '', '', '0', '0', '0', '', 'text', 'qte', '1', '1')";
1099  $SQL_aacore[] = "INSERT INTO field (id, type, slice_id, name, input_pri, input_help, input_morehlp, input_default, required, feed, multiple, input_show_func, content_id, search_pri, search_type, search_help, search_before, search_more_help, search_show, search_ft_show, search_ft_default, alias1, alias1_func, alias1_help, alias2, alias2_func, alias2_help, alias3, alias3_func, alias3_help, input_before, aditional, content_edit, html_default, html_show, in_item_tbl, input_validate, input_insert_func, input_show, text_stored) VALUES( 'start_date', '', 'AA_Core_Fields..', 'Start date', '100', '', '${AA_DOC_URL}help.html', 'now', '1', '0', '0', 'dte:1:10:1', '', '100', '', '', '', '', '1', '1', '1', '_#UNDEFINE', 'f_d:m/d/Y', 'alias undefined - see Admin pages - Field setting', '', '', '', '', '', '', '', '', '0', '0', '0', '', 'date', 'dte', '1', '0')";
1100  $SQL_aacore[] = "INSERT INTO field (id, type, slice_id, name, input_pri, input_help, input_morehlp, input_default, required, feed, multiple, input_show_func, content_id, search_pri, search_type, search_help, search_before, search_more_help, search_show, search_ft_show, search_ft_default, alias1, alias1_func, alias1_help, alias2, alias2_func, alias2_help, alias3, alias3_func, alias3_help, input_before, aditional, content_edit, html_default, html_show, in_item_tbl, input_validate, input_insert_func, input_show, text_stored) VALUES( 'end_date', '', 'AA_Core_Fields..', 'End date', '100', '', '${AA_DOC_URL}help.html', 'now', '1', '0', '0', 'dte:1:10:1', '', '100', '', '', '', '', '1', '1', '1', '_#UNDEFINE', 'f_d:m/d/Y', 'alias undefined - see Admin pages - Field setting', '', '', '', '', '', '', '', '', '0', '0', '0', '', 'date', 'dte', '1', '0')";
1101  $SQL_aacore[] = "INSERT INTO field (id, type, slice_id, name, input_pri, input_help, input_morehlp, input_default, required, feed, multiple, input_show_func, content_id, search_pri, search_type, search_help, search_before, search_more_help, search_show, search_ft_show, search_ft_default, alias1, alias1_func, alias1_help, alias2, alias2_func, alias2_help, alias3, alias3_func, alias3_help, input_before, aditional, content_edit, html_default, html_show, in_item_tbl, input_validate, input_insert_func, input_show, text_stored) VALUES( 'keywords', '', 'AA_Core_Fields..', 'Keywords', '100', '', '${AA_DOC_URL}help.html', 'qte', '1', '0', '0', 'fld', '', '100', '', '', '', '', '1', '1', '1', '_#UNDEFINE', 'f_h', 'alias undefined - see Admin pages - Field setting', '', '', '', '', '', '', '', '', '0', '0', '0', '', 'text', 'qte', '1', '1')";
1102  $SQL_aacore[] = "INSERT INTO field (id, type, slice_id, name, input_pri, input_help, input_morehlp, input_default, required, feed, multiple, input_show_func, content_id, search_pri, search_type, search_help, search_before, search_more_help, search_show, search_ft_show, search_ft_default, alias1, alias1_func, alias1_help, alias2, alias2_func, alias2_help, alias3, alias3_func, alias3_help, input_before, aditional, content_edit, html_default, html_show, in_item_tbl, input_validate, input_insert_func, input_show, text_stored) VALUES( 'subtitle', '', 'AA_Core_Fields..', 'Subtitle', '100', '', '${AA_DOC_URL}help.html', 'qte', '1', '0', '0', 'fld', '', '100', '', '', '', '', '1', '1', '1', '_#UNDEFINE', 'f_h', 'alias undefined - see Admin pages - Field setting', '', '', '', '', '', '', '', '', '0', '0', '0', '', 'text', 'qte', '1', '1')";
1103  $SQL_aacore[] = "INSERT INTO field (id, type, slice_id, name, input_pri, input_help, input_morehlp, input_default, required, feed, multiple, input_show_func, content_id, search_pri, search_type, search_help, search_before, search_more_help, search_show, search_ft_show, search_ft_default, alias1, alias1_func, alias1_help, alias2, alias2_func, alias2_help, alias3, alias3_func, alias3_help, input_before, aditional, content_edit, html_default, html_show, in_item_tbl, input_validate, input_insert_func, input_show, text_stored) VALUES( 'year', '', 'AA_Core_Fields..', 'Year', '100', '', '${AA_DOC_URL}help.html', 'qte', '1', '0', '0', 'fld', '', '100', '', '', '', '', '1', '1', '1', '_#UNDEFINE', 'f_h', 'alias undefined - see Admin pages - Field setting', '', '', '', '', '', '', '', '', '0', '0', '0', '', 'text', 'qte', '1', '1')";
1104  $SQL_aacore[] = "INSERT INTO field (id, type, slice_id, name, input_pri, input_help, input_morehlp, input_default, required, feed, multiple, input_show_func, content_id, search_pri, search_type, search_help, search_before, search_more_help, search_show, search_ft_show, search_ft_default, alias1, alias1_func, alias1_help, alias2, alias2_func, alias2_help, alias3, alias3_func, alias3_help, input_before, aditional, content_edit, html_default, html_show, in_item_tbl, input_validate, input_insert_func, input_show, text_stored) VALUES( 'number', '', 'AA_Core_Fields..', 'Number', '100', '', '${AA_DOC_URL}help.html', 'qte', '1', '0', '0', 'fld', '', '100', '', '', '', '', '1', '1', '1', '_#UNDEFINE', 'f_h', 'alias undefined - see Admin pages - Field setting', '', '', '', '', '', '', '', '', '0', '0', '0', '', 'number', 'num', '1', '1')";
1105  $SQL_aacore[] = "INSERT INTO field (id, type, slice_id, name, input_pri, input_help, input_morehlp, input_default, required, feed, multiple, input_show_func, content_id, search_pri, search_type, search_help, search_before, search_more_help, search_show, search_ft_show, search_ft_default, alias1, alias1_func, alias1_help, alias2, alias2_func, alias2_help, alias3, alias3_func, alias3_help, input_before, aditional, content_edit, html_default, html_show, in_item_tbl, input_validate, input_insert_func, input_show, text_stored) VALUES( 'page', '', 'AA_Core_Fields..', 'Page', '100', '', '${AA_DOC_URL}help.html', 'qte', '1', '0', '0', 'fld', '', '100', '', '', '', '', '1', '1', '1', '_#UNDEFINE', 'f_h', 'alias undefined - see Admin pages - Field setting', '', '', '', '', '', '', '', '', '0', '0', '0', '', 'number', 'num', '1', '1')";
1106  $SQL_aacore[] = "INSERT INTO field (id, type, slice_id, name, input_pri, input_help, input_morehlp, input_default, required, feed, multiple, input_show_func, content_id, search_pri, search_type, search_help, search_before, search_more_help, search_show, search_ft_show, search_ft_default, alias1, alias1_func, alias1_help, alias2, alias2_func, alias2_help, alias3, alias3_func, alias3_help, input_before, aditional, content_edit, html_default, html_show, in_item_tbl, input_validate, input_insert_func, input_show, text_stored) VALUES( 'price', '', 'AA_Core_Fields..', 'Price', '100', '', '${AA_DOC_URL}help.html', 'qte', '1', '0', '0', 'fld', '', '100', '', '', '', '', '1', '1', '1', '_#UNDEFINE', 'f_h', 'alias undefined - see Admin pages - Field setting', '', '', '', '', '', '', '', '', '0', '0', '0', '', 'number', 'num', '1', '1')";
1107  $SQL_aacore[] = "INSERT INTO field (id, type, slice_id, name, input_pri, input_help, input_morehlp, input_default, required, feed, multiple, input_show_func, content_id, search_pri, search_type, search_help, search_before, search_more_help, search_show, search_ft_show, search_ft_default, alias1, alias1_func, alias1_help, alias2, alias2_func, alias2_help, alias3, alias3_func, alias3_help, input_before, aditional, content_edit, html_default, html_show, in_item_tbl, input_validate, input_insert_func, input_show, text_stored) VALUES( 'organization', '', 'AA_Core_Fields..', 'Organization', '100', '', '${AA_DOC_URL}help.html', 'qte', '1', '0', '0', 'fld', '', '100', '', '', '', '', '1', '1', '1', '_#UNDEFINE', 'f_h', 'alias undefined - see Admin pages - Field setting', '', '', '', '', '', '', '', '', '0', '0', '0', '', 'text', 'qte', '1', '1')";
1108  $SQL_aacore[] = "INSERT INTO field (id, type, slice_id, name, input_pri, input_help, input_morehlp, input_default, required, feed, multiple, input_show_func, content_id, search_pri, search_type, search_help, search_before, search_more_help, search_show, search_ft_show, search_ft_default, alias1, alias1_func, alias1_help, alias2, alias2_func, alias2_help, alias3, alias3_func, alias3_help, input_before, aditional, content_edit, html_default, html_show, in_item_tbl, input_validate, input_insert_func, input_show, text_stored) VALUES( 'file', '', 'AA_Core_Fields..', 'File upload', '2222', 'Select file for upload', '${AA_DOC_URL}help.html', 'qte', '1', '0', '0', 'fil:*/*', '', '100', '', '', '', '', '1', '1', '1', '_#UNDEFINE', 'f_h', 'alias undefined - see Admin pages - Field setting', '', '', '', '', '', '', '', '', '0', '0', '0', '', 'text', 'fil', '1', '1')";
1109  $SQL_aacore[] = "INSERT INTO field (id, type, slice_id, name, input_pri, input_help, input_morehlp, input_default, required, feed, multiple, input_show_func, content_id, search_pri, search_type, search_help, search_before, search_more_help, search_show, search_ft_show, search_ft_default, alias1, alias1_func, alias1_help, alias2, alias2_func, alias2_help, alias3, alias3_func, alias3_help, input_before, aditional, content_edit, html_default, html_show, in_item_tbl, input_validate, input_insert_func, input_show, text_stored) VALUES( 'text', '', 'AA_Core_Fields..', 'Text', '100', '', '$AA_DOC_URL}help.html', 'qte', '1', '0', '0', 'fld', '', '100', '', '', '', '', '1', '1', '1', '_#UNDEFINE', 'f_h', 'alias undefined - see Admin pages - Field setting', '', '', '', '', '', '', '', '', '0', '0', '0', '', 'text', 'qte', '1', '1')";
1110  $SQL_aacore[] = "INSERT INTO field (id, type, slice_id, name, input_pri, input_help, input_morehlp, input_default, required, feed, multiple, input_show_func, content_id, search_pri, search_type, search_help, search_before, search_more_help, search_show, search_ft_show, search_ft_default, alias1, alias1_func, alias1_help, alias2, alias2_func, alias2_help, alias3, alias3_func, alias3_help, input_before, aditional, content_edit, html_default, html_show, in_item_tbl, input_validate, input_insert_func, input_show, text_stored) VALUES( 'unspecified', '', 'AA_Core_Fields..', 'Unspecified', '100', '', '$AA_DOC_URL}help.html', 'qte', '1', '0', '0', 'fld', '', '100', '', '', '', '', '1', '1', '1', '_#UNDEFINE', 'f_h', 'alias undefined - see Admin pages - Field setting', '', '', '', '', '', '', '', '', '0', '0', '0', '', 'text', 'qte', '1', '1')";
1111  $SQL_aacore[] = "INSERT INTO field (id, type, slice_id, name, input_pri, input_help, input_morehlp, input_default, required, feed, multiple, input_show_func, content_id, search_pri, search_type, search_help, search_before, search_more_help, search_show, search_ft_show, search_ft_default, alias1, alias1_func, alias1_help, alias2, alias2_func, alias2_help, alias3, alias3_func, alias3_help, input_before, aditional, content_edit, html_default, html_show, in_item_tbl, input_validate, input_insert_func, input_show, text_stored) VALUES( 'url', '', 'AA_Core_Fields..', 'URL', '2055', 'Internet URL address', '$AA_DOC_URL}help.html', 'qte', '0', '0', '0', 'fld', '', '100', '', '', '', '', '0', '0', '0', '_#UNDEFINE', 'f_i', 'alias undefined - see Admin pages - Field setting', '', '', '', '', '', '', '', '', '0', '0', '0', '', 'url', 'qte', '1', '1')";
1112  $SQL_aacore[] = "INSERT INTO field (id, type, slice_id, name, input_pri, input_help, input_morehlp, input_default, required, feed, multiple, input_show_func, content_id, search_pri, search_type, search_help, search_before, search_more_help, search_show, search_ft_show, search_ft_default, alias1, alias1_func, alias1_help, alias2, alias2_func, alias2_help, alias3, alias3_func, alias3_help, input_before, aditional, content_edit, html_default, html_show, in_item_tbl, input_validate, input_insert_func, input_show, text_stored) VALUES( 'switch', '', 'AA_Core_Fields..', 'Switch', '2055', '', '$AA_DOC_URL}help.html', 'qte', '0', '0', '0', 'chb', '', '100', '', '', '', '', '0', '0', '0', '_#UNDEFINE', 'f_i', 'alias undefined - see Admin pages - Field setting', '', '', '', '', '', '', '', '', '0', '0', '0', '', 'text', 'boo', '1', '0')";
1113  $SQL_aacore[] = "INSERT INTO field (id, type, slice_id, name, input_pri, input_help, input_morehlp, input_default, required, feed, multiple, input_show_func, content_id, search_pri, search_type, search_help, search_before, search_more_help, search_show, search_ft_show, search_ft_default, alias1, alias1_func, alias1_help, alias2, alias2_func, alias2_help, alias3, alias3_func, alias3_help, input_before, aditional, content_edit, html_default, html_show, in_item_tbl, input_validate, input_insert_func, input_show, text_stored) VALUES( 'password', '', 'AA_Core_Fields..', 'Password', '2055', 'Password which user must know if (s)he want to edit item on public site', '$AA_DOC_URL}help.html', 'qte', '0', '0', '0', 'fld', '', '100', '', '', '', '', '0', '0', '0', '_#UNDEFINE', 'f_i', 'alias undefined - see Admin pages - Field setting', '', '', '', '', '', '', '', '', '0', '0', '0', '', 'text', 'qte', '1', '1')";
1114  $SQL_aacore[] = "INSERT INTO field (id, type, slice_id, name, input_pri, input_help, input_morehlp, input_default, required, feed, multiple, input_show_func, content_id, search_pri, search_type, search_help, search_before, search_more_help, search_show, search_ft_show, search_ft_default, alias1, alias1_func, alias1_help, alias2, alias2_func, alias2_help, alias3, alias3_func, alias3_help, input_before, aditional, content_edit, html_default, html_show, in_item_tbl, input_validate, input_insert_func, input_show, text_stored) VALUES( 'relation', '', 'AA_Core_Fields..', 'Relation', '2055', '', '', 'txt:', '0', '0', '1', 'mse:#sLiCe-4e6577735f454e5f746d706c2e2e2e2e:', '', '100', '', '', '', '', '1', '1', '1', '_#UNDEFINE', 'f_v:vid=243&cmd[243]=x-243-_#this', 'alias undefined - see Admin pages - Field setting', '', '', '', '', '', '', '', '', '0', '0', '0', '', 'text', 'qte', '1', '1')";
1115  // Jakub added auth_group and mail_lists on 6.3.2003
1116  $SQL_aacore[] = "INSERT INTO field (id, type, slice_id, name, input_pri, input_help, input_morehlp, input_default, required, feed, multiple, input_show_func, content_id, search_pri, search_type, search_help, search_before, search_more_help, search_show, search_ft_show, search_ft_default, alias1, alias1_func, alias1_help, alias2, alias2_func, alias2_help, alias3, alias3_func, alias3_help, input_before, aditional, content_edit, html_default, html_show, in_item_tbl, input_validate, input_insert_func, input_show, text_stored) VALUES ('auth_group......', '', 'AA_Core_Fields..', 'Auth Group', 350, 'Sets permissions for web sections', '$AA_DOC_URL}help.html', 'txt:', 0, 0, 0, 'sel:', '', 100, '', '', '', '', 1, 1, 1, '_#AUTGROUP', 'f_h:', 'Auth Group (membership type)', '', 'f_0:', '', '', 'f_0:', '', '', '', 0, 0, 0, '', 'text:', 'qte:', 1, 1);";
1117  $SQL_aacore[] = "INSERT INTO field (id, type, slice_id, name, input_pri, input_help, input_morehlp, input_default, required, feed, multiple, input_show_func, content_id, search_pri, search_type, search_help, search_before, search_more_help, search_show, search_ft_show, search_ft_default, alias1, alias1_func, alias1_help, alias2, alias2_func, alias2_help, alias3, alias3_func, alias3_help, input_before, aditional, content_edit, html_default, html_show, in_item_tbl, input_validate, input_insert_func, input_show, text_stored) VALUES ('mail_lists......', '', 'AA_Core_Fields..', 'Mailing Lists', 1000, 'Select mailing lists which you read', '$AA_DOC_URL}help.html', 'txt:', 0, 0, 1, 'mch::3:1', '', 100, '', '', '', '', 1, 1, 1, '_#MAILLIST', 'f_h:;&nbsp', 'Mailing Lists', '', 'f_0:', '', '', 'f_0:', '', '', '', 0, 0, 0, '', 'text:', 'qte:', 1, 1);";
1118  // mimo added mlxctrl on 4.10.2004
1119  $SQL_aacore[] = "INSERT INTO field (id, type, slice_id, name, input_pri, input_help, input_morehlp, input_default, required, feed, multiple, input_show_func, content_id, search_pri, search_type, search_help, search_before, search_more_help, search_show, search_ft_show, search_ft_default, alias1, alias1_func, alias1_help, alias2, alias2_func, alias2_help, alias3, alias3_func, alias3_help, input_before, aditional, content_edit, html_default, html_show, in_item_tbl, input_validate, input_insert_func, input_show, text_stored) VALUES ('mlxctrl', '', 'AA_Core_Fields..', 'MLX Control', 6000, '', 'http://mimo.gn.apc.org/mlx/', 'txt:', 1, 0, 1, 'fld', '', 100, '', '', '', '', 1, 1, 1, '', '', '', '', '', '', '', '', '', '', '', 0, 0, 0, '', 'text:', 'qte:', 0, 1);";
1120  //mimo added 3/2/2005
1121  $SQL_aacore[] = "INSERT INTO field (id, type, slice_id, name, input_pri, input_help, input_morehlp, input_default, required, feed, multiple, input_show_func, content_id, search_pri, search_type, search_help, search_before, search_more_help, search_show, search_ft_show, search_ft_default, alias1, alias1_func, alias1_help, alias2, alias2_func, alias2_help, alias3, alias3_func, alias3_help, input_before, aditional, content_edit, html_default, html_show, in_item_tbl, input_validate, input_insert_func, input_show, text_stored) VALUES( 'integer', '', 'AA_Core_Fields..', 'Integer', '100', '', '$AA_DOC_URL}help.html', 'qte', '1', '0', '0', 'fld', '', '100', '', '', '', '', '1', '1', '1', '_#UNDEFINE', 'f_h', 'alias undefined - see Admin pages - Field setting', '', '', '', '', '', '', '', '', '0', '0', '0', '', 'number', 'num', '1', '0')";
1122  
1123  
1124  // News EN slice template
1125  $SQL_templates[] = "DELETE FROM field WHERE slice_id='News_EN_tmpl....'";
1126  $SQL_templates[] = "REPLACE INTO module (id, name, deleted, type, slice_url, lang_file, created_at, created_by, owner, flag) VALUES ('News_EN_tmpl....', 'News (EN) Template', 0, 'S', '', 'en_news_lang.php3', 975157733, '', 'AA_Core.........', 0)";
1127  $SQL_templates[] = "REPLACE INTO slice (id, name, owner, deleted, created_by, created_at, export_to_all, type, template, fulltext_format_top, fulltext_format, fulltext_format_bottom, odd_row_format, even_row_format, even_odd_differ, compact_top, compact_bottom, category_top, category_format, category_bottom, category_sort, slice_url, d_listlen, lang_file, fulltext_remove, compact_remove, email_sub_enable, exclude_from_dir, notify_sh_offer, notify_sh_accept, notify_sh_remove, notify_holding_item_s, notify_holding_item_b, notify_holding_item_edit_s, notify_holding_item_edit_b, notify_active_item_edit_s, notify_active_item_edit_b, notify_active_item_s, notify_active_item_b, noitem_msg, admin_format_top, admin_format, admin_format_bottom, admin_remove, permit_anonymous_post, permit_offline_fill, aditional, flag, vid, gb_direction, group_by, gb_header, gb_case, javascript) VALUES( 'News_EN_tmpl....', 'News (EN) Template', 'AA_Core.........', '0', '', '$now', '0', 'News_EN_tmpl....', '1', '', '<BR><FONT SIZE=+2 COLOR=blue>_#HEADLINE</FONT> <BR><B>_#PUB_DATE</B> <BR><img src=\"_#IMAGESRC\" width=\"_#IMGWIDTH\" height=\"_#IMG_HGHT\">_#FULLTEXT ', '','<font face=Arial color=#808080 size=-2>_#PUB_DATE - </font><font color=#FF0000><strong><a href=_#HDLN_URL>_#HEADLINE</a></strong></font><font color=#808080 size=-1><br>_#PLACE###(_#LINK_SRC) - </font><font color=black size=-1>_#ABSTRACT<br></font><br>', '', '0', '<br>', '<br>', '', '<p>_#CATEGORY</p>', '', '1', '$AA_HTTP_DOMAIN', '10000', 'en_news_lang.php3', '()', '()', '1', '0', '', '', '', '', '', '', '', '', '', '', '', 'No item found', '<tr class=tablename><td width=30>&nbsp;</td><td>Click on Headline to Edit</td><td>Date</td></tr>', '<tr class=tabtxt><td width=30><input type=checkbox name=\"chb[x_#ITEM_ID#]\" value=\"1\"></td><td><a href=\"_#EDITITEM\">_#HEADLINE</a></td><td>_#PUB_DATE</td></tr>', '', '', '1', '1', '', '0', '0', NULL, NULL, NULL, NULL,'')";
1128  $SQL_templates[] = "INSERT INTO field (id, type, slice_id, name, input_pri, input_help, input_morehlp, input_default, required, feed, multiple, input_show_func, content_id, search_pri, search_type, search_help, search_before, search_more_help, search_show, search_ft_show, search_ft_default, alias1, alias1_func, alias1_help, alias2, alias2_func, alias2_help, alias3, alias3_func, alias3_help, input_before, aditional, content_edit, html_default, html_show, in_item_tbl, input_validate, input_insert_func, input_show, text_stored) VALUES( 'abstract........', '', 'News_EN_tmpl....', 'Abstract', '150', 'Abstract', '$AA_DOC_URL}help.html', 'qte', '0', '0', '0', 'txt:8', '', '100', '', '', '', '', '0', '1', '1', '_#ABSTRACT', 'f_t', 'alias for abstract', '_#RSS_IT_D', 'f_r:256', 'Abstract for RSS', '', '', '', '', '', '0', '0', '1', '', 'text', 'qte', '1', '1')";
1129  $SQL_templates[] = "INSERT INTO field (id, type, slice_id, name, input_pri, input_help, input_morehlp, input_default, required, feed, multiple, input_show_func, content_id, search_pri, search_type, search_help, search_before, search_more_help, search_show, search_ft_show, search_ft_default, alias1, alias1_func, alias1_help, alias2, alias2_func, alias2_help, alias3, alias3_func, alias3_help, input_before, aditional, content_edit, html_default, html_show, in_item_tbl, input_validate, input_insert_func, input_show, text_stored) VALUES( 'category........', '', 'News_EN_tmpl....', 'Category', '500', 'Category', '$AA_DOC_URL}help.html', 'txt:', '0', '0', '0', 'sel:lt_apcCategories', '', '100', '', '', '', '', '1', '1', '1', '_#CATEGORY', 'f_h', 'alias for Item Category', '', '', '', '', '', '', '', '', '0', '0', '0', '', 'text', 'qte', '0', '1')";
1130  $SQL_templates[] = "INSERT INTO field (id, type, slice_id, name, input_pri, input_help, input_morehlp, input_default, required, feed, multiple, input_show_func, content_id, search_pri, search_type, search_help, search_before, search_more_help, search_show, search_ft_show, search_ft_default, alias1, alias1_func, alias1_help, alias2, alias2_func, alias2_help, alias3, alias3_func, alias3_help, input_before, aditional, content_edit, html_default, html_show, in_item_tbl, input_validate, input_insert_func, input_show, text_stored) VALUES( 'cp_code.........', '', 'News_EN_tmpl....', 'Code Page', '1800', 'Language Code Page', '$AA_DOC_URL}help.html', 'txt:iso8859-1', '0', '0', '0', 'sel:lt_codepages', '', '100', '', '', '', '', '0', '0', '0', '', '', '', '', '', '', '', '', '', '', '', '0', '0', '0', '', 'text', 'qte', '0', '1')";
1131  $SQL_templates[] = "INSERT INTO field (id, type, slice_id, name, input_pri, input_help, input_morehlp, input_default, required, feed, multiple, input_show_func, content_id, search_pri, search_type, search_help, search_before, search_more_help, search_show, search_ft_show, search_ft_default, alias1, alias1_func, alias1_help, alias2, alias2_func, alias2_help, alias3, alias3_func, alias3_help, input_before, aditional, content_edit, html_default, html_show, in_item_tbl, input_validate, input_insert_func, input_show, text_stored) VALUES( 'created_by......', '', 'News_EN_tmpl....', 'Author', '470', 'Identification of creator', '$AA_DOC_URL}help.html', 'qte', '0', '0', '0', 'fld', '', '100', '', '', '', '', '0', '0', '0', '_#CREATED#', 'f_h', 'alias for Written By', '', '', '', '', '', '', '', '', '0', '0', '0', '', 'text', 'qte', '1', '1')";
1132  $SQL_templates[] = "INSERT INTO field (id, type, slice_id, name, input_pri, input_help, input_morehlp, input_default, required, feed, multiple, input_show_func, content_id, search_pri, search_type, search_help, search_before, search_more_help, search_show, search_ft_show, search_ft_default, alias1, alias1_func, alias1_help, alias2, alias2_func, alias2_help, alias3, alias3_func, alias3_help, input_before, aditional, content_edit, html_default, html_show, in_item_tbl, input_validate, input_insert_func, input_show, text_stored) VALUES( 'edited_by.......', '', 'News_EN_tmpl....', 'Edited by', '5030', 'Identification of last editor', '$AA_DOC_URL}help.html', 'qte', '0', '0', '0', 'nul', '', '100', '', '', '', '', '0', '0', '0', '_#EDITEDBY', 'f_h', 'alias for Last edited By', '', '', '', '', '', '', '', '', '0', '0', '0', 'edited_by', 'text', 'uid', '0', '1')";
1133  $SQL_templates[] = "INSERT INTO field (id, type, slice_id, name, input_pri, input_help, input_morehlp, input_default, required, feed, multiple, input_show_func, content_id, search_pri, search_type, search_help, search_before, search_more_help, search_show, search_ft_show, search_ft_default, alias1, alias1_func, alias1_help, alias2, alias2_func, alias2_help, alias3, alias3_func, alias3_help, input_before, aditional, content_edit, html_default, html_show, in_item_tbl, input_validate, input_insert_func, input_show, text_stored) VALUES( 'edit_note.......', '', 'News_EN_tmpl....', 'Editor`s note', '2355', 'Here you can write your note (not displayed on the web)', '$AA_DOC_URL}help.html', 'qte', '0', '0', '0', 'txt', '', '100', '', '', '', '', '0', '0', '0', '_#EDITNOTE', 'f_h', 'alias for Editor`s note', '', '', '', '', '', '', '', '', '0', '0', '0', '', 'text', 'qte', '1', '1')";
1134  $SQL_templates[] = "INSERT INTO field (id, type, slice_id, name, input_pri, input_help, input_morehlp, input_default, required, feed, multiple, input_show_func, content_id, search_pri, search_type, search_help, search_before, search_more_help, search_show, search_ft_show, search_ft_default, alias1, alias1_func, alias1_help, alias2, alias2_func, alias2_help, alias3, alias3_func, alias3_help, input_before, aditional, content_edit, html_default, html_show, in_item_tbl, input_validate, input_insert_func, input_show, text_stored) VALUES( 'expiry_date.....', '', 'News_EN_tmpl....', 'Expiry Date', '955', 'Date when the news expires', '$AA_DOC_URL}help.html', 'dte:2000', '1', '0', '0', 'dte:1:10:1', '', '100', '', '', '', '', '0', '0', '0', '_#EXP_DATE', 'f_d:m/d/Y', 'alias for Expiry Date', '', '', '', '', '', '', '', '', '0', '0', '0', 'expiry_date', 'date', 'dte', '1', '0')";
1135  $SQL_templates[] = "INSERT INTO field (id, type, slice_id, name, input_pri, input_help, input_morehlp, input_default, required, feed, multiple, input_show_func, content_id, search_pri, search_type, search_help, search_before, search_more_help, search_show, search_ft_show, search_ft_default, alias1, alias1_func, alias1_help, alias2, alias2_func, alias2_help, alias3, alias3_func, alias3_help, input_before, aditional, content_edit, html_default, html_show, in_item_tbl, input_validate, input_insert_func, input_show, text_stored) VALUES( 'e_posted_by.....', '', 'News_EN_tmpl....', 'Author`s e-mail', '480', 'E-mail to author', '$AA_DOC_URL}help.html', 'qte', '0', '0', '0', 'fld', '', '100', '', '', '', '', '0', '0', '0', '_#E_POSTED', 'f_h', 'alias for Author`s e-mail', '', '', '', '', '', '', '', '', '0', '0', '0', '', 'email', 'qte', '1', '1')";
1136  $SQL_templates[] = "INSERT INTO field (id, type, slice_id, name, input_pri, input_help, input_morehlp, input_default, required, feed, multiple, input_show_func, content_id, search_pri, search_type, search_help, search_before, search_more_help, search_show, search_ft_show, search_ft_default, alias1, alias1_func, alias1_help, alias2, alias2_func, alias2_help, alias3, alias3_func, alias3_help, input_before, aditional, content_edit, html_default, html_show, in_item_tbl, input_validate, input_insert_func, input_show, text_stored) VALUES( 'full_text.......', '', 'News_EN_tmpl....', 'Fulltext', '200', 'Fulltext', '$AA_DOC_URL}help.html', 'qte', '0', '0', '0', 'txt:8', '', '100', '', '', '', '', '0', '1', '1', '_#FULLTEXT', 'f_t', 'alias for Fulltext<br>(HTML tags are striped or not depending on HTML formated item setting)', '', '', '', '', '', '', '', '', '0', '0', '1', '', 'text', 'qte', '1', '1')";
1137  $SQL_templates[] = "INSERT INTO field (id, type, slice_id, name, input_pri, input_help, input_morehlp, input_default, required, feed, multiple, input_show_func, content_id, search_pri, search_type, search_help, search_before, search_more_help, search_show, search_ft_show, search_ft_default, alias1, alias1_func, alias1_help, alias2, alias2_func, alias2_help, alias3, alias3_func, alias3_help, input_before, aditional, content_edit, html_default, html_show, in_item_tbl, input_validate, input_insert_func, input_show, text_stored) VALUES( 'headline........', '', 'News_EN_tmpl....', 'Headline', '100', 'Headline of the news', '$AA_DOC_URL}help.html', 'qte', '1', '0', '0', 'fld', '', '100', '', '', '', '', '1', '1', '1', '_#HEADLINE', 'f_h', 'alias for Item Headline', '_#RSS_IT_T', 'f_r:100', 'item title, for RSS', '', '', '', '', '', '0', '0', '0', '', 'text', 'qte', '1', '1')";
1138  $SQL_templates[] = "INSERT INTO field (id, type, slice_id, name, input_pri, input_help, input_morehlp, input_default, required, feed, multiple, input_show_func, content_id, search_pri, search_type, search_help, search_before, search_more_help, search_show, search_ft_show, search_ft_default, alias1, alias1_func, alias1_help, alias2, alias2_func, alias2_help, alias3, alias3_func, alias3_help, input_before, aditional, content_edit, html_default, html_show, in_item_tbl, input_validate, input_insert_func, input_show, text_stored) VALUES( 'highlight.......', '', 'News_EN_tmpl....', 'Highlight', '450', 'Interesting news - shown on homepage', '$AA_DOC_URL}help.html', 'qte', '0', '0', '0', 'chb', '', '100', '', '', '', '', '0', '0', '0', '', '', '', '', '', '', '', '', '', '', '', '0', '0', '0', 'highlight', 'bool', 'boo', '1', '0')";
1139  $SQL_templates[] = "INSERT INTO field (id, type, slice_id, name, input_pri, input_help, input_morehlp, input_default, required, feed, multiple, input_show_func, content_id, search_pri, search_type, search_help, search_before, search_more_help, search_show, search_ft_show, search_ft_default, alias1, alias1_func, alias1_help, alias2, alias2_func, alias2_help, alias3, alias3_func, alias3_help, input_before, aditional, content_edit, html_default, html_show, in_item_tbl, input_validate, input_insert_func, input_show, text_stored) VALUES( 'hl_href.........', '', 'News_EN_tmpl....', 'Headline URL', '400', 'Link for the headline (for external links)', '$AA_DOC_URL}help.html', 'qte', '0', '0', '0', 'fld', '', '100', '', '', '', '', '1', '1', '1', '_#HDLN_URL', 'f_f:link_only.......', 'alias for News URL<br>(substituted by External news link URL(if External news is checked) or link to Fulltext)<div class=example><em>Example: </em>&lt;a href=_#HDLN_URL&gt;_#HEADLINE&lt;/a&gt;</div>', '_#RSS_IT_L', 'f_r:link_only.......', 'item link, for RSS', '', '', '', '', '', '0', '0', '0', '', 'url', 'qte', '1', '1')";
1140  $SQL_templates[] = "INSERT INTO field (id, type, slice_id, name, input_pri, input_help, input_morehlp, input_default, required, feed, multiple, input_show_func, content_id, search_pri, search_type, search_help, search_before, search_more_help, search_show, search_ft_show, search_ft_default, alias1, alias1_func, alias1_help, alias2, alias2_func, alias2_help, alias3, alias3_func, alias3_help, input_before, aditional, content_edit, html_default, html_show, in_item_tbl, input_validate, input_insert_func, input_show, text_stored) VALUES( 'img_height......', '', 'News_EN_tmpl....', 'Image height', '2300', 'Height of image (like: 100, 50%)', '$AA_DOC_URL}help.html', 'qte', '0', '0', '0', 'fld', '', '100', '', '', '', '', '0', '0', '0', '_#IMG_HGHT', 'f_g', 'alias for Image Height<br>(if no height defined, program tries to remove <em>height=</em> atribute from format string<div class=example><em>Example: </em>&lt;img src=\"_#IMAGESRC\" width=_#IMGWIDTH height=_#IMG_HGHT&gt;</div>', '', '', '', '', '', '', '', '', '0', '0', '0', '', 'text', 'qte', '1', '1')";
1141  $SQL_templates[] = "INSERT INTO field (id, type, slice_id, name, input_pri, input_help, input_morehlp, input_default, required, feed, multiple, input_show_func, content_id, search_pri, search_type, search_help, search_before, search_more_help, search_show, search_ft_show, search_ft_default, alias1, alias1_func, alias1_help, alias2, alias2_func, alias2_help, alias3, alias3_func, alias3_help, input_before, aditional, content_edit, html_default, html_show, in_item_tbl, input_validate, input_insert_func, input_show, text_stored) VALUES( 'img_src.........', '', 'News_EN_tmpl....', 'Image URL', '2100', 'URL of the image', '$AA_DOC_URL}help.html', 'qte', '0', '0', '0', 'fld', '', '100', '', '', '', '', '0', '0', '0', '_#IMAGESRC', 'f_i', 'alias for Image URL<br>(if there is no image url defined in database, default url is used instead (see NO_PICTURE_URL constant in en_*_lang.php3 file))<div class=example><em>Example: </em>&lt;img src=\"_#IMAGESRC\"&gt;</div>', '', '', '', '', '', '', '', '', '0', '0', '0', '', 'url', 'qte', '1', '1')";
1142  $SQL_templates[] = "INSERT INTO field (id, type, slice_id, name, input_pri, input_help, input_morehlp, input_default, required, feed, multiple, input_show_func, content_id, search_pri, search_type, search_help, search_before, search_more_help, search_show, search_ft_show, search_ft_default, alias1, alias1_func, alias1_help, alias2, alias2_func, alias2_help, alias3, alias3_func, alias3_help, input_before, aditional, content_edit, html_default, html_show, in_item_tbl, input_validate, input_insert_func, input_show, text_stored) VALUES( 'img_width.......', '', 'News_EN_tmpl....', 'Image width', '2200', 'Width of image (like: 100, 50%)', '$AA_DOC_URL}help.html', 'qte', '0', '0', '0', 'fld', '', '100', '', '', '', '', '0', '0', '0', '_#IMGWIDTH', 'f_w', 'alias for Image Width<br>(if no width defined, program tries to remove <em>width=</em> atribute from format string<div class=example><em>Example: </em>&lt;img src=\"_#IMAGESRC\" width=_#IMGWIDTH height=_#IMG_HGHT&gt;</div>', '', '', '', '', '', '', '', '', '0', '0', '0', '', 'text', 'qte', '1', '1')";
1143  $SQL_templates[] = "INSERT INTO field (id, type, slice_id, name, input_pri, input_help, input_morehlp, input_default, required, feed, multiple, input_show_func, content_id, search_pri, search_type, search_help, search_before, search_more_help, search_show, search_ft_show, search_ft_default, alias1, alias1_func, alias1_help, alias2, alias2_func, alias2_help, alias3, alias3_func, alias3_help, input_before, aditional, content_edit, html_default, html_show, in_item_tbl, input_validate, input_insert_func, input_show, text_stored) VALUES( 'lang_code.......', '', 'News_EN_tmpl....', 'Language Code', '1700', 'Code of used language', '$AA_DOC_URL}help.html', 'txt:EN', '0', '0', '0', 'sel:lt_languages', '', '100', '', '', '', '', '0', '0', '0', '', '', '', '', '', '', '', '', '', '', '', '0', '0', '0', '', 'text', 'qte', '0', '1')";
1144  $SQL_templates[] = "INSERT INTO field (id, type, slice_id, name, input_pri, input_help, input_morehlp, input_default, required, feed, multiple, input_show_func, content_id, search_pri, search_type, search_help, search_before, search_more_help, search_show, search_ft_show, search_ft_default, alias1, alias1_func, alias1_help, alias2, alias2_func, alias2_help, alias3, alias3_func, alias3_help, input_before, aditional, content_edit, html_default, html_show, in_item_tbl, input_validate, input_insert_func, input_show, text_stored) VALUES( 'last_edit.......', '', 'News_EN_tmpl....', 'Last Edit', '5040', 'Date of last edit', '$AA_DOC_URL}help.html', 'now:', '0', '0', '0', 'dte:1:10:1', '', '100', '', '', '', '', '0', '0', '0', '_#LASTEDIT', 'f_d:m/d/Y', 'alias for Last Edit', '', '', '', '', '', '', '', '', '0', '0', '0', 'last_edit', 'date', 'now', '0', '0')";
1145  $SQL_templates[] = "INSERT INTO field (id, type, slice_id, name, input_pri, input_help, input_morehlp, input_default, required, feed, multiple, input_show_func, content_id, search_pri, search_type, search_help, search_before, search_more_help, search_show, search_ft_show, search_ft_default, alias1, alias1_func, alias1_help, alias2, alias2_func, alias2_help, alias3, alias3_func, alias3_help, input_before, aditional, content_edit, html_default, html_show, in_item_tbl, input_validate, input_insert_func, input_show, text_stored) VALUES( 'link_only.......', '', 'News_EN_tmpl....', 'External news', '300', 'Use External link instead of fulltext?', '$AA_DOC_URL}help.html', 'qte', '0', '0', '0', 'chb', '', '100', '', '', '', '', '0', '0', '1', '', '', '', '', '', '', '', '', '', '', '', '0', '0', '0', '', 'bool', 'boo', '1', '0')";
1146  $SQL_templates[] = "INSERT INTO field (id, type, slice_id, name, input_pri, input_help, input_morehlp, input_default, required, feed, multiple, input_show_func, content_id, search_pri, search_type, search_help, search_before, search_more_help, search_show, search_ft_show, search_ft_default, alias1, alias1_func, alias1_help, alias2, alias2_func, alias2_help, alias3, alias3_func, alias3_help, input_before, aditional, content_edit, html_default, html_show, in_item_tbl, input_validate, input_insert_func, input_show, text_stored) VALUES( 'place...........', '', 'News_EN_tmpl....', 'Locality', '630', 'News locality', '$AA_DOC_URL}help.html', 'qte', '0', '0', '0', 'fld', '', '100', '', '', '', '', '0', '0', '0', '_#PLACE###', 'f_h', 'alias for Locality', '', '', '', '', '', '', '', '', '0', '0', '0', '', 'text', 'qte', '1', '1')";
1147  $SQL_templates[] = "INSERT INTO field (id, type, slice_id, name, input_pri, input_help, input_morehlp, input_default, required, feed, multiple, input_show_func, content_id, search_pri, search_type, search_help, search_before, search_more_help, search_show, search_ft_show, search_ft_default, alias1, alias1_func, alias1_help, alias2, alias2_func, alias2_help, alias3, alias3_func, alias3_help, input_before, aditional, content_edit, html_default, html_show, in_item_tbl, input_validate, input_insert_func, input_show, text_stored) VALUES( 'posted_by.......', '', 'News_EN_tmpl....', 'Posted by', '5035', 'Identification of author', '$AA_DOC_URL}help.html', 'qte', '0', '0', '0', 'fld', '', '100', '', '', '', '', '0', '0', '0', '_#POSTEDBY', 'f_h', 'alias for Author', '', '', '', '', '', '', '', '', '0', '0', '0', 'posted_by', 'text', 'uid', '0', '1')";
1148  $SQL_templates[] = "INSERT INTO field (id, type, slice_id, name, input_pri, input_help, input_morehlp, input_default, required, feed, multiple, input_show_func, content_id, search_pri, search_type, search_help, search_before, search_more_help, search_show, search_ft_show, search_ft_default, alias1, alias1_func, alias1_help, alias2, alias2_func, alias2_help, alias3, alias3_func, alias3_help, input_before, aditional, content_edit, html_default, html_show, in_item_tbl, input_validate, input_insert_func, input_show, text_stored) VALUES( 'post_date.......', '', 'News_EN_tmpl....', 'Post Date', '5005', 'Date of posting this news', '$AA_DOC_URL}help.html',              'now:', '1', '0', '0', 'nul', '', '100', '', '', '', '', '0', '0', '0', '_#POSTDATE', 'f_d:m/d/Y', 'alias for Post Date', '', '', '', '', '', '', '', '', '0', '0', '0', 'post_date', 'date', 'now', '0', '0')";
1149  $SQL_templates[] = "INSERT INTO field (id, type, slice_id, name, input_pri, input_help, input_morehlp, input_default, required, feed, multiple, input_show_func, content_id, search_pri, search_type, search_help, search_before, search_more_help, search_show, search_ft_show, search_ft_default, alias1, alias1_func, alias1_help, alias2, alias2_func, alias2_help, alias3, alias3_func, alias3_help, input_before, aditional, content_edit, html_default, html_show, in_item_tbl, input_validate, input_insert_func, input_show, text_stored) VALUES( 'publish_date....', '', 'News_EN_tmpl....', 'Publish Date', '900', 'Date when the news will be published', '$AA_DOC_URL}help.html', 'now:', '1', '0', '0', 'dte:1:10:1', '', '100', '', '', '', '', '0', '0', '0', '_#PUB_DATE', 'f_d:m/d/Y', 'alias for Publish Date', '', '', '', '', '', '', '', '', '0', '0', '0', 'publish_date', 'date', 'dte', '1', '0')";
1150  $SQL_templates[] = "INSERT INTO field (id, type, slice_id, name, input_pri, input_help, input_morehlp, input_default, required, feed, multiple, input_show_func, content_id, search_pri, search_type, search_help, search_before, search_more_help, search_show, search_ft_show, search_ft_default, alias1, alias1_func, alias1_help, alias2, alias2_func, alias2_help, alias3, alias3_func, alias3_help, input_before, aditional, content_edit, html_default, html_show, in_item_tbl, input_validate, input_insert_func, input_show, text_stored) VALUES( 'source..........', '', 'News_EN_tmpl....', 'Source', '600', 'Source of the news', '$AA_DOC_URL}help.html',                         'qte', '0', '0', '0', 'fld', '', '100', '', '', '', '', '0', '0', '0', '_#SOURCE##', 'f_h', 'alias for Source Name<br>(see _#LINK_SRC for text source link)', '_#SRC_URL#', 'f_l:source_href.....', 'alias for Source with URL<br>(if there is no source url defined in database, the source is displayed as link)', '', '', '', '', '', '0', '0', '0', '', 'text', 'qte', '1', '1')";
1151  $SQL_templates[] = "INSERT INTO field (id, type, slice_id, name, input_pri, input_help, input_morehlp, input_default, required, feed, multiple, input_show_func, content_id, search_pri, search_type, search_help, search_before, search_more_help, search_show, search_ft_show, search_ft_default, alias1, alias1_func, alias1_help, alias2, alias2_func, alias2_help, alias3, alias3_func, alias3_help, input_before, aditional, content_edit, html_default, html_show, in_item_tbl, input_validate, input_insert_func, input_show, text_stored) VALUES( 'source_href.....', '', 'News_EN_tmpl....', 'Source URL', '610', 'URL of the source', '$AA_DOC_URL}help.html',                      'qte', '0', '0', '0', 'fld', '', '100', '', '', '', '', '1', '1', '1', '_#LINK_SRC', 'f_l', 'alias for Source Name with link.<br>(substituted by &lt;a href=\"_#SRC_URL#\"&gt;_#SOURCE##&lt;/a&gt; if Source URL defined, otherwise _#SOURCE## only)', '', '', '', '', '', '', '', '', '0', '0', '0', '', 'url', 'qte', '1', '1')";
1152  $SQL_templates[] = "INSERT INTO field (id, type, slice_id, name, input_pri, input_help, input_morehlp, input_default, required, feed, multiple, input_show_func, content_id, search_pri, search_type, search_help, search_before, search_more_help, search_show, search_ft_show, search_ft_default, alias1, alias1_func, alias1_help, alias2, alias2_func, alias2_help, alias3, alias3_func, alias3_help, input_before, aditional, content_edit, html_default, html_show, in_item_tbl, input_validate, input_insert_func, input_show, text_stored) VALUES( 'status_code.....', '', 'News_EN_tmpl....', 'Status Code', '5020', 'Select in which bin should the news appear', '$AA_DOC_URL}help.html', 'qte:1', '1', '0', '0', 'sel:AA_Core_Bins....', '', '100', '', '', '', '', '0', '0', '0', '', '', '', '', '', '', '', '', '', '', '', '0', '0', '0', 'status_code', 'number', 'num', '0', '0')";
1153  $SQL_templates[] = "INSERT INTO field (id, type, slice_id, name, input_pri, input_help, input_morehlp, input_default, required, feed, multiple, input_show_func, content_id, search_pri, search_type, search_help, search_before, search_more_help, search_show, search_ft_show, search_ft_default, alias1, alias1_func, alias1_help, alias2, alias2_func, alias2_help, alias3, alias3_func, alias3_help, input_before, aditional, content_edit, html_default, html_show, in_item_tbl, input_validate, input_insert_func, input_show, text_stored) VALUES( 'slice_id........', '', 'News_EN_tmpl....', 'Slice', '5000', 'Internal field - do not change', '$AA_DOC_URL}help.html', 'qte:1', '1', '0', '0', 'fld', '', '100', '', '', '', '', '0', '0', '0', '_#SLICE_ID', 'f_n:slice_id........', 'alias for id of slice', '', '', '', '', '', '', '', '', '0', '0', '0', 'slice_id', '', 'nul', '0', '1')";
1154  $SQL_templates[] = "INSERT INTO field (id, type, slice_id, name, input_pri, input_help, input_morehlp, input_default, required, feed, multiple, input_show_func, content_id, search_pri, search_type, search_help, search_before, search_more_help, search_show, search_ft_show, search_ft_default, alias1, alias1_func, alias1_help, alias2, alias2_func, alias2_help, alias3, alias3_func, alias3_help, input_before, aditional, content_edit, html_default, html_show, in_item_tbl, input_validate, input_insert_func, input_show, text_stored) VALUES( 'display_count...', '', 'News_EN_tmpl....', 'Displayed Times', '5050', 'Internal field - do not change', '$AA_DOC_URL}help.html', 'qte:0', '1', '1', '0', 'fld', '', '100', '', '', '', '', '0', '0', '0', '_#DISPL_NO', 'f_h', 'alias for number of displaying of this item', '', '', '', '', '', '', '', '', '0', '0', '0', 'display_count', '', 'nul', '0', '1')";
1155  $SQL_templates[] = "INSERT INTO field (id, type, slice_id, name, input_pri, input_help, input_morehlp, input_default, required, feed, multiple, input_show_func, content_id, search_pri, search_type, search_help, search_before, search_more_help, search_show, search_ft_show, search_ft_default, alias1, alias1_func, alias1_help, alias2, alias2_func, alias2_help, alias3, alias3_func, alias3_help, input_before, aditional, content_edit, html_default, html_show, in_item_tbl, input_validate, input_insert_func, input_show, text_stored) VALUES( 'disc_count......', '', 'News_EN_tmpl....', 'Comments Count', '5060', 'Internal field - do not change', '$AA_DOC_URL}help.html', 'qte:0', '1', '1', '0', 'fld', '', '100', '', '', '', '', '0', '0', '0', '_#D_ALLCNT', 'f_h', 'alias for number of all discussion comments for this item', '', '', '', '', '', '', '', '', '0', '0', '0', 'disc_count', '', 'nul', '0', '1')";
1156  $SQL_templates[] = "INSERT INTO field (id, type, slice_id, name, input_pri, input_help, input_morehlp, input_default, required, feed, multiple, input_show_func, content_id, search_pri, search_type, search_help, search_before, search_more_help, search_show, search_ft_show, search_ft_default, alias1, alias1_func, alias1_help, alias2, alias2_func, alias2_help, alias3, alias3_func, alias3_help, input_before, aditional, content_edit, html_default, html_show, in_item_tbl, input_validate, input_insert_func, input_show, text_stored) VALUES( 'disc_app........', '', 'News_EN_tmpl....', 'Approved Comments Count', '5070', 'Internal field - do not change', '$AA_DOC_URL}help.html', 'qte:0', '1', '1', '0', 'fld', '', '100', '', '', '', '', '0', '0', '0', '_#D_APPCNT', 'f_h', 'alias for number of approved discussion comments for this item', '', '', '', '', '', '', '', '', '0', '0', '0', 'disc_app', '', 'nul', '0', '1')";
1157  $SQL_templates[] = "INSERT INTO field (id, type, slice_id, name, input_pri, input_help, input_morehlp, input_default, required, feed, multiple, input_show_func, content_id, search_pri, search_type, search_help, search_before, search_more_help, search_show, search_ft_show, search_ft_default, alias1, alias1_func, alias1_help, alias2, alias2_func, alias2_help, alias3, alias3_func, alias3_help, input_before, aditional, content_edit, html_default, html_show, in_item_tbl, input_validate, input_insert_func, input_show, text_stored) VALUES( 'id..............', '', 'News_EN_tmpl....', 'Long ID', '5080', 'Internal field - do not change', '$AA_DOC_URL}help.html', 'txt:', 0, 0, 0, 'nul', '', 0, '', '', '', '', 1, 1, 1, '_#ITEM_ID_', 'f_n:', 'alias for Long Item ID', '', 'f_0:', '', '', 'f_0:', '', '', '', 0, 0, 0, 'id', '', 'nul', 0, 1)";
1158  $SQL_templates[] = "INSERT INTO field (id, type, slice_id, name, input_pri, input_help, input_morehlp, input_default, required, feed, multiple, input_show_func, content_id, search_pri, search_type, search_help, search_before, search_more_help, search_show, search_ft_show, search_ft_default, alias1, alias1_func, alias1_help, alias2, alias2_func, alias2_help, alias3, alias3_func, alias3_help, input_before, aditional, content_edit, html_default, html_show, in_item_tbl, input_validate, input_insert_func, input_show, text_stored) VALUES( 'short_id........', '', 'News_EN_tmpl....', 'Short ID', '5090', 'Internal field - do not change', '$AA_DOC_URL}help.html', 'txt:', 0, 0, 0, 'nul', '', 100, '', '', '', '', 1, 1, 1, '_#SITEM_ID', 'f_t:', 'alias for Short Item ID', '', 'f_0:', '', '', 'f_0:', '', '', '', 0, 0, 0, 'short_id', '', 'nul', 0, 0)";
1159  
1160  // Reader Management slice template
1161  $SQL_templates[] = "DELETE FROM field WHERE slice_id='ReaderManagement'";
1162  $SQL_templates[] = "REPLACE INTO module (id, name, deleted, type, slice_url, lang_file, created_at, created_by, owner, flag) VALUES ('ReaderManagement', 'Reader Management Minimal', 0, 'S', '', 'en_news_lang.php3', 1043151515, '', 'AA_Core.........', 0)";
1163  $SQL_templates[] = "REPLACE INTO slice (id, name, owner, deleted, created_by, created_at, export_to_all, type, template, fulltext_format_top, fulltext_format, fulltext_format_bottom, odd_row_format, even_row_format, even_odd_differ, compact_top, compact_bottom, category_top, category_format, category_bottom, category_sort, slice_url, d_listlen, lang_file, fulltext_remove, compact_remove, email_sub_enable, exclude_from_dir, notify_sh_offer, notify_sh_accept, notify_sh_remove, notify_holding_item_s, notify_holding_item_b, notify_holding_item_edit_s, notify_holding_item_edit_b, notify_active_item_edit_s, notify_active_item_edit_b, notify_active_item_s, notify_active_item_b, noitem_msg, admin_format_top, admin_format, admin_format_bottom, admin_remove, permit_anonymous_post, permit_offline_fill, aditional, flag, vid, gb_direction, group_by, gb_header, gb_case, javascript, fileman_access, fileman_dir, auth_field_group, mailman_field_lists, permit_anonymous_edit) VALUES ('ReaderManagement', 'Reader Management Minimal', 'AA_Core.........', 0, '1', $now, 1, 'ReaderManagement', 1, '', '&nbsp;', '', '&nbsp;', '', 0, '', '', '', '', '', 0, '', 15, 'cz_news_lang.php3', '', '', 1, 0, '', '', '', '', '', '', '', '', '', '', '', ' ', '<table border=\"1\" bordercolor=\"white\" cellpadding=\"2\" cellspacing=\"0\">\r\n<tr align=\"center\">\r\n<td class=\"tabtit\">&nbsp;</td>\r\n<td class=\"tabtit\"><b>Username</b></td>\r\n<td class=\"tabtit\"><b>Email</b></td>\r\n<td class=\"tabtit\"><b>First</b></td>\r\n<td class=\"tabtit\"><b>Last</b></td>\r\n<td class=\"tabtit\"><b>Mail confirmed</b></td>\r\n</tr>', '<tr>\r\n<td><input type=checkbox name=\"chb[x_#ITEM_ID#]\" value=\"\"></td>\r\n<td class=\"tabtxt\">_#USERNAME</td>\r\n<td class=\"tabtxt\">_#EMAIL___</td>\r\n<td class=\"tabtxt\">_#FIRSTNAM</td>\r\n<td class=\"tabtxt\">_#LASTNAME</td>\r\n<td class=\"tabtxt\">_#MAILCONF</td>\r\n</tr>', '</table>', '', 2, 0, '', 0, 0, 2, '', 0, NULL, '', '0', '', '0', '0', 5);";
1164  $SQL_templates[] = "INSERT INTO field (id, type, slice_id, name, input_pri, input_help, input_morehlp, input_default, required, feed, multiple, input_show_func, content_id, search_pri, search_type, search_help, search_before, search_more_help, search_show, search_ft_show, search_ft_default, alias1, alias1_func, alias1_help, alias2, alias2_func, alias2_help, alias3, alias3_func, alias3_help, input_before, aditional, content_edit, html_default, html_show, in_item_tbl, input_validate, input_insert_func, input_show, text_stored) VALUES ('con_email.......', '', 'ReaderManagement', 'Email', 200, 'Reader\'s e-mail, unique in the scope of this slice', '$AA_DOC_URL}help.html', 'txt:', 0, 0, 0, 'fld:', '', 100, '', '', '', '', 1, 1, 1, '_#EMAIL___', 'f_c:!:<a href=\"_#EDITITEM\" class=iheadline>:</a>:&nbsp;::', 'Email', '', 'f_0:', '', '', 'f_0:', '', '', '', 0, 0, 0, '', 'e-unique:con_email.......:1', 'qte:', 1, 1);";
1165  $SQL_templates[] = "INSERT INTO field (id, type, slice_id, name, input_pri, input_help, input_morehlp, input_default, required, feed, multiple, input_show_func, content_id, search_pri, search_type, search_help, search_before, search_more_help, search_show, search_ft_show, search_ft_default, alias1, alias1_func, alias1_help, alias2, alias2_func, alias2_help, alias3, alias3_func, alias3_help, input_before, aditional, content_edit, html_default, html_show, in_item_tbl, input_validate, input_insert_func, input_show, text_stored) VALUES ('disc_app........', '', 'ReaderManagement', 'Approved Comments Count', 5070, 'Internal field - do not change', '', 'qte:0', 1, 1, 0, 'fld', '', 100, '', '', '', '', 0, 0, 0, '_#D_APPCNT', 'f_h', 'alias for number of approved discussion comments for this item', '', '', '', '', '', '', '', '', 0, 0, 0, 'disc_app', '', 'nul', 0, 1);";
1166  $SQL_templates[] = "INSERT INTO field (id, type, slice_id, name, input_pri, input_help, input_morehlp, input_default, required, feed, multiple, input_show_func, content_id, search_pri, search_type, search_help, search_before, search_more_help, search_show, search_ft_show, search_ft_default, alias1, alias1_func, alias1_help, alias2, alias2_func, alias2_help, alias3, alias3_func, alias3_help, input_before, aditional, content_edit, html_default, html_show, in_item_tbl, input_validate, input_insert_func, input_show, text_stored) VALUES ('disc_count......', '', 'ReaderManagement', 'Comments Count', 5060, 'Internal field - do not change', '', 'txt:0', 1, 1, 0, 'fld:', '', 100, '', '', '', '', 0, 0, 0, '_#D_ALLCNT', 'f_h:', 'alias for number of all discussion comments for this item', '_#VIEW_165', 'f_v:vid=165&cmd[165]=x-165-_#short_id........', 'Zkraceny fulltex pohled pro diskuse', '', 'f_0:', '', '', '', 0, 0, 0, 'disc_count', 'text', 'qte', 0, 1);";
1167  $SQL_templates[] = "INSERT INTO field (id, type, slice_id, name, input_pri, input_help, input_morehlp, input_default, required, feed, multiple, input_show_func, content_id, search_pri, search_type, search_help, search_before, search_more_help, search_show, search_ft_show, search_ft_default, alias1, alias1_func, alias1_help, alias2, alias2_func, alias2_help, alias3, alias3_func, alias3_help, input_before, aditional, content_edit, html_default, html_show, in_item_tbl, input_validate, input_insert_func, input_show, text_stored) VALUES ('display_count...', '', 'ReaderManagement', 'Displayed Times', 5050, 'Internal field - do not change', '', 'qte:0', 1, 1, 0, 'fld', '', 100, '', '', '', '', 0, 0, 0, '_#DISPL_NO', 'f_h', 'alias for number of displaying of this item', '', '', '', '', '', '', '', '', 0, 0, 0, 'display_count', '', 'nul', 0, 1);";
1168  $SQL_templates[] = "INSERT INTO field (id, type, slice_id, name, input_pri, input_help, input_morehlp, input_default, required, feed, multiple, input_show_func, content_id, search_pri, search_type, search_help, search_before, search_more_help, search_show, search_ft_show, search_ft_default, alias1, alias1_func, alias1_help, alias2, alias2_func, alias2_help, alias3, alias3_func, alias3_help, input_before, aditional, content_edit, html_default, html_show, in_item_tbl, input_validate, input_insert_func, input_show, text_stored) VALUES( 'id..............', '', 'ReaderManagement', 'Long ID', '5080', 'Internal field - do not change', '', 'txt:', 0, 0, 0, 'nul', '', 0, '', '', '', '', 1, 1, 1, '_#ITEM_ID_', 'f_n:', 'alias for Long Item ID', '', 'f_0:', '', '', 'f_0:', '', '', '', 0, 0, 0, 'id', '', 'nul', 0, 1)";
1169  $SQL_templates[] = "INSERT INTO field (id, type, slice_id, name, input_pri, input_help, input_morehlp, input_default, required, feed, multiple, input_show_func, content_id, search_pri, search_type, search_help, search_before, search_more_help, search_show, search_ft_show, search_ft_default, alias1, alias1_func, alias1_help, alias2, alias2_func, alias2_help, alias3, alias3_func, alias3_help, input_before, aditional, content_edit, html_default, html_show, in_item_tbl, input_validate, input_insert_func, input_show, text_stored) VALUES( 'short_id........', '', 'ReaderManagement', 'Short ID', '5090', 'Internal field - do not change', '', 'txt:', 0, 0, 0, 'nul', '', 100, '', '', '', '', 1, 1, 1, '_#SITEM_ID', 'f_t:', 'alias for Short Item ID', '', 'f_0:', '', '', 'f_0:', '', '', '', 0, 0, 0, 'short_id', '', 'nul', 0, 0)";
1170  $SQL_templates[] = "INSERT INTO field (id, type, slice_id, name, input_pri, input_help, input_morehlp, input_default, required, feed, multiple, input_show_func, content_id, search_pri, search_type, search_help, search_before, search_more_help, search_show, search_ft_show, search_ft_default, alias1, alias1_func, alias1_help, alias2, alias2_func, alias2_help, alias3, alias3_func, alias3_help, input_before, aditional, content_edit, html_default, html_show, in_item_tbl, input_validate, input_insert_func, input_show, text_stored) VALUES ('edited_by.......', '', 'ReaderManagement', 'Edited by', 5030, 'Identification of last editor', '', 'qte', 0, 0, 0, 'nul', '', 100, '', '', '', '', 0, 0, 0, '_#EDITEDBY', 'f_h', 'alias for Last edited By', '', '', '', '', '', '', '', '', 0, 0, 0, 'edited_by', 'text', 'uid', 0, 0);";
1171  $SQL_templates[] = "INSERT INTO field (id, type, slice_id, name, input_pri, input_help, input_morehlp, input_default, required, feed, multiple, input_show_func, content_id, search_pri, search_type, search_help, search_before, search_more_help, search_show, search_ft_show, search_ft_default, alias1, alias1_func, alias1_help, alias2, alias2_func, alias2_help, alias3, alias3_func, alias3_help, input_before, aditional, content_edit, html_default, html_show, in_item_tbl, input_validate, input_insert_func, input_show, text_stored) VALUES ('edit_note.......', '', 'ReaderManagement', 'Remark', 1000, '', '', 'txt:', 0, 0, 0, 'txt:4', '', 100, '', '', '', '', 0, 0, 0, '_#REMARK__', 'f_c:!:::&nbsp;::', 'Remark', '', 'f_a:', '', '', 'f_a:', '', '', '', 0, 0, 0, '', 'text', 'qte:', 1, 1);";
1172  $SQL_templates[] = "INSERT INTO field (id, type, slice_id, name, input_pri, input_help, input_morehlp, input_default, required, feed, multiple, input_show_func, content_id, search_pri, search_type, search_help, search_before, search_more_help, search_show, search_ft_show, search_ft_default, alias1, alias1_func, alias1_help, alias2, alias2_func, alias2_help, alias3, alias3_func, alias3_help, input_before, aditional, content_edit, html_default, html_show, in_item_tbl, input_validate, input_insert_func, input_show, text_stored) VALUES ('expiry_date.....', '', 'ReaderManagement', 'Expiry date', 3100, 'Membership expiration', '', 'dte:2000', 0, 0, 0, 'dte:1\'10\'1', '', 100, '', '', '', '', 0, 0, 0, '_#EXP_DATE', 'f_d:j. n. Y', 'alias pro Datum Expirace', '', 'f_a:', '', '', 'f_a:', '', '', '', 0, 0, 0, 'expiry_date', 'date:', 'qte:', 1, 0);";
1173  $SQL_templates[] = "INSERT INTO field (id, type, slice_id, name, input_pri, input_help, input_morehlp, input_default, required, feed, multiple, input_show_func, content_id, search_pri, search_type, search_help, search_before, search_more_help, search_show, search_ft_show, search_ft_default, alias1, alias1_func, alias1_help, alias2, alias2_func, alias2_help, alias3, alias3_func, alias3_help, input_before, aditional, content_edit, html_default, html_show, in_item_tbl, input_validate, input_insert_func, input_show, text_stored) VALUES ('flags...........', '', 'ReaderManagement', 'Flags', 5075, 'Internal field - do not change', '$AA_DOC_URL}help.html', 'qte:0', 0, 0, 0, 'fld', '', 100, '', '', '', '', 0, 0, 0, '', '', '', '', '', '', '', '', '', '', '', 0, 0, 0, 'flags', 'number', 'qte', 0, 1);";
1174  $SQL_templates[] = "INSERT INTO field (id, type, slice_id, name, input_pri, input_help, input_morehlp, input_default, required, feed, multiple, input_show_func, content_id, search_pri, search_type, search_help, search_before, search_more_help, search_show, search_ft_show, search_ft_default, alias1, alias1_func, alias1_help, alias2, alias2_func, alias2_help, alias3, alias3_func, alias3_help, input_before, aditional, content_edit, html_default, html_show, in_item_tbl, input_validate, input_insert_func, input_show, text_stored) VALUES ('headline........', '', 'ReaderManagement', 'Username', 100, 'Reader\'s User Name, unique in the scope of the complete AA installation', '', 'txt:', 0, 0, 0, 'fld:', '', 100, '', '', '', '', 1, 1, 1, '_#USERNAME', 'f_c:!:<a href=\"_#EDITITEM\" class=iheadline>:</a>:&nbsp;::', 'Username', '', 'f_a:', '', '', 'f_a:', '', '', '', 0, 0, 0, '', 'unique:headline........:0', 'qte:', 1, 1);";
1175  $SQL_templates[] = "INSERT INTO field (id, type, slice_id, name, input_pri, input_help, input_morehlp, input_default, required, feed, multiple, input_show_func, content_id, search_pri, search_type, search_help, search_before, search_more_help, search_show, search_ft_show, search_ft_default, alias1, alias1_func, alias1_help, alias2, alias2_func, alias2_help, alias3, alias3_func, alias3_help, input_before, aditional, content_edit, html_default, html_show, in_item_tbl, input_validate, input_insert_func, input_show, text_stored) VALUES ('highlight.......', '', 'ReaderManagement', 'Highlight', 5025, 'Interesting news - shown on homepage', '', 'qte', 0, 0, 0, 'chb', '', 100, '', '', '', '', 0, 0, 0, '', '', '', '', '', '', '', '', '', '', '', 0, 0, 0, 'highlight', 'bool', 'boo', 0, 0);";
1176  $SQL_templates[] = "INSERT INTO field (id, type, slice_id, name, input_pri, input_help, input_morehlp, input_default, required, feed, multiple, input_show_func, content_id, search_pri, search_type, search_help, search_before, search_more_help, search_show, search_ft_show, search_ft_default, alias1, alias1_func, alias1_help, alias2, alias2_func, alias2_help, alias3, alias3_func, alias3_help, input_before, aditional, content_edit, html_default, html_show, in_item_tbl, input_validate, input_insert_func, input_show, text_stored) VALUES ('last_edit.......', '', 'ReaderManagement', 'Last Edit', 5040, 'Date of last edit', '', 'now:', 0, 0, 0, 'dte:1\'10\'1', '', 100, '', '', '', '', 0, 0, 0, '_#LASTEDIT', 'f_d:m/d/Y', 'alias for Last Edit', '', '', '', '', '', '', '', '', 0, 0, 0, 'last_edit', 'date', 'now', 0, 0);";
1177  $SQL_templates[] = "INSERT INTO field (id, type, slice_id, name, input_pri, input_help, input_morehlp, input_default, required, feed, multiple, input_show_func, content_id, search_pri, search_type, search_help, search_before, search_more_help, search_show, search_ft_show, search_ft_default, alias1, alias1_func, alias1_help, alias2, alias2_func, alias2_help, alias3, alias3_func, alias3_help, input_before, aditional, content_edit, html_default, html_show, in_item_tbl, input_validate, input_insert_func, input_show, text_stored) VALUES ('password........', '', 'ReaderManagement', 'Password', 300, 'Your password. You must send it every time to confirm your changes.', '$AA_DOC_URL}help.html', 'txt:', 1, 0, 0, 'pwd:', '', 100, '', '', '', '', 0, 0, 0, '_#PASSWORD', 'f_c:!:*::&nbsp;::1', 'Password: Show * when set, nothing when not set', '', 'f_0:', '', '', 'f_0:', '', '', '', 0, 0, 0, '', 'pwd:', 'pwd:', 1, 1);";
1178  $SQL_templates[] = "INSERT INTO field (id, type, slice_id, name, input_pri, input_help, input_morehlp, input_default, required, feed, multiple, input_show_func, content_id, search_pri, search_type, search_help, search_before, search_more_help, search_show, search_ft_show, search_ft_default, alias1, alias1_func, alias1_help, alias2, alias2_func, alias2_help, alias3, alias3_func, alias3_help, input_before, aditional, content_edit, html_default, html_show, in_item_tbl, input_validate, input_insert_func, input_show, text_stored) VALUES ('posted_by.......', '', 'ReaderManagement', 'Posted by', 5000, 'Identification of author', '', 'qte', 0, 0, 0, 'fld', '', 100, '', '', '', '', 0, 0, 0, '_#POSTEDBY', 'f_h', 'alias for Author', '', '', '', '', '', '', '', '', 0, 0, 0, 'posted_by', 'text', 'uid', 0, 1);";
1179  $SQL_templates[] = "INSERT INTO field (id, type, slice_id, name, input_pri, input_help, input_morehlp, input_default, required, feed, multiple, input_show_func, content_id, search_pri, search_type, search_help, search_before, search_more_help, search_show, search_ft_show, search_ft_default, alias1, alias1_func, alias1_help, alias2, alias2_func, alias2_help, alias3, alias3_func, alias3_help, input_before, aditional, content_edit, html_default, html_show, in_item_tbl, input_validate, input_insert_func, input_show, text_stored) VALUES ('post_date.......', '', 'ReaderManagement', 'Post Date', 5005, 'Date of posting this news', '', 'now:', 1, 0, 0, 'nul', '', 100, '', '', '', '', 0, 0, 0, '_#POSTDATE', 'f_d:m/d/Y', 'alias for Post Date', '', '', '', '', '', '', '', '', 0, 0, 0, 'post_date', 'date', 'now', 0, 0);";
1180  $SQL_templates[] = "INSERT INTO field (id, type, slice_id, name, input_pri, input_help, input_morehlp, input_default, required, feed, multiple, input_show_func, content_id, search_pri, search_type, search_help, search_before, search_more_help, search_show, search_ft_show, search_ft_default, alias1, alias1_func, alias1_help, alias2, alias2_func, alias2_help, alias3, alias3_func, alias3_help, input_before, aditional, content_edit, html_default, html_show, in_item_tbl, input_validate, input_insert_func, input_show, text_stored) VALUES ('publish_date....', '', 'ReaderManagement', 'Start date', 3000, 'Membership start', '', 'now:', 0, 0, 0, 'dte:1:10:1', '', 100, '', '', '', '', 0, 0, 0, '_#PUB_DATE', 'f_d:j. n. Y', 'alias pro Datum Vystavení', '_#PUB_DAT#', 'f_d:j.n.y', 'alias pro Datum Vystavení pro admin stranky', '', 'f_a:', '', '', '', 0, 0, 0, 'publish_date', 'date:', 'qte:', 1, 0);";
1181  $SQL_templates[] = "INSERT INTO field (id, type, slice_id, name, input_pri, input_help, input_morehlp, input_default, required, feed, multiple, input_show_func, content_id, search_pri, search_type, search_help, search_before, search_more_help, search_show, search_ft_show, search_ft_default, alias1, alias1_func, alias1_help, alias2, alias2_func, alias2_help, alias3, alias3_func, alias3_help, input_before, aditional, content_edit, html_default, html_show, in_item_tbl, input_validate, input_insert_func, input_show, text_stored) VALUES ('slice_id........', '', 'ReaderManagement', 'Slice', 5000, 'Internal field - do not change', '', 'qte:1', 1, 0, 0, 'fld', '', 100, '', '', '', '', 0, 0, 0, '_#SLICE_ID', 'f_n:slice_id', 'alias for id of slice', '', '', '', '', '', '', '', '', 0, 0, 0, 'slice_id', '', 'nul', 0, 0);";
1182  $SQL_templates[] = "INSERT INTO field (id, type, slice_id, name, input_pri, input_help, input_morehlp, input_default, required, feed, multiple, input_show_func, content_id, search_pri, search_type, search_help, search_before, search_more_help, search_show, search_ft_show, search_ft_default, alias1, alias1_func, alias1_help, alias2, alias2_func, alias2_help, alias3, alias3_func, alias3_help, input_before, aditional, content_edit, html_default, html_show, in_item_tbl, input_validate, input_insert_func, input_show, text_stored) VALUES ('status_code.....', '', 'ReaderManagement', 'Status Code', 5020, 'Select in which bin should the news appear', '', 'qte:1', 1, 0, 0, 'sel:AA_Core_Bins....', '', 100, '', '', '', '', 0, 0, 0, '', '', '', '', '', '', '', '', '', '', '', 0, 0, 0, 'status_code', 'number', 'num', 0, 0);";
1183  $SQL_templates[] = "INSERT INTO field (id, type, slice_id, name, input_pri, input_help, input_morehlp, input_default, required, feed, multiple, input_show_func, content_id, search_pri, search_type, search_help, search_before, search_more_help, search_show, search_ft_show, search_ft_default, alias1, alias1_func, alias1_help, alias2, alias2_func, alias2_help, alias3, alias3_func, alias3_help, input_before, aditional, content_edit, html_default, html_show, in_item_tbl, input_validate, input_insert_func, input_show, text_stored) VALUES ('switch..........', '', 'ReaderManagement', 'Email Confirmed', 600, 'Email is confirmed when the user clicks on the URL received in email', '$AA_DOC_URL}help.html', 'txt:', 0, 0, 0, 'chb', '', 100, '', '', '', '', 0, 0, 0, '_#MAILCONF', 'f_c:1:Yes::No::1', 'Email Confirmed', '', 'f_0:', '', '', 'f_0:', '', '', '', 0, 0, 0, '', 'text', 'boo:', 1, 1);";
1184  $SQL_templates[] = "INSERT INTO field (id, type, slice_id, name, input_pri, input_help, input_morehlp, input_default, required, feed, multiple, input_show_func, content_id, search_pri, search_type, search_help, search_before, search_more_help, search_show, search_ft_show, search_ft_default, alias1, alias1_func, alias1_help, alias2, alias2_func, alias2_help, alias3, alias3_func, alias3_help, input_before, aditional, content_edit, html_default, html_show, in_item_tbl, input_validate, input_insert_func, input_show, text_stored) VALUES ('text...........1', '', 'ReaderManagement', 'First name', 400, '', '$AA_DOC_URL}help.html', 'txt:', 0, 0, 0, 'fld:', '', 100, '', '', '', '', 1, 1, 1, '_#FIRSTNAM', 'f_c:!:::&nbsp;::', 'First name', '', 'f_0:', '', '', 'f_0:', '', '', '', 0, 0, 0, '', 'text', 'qte:', 1, 1);";
1185  $SQL_templates[] = "INSERT INTO field (id, type, slice_id, name, input_pri, input_help, input_morehlp, input_default, required, feed, multiple, input_show_func, content_id, search_pri, search_type, search_help, search_before, search_more_help, search_show, search_ft_show, search_ft_default, alias1, alias1_func, alias1_help, alias2, alias2_func, alias2_help, alias3, alias3_func, alias3_help, input_before, aditional, content_edit, html_default, html_show, in_item_tbl, input_validate, input_insert_func, input_show, text_stored) VALUES ('text...........2', '', 'ReaderManagement', 'Last name', 500, '', '$AA_DOC_URL}help.html', 'txt:', 0, 0, 0, 'fld:', '', 100, '', '', '', '', 1, 1, 1, '_#LASTNAME', 'f_c:!:::&nbsp;::', 'Last name', '', 'f_0:', '', '', 'f_0:', '', '', '', 0, 0, 0, '', 'text', 'qte:', 1, 1);";
1186  $SQL_templates[] = "INSERT INTO field (id, type, slice_id, name, input_pri, input_help, input_morehlp, input_default, required, feed, multiple, input_show_func, content_id, search_pri, search_type, search_help, search_before, search_more_help, search_show, search_ft_show, search_ft_default, alias1, alias1_func, alias1_help, alias2, alias2_func, alias2_help, alias3, alias3_func, alias3_help, input_before, aditional, content_edit, html_default, html_show, in_item_tbl, input_validate, input_insert_func, input_show, text_stored) VALUES ('text...........3', '', 'ReaderManagement', 'Access Code', 700, 'Access code is used to confirm email and when you do not use HTTP Authentification', '$AA_DOC_URL}help.html', 'rnd:5:text...........3:0', 0, 0, 0, 'fld:', '', 100, '', '', '', '', 1, 1, 1, '_#ACCECODE', 'f_h:', 'Access Code', '', 'f_0:', '', '', 'f_0:', '', '', '', 0, 0, 0, '', 'text:', 'qte:', 1, 1);";
1187  
1188  // Noticas - ES - template
1189  $SQL_templates[] = "DELETE FROM field WHERE slice_id='noticias-es.....'";
1190  $SQL_templates[] = "REPLACE INTO module (id, name, deleted, type, slice_url, lang_file, created_at, created_by, owner, flag) VALUES ('noticias-es.....', 'Noticias (ES) - Plantilla', 0, 'S', '', 'es_news_lang.php3', 1067835192, '', 'AA_Core.........', 0)";
1191  $SQL_templates[] = "REPLACE INTO slice (id, name, owner, deleted, created_by, created_at, export_to_all, type, template, fulltext_format_top, fulltext_format, fulltext_format_bottom, odd_row_format, even_row_format, even_odd_differ, compact_top, compact_bottom, category_top, category_format, category_bottom, category_sort, slice_url, d_listlen, lang_file, fulltext_remove, compact_remove, email_sub_enable, exclude_from_dir, notify_sh_offer, notify_sh_accept, notify_sh_remove, notify_holding_item_s, notify_holding_item_b, notify_holding_item_edit_s, notify_holding_item_edit_b, notify_active_item_edit_s, notify_active_item_edit_b, notify_active_item_s, notify_active_item_b, noitem_msg, admin_format_top, admin_format, admin_format_bottom, admin_remove, permit_anonymous_post, permit_anonymous_edit, permit_offline_fill, aditional, flag, vid, gb_direction, group_by, gb_header, gb_case, javascript, fileman_access, fileman_dir, auth_field_group, mailman_field_lists, reading_password) VALUES ('noticias-es.....', 'Noticias (ES) - Plantilla', 'AA_Core.........', 0, '8', 1067835192, 0, 'noticias-es.....', 1, '', '<h2>_#TITULAR_</h2>\r\n<B>_#AUTOR___, _#LUGAR___</B> <BR>\r\n<img src=\"_#IMAGESRC\" width=\"_#IMGWIDTH\" height=\"_#IMG_HGHT\" align=\"right\">\r\n_#TEXTO___', '', '<div class=\"item\">_#FECHAPUB:\r\n<strong><a href=_#ENLACE__>_#TITULAR_</a>\r\n</strong>\r\n<br>_#LUGAR___ [_#FTE_URL_]<br>\r\n_#RESUMEN_\r\n</div>\r\n<br>', '', 0, '', '<br>', '', '<p>_#CATEGORi</p>', '', 0, '', 10000, 'es_news_lang.php3', '()', '[]', 1, 0, '', '', '', '', '', '', '', '', '', '', '', 'No se encontraron datos', '<tr class=tablename><td width=30>&nbsp;</td><td>Haga clic para editar</td><td>Fecha</td></tr>', '<tr class=tabtxt><td width=30><input type=checkbox name=\"chb[x_#ITEM_ID#]\" value=\"1\"></td><td><a href=\"_#EDITITEM\">_#TITULAR_</a></td><td>_#FECHAPUB</td></tr>', '', '', 2, 0, 2, '', 0, 0, 2, 'category........', 0, '', '', '0', '', '', '', '')";
1192  $SQL_templates[] = "INSERT INTO field (id, type, slice_id, name, input_pri, input_help, input_morehlp, input_default, required, feed, multiple, input_show_func, content_id, search_pri, search_type, search_help, search_before, search_more_help, search_show, search_ft_show, search_ft_default, alias1, alias1_func, alias1_help, alias2, alias2_func, alias2_help, alias3, alias3_func, alias3_help, input_before, aditional, content_edit, html_default, html_show, in_item_tbl, input_validate, input_insert_func, input_show, text_stored) VALUES ('abstract........', '', 'noticias-es.....', 'Resumen', 150, '', '', 'txt:', 0, 0, 0, 'txt:8', '', 100, '', '', '', '', 0, 1, 1, '_#RESUMEN_', 'f_a:80:full_text.......:1', 'resumen del item', '_#RSS_IT_D', 'f_r:80:full_text.......:1', 'resumen del item para RSS', '', 'f_0:', '', '', '', 0, 0, 1, '', 'text:', 'qte:', 1, 1)";
1193  $SQL_templates[] = "INSERT INTO field (id, type, slice_id, name, input_pri, input_help, input_morehlp, input_default, required, feed, multiple, input_show_func, content_id, search_pri, search_type, search_help, search_before, search_more_help, search_show, search_ft_show, search_ft_default, alias1, alias1_func, alias1_help, alias2, alias2_func, alias2_help, alias3, alias3_func, alias3_help, input_before, aditional, content_edit, html_default, html_show, in_item_tbl, input_validate, input_insert_func, input_show, text_stored) VALUES ('category........', '', 'noticias-es.....', 'Categoría', 500, '', '', 'txt:', 0, 0, 0, 'sel:lt_apcCategories:', '', 100, '', '', '', '', 1, 1, 1, '_#CATEGORI', 'f_h:', 'categoria del item', '', 'f_0:', '', '', 'f_0:', '', '', '', 0, 0, 0, '', 'text:', 'qte:', 0, 1)";
1194  $SQL_templates[] = "INSERT INTO field (id, type, slice_id, name, input_pri, input_help, input_morehlp, input_default, required, feed, multiple, input_show_func, content_id, search_pri, search_type, search_help, search_before, search_more_help, search_show, search_ft_show, search_ft_default, alias1, alias1_func, alias1_help, alias2, alias2_func, alias2_help, alias3, alias3_func, alias3_help, input_before, aditional, content_edit, html_default, html_show, in_item_tbl, input_validate, input_insert_func, input_show, text_stored) VALUES ('cp_code.........', '', 'noticias-es.....', 'Página de códigos', 1800, '', '', 'txt:iso8859-1', 0, 0, 0, 'sel:lt_codepages:', '', 100, '', '', '', '', 0, 0, 0, '', 'f_0:', '', '', 'f_0:', '', '', 'f_0:', '', '', '', 0, 0, 0, '', 'text:', 'qte:', 0, 1)";
1195  $SQL_templates[] = "INSERT INTO field (id, type, slice_id, name, input_pri, input_help, input_morehlp, input_default, required, feed, multiple, input_show_func, content_id, search_pri, search_type, search_help, search_before, search_more_help, search_show, search_ft_show, search_ft_default, alias1, alias1_func, alias1_help, alias2, alias2_func, alias2_help, alias3, alias3_func, alias3_help, input_before, aditional, content_edit, html_default, html_show, in_item_tbl, input_validate, input_insert_func, input_show, text_stored) VALUES ('created_by......', '', 'noticias-es.....', 'Autor', 470, '', '', 'txt:', 0, 0, 0, 'fld:', '', 100, '', '', '', '', 0, 0, 0, '_#AUTOR___', 'f_h:', 'autor del item', '', 'f_0:', '', '', 'f_0:', '', '', '', 0, 0, 0, '', 'text:', 'qte:', 1, 1)";
1196  $SQL_templates[] = "INSERT INTO field (id, type, slice_id, name, input_pri, input_help, input_morehlp, input_default, required, feed, multiple, input_show_func, content_id, search_pri, search_type, search_help, search_before, search_more_help, search_show, search_ft_show, search_ft_default, alias1, alias1_func, alias1_help, alias2, alias2_func, alias2_help, alias3, alias3_func, alias3_help, input_before, aditional, content_edit, html_default, html_show, in_item_tbl, input_validate, input_insert_func, input_show, text_stored) VALUES ('disc_app........', '', 'noticias-es.....', 'Comentarios aprobados', 5070, 'Internal field - do not change', '$AA_DOC_URL}help.html', 'txt:0', 1, 1, 0, 'fld:', '', 100, '', '', '', '', 0, 0, 0, '_#D_APPCNT', 'f_h:', 'número de comentarios aprobados para este ítem', '', 'f_0:', '', '', 'f_0:', '', '', '', 0, 0, 0, 'disc_app', 'text:', 'qte:', 0, 1)";
1197  $SQL_templates[] = "INSERT INTO field (id, type, slice_id, name, input_pri, input_help, input_morehlp, input_default, required, feed, multiple, input_show_func, content_id, search_pri, search_type, search_help, search_before, search_more_help, search_show, search_ft_show, search_ft_default, alias1, alias1_func, alias1_help, alias2, alias2_func, alias2_help, alias3, alias3_func, alias3_help, input_before, aditional, content_edit, html_default, html_show, in_item_tbl, input_validate, input_insert_func, input_show, text_stored) VALUES ('disc_count......', '', 'noticias-es.....', 'Comentarios', 5060, 'Internal field - do not change', '$AA_DOC_URL}help.html', 'txt:0', 1, 1, 0, 'fld:', '', 100, '', '', '', '', 0, 0, 0, '_#D_ALLCNT', 'f_h:', 'número total de comentarios sobre este ítem', '', 'f_0:', '', '', 'f_0:', '', '', '', 0, 0, 0, 'disc_count', 'text:', 'qte:', 0, 1)";
1198  $SQL_templates[] = "INSERT INTO field (id, type, slice_id, name, input_pri, input_help, input_morehlp, input_default, required, feed, multiple, input_show_func, content_id, search_pri, search_type, search_help, search_before, search_more_help, search_show, search_ft_show, search_ft_default, alias1, alias1_func, alias1_help, alias2, alias2_func, alias2_help, alias3, alias3_func, alias3_help, input_before, aditional, content_edit, html_default, html_show, in_item_tbl, input_validate, input_insert_func, input_show, text_stored) VALUES ('display_count...', '', 'noticias-es.....', 'Visualizaciones', 5050, 'Internal field - do not change', '$AA_DOC_URL}help.html', 'txt:0', 1, 1, 0, 'fld:', '', 100, '', '', '', '', 0, 0, 0, '_#VISUALIZ', 'f_h:', 'número de veces que este ítem ha sido visitado', '', 'f_0:', '', '', 'f_0:', '', '', '', 0, 0, 0, 'display_count', 'text:', 'qte:', 0, 1)";
1199  $SQL_templates[] = "INSERT INTO field (id, type, slice_id, name, input_pri, input_help, input_morehlp, input_default, required, feed, multiple, input_show_func, content_id, search_pri, search_type, search_help, search_before, search_more_help, search_show, search_ft_show, search_ft_default, alias1, alias1_func, alias1_help, alias2, alias2_func, alias2_help, alias3, alias3_func, alias3_help, input_before, aditional, content_edit, html_default, html_show, in_item_tbl, input_validate, input_insert_func, input_show, text_stored) VALUES( 'id..............', '', 'noticias-es.....', 'Long ID', '5080', 'Internal field - do not change', '$AA_DOC_URL}help.html', 'txt:', 0, 0, 0, 'nul', '', 0, '', '', '', '', 1, 1, 1, '_#ITEM_ID_', 'f_n:', 'alias for Long Item ID', '', 'f_0:', '', '', 'f_0:', '', '', '', 0, 0, 0, 'id', '', 'nul', 0, 1)";
1200  $SQL_templates[] = "INSERT INTO field (id, type, slice_id, name, input_pri, input_help, input_morehlp, input_default, required, feed, multiple, input_show_func, content_id, search_pri, search_type, search_help, search_before, search_more_help, search_show, search_ft_show, search_ft_default, alias1, alias1_func, alias1_help, alias2, alias2_func, alias2_help, alias3, alias3_func, alias3_help, input_before, aditional, content_edit, html_default, html_show, in_item_tbl, input_validate, input_insert_func, input_show, text_stored) VALUES( 'short_id........', '', 'noticias-es.....', 'Short ID', '5090', 'Internal field - do not change', '$AA_DOC_URL}help.html', 'txt:', 0, 0, 0, 'nul', '', 100, '', '', '', '', 1, 1, 1, '_#SITEM_ID', 'f_t:', 'alias for Short Item ID', '', 'f_0:', '', '', 'f_0:', '', '', '', 0, 0, 0, 'short_id', '', 'nul', 0, 0)";
1201  $SQL_templates[] = "INSERT INTO field (id, type, slice_id, name, input_pri, input_help, input_morehlp, input_default, required, feed, multiple, input_show_func, content_id, search_pri, search_type, search_help, search_before, search_more_help, search_show, search_ft_show, search_ft_default, alias1, alias1_func, alias1_help, alias2, alias2_func, alias2_help, alias3, alias3_func, alias3_help, input_before, aditional, content_edit, html_default, html_show, in_item_tbl, input_validate, input_insert_func, input_show, text_stored) VALUES ('edited_by.......', '', 'noticias-es.....', 'Editado por', 5030, '', '', 'txt:', 0, 0, 0, 'nul', '', 100, '', '', '', '', 0, 0, 0, '_#EDITADO_', 'f_h:', 'identificador del usuario que editó el ítem', '', 'f_0:', '', '', 'f_0:', '', '', '', 0, 0, 0, 'edited_by', 'text:', 'uid:', 0, 1)";
1202  $SQL_templates[] = "INSERT INTO field (id, type, slice_id, name, input_pri, input_help, input_morehlp, input_default, required, feed, multiple, input_show_func, content_id, search_pri, search_type, search_help, search_before, search_more_help, search_show, search_ft_show, search_ft_default, alias1, alias1_func, alias1_help, alias2, alias2_func, alias2_help, alias3, alias3_func, alias3_help, input_before, aditional, content_edit, html_default, html_show, in_item_tbl, input_validate, input_insert_func, input_show, text_stored) VALUES ('edit_note.......', '', 'noticias-es.....', 'Notas del editor', 2355, 'Estas notas no se publicarán en el sitio', '', 'txt:', 0, 0, 0, 'txt:', '', 100, '', '', '', '', 0, 0, 0, '_#EDITNOTE', 'f_h:', 'notas del editor', '', 'f_0:', '', '', 'f_0:', '', '', '', 0, 0, 0, '', 'text:', 'qte:', 1, 1)";
1203  $SQL_templates[] = "INSERT INTO field (id, type, slice_id, name, input_pri, input_help, input_morehlp, input_default, required, feed, multiple, input_show_func, content_id, search_pri, search_type, search_help, search_before, search_more_help, search_show, search_ft_show, search_ft_default, alias1, alias1_func, alias1_help, alias2, alias2_func, alias2_help, alias3, alias3_func, alias3_help, input_before, aditional, content_edit, html_default, html_show, in_item_tbl, input_validate, input_insert_func, input_show, text_stored) VALUES ('expiry_date.....', '', 'noticias-es.....', 'Fecha de caducidad', 955, 'Fecha en que el item expira (y se retira automáticamente del sitio)', '', 'dte:2000', 1, 0, 0, 'dte:1:10:1', '', 100, '', '', '', '', 0, 0, 0, '_#FECHACAD', 'f_d:d/m/Y', 'fecha de caducidad', '', 'f_0:', '', '', 'f_0:', '', '', '', 0, 0, 0, 'expiry_date', 'date:', 'qte:', 1, 0)";
1204  $SQL_templates[] = "INSERT INTO field (id, type, slice_id, name, input_pri, input_help, input_morehlp, input_default, required, feed, multiple, input_show_func, content_id, search_pri, search_type, search_help, search_before, search_more_help, search_show, search_ft_show, search_ft_default, alias1, alias1_func, alias1_help, alias2, alias2_func, alias2_help, alias3, alias3_func, alias3_help, input_before, aditional, content_edit, html_default, html_show, in_item_tbl, input_validate, input_insert_func, input_show, text_stored) VALUES ('e_posted_by.....', '', 'noticias-es.....', 'e-mail autor', 480, '', '', 'txt:', 0, 0, 0, 'fld:', '', 100, '', '', '', '', 0, 0, 0, '_#E_AUTOR_', 'f_h:', 'correo electrónico del autor', '', 'f_0:', '', '', 'f_0:', '', '', '', 0, 0, 0, '', 'text:', 'qte:', 1, 1)";
1205  $SQL_templates[] = "INSERT INTO field (id, type, slice_id, name, input_pri, input_help, input_morehlp, input_default, required, feed, multiple, input_show_func, content_id, search_pri, search_type, search_help, search_before, search_more_help, search_show, search_ft_show, search_ft_default, alias1, alias1_func, alias1_help, alias2, alias2_func, alias2_help, alias3, alias3_func, alias3_help, input_before, aditional, content_edit, html_default, html_show, in_item_tbl, input_validate, input_insert_func, input_show, text_stored) VALUES ('full_text.......', '', 'noticias-es.....', 'Texto completo', 200, '', '', 'txt:', 0, 0, 0, 'txt:8', '', 100, '', '', '', '', 0, 1, 1, '_#TEXTO___', 'f_t:', 'texto completo del item', '', 'f_0:', '', '', 'f_0:', '', '', '', 0, 0, 1, '', 'text:', 'qte:', 1, 1)";
1206  $SQL_templates[] = "INSERT INTO field (id, type, slice_id, name, input_pri, input_help, input_morehlp, input_default, required, feed, multiple, input_show_func, content_id, search_pri, search_type, search_help, search_before, search_more_help, search_show, search_ft_show, search_ft_default, alias1, alias1_func, alias1_help, alias2, alias2_func, alias2_help, alias3, alias3_func, alias3_help, input_before, aditional, content_edit, html_default, html_show, in_item_tbl, input_validate, input_insert_func, input_show, text_stored) VALUES ('headline........', '', 'noticias-es.....', 'Titular', 100, '', '', 'txt:', 1, 0, 0, 'fld:', '', 100, '', '', '', '', 1, 1, 1, '_#TITULAR_', 'f_h:', 'titular del item', '_#RSS_IT_T', 'f_r:100', 'titular del item para RSS', '', 'f_0:', '', '', '', 0, 0, 0, '', 'text:', 'qte:', 1, 1)";
1207  $SQL_templates[] = "INSERT INTO field (id, type, slice_id, name, input_pri, input_help, input_morehlp, input_default, required, feed, multiple, input_show_func, content_id, search_pri, search_type, search_help, search_before, search_more_help, search_show, search_ft_show, search_ft_default, alias1, alias1_func, alias1_help, alias2, alias2_func, alias2_help, alias3, alias3_func, alias3_help, input_before, aditional, content_edit, html_default, html_show, in_item_tbl, input_validate, input_insert_func, input_show, text_stored) VALUES ('highlight.......', '', 'noticias-es.....', 'Resaltar', 450, '', '', 'txt:', 0, 0, 0, 'chb', '', 100, '', '', '', '', 0, 0, 0, '', 'f_0:', '', '', 'f_0:', '', '', 'f_0:', '', '', '', 0, 0, 0, 'highlight', 'bool:', 'boo:', 1, 0)";
1208  $SQL_templates[] = "INSERT INTO field (id, type, slice_id, name, input_pri, input_help, input_morehlp, input_default, required, feed, multiple, input_show_func, content_id, search_pri, search_type, search_help, search_before, search_more_help, search_show, search_ft_show, search_ft_default, alias1, alias1_func, alias1_help, alias2, alias2_func, alias2_help, alias3, alias3_func, alias3_help, input_before, aditional, content_edit, html_default, html_show, in_item_tbl, input_validate, input_insert_func, input_show, text_stored) VALUES ('hl_href.........', '', 'noticias-es.....', 'URL noticia externa', 400, '(para items externos) usar este URL para el enlace', '', 'txt:', 0, 0, 0, 'fld:', '', 100, '', '', '', '', 1, 1, 1, '_#ENLACE__', 'f_f:link_only.......', 'enlace al texto completo del item (se sustituye por el URL externo si está marcado como externo)', '_#RSS_IT_L', 'f_r:link_only.......', 'enlace para RSS', '', 'f_0:', '', '', '', 0, 0, 0, '', 'url:', 'qte:', 1, 1)";
1209  $SQL_templates[] = "INSERT INTO field (id, type, slice_id, name, input_pri, input_help, input_morehlp, input_default, required, feed, multiple, input_show_func, content_id, search_pri, search_type, search_help, search_before, search_more_help, search_show, search_ft_show, search_ft_default, alias1, alias1_func, alias1_help, alias2, alias2_func, alias2_help, alias3, alias3_func, alias3_help, input_before, aditional, content_edit, html_default, html_show, in_item_tbl, input_validate, input_insert_func, input_show, text_stored) VALUES ('img_height......', '', 'noticias-es.....', 'alto de la imagen', 2300, 'puede ser en pixeles (ej: 100) o porcentaje (ej: 50%)', '', 'txt:', 0, 0, 0, 'fld:', '', 100, '', '', '', '', 0, 0, 0, '_#IMG_HGHT', 'f_g:', 'alto de la imagen<br>(si no está definido, se intenta eliminar el atributo <em>height=</em> del dise?o<div class=example><em>Ejemplo: </em>&lt;img src=\"_#IMAGESRC\" width=\"_#IMGWIDTH\" height=\"_#IMG_HGHT\"&gt;</div>', '', 'f_0:', '', '', 'f_0:', '', '', '', 0, 0, 0, '', 'text:', 'qte:', 1, 1)";
1210  $SQL_templates[] = "INSERT INTO field (id, type, slice_id, name, input_pri, input_help, input_morehlp, input_default, required, feed, multiple, input_show_func, content_id, search_pri, search_type, search_help, search_before, search_more_help, search_show, search_ft_show, search_ft_default, alias1, alias1_func, alias1_help, alias2, alias2_func, alias2_help, alias3, alias3_func, alias3_help, input_before, aditional, content_edit, html_default, html_show, in_item_tbl, input_validate, input_insert_func, input_show, text_stored) VALUES ('img_src.........', '', 'noticias-es.....', 'URL de imagen', 2100, 'URL de una imágen previamente publicada', '', 'txt:', 0, 0, 0, 'fld:', '', 100, '', '', '', '', 0, 0, 0, '_#IMAGESRC', 'f_i:', 'URL de la imagen<br>Si no está definido se usa el URL por defecto (ver NO_PICTURE_URL en en_*_lang.php3)<div class=example><em>Ejemplo: </em>&lt;img src=\"_#IMAGESRC\"&gt;</div>', '', 'f_0:', '', '', 'f_0:', '', '', '', 0, 0, 0, '', 'url:', 'qte:', 1, 1)";
1211  $SQL_templates[] = "INSERT INTO field (id, type, slice_id, name, input_pri, input_help, input_morehlp, input_default, required, feed, multiple, input_show_func, content_id, search_pri, search_type, search_help, search_before, search_more_help, search_show, search_ft_show, search_ft_default, alias1, alias1_func, alias1_help, alias2, alias2_func, alias2_help, alias3, alias3_func, alias3_help, input_before, aditional, content_edit, html_default, html_show, in_item_tbl, input_validate, input_insert_func, input_show, text_stored) VALUES ('img_width.......', '', 'noticias-es.....', 'ancho de la imagen', 2200, 'puede ser en pixeles (ej: 100) o porcentaje (ej: 50%)', '', 'txt:', 0, 0, 0, 'fld:', '', 100, '', '', '', '', 0, 0, 0, '_#IMGWIDTH', 'f_w:', 'ancho de la imagen<br>(si no está definido, se intenta eliminar el atributo <em>width=</em> del dise?o<div class=example><em>Ejemplo: </em>&lt;img src=\"_#IMAGESRC\" width=\"_#IMGWIDTH\" height=\"_#IMG_HGHT\"&gt;</div>', '', 'f_0:', '', '', 'f_0:', '', '', '', 0, 0, 0, '', 'text:', 'qte:', 1, 1)";
1212  $SQL_templates[] = "INSERT INTO field (id, type, slice_id, name, input_pri, input_help, input_morehlp, input_default, required, feed, multiple, input_show_func, content_id, search_pri, search_type, search_help, search_before, search_more_help, search_show, search_ft_show, search_ft_default, alias1, alias1_func, alias1_help, alias2, alias2_func, alias2_help, alias3, alias3_func, alias3_help, input_before, aditional, content_edit, html_default, html_show, in_item_tbl, input_validate, input_insert_func, input_show, text_stored) VALUES ('lang_code.......', '', 'noticias-es.....', 'Idioma', 1700, '', '', 'txt:EN', 0, 0, 0, 'sel:lt_languages:', '', 100, '', '', '', '', 0, 0, 0, '', 'f_0:', '', '', 'f_0:', '', '', 'f_0:', '', '', '', 0, 0, 0, '', 'text:', 'qte:', 0, 1)";
1213  $SQL_templates[] = "INSERT INTO field (id, type, slice_id, name, input_pri, input_help, input_morehlp, input_default, required, feed, multiple, input_show_func, content_id, search_pri, search_type, search_help, search_before, search_more_help, search_show, search_ft_show, search_ft_default, alias1, alias1_func, alias1_help, alias2, alias2_func, alias2_help, alias3, alias3_func, alias3_help, input_before, aditional, content_edit, html_default, html_show, in_item_tbl, input_validate, input_insert_func, input_show, text_stored) VALUES ('last_edit.......', '', 'noticias-es.....', 'Ultima modificación', 5040, '', '', 'now:', 0, 0, 0, 'dte:1:10:1', '', 100, '', '', '', '', 0, 0, 0, '_#ULTIMA_E', 'f_d:d/m/Y', 'fecha de la última edición', '', 'f_0:', '', '', 'f_0:', '', '', '', 0, 0, 0, 'last_edit', 'date:', 'now:', 0, 0)";
1214  $SQL_templates[] = "INSERT INTO field (id, type, slice_id, name, input_pri, input_help, input_morehlp, input_default, required, feed, multiple, input_show_func, content_id, search_pri, search_type, search_help, search_before, search_more_help, search_show, search_ft_show, search_ft_default, alias1, alias1_func, alias1_help, alias2, alias2_func, alias2_help, alias3, alias3_func, alias3_help, input_before, aditional, content_edit, html_default, html_show, in_item_tbl, input_validate, input_insert_func, input_show, text_stored) VALUES ('link_only.......', '', 'noticias-es.....', 'Noticia externa', 300, 'Usar un enlace externo en vez del texto completo', '', 'txt:', 0, 0, 0, 'chb', '', 100, '', '', '', '', 0, 0, 1, '', 'f_0:', '', '', 'f_0:', '', '', 'f_0:', '', '', '', 0, 0, 0, '', 'bool:', 'boo:', 1, 0)";
1215  $SQL_templates[] = "INSERT INTO field (id, type, slice_id, name, input_pri, input_help, input_morehlp, input_default, required, feed, multiple, input_show_func, content_id, search_pri, search_type, search_help, search_before, search_more_help, search_show, search_ft_show, search_ft_default, alias1, alias1_func, alias1_help, alias2, alias2_func, alias2_help, alias3, alias3_func, alias3_help, input_before, aditional, content_edit, html_default, html_show, in_item_tbl, input_validate, input_insert_func, input_show, text_stored) VALUES ('place...........', '', 'noticias-es.....', 'Localidad', 630, '', '', 'txt:', 0, 0, 0, 'fld:', '', 100, '', '', '', '', 0, 0, 0, '_#LUGAR___', 'f_h:', 'localidad', '', 'f_0:', '', '', 'f_0:', '', '', '', 0, 0, 0, '', 'text:', 'qte:', 1, 1)";
1216  $SQL_templates[] = "INSERT INTO field (id, type, slice_id, name, input_pri, input_help, input_morehlp, input_default, required, feed, multiple, input_show_func, content_id, search_pri, search_type, search_help, search_before, search_more_help, search_show, search_ft_show, search_ft_default, alias1, alias1_func, alias1_help, alias2, alias2_func, alias2_help, alias3, alias3_func, alias3_help, input_before, aditional, content_edit, html_default, html_show, in_item_tbl, input_validate, input_insert_func, input_show, text_stored) VALUES ('posted_by.......', '', 'noticias-es.....', 'Publicado por', 5035, '', '', 'txt:', 0, 0, 0, 'fld:', '', 100, '', '', '', '', 0, 0, 0, '_#PUBLICAD', 'f_h:', 'identificador del usuario que publicó el ítem', '', 'f_0:', '', '', 'f_0:', '', '', '', 0, 0, 0, 'posted_by', 'text:', 'uid:', 0, 1)";
1217  $SQL_templates[] = "INSERT INTO field (id, type, slice_id, name, input_pri, input_help, input_morehlp, input_default, required, feed, multiple, input_show_func, content_id, search_pri, search_type, search_help, search_before, search_more_help, search_show, search_ft_show, search_ft_default, alias1, alias1_func, alias1_help, alias2, alias2_func, alias2_help, alias3, alias3_func, alias3_help, input_before, aditional, content_edit, html_default, html_show, in_item_tbl, input_validate, input_insert_func, input_show, text_stored) VALUES ('post_date.......', '', 'noticias-es.....', 'Fecha de envío', 5005, '', '', 'now:', 1, 0, 0, 'nul', '', 100, '', '', '', '', 0, 0, 0, '_#FECHAENV', 'f_d:d/m/Y', 'fecha en que fué enviado el ítem', '', 'f_0:', '', '', 'f_0:', '', '', '', 0, 0, 0, 'post_date', 'date:', 'now:', 0, 0)";
1218  $SQL_templates[] = "INSERT INTO field (id, type, slice_id, name, input_pri, input_help, input_morehlp, input_default, required, feed, multiple, input_show_func, content_id, search_pri, search_type, search_help, search_before, search_more_help, search_show, search_ft_show, search_ft_default, alias1, alias1_func, alias1_help, alias2, alias2_func, alias2_help, alias3, alias3_func, alias3_help, input_before, aditional, content_edit, html_default, html_show, in_item_tbl, input_validate, input_insert_func, input_show, text_stored) VALUES ('publish_date....', '', 'noticias-es.....', 'Fecha de publicación', 900, 'Fecha en que el item debe aparecer publicado en el sitio', '', 'now:', 1, 0, 0, 'dte:1:10:1', '', 100, '', '', '', '', 0, 0, 0, '_#FECHAPUB', 'f_d:d/m/Y', 'fecha de publicación del item', '', 'f_0:', '', '', 'f_0:', '', '', '', 0, 0, 0, 'publish_date', 'date:', 'qte:', 1, 0)";
1219  $SQL_templates[] = "INSERT INTO field (id, type, slice_id, name, input_pri, input_help, input_morehlp, input_default, required, feed, multiple, input_show_func, content_id, search_pri, search_type, search_help, search_before, search_more_help, search_show, search_ft_show, search_ft_default, alias1, alias1_func, alias1_help, alias2, alias2_func, alias2_help, alias3, alias3_func, alias3_help, input_before, aditional, content_edit, html_default, html_show, in_item_tbl, input_validate, input_insert_func, input_show, text_stored) VALUES( 'status_code.....', '', 'noticias-es.....', 'Estado', '5020', 'Seleccione en qué carpeta se almacena el item', '$AA_DOC_URL}help.html', 'qte:1', '1', '0', '0', 'sel:AA_Core_Bins....', '', '100', '', '', '', '', '0', '0', '0', '', '', '', '', '', '', '', '', '', '', '', '0', '0', '0', 'status_code', 'number', 'num', '0', '0')";
1220  $SQL_templates[] = "INSERT INTO field (id, type, slice_id, name, input_pri, input_help, input_morehlp, input_default, required, feed, multiple, input_show_func, content_id, search_pri, search_type, search_help, search_before, search_more_help, search_show, search_ft_show, search_ft_default, alias1, alias1_func, alias1_help, alias2, alias2_func, alias2_help, alias3, alias3_func, alias3_help, input_before, aditional, content_edit, html_default, html_show, in_item_tbl, input_validate, input_insert_func, input_show, text_stored) VALUES ('slice_id........', '', 'noticias-es.....', 'Canal', 5000, 'Internal field - do not change', '/apc-aa/doc/help.html', 'txt:1', 1, 0, 0, 'fld:', '', 100, '', '', '', '', 0, 0, 0, '_#ID_CANAL', 'f_n:slice_id........', 'identificador interno del canal', '', 'f_0:', '', '', 'f_0:', '', '', '', 0, 0, 0, 'slice_id', 'text:', 'qte:', 0, 1)";
1221  $SQL_templates[] = "INSERT INTO field (id, type, slice_id, name, input_pri, input_help, input_morehlp, input_default, required, feed, multiple, input_show_func, content_id, search_pri, search_type, search_help, search_before, search_more_help, search_show, search_ft_show, search_ft_default, alias1, alias1_func, alias1_help, alias2, alias2_func, alias2_help, alias3, alias3_func, alias3_help, input_before, aditional, content_edit, html_default, html_show, in_item_tbl, input_validate, input_insert_func, input_show, text_stored) VALUES ('source..........', '', 'noticias-es.....', 'Fuente', 600, '', '', 'txt:', 0, 0, 0, 'fld:', '', 100, '', '', '', '', 0, 0, 0, '_#FUENTE__', 'f_h:', 'fuente', '_#FTE_URL_', 'f_l:source_href.....', 'fuente mostrada como enlace al URL de la fuente (si está rellenado)', '', 'f_0:', '', '', '', 0, 0, 0, '', 'text:', 'qte:', 1, 1)";
1222  $SQL_templates[] = "INSERT INTO field (id, type, slice_id, name, input_pri, input_help, input_morehlp, input_default, required, feed, multiple, input_show_func, content_id, search_pri, search_type, search_help, search_before, search_more_help, search_show, search_ft_show, search_ft_default, alias1, alias1_func, alias1_help, alias2, alias2_func, alias2_help, alias3, alias3_func, alias3_help, input_before, aditional, content_edit, html_default, html_show, in_item_tbl, input_validate, input_insert_func, input_show, text_stored) VALUES ('source_href.....', '', 'noticias-es.....', 'URL de la fuente', 610, '', '', 'txt:', 0, 0, 0, 'fld:', '', 100, '', '', '', '', 1, 1, 1, '_#URL_FTE_', 'f_h:', 'URL de la fuente', '', 'f_0:', '', '', 'f_0:', '', '', '', 0, 0, 0, '', 'url:', 'qte:', 1, 1)";
1223  
1224  //$SQL_view_templates_delete[] = "DELETE FROM view WHERE slice_id='AA_Core_Fields..' AND name IN ('Discussion ...','Constant view ...','Javascript ...','rss','Calendar')";
1225  
1226  $SQL_view_templates["discus"]     = "view SET slice_id='AA_Core_Fields..', name='Discussion ...', type='discus', `before`='<table bgcolor=#000000 cellspacing=0 cellpadding=1 border=0><tr><td><table width=100% bgcolor=#f5f0e7 cellspacing=0 cellpadding=0 border=0><tr><td colspan=8><big>Comments</big></td></tr>', even='<table  width=500 cellspacing=0 cellpadding=0 border=0><tr><td colspan=2><hr></td></tr><tr><td width=\"20%\"><b>Date:</b></td><td> _#DATE####</td></tr><tr><td><b>Comment:</b></td><td> _#SUBJECT#</td></tr><tr><td><b>Author:</b></td><td><A href=mailto:_#EMAIL###>_#AUTHOR##</a></td></tr><tr><td><b>WWW:</b></td><td><A href=_#WWW_URL#>_#WWW_DESC</a></td></tr><tr><td><b>IP:</b></td><td>_#IP_ADDR#</td></tr><tr><td colspan=2>&nbsp;</td></tr><tr><td colspan=2>_#BODY####</td></tr><tr><td colspan=2>&nbsp;</td></tr><tr><td colspan=2><a href=_#URLREPLY>Reply</a></td></tr></table><br>', odd='<tr><td width=\"10\">&nbsp;</td><td><font size=-1>_#CHECKBOX</font></td><td width=\"10\">&nbsp;</td><td align=center nowrap><SMALL>_#DATE####</SMALL></td><td width=\"20\">&nbsp;</td><td nowrap>_#AUTHOR## </td><td><table cellspacing=0 cellpadding=0 border=0><tr><td>_#TREEIMGS</td><td><img src=".$AA_IMG_URL."blank.gif width=2 height=21></td><td nowrap>_#SUBJECT#</td></tr></table></td><td width=\"20\">&nbsp;</td></tr>', even_odd_differ=1, after='</table></td></tr></table>_#BUTTONS#', remove_string='<SCRIPT Language=\"JavaScript\"><!--function checkData() { var text=\"\"; if(!document.f.d_subject.value) { text+=\"subject \" } if (text!=\"\") { alert(\"Please, fill the field: \" + text);  return false; } return true; } // --></SCRIPT><form name=f method=post action=\"/apc-aa/filldisc.php3\" onSubmit=\" return checkData()\"><p>Author<br><input type=text name=d_author > <p>Subject<br><input type=text name=d_subject value=\"_#SUBJECT#\"><p>E-mail<br><input type=text name=d_e_mail><p>Comment<br><textarea rows=\"5\" cols=\"40\" name=d_body ></textarea><p>WWW<br><input type=text name=d_url_address value=\"http://\"><p>WWW description<br><input type=text name=d_url_description><br><input type=submit value=Send align=center><input type=hidden name=d_parent value=\"_#DISC_ID#\"><input type=hidden name=d_item_id value=\"_#ITEM_ID#\"><input type=hidden name=url value=\"_#DISC_URL\"></FORM>', group_title=NULL, order1=NULL, o1_direction=0, order2=NULL, o2_direction=NULL, group_by1=NULL, g1_direction=NULL, group_by2=NULL, g2_direction=NULL, cond1field=NULL, cond1op=NULL, cond1cond=NULL, cond2field=NULL, cond2op=NULL, cond2cond=NULL, cond3field=NULL, cond3op=NULL, cond3cond=NULL, listlen=NULL, scroller=NULL, selected_item=0, modification=23, parameter=NULL, img1='<img src=${AA_IMG_URL}i.gif width=9 height=21>', img2='<img src=${AA_IMG_URL}l.gif width=9 height=21>', img3='<img src=${AA_IMG_URL}t.gif width=9 height=21>', img4='<img src=${AA_IMG_URL}blank.gif width=12 height=21>', flag=NULL, aditional=NULL, aditional2=NULL, aditional3=NULL, aditional4=NULL, aditional5=NULL, aditional6=NULL, noitem_msg='No item found', group_bottom=NULL, field1='', field2=NULL, field3=NULL, calendar_type='mon'";
1227  $SQL_view_templates["const"]      = "view SET slice_id='AA_Core_Fields..', name='Constant view ...', type='const', `before`='<table border=0 cellpadding=0 cellspacing=0>', even='', odd='<tr><td>_#VALUE###</td></tr>', even_odd_differ=0, after='</table>', remove_string=NULL, group_title=NULL, order1='value', o1_direction=0, order2=NULL, o2_direction=NULL, group_by1=NULL, g1_direction=NULL, group_by2=NULL, g2_direction=NULL, cond1field=NULL, cond1op=NULL, cond1cond=NULL, cond2field=NULL, cond2op=NULL, cond2cond=NULL, cond3field=NULL, cond3op=NULL, cond3cond=NULL, listlen=10, scroller=NULL, selected_item=0, modification=NULL, parameter='lt_languages', img1=NULL, img2=NULL, img3=NULL, img4=NULL, flag=NULL, aditional=NULL, aditional2=NULL, aditional3=NULL, aditional4=NULL, aditional5=NULL, aditional6=NULL, noitem_msg='No item found', group_bottom=NULL, field1='', field2=NULL, field3=NULL, calendar_type='mon'";
1228  $SQL_view_templates["javascript"] = "view SET slice_id='AA_Core_Fields..', name='Javascript ...', type='javascript', `before`='/* output of this script can be included to any page on any server by adding:&lt;script type=\"text/javascript\" src=\"". $AA_BASE_PATH ."view.php3?vid=3\"&gt; &lt;/script&lt; or such.*/', even=NULL, odd='document.write(\"_#HEADLINE\");', even_odd_differ=NULL, after='// script end ', remove_string=NULL, group_title=NULL, order1='', o1_direction=0, order2='', o2_direction=0, group_by1=NULL, g1_direction=NULL, group_by2=NULL, g2_direction=NULL, cond1field='', cond1op='<', cond1cond='', cond2field='', cond2op='<', cond2cond='', cond3field='', cond3op='<', cond3cond='', listlen=8, scroller=NULL, selected_item=NULL, modification=NULL, parameter=NULL, img1=NULL, img2=NULL, img3=NULL, img4=NULL, flag=NULL, aditional=NULL, aditional2=NULL, aditional3=NULL, aditional4=NULL, aditional5=NULL, aditional6=NULL, noitem_msg='No item found', group_bottom=NULL, field1='', field2=NULL, field3=NULL, calendar_type='mon'";
1229  $SQL_view_templates["rss"]        = "view SET slice_id='AA_Core_Fields..', name='rss', type='rss', `before`='<!DOCTYPE rss PUBLIC \"-//Netscape Communications//DTD RSS 0.91//EN\" \"http://my.netscape.com/publish/formats/rss-0.91.dtd\"> <rss version=\"0.91\"> <channel>  <title>_#RSS_TITL</title>  <link>_#RSS_LINK</link>  <description>_#RSS_DESC</description>  <lastBuildDate>_#RSS_DATE</lastBuildDate> <language></language>', even=NULL, odd=' <item> <title>_#RSS_IT_T</title> <link>_#RSS_IT_L</link> <description>_#RSS_IT_D</description> </item>', even_odd_differ=NULL, after='</channel></rss>', remove_string=NULL, group_title=NULL, order1='publish_date....', o1_direction=0, order2='headline........', o2_direction=0, group_by1=NULL, g1_direction=NULL, group_by2=NULL, g2_direction=NULL, cond1field='source..........', cond1op='', cond1cond='', cond2field='', cond2op='<', cond2cond='', cond3field='', cond3op='<', cond3cond='', listlen=15, scroller=NULL, selected_item=NULL, modification=NULL, parameter=NULL, img1=NULL, img2=NULL, img3=NULL, img4=NULL, flag=NULL, aditional='NULL', aditional2='NULL', aditional3='NULL', aditional4='NULL', aditional5='NULL', aditional6='NULL', noitem_msg='<!DOCTYPE rss PUBLIC \"-//Netscape Communications//DTD RSS 0.91//EN\" \"http://my.netscape.com/publish/formats/rss-0.91.dtd\"> <rss version=\"0.91\"> <title>_#RSS_TITL</title>  <link>_#RSS_LINK</link>  <description>_#RSS_DESC</description>  <lastBuildDate>_#RSS_DATE</lastBuildDate> <language></language><channel></channel></rss>', group_bottom=NULL, field1=NULL, field2=NULL, field3=NULL, calendar_type='mon'";
1230  $SQL_view_templates["calendar"]   = "view SET slice_id='AA_Core_Fields..', name='Calendar', type='calendar', `before`='<table border=1>\r\n<tr><td>Mon</td><td>Tue</td><td>Wen</td><td>Thu</td><td>Fri</td><td>Sat</td><td>Sun</td></tr>', even=NULL, odd='_#STARTDAT-_#END_DATE <b>_#HEADLINE</b>', even_odd_differ=1, after='</table>', remove_string='', group_title='<td><font size=+2><a href=\"calendar.shtml?vid=319&cmd[319]=c-1-_#CV_TST_2-2-_#CV_TST_1&month=_#CV_NUM_M&year=_#CV_NUM_Y&day=_#CV_NUM_D\"><b>_#CV_NUM_D</b></a></font></td>', order1='', o1_direction=0, order2='', o2_direction=0, group_by1=NULL, g1_direction=NULL, group_by2=NULL, g2_direction=NULL, cond1field='publish_date....', cond1op='<', cond1cond='', cond2field='', cond2op='<', cond2cond='', cond3field='', cond3op='<', cond3cond='', listlen=5, scroller=NULL, selected_item=NULL, modification=NULL, parameter=NULL, img1=NULL, img2=NULL, img3=NULL, img4=NULL, flag=NULL, aditional='<td><font size=+2>_#CV_NUM_D</font></td>', aditional2='', aditional3='bgcolor=\"_#COLOR___\"', aditional4=NULL, aditional5=NULL, aditional6=NULL, noitem_msg='There are no events in this month.', group_bottom='', field1='start_date.....1', field2='end_date.......1', field3=NULL, calendar_type='mon_table'";
1231  $SQL_view_templates['links']      = "view SET slice_id='AA_Core_Fields..', name='Links', type='links', `before`='<br>\r\n', even='', odd='<p><a href=\"_#L_URL___\" class=\"link\">_#L_NAME__ (_#L_O_NAME)</a><br>\r\n          _#L_DESCRI<br>\r\n          <a href=\"_#L_URL___\" class=\"link2\">_#L_URL___</a>\r\n     </p>\r\n', even_odd_differ=0, after='', remove_string='()', group_title='', order1='', o1_direction=0, order2=NULL, o2_direction=0, group_by1=NULL, g1_direction=0, group_by2=NULL, g2_direction=0, cond1field=NULL, cond1op='<', cond1cond=NULL, cond2field=NULL, cond2op='<', cond2cond=NULL, cond3field=NULL, cond3op='<', cond3cond=NULL, listlen=1000, scroller=NULL, selected_item=NULL, modification=NULL, parameter=NULL, img1=NULL, img2=NULL, img3=NULL, img4=NULL, flag=NULL, aditional=NULL, aditional2=NULL, aditional3=NULL, aditional4=NULL, aditional5=NULL, aditional6=NULL, noitem_msg='<!-- no links in this category -->', group_bottom='', field1=NULL, field2=NULL, field3=NULL, calendar_type='mon'";
1232  $SQL_view_templates['categories'] = "view SET slice_id='AA_Core_Fields..', name='Catategories', type='categories', `before`='     <br><b>_#C_PATH__</b><br><br>\r\n', even='', odd='<br>&#8226; <a href=\"?cat=_#CATEG_ID\" class=\"link\">_#C_NAME___#C_CROSS_</a>&nbsp;&nbsp;<b>(_#C_LCOUNT)</b>\r\n', even_odd_differ=0, after='', remove_string='', group_title='', order1='', o1_direction=0, order2='', o2_direction=0, group_by1='', g1_direction=0, group_by2='', g2_direction=0, cond1field='', cond1op='<', cond1cond='', cond2field='', cond2op='<', cond2cond='', cond3field='', cond3op='<', cond3cond='', listlen=1000, scroller=NULL, selected_item=NULL, modification=NULL, parameter=NULL, img1=NULL, img2=NULL, img3=NULL, img4=NULL, flag=NULL, aditional=NULL, aditional2=NULL, aditional3=NULL, aditional4=NULL, aditional5=NULL, aditional6=NULL, noitem_msg='<!-- no categories in this category -->', group_bottom='', field1=NULL, field2=NULL, field3=NULL, calendar_type='mon'";
1233  $SQL_view_templates['urls']       = "view SET slice_id='AA_Core_Fields..', name='URLs listing', type='urls', `before`='<!-- view used for listing URLs of items -->', even=NULL, odd='<a href=\"http://www.example.org/index.stm?x=_#SITEM_ID\">_#SITEM_ID</a><br>\r\n', even_odd_differ=0, after='', remove_string='', group_title='', order1='', o1_direction=0, order2='', o2_direction=0, group_by1='', g1_direction=0, group_by2='', g2_direction=0, cond1field='', cond1op='<', cond1cond='', cond2field='', cond2op='<', cond2cond='', cond3field='', cond3op='<', cond3cond='', listlen=100000, scroller=NULL, selected_item=NULL, modification=NULL, parameter=NULL, img1=NULL, img2=NULL, img3=NULL, img4=NULL, flag=NULL, aditional=NULL, aditional2=NULL, aditional3=NULL, aditional4=NULL, aditional5=NULL, aditional6=NULL, noitem_msg='No item found', group_bottom=NULL, field1=NULL, field2=NULL, field3=NULL, calendar_type='mon'";
1234  $SQL_view_templates['static']     ="view SET slice_id='AA_Core_Fields..', name='Static page', type='static', `before`=NULL, even=NULL, odd='<!-- Static page view is used for creating and viewing static pages like Contacts or About us.', even_odd_differ=NULL, after=NULL, remove_string=NULL, group_title=NULL, order1=NULL, o1_direction=NULL, order2=NULL, o2_direction=NULL, group_by1=NULL, g1_direction=NULL, group_by2=NULL, g2_direction=NULL, cond1field=NULL, cond1op=NULL, cond1cond=NULL, cond2field=NULL, cond2op=NULL, cond2cond=NULL, cond3field=NULL, cond3op=NULL, cond3cond=NULL, listlen=NULL, scroller=NULL, selected_item=NULL, modification=NULL, parameter=NULL, img1=NULL, img2=NULL, img3=NULL, img4=NULL, flag=NULL, aditional=NULL, aditional2=NULL, aditional3=NULL, aditional4=NULL, aditional5=NULL, aditional6=NULL, noitem_msg=NULL, group_bottom=NULL, field1=NULL, field2=NULL, field3=NULL, calendar_type='mon'";
1235  $SQL_view_templates['full']       ="view SET slice_id='AA_Core_Fields..', name='Fulltext view', type='full', `before`='<!-- Fulltext view is for viewing long items. It shows only one selected item with abstract and fulltext. -->\r\n\r\n<!-- top of the page -->\r\n<br>', even=NULL, odd='<h2><b>_#HEADLINE</b></h2>\r\n_#PUB_DATE, _#AUTHOR__\r\n<br>\r\n_#FULLTEXT<br>\r\n<div align=\"right\"><a href=\"javascript:history.go(-1)\">Back</a></div>\r\n', even_odd_differ=NULL, after='', remove_string=NULL, group_title=NULL, order1=NULL, o1_direction=NULL, order2=NULL, o2_direction=NULL, group_by1=NULL, g1_direction=NULL, group_by2=NULL, g2_direction=NULL, cond1field='', cond1op='<', cond1cond='', cond2field='', cond2op='<', cond2cond='', cond3field='', cond3op='<', cond3cond='', listlen=NULL, scroller=NULL, selected_item=NULL, modification=NULL, parameter=NULL, img1=NULL, img2=NULL, img3=NULL, img4=NULL, flag=NULL, aditional=NULL, aditional2=NULL, aditional3=NULL, aditional4=NULL, aditional5=NULL, aditional6=NULL, noitem_msg='<p>No item found.</p>', group_bottom=NULL, field1=NULL, field2=NULL, field3=NULL, calendar_type='mon'";
1236  
1237  
1238  $SQL_update_modules[] = "REPLACE INTO module (id, name, deleted, type, slice_url, lang_file, created_at, created_by, owner, flag) SELECT id, name, deleted, 'S', slice_url, lang_file, created_at, created_by, owner, 0 FROM slice";
1239  $SQL_update_modules[] = "REPLACE INTO module  (id, name, deleted, type, slice_url, lang_file, created_at, created_by, owner, flag) VALUES ('SiteTemplate....', 'Site Template', 0, 'W', 'http://example.org/index.shtml', 'en_site_lang.php3', $now, '', '', 0)";
1240  $SQL_update_modules[] = "REPLACE INTO site    (id, state_file, structure, flag) VALUES ('SiteTemplate....', 'template.php3', '".'O:8:"sitetree":2:{s:4:"tree";a:1:{i:1;O:4:"spot":8:{s:2:"id";s:1:"1";s:1:"n";s:5:"start";s:1:"c";N;s:1:"v";N;s:1:"p";s:1:"1";s:2:"po";a:1:{i:0;s:1:"1";}s:2:"ch";N;s:1:"f";i:0;}}s:8:"start_id";s:1:"1";}'."', 0)";
1241  
1242  // Add the rows to cron only if no row with the script exists
1243  $SQL_cron[] = array (
1244      "script" => 'modules/alerts/alerts.php3',
1245      "sql" => array (
1246          "INSERT INTO cron (minutes, hours, mday, mon, wday, script, params, last_run)
1247           VALUES ('0-60/5', '*', '*', '*', '*', 'modules/alerts/alerts.php3', 'howoften=instant', NULL)"),
1248      "script" => 'modules/alerts/alerts.php3');
1249  $SQL_cron[] = array (
1250      "sql" => array (
1251          "INSERT INTO cron (minutes, hours, mday, mon, wday, script, params, last_run)
1252           VALUES ('8,23,38,53', '*', '*', '*', '*', 'admin/xmlclient.php3', '', NULL)"),
1253      "script" => 'admin/xmlclient.php3');
1254  $SQL_cron[] = array (
1255      "sql" => array (
1256          "INSERT INTO cron (minutes, hours, mday, mon, wday, script, params, last_run)
1257           VALUES ('38',     '2', '*', '*', '2', 'misc/optimize.php3', 'key=".substr( DB_PASSWORD, 0, 5 )."', NULL)"),
1258      "script" => 'misc/optimize.php3');
1259  $SQL_cron[] = array (
1260      "sql" => array (
1261          "INSERT INTO cron (minutes, hours, mday, mon, wday, script, params, last_run)
1262           VALUES ('1',     '0', '*', '*', '*', 'modules/mysql_auth/suspend.php3', '', NULL)"),
1263      "script" => 'modules/mysql_auth/suspend.php3');
1264  $SQL_cron[] = array (
1265      "sql" => array (
1266          "INSERT INTO cron (minutes, hours, mday, mon, wday, script, params, last_run)
1267           VALUES ('35',     '*', '*', '*', '*', 'modules/links/linkcheck.php3', '', NULL)"),
1268      "script" => 'modules/links/linkcheck.php3');
1269  $SQL_cron[] = array (
1270      "sql" => array (
1271          "INSERT INTO cron (minutes, hours, mday, mon, wday, script, params, last_run)
1272           VALUES ('0-60/2',     '*', '*', '*', '*', 'misc/toexecute.php3', '', NULL)"),
1273      "script" => 'misc/toexecute.php3');
1274  
1275  $SQL_email_templates[] = "REPLACE INTO email (description, subject, body, header_from, reply_to, errors_to, sender, lang, html, type) VALUES ('Generic Alerts Welcome', 'Welcome to Econnect Alerts', 'Somebody requested to receive regularly new items from our web site \r\n<a href=\"http://www.ecn.cz\">www.ecn.cz</a>\r\n{switch({_#HOWOFTEN})instant:at the moment they are added\r\n:daily:once a day\r\n:weekly:once a week\r\n:monthly:once a month}.<br>\r\n<br>\r\nYou will not receive any emails until you confirm your subscription.\r\nTo confirm it or to change your personal info, please go to<br>\r\n<a href=\"_#COLLFORM\">_#COLLFORM</a>.<br><br>\r\nThank you for reading our alerts,<br>\r\nThe Econnect team\r\n', 'somebody@haha.cz', '', '', '', 'cz', 1, 'alerts welcome');";
1276  $SQL_email_templates[] = "REPLACE INTO email (description, subject, body, header_from, reply_to, errors_to, sender, lang, html, type) VALUES ('Generic Alerts Alert', '{switch({_#HOWOFTEN})instant:News from Econnect::_#HOWOFTEN digest from Econnect}', '_#FILTERS_\r\n<br><hr>\r\nTo change your personal info, please go to<br>\r\n<a href=\"_#COLLFORM\">_#COLLFORM</a>.<br><br>\r\nThank you for reading our alerts,<br>\r\nThe Econnect team\r\n', 'econnect@team.cz', '', '', '', 'cz', 1, 'alerts alert');";
1277  $SQL_email_templates[] = "REPLACE INTO email (description, subject, body, header_from, reply_to, errors_to, sender, lang, html, type) VALUES ('Generic Item Manager Welcome', 'Welcome, AA _#ROLE____', 'You have been assigned an Item Manager for the slice _#SLICNAME. Your username is _#LOGIN___. See <a href=\"http://apc-aa.sf.net/faq\">FAQ</a> for help.', '\"_#ME_NAME_\" <_#ME_MAIL_>', '', '', '', 'en', 1, 'slice wizard welcome');";
1278  
1279  
1280  // ------------------- Links module setup ---------------------------------
1281  $plinks_root_id = q_pack_id(Links_Category2SliceID(1));
1282  $plinks_test_id = q_pack_id(Links_Category2SliceID(2));
1283  $SQL_links_create[] = "REPLACE INTO module (id,                name,     deleted, type,   slice_url,                         lang_file,           created_at, created_by, owner, flag)
1284                                      VALUES ('$plinks_root_id', 'Links root', 0,  'Links', 'http://example.org/index.shtml', 'en_links_lang.php3', $now, '', '', 0)";
1285  $SQL_links_create[] = "REPLACE INTO module (id,                name,     deleted, type,   slice_url,                         lang_file,           created_at, created_by, owner, flag)
1286                                      VALUES ('$plinks_test_id', 'Links example', 0,  'Links', 'http://example.org/index.shtml', 'en_links_lang.php3', $now, '', '', 0)";
1287  $SQL_links_create[] = "REPLACE INTO links (id,            start_id, tree_start, select_start)
1288                                     VALUES ('$plinks_root_id', 1,        1,          1)";
1289  $SQL_links_create[] = "REPLACE INTO links (id,            start_id, tree_start, select_start)
1290                                     VALUES ('$plinks_test_id', 2,        2,          2)";
1291  
1292  $SQL_links_create[] = "REPLACE INTO links_categories (id, name, html_template, deleted, path, inc_file1, link_count)
1293                                                VALUES (1, 'Root', '',           'n',     '1',  '',        0)";
1294  $SQL_links_create[] = "REPLACE INTO links_categories (id, name, html_template, deleted, path, inc_file1, link_count)
1295                                                VALUES (2, 'Example', '',        'n',     '1,2', '',       0)";
1296  
1297  $SQL_links_create[] = "REPLACE INTO links_cat_cat (category_id, what_id, base, state, proposal, priority, proposal_delete, a_id)
1298                                             VALUES (1,           2,       'y',  'visible', 'n',  '5.00',   'n',             1)";
1299  
1300  $SQL_links_create[] = "REPLACE INTO links_languages (id, name, short_name) VALUES (100, 'Czech', 'Cz')";
1301  $SQL_links_create[] = "REPLACE INTO links_languages (id, name, short_name) VALUES (200, 'Deutsch', 'De')";
1302  $SQL_links_create[] = "REPLACE INTO links_languages (id, name, short_name) VALUES (300, 'English', 'En')";
1303  $SQL_links_create[] = "REPLACE INTO links_languages (id, name, short_name) VALUES (400, 'French', 'Fr')";
1304  $SQL_links_create[] = "REPLACE INTO links_languages (id, name, short_name) VALUES (500, 'Hungarian', 'Hu')";
1305  $SQL_links_create[] = "REPLACE INTO links_languages (id, name, short_name) VALUES (530, 'Italian', 'It')";
1306  $SQL_links_create[] = "REPLACE INTO links_languages (id, name, short_name) VALUES (550, 'Japan', 'It')";
1307  $SQL_links_create[] = "REPLACE INTO links_languages (id, name, short_name) VALUES (600, 'Portugal', 'Po')";
1308  $SQL_links_create[] = "REPLACE INTO links_languages (id, name, short_name) VALUES (700, 'Slovak', 'Sl')";
1309  $SQL_links_create[] = "REPLACE INTO links_languages (id, name, short_name) VALUES (800, 'Spanish', 'Sp')";
1310  $SQL_links_create[] = "REPLACE INTO links_languages (id, name, short_name) VALUES (900, 'Romanian', 'Ro')";
1311  $SQL_links_create[] = "REPLACE INTO links_languages (id, name, short_name) VALUES (950, 'Russian', 'Ru')";
1312  $SQL_links_create[] = "REPLACE INTO links_languages (id, name, short_name) VALUES (999, 'Other', 'other')";
1313  
1314  $SQL_links_create[] = "REPLACE INTO links_regions (id, name, level) VALUES (1000, 'Africa', 1)";
1315  $SQL_links_create[] = "REPLACE INTO links_regions (id, name, level) VALUES (1010, 'Kenya', 2)";
1316  $SQL_links_create[] = "REPLACE INTO links_regions (id, name, level) VALUES (1020, 'Nigeria', 2)";
1317  $SQL_links_create[] = "REPLACE INTO links_regions (id, name, level) VALUES (1030, 'Senegal', 2)";
1318  $SQL_links_create[] = "REPLACE INTO links_regions (id, name, level) VALUES (1040, 'South Africa', 2)";
1319  $SQL_links_create[] = "REPLACE INTO links_regions (id, name, level) VALUES (2000, 'Asia-Pacific', 1)";
1320  $SQL_links_create[] = "REPLACE INTO links_regions (id, name, level) VALUES (2010, 'Australia', 2)";
1321  $SQL_links_create[] = "REPLACE INTO links_regions (id, name, level) VALUES (2020, 'Japan', 2)";
1322  $SQL_links_create[] = "REPLACE INTO links_regions (id, name, level) VALUES (2030, 'Philippines', 2)";
1323  $SQL_links_create[] = "REPLACE INTO links_regions (id, name, level) VALUES (2040, 'South Korea', 2)";
1324  $SQL_links_create[] = "REPLACE INTO links_regions (id, name, level) VALUES (3000, 'Central America', 1)";
1325  $SQL_links_create[] = "REPLACE INTO links_regions (id, name, level) VALUES (3010, 'Nicaragua', 2)";
1326  $SQL_links_create[] = "REPLACE INTO links_regions (id, name, level) VALUES (4000, 'Europe', 1)";
1327  $SQL_links_create[] = "REPLACE INTO links_regions (id, name, level) VALUES (4010, 'Bulgaria', 2)";
1328  $SQL_links_create[] = "REPLACE INTO links_regions (id, name, level) VALUES (4020, 'Czech Republic', 2)";
1329  $SQL_links_create[] = "REPLACE INTO links_regions (id, name, level) VALUES (4030, 'Germany', 2)";
1330  $SQL_links_create[] = "REPLACE INTO links_regions (id, name, level) VALUES (4040, 'Hungary', 2)";
1331  $SQL_links_create[] = "REPLACE INTO links_regions (id, name, level) VALUES (4050, 'Romania', 2)";
1332  $SQL_links_create[] = "REPLACE INTO links_regions (id, name, level) VALUES (4060, 'Slovakia', 2)";
1333  $SQL_links_create[] = "REPLACE INTO links_regions (id, name, level) VALUES (4070, 'Spain', 2)";
1334  $SQL_links_create[] = "REPLACE INTO links_regions (id, name, level) VALUES (4080, 'Ukraine', 2)";
1335  $SQL_links_create[] = "REPLACE INTO links_regions (id, name, level) VALUES (4090, 'United Kingdom', 2)";
1336  $SQL_links_create[] = "REPLACE INTO links_regions (id, name, level) VALUES (5000, 'North America', 1)";
1337  $SQL_links_create[] = "REPLACE INTO links_regions (id, name, level) VALUES (5010, 'Canada', 2)";
1338  $SQL_links_create[] = "REPLACE INTO links_regions (id, name, level) VALUES (5020, 'Mexico', 2)";
1339  $SQL_links_create[] = "REPLACE INTO links_regions (id, name, level) VALUES (5030, 'USA', 2)";
1340  $SQL_links_create[] = "REPLACE INTO links_regions (id, name, level) VALUES (6000, 'South America', 1)";
1341  $SQL_links_create[] = "REPLACE INTO links_regions (id, name, level) VALUES (6010, 'Argentina', 2)";
1342  $SQL_links_create[] = "REPLACE INTO links_regions (id, name, level) VALUES (6020, 'Brasil', 2)";
1343  $SQL_links_create[] = "REPLACE INTO links_regions (id, name, level) VALUES (6030, 'Colombia', 2)";
1344  $SQL_links_create[] = "REPLACE INTO links_regions (id, name, level) VALUES (6040, 'Ecuador', 2)";
1345  $SQL_links_create[] = "REPLACE INTO links_regions (id, name, level) VALUES (6050, 'Uruguay', 2)";
1346  
1347  
1348  
1349  // -------------------------------- Executive part -----------------------------
1350  echo "<h2>update=".$update."</h2>";
1351  if ( !$update AND !$restore AND !$restore_now) {
1352    echo '
1353    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
1354    <html>
1355    <head>
1356      <title>APC-AA database update script</title>
1357    </head>
1358    <body>
1359  
1360    <h1>APC-AA database update</h1>
1361    <p>This script is written to be not destructive. It creates temporary tables
1362       first, then copies data from old tables to the temporary ones (tmp_*) and
1363       after successfull copy it drops old tables and renames temporary ones to
1364       right names. Then it possibly updates common records (like default field
1365       definitions, APC-wide constants and templates).</p>
1366    <p><font color="red">However, it is strongly recommended backup your current
1367    database !!!</font><br><br>Something like:<br><code>mysqldump --lock-tables -u '.DB_USER.' -p --opt '.DB_NAME.' &gt; ./aadb/aadb.sql</code></p>
1368  
1369    <form name=f action="' .$PHP_SELF .'" method=post>
1370    <table width="440" border="0" cellspacing="0" cellpadding="1" bgcolor="#589868" align="center">
1371    <tr><td class=tabtit><b>&nbsp;APC-AA database update options</b>
1372    </td>
1373    </tr>
1374    <tr><td>
1375    <table width="100%" border="0" cellspacing="0" cellpadding="4" bgcolor="#A8C8B0">';
1376    FrmInputChBox("dbcreate", "Update DB structure", true, false, "", 1, false,
1377                  "create or update database structure","");
1378    FrmInputChBox("copyold", "Copy current data", true, false, "", 1, false,
1379                  "copy data from current database to the updated one","");
1380    FrmInputChBox("backup", "Backup current tables", true, false, "", 1, false,
1381                  "left the current tables in database named like bck_xxx","");
1382    FrmInputChBox("replacecateg", "Refresh APC-wide categories", true, false, "", 1, false,
1383                  "updates APC-wide (parent) categories","");
1384    FrmInputChBox("replaceconst", "Refresh other constants", true, false, "", 1, false,
1385                  "updates Codepage constants, Language constants, Bin constants","");
1386    FrmInputChBox("newcore", "Redefine field defaults", true, false, "", 1, false,
1387                  "Updates field templates, which is used when you adding new field to slice","");
1388    FrmInputChBox("templates", "Redefine slice templates", true, false, "", 1, false,
1389                  "Updates only slice templates, which is in standard AA installation","");
1390    FrmInputChBox("view_templates", "Add new view templates", true, false, "", 1, false,
1391                  "Templates for javascript, constans, discussions views, ... you can see in 'Action Aplication Core' slice. If you haven't defined any view of some type, the templates are used as default values for new views.","");
1392    FrmInputChBox("view_templates_rewrite_existing", "Overwrite existing templates", false,false, "", 1, false,
1393                  "Check this, if you want overwrite existing view templates with new ones. Default is not to overwrite (unchecked)");
1394    FrmInputChBox("addstatistic", "Add statistic fields (fix)", true, false, "", 1, false,
1395                  "New fields (display_count, disc_count, disc_app) in v1.8 should be added to all slice definitions","");
1396    FrmInputChBox("additemidfields", "Add item id fields (fix)", true, false, "", 1, false,
1397                  "Add 'id' and 'short_id' definitions to fields tabl for each slice, where the definition is missing. It allows searchbar in Item Manager to create filter also on Short id field, ...","");
1398    FrmInputChBox("fixmissingfields", "Fix missing fields fields", true, false, "", 1, false,
1399                  "Add missing mandatory fields in slices (status_code.....)","");
1400    FrmInputChBox("update_modules", "Update modules table", true, false, "", 1, false,
1401                  "AA version >2.1 supports management not only slices, but other modules too. Module table holds IDs of modules (just like slice IDs), which should be copied from module tables (table slice). The default site and poll module is also created/renewed with this option.","");
1402    FrmInputChBox("cron", "Add entries to Cron", true, false, "", 1, false,
1403                  "Alerts, cross server networking and database optimization are run by cron.php3, their entries are added to table cron if not yet there.");
1404    FrmInputChBox("generic_emails", "Add generic email templates", true, false, "", 1, false,
1405                  "These are examples of each email type.");
1406    FrmInputChBox("links_create", "Add Links module", true, false, "", 1, false,
1407                  "Before you can use Links module, you have to prepare database for it (create root category). This option create root category if it is not set already.");
1408    FrmStaticText("", "<hr>", false, "", "", false );
1409    FrmInputChBox("fire", "Write to database", false, false, "", 1, false,
1410                  "Check this for real work with writing to database","");
1411    FrmStaticText("", "<hr>", false, "", "", false );
1412    FrmStaticText("", "Before you write the data into database, please check if following data are correct. If not, please correct it in config.php3 file.<br>
1413                       <b>AA http domain:</b> $AA_HTTP_DOMAIN<br>
1414                       <b>AA image path:</b> $AA_IMG_URL<br>
1415                       <b>AA doc path:</b> $AA_DOC_URL<br>
1416                       <b>Administrator's e-mail:</b> ".ERROR_REPORTING_EMAIL."<br>", false, "", "", false );
1417    FrmInputText("dbpw5", "5 characters of database password", "", 5, 5, false,
1418                  "Fill in first five characters of the database password (see DB_PASSWORD in config.php3 file) - it is from security reasons");
1419    echo '
1420    </table></td></tr>
1421    <tr><td align="center">
1422      <input type=submit name=update value="Run Update">
1423      <input type=submit name=restore value="Restore Data from Backup Tables">
1424    </td></tr></table>
1425    </FORM>
1426    </body>
1427    </html>
1428    ';
1429    exit;
1430  }
1431  
1432  
1433  if ( substr( DB_PASSWORD, 0, 5 ) != $dbpw5 ) {
1434    echo '
1435      <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
1436      <html>
1437      <head>
1438          <title>APC-AA database update script - bad password</title>
1439      </head>
1440      <body>
1441  
1442      <h1>APC AA</h1>
1443  
1444      <form name=f action="' .$PHP_SELF .'" >
1445      <table width="440" border="0" cellspacing="0" cellpadding="1" bgcolor="#589868" align="center">
1446      <tr><td class=tabtit><b>&nbsp;Bad password. Please fill "first five characters from aa database password (DB_PASSWORD in config.php3 file)".</b></td></tr>
1447      <tr><td align="center">
1448        <input type=hidden name=dbpw5 value="'.$dbpw5.'">
1449        <input type=submit name=xxxx value="Back">
1450      </td></tr></table>
1451      </FORM>
1452      </body>
1453      </html>';
1454    exit;
1455  }
1456  
1457  
1458  if ( $restore ) {
1459    echo '
1460      <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
1461      <html>
1462      <head>
1463          <title>APC-AA database restore script</title>
1464      </head>
1465      <body>
1466  
1467      <h1>APC-AA database restore</h1>
1468  
1469      <p>This script DELETES all the current tables (slice, item, ...) and then renames all backup tables (bck_slice, bck_item, ...) to right names (slice, item, ...). So, there MUST be bck_* tables if you want to have some content in database.</p>
1470      <form name=f action="' .$PHP_SELF .'">
1471      <table width="440" border="0" cellspacing="0" cellpadding="1" bgcolor="#589868" align="center">
1472      <tr><td class=tabtit><b>&nbsp;Are you sure you want to restore tables?</b></td></tr>
1473      <tr><td align="center">
1474        <input type=hidden name=dbpw5 value="'.$dbpw5.'">
1475        <input type=submit name=restore_now value="Yes">
1476        <input type=submit name=xxxx value="No">
1477      </td></tr></table>
1478      </FORM>
1479      </body>
1480      </html>';
1481    exit;
1482  }
1483  
1484  if ( $restore_now ) {
1485    echo '
1486      <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
1487      <html>
1488      <head>
1489          <title>APC-AA database restore script</title>
1490      </head>
1491      <body>
1492  
1493      <h1>APC-AA database restore</h1>
1494  
1495      <p>Resoring ...</p>';
1496  
1497    echo '<h2>Replace tables with bck_* tables</h2>';
1498    reset( $tablelist );
1499    $store_halt = $db->Halt_On_Error;
1500    $db->Halt_On_Error = "report";
1501    while ( list($t) = each( $tablelist ) ) {
1502      $SQL = "DROP TABLE IF EXISTS $t";
1503      safe_echo ($SQL);
1504      myquery($db, $SQL);
1505      $SQL = "ALTER TABLE bck_$t RENAME $t";
1506      safe_echo ($SQL);
1507      myquery($db, $SQL);
1508    }
1509    $db->Halt_On_Error = $store_halt;
1510  
1511    echo '<h2>Restore OK</h2>
1512          </body>
1513          </html>';
1514  
1515    exit;
1516  }
1517  
1518  echo '
1519    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
1520    <html>
1521    <head>
1522      <title>APC-AA database update script</title>
1523    </head>
1524    <body>
1525  
1526    <h1>APC-AA database update</h1>
1527    <p>Updating ...</p>';
1528  
1529  if ( $dbcreate ) {
1530    // this script copies data from old tables to temp tables,
1531    // and then replaces the old tables with the temp tables.
1532    // if an old table is 'missing' it will cause an error,
1533    // so here, we create missing old tables.
1534  
1535    echo '<h2>Delete temporary tables if exists</h2>';
1536    reset( $tablelist );
1537    while ( list($t) = each( $tablelist ) ) {
1538      $SQL = "DROP TABLE IF EXISTS tmp_$t";
1539      safe_echo ($SQL);
1540      myquery($db, $SQL);
1541    }
1542  
1543    echo '<h2>Creating temporary databases</h2>';
1544    reset( $tablelist );
1545    while ( list( $t, $def) = each( $tablelist ) ) {
1546      $SQL = "  CREATE TABLE IF NOT EXISTS tmp_$t $def";
1547      safe_echo ($SQL);
1548      myquery($db, $SQL );
1549    }
1550  
1551    echo '<h2>Creating new tables that do not exist in database</h2>';
1552    reset( $tablelist );
1553    while ( list( $t, $def ) = each( $tablelist ) ) {
1554      $SQL = "  CREATE TABLE IF NOT EXISTS $t $def";
1555      safe_echo ($SQL);
1556      myquery($db, $SQL );
1557    }
1558  }
1559  
1560  if ( $copyold ) {
1561    echo '<h2>Copying old values to new tables </h2>';
1562    reset( $tablelist );
1563    $store_halt = $db->Halt_On_Error;
1564    $db->Halt_On_Error = "report";
1565  
1566    while ( list($t) = each( $tablelist ) ) {   // copy all tables
1567      unset($old_info);
1568      unset($tmp_info);
1569      $old_info = $db->metadata( $t );
1570      $tmp_info = $db->metadata( "tmp_$t" );
1571  
1572      if ( isset( $old_info ) AND is_array($old_info) ) {
1573        $delim = "";
1574        $field_list = "";
1575        while ( list ( ,$fld ) = each ($tmp_info)) {  //construct field list
1576          if ( IsPaired($fld[name], $old_info) )
1577            $field_list .= $delim . '`'. $fld['name'] .'`';
1578           else
1579            $field_list .= $delim .( strstr($fld['flags'],"not_null") ? '" "':'""');
1580          $delim = ",";
1581        }
1582        if ( $field_list == "")
1583          $field_list = "*" ;
1584        $SQL = "INSERT INTO tmp_$t SELECT $field_list FROM $t";
1585        safe_echo ($SQL);
1586        myquery($db, $SQL);
1587      }
1588    }
1589    $db->Halt_On_Error = $store_halt;
1590  }
1591  
1592  if ( $backup )
1593    echo '<h2>Backup old tables to bck_xxxx tables and use new tables instead</h2>';
1594   else
1595    echo '<h2>delete old tables and use new tables instead</h2>';
1596  
1597  if ( $dbcreate ) {
1598    reset( $tablelist );
1599    $store_halt = $db->Halt_On_Error;
1600    $db->Halt_On_Error = "report";
1601  
1602    while ( list($t) = each( $tablelist ) ) {
1603      if ( $backup ) {
1604        $SQL = "DROP TABLE IF EXISTS bck_$t";
1605        safe_echo ($SQL);
1606        myquery($db, $SQL);
1607  
1608        $SQL = "ALTER TABLE $t RENAME bck_$t";
1609        safe_echo ($SQL);
1610        myquery($db, $SQL);
1611      }
1612      $SQL = "DROP TABLE IF EXISTS $t";
1613      safe_echo ($SQL);
1614      myquery($db, $SQL);
1615  
1616      $SQL = "ALTER TABLE tmp_$t RENAME $t";
1617      safe_echo ($SQL);
1618      myquery($db, $SQL);
1619    }
1620    $db->Halt_On_Error = $store_halt;
1621  }
1622  
1623  if ( $addstatistic ) {
1624    echo '<h2>Add statistic and discusion count field field for each slice</h2>';
1625    $SQL = "SELECT slice.id FROM slice LEFT JOIN field ON
1626            (slice.id=field.slice_id AND field.id IN ('display_count...', 'disc_count......', 'disc_app........'))
1627            WHERE field.id IS NULL";  // get only slices with not defined di... fields
1628    $db->query( $SQL );
1629    while ( $db->next_record() ) {
1630      if ( $db->f('id') == 'AA_Core_Fields..' )
1631        continue;
1632      $SQL = "REPLACE INTO field VALUES( 'display_count...', '', '". quote($db->f(id)) ."', 'Displayed Times', '5050', 'Internal field - do not change', '$AA_DOC_URL}help.html', 'qte:0', '1', '1', '0', 'fld', '', '100', '', '', '', '', '0', '0', '0', '_#DISPL_NO', 'f_h', 'alias for number of displaying of this item', '', '', '', '', '', '', '', '', '0', '0', '0', 'display_count', '', 'nul', '0', '1')";
1633      safe_echo ($SQL);
1634      myquery($db2, $SQL );
1635      $SQL = "REPLACE INTO field VALUES( 'disc_count......', '', '". quote($db->f(id)) ."', 'Comments Count', '5060', 'Internal field - do not change', '$AA_DOC_URL}help.html', 'qte:0', '1', '1', '0', 'fld', '', '100', '', '', '', '', '0', '0', '0', '_#D_ALLCNT', 'f_h', 'alias for number of all discussion comments for this item', '', '', '', '', '', '', '', '', '0', '0', '0', 'disc_count', '', 'nul', '0', '1')";
1636      safe_echo ($SQL);
1637      myquery($db2, $SQL );
1638      $SQL = "REPLACE INTO field VALUES( 'disc_app........', '', '". quote($db->f(id)) ."', 'Approved Comments Count', '5070', 'Internal field - do not change', '$AA_DOC_URL}help.html', 'qte:0', '1', '1', '0', 'fld', '', '100', '', '', '', '', '0', '0', '0', '_#D_APPCNT', 'f_h', 'alias for number of approved discussion comments for this item', '', '', '', '', '', '', '', '', '0', '0', '0', 'disc_app', '', 'nul', '0', '1')";
1639      safe_echo ($SQL);
1640      myquery($db2, $SQL );
1641    }
1642  }
1643  
1644  if ( $additemidfields ) {
1645    echo '<h2>Add short_id and id field definition to fields table (for all slices)</h2>';
1646    $SQL = "SELECT slice.id FROM slice LEFT JOIN field ON
1647            (slice.id=field.slice_id AND field.id IN ('id..............', 'short_id........'))
1648            WHERE field.id IS NULL";  // get only slices with not defined di... fields
1649    $db->query( $SQL );
1650    while ( $db->next_record() ) {
1651      if ( $db->f('id') == 'AA_Core_Fields..' )
1652        continue;
1653  
1654      $SQL = "REPLACE INTO field VALUES ('id..............', '', '". quote($db->f('id')) ."', 'Long ID', 5080, 'Internal field - do not change', '$AA_DOC_URL}help.html', 'txt:', 0, 0, 0, 'nul', '', 0, '', '', '', '', 1, 1, 1, '_#ITEM_ID_', 'f_n:', 'alias for Long Item ID', '', 'f_0:', '', '', 'f_0:', '', '', '', 0, 0, 0, 'id', '', 'nul', 0, 1)";
1655      safe_echo ($SQL);
1656      myquery($db2, $SQL );
1657      $SQL = "REPLACE INTO field VALUES ('short_id........', '', '". quote($db->f('id')) ."', 'Short ID', 5090, 'Internal field - do not change', '$AA_DOC_URL}help.html', 'txt:', 0, 0, 0, 'nul', '', 100, '', '', '', '', 1, 1, 1, '_#SITEM_ID', 'f_t:', 'alias for Short Item ID', '', 'f_0:', '', '', 'f_0:', '', '', '', 0, 0, 0, 'short_id', '', 'nul', 0, 0)";
1658      safe_echo ($SQL);
1659      myquery($db2, $SQL );
1660    }
1661  }
1662  
1663  
1664  if ( $fixmissingfields ) {
1665    echo '<h2>Fixing missing mandatory fields in slices</h2>';
1666    $SQL = "SELECT slice.id FROM slice LEFT JOIN field ON
1667            (slice.id=field.slice_id AND field.id='status_code.....')
1668            WHERE field.id IS NULL";  // get only slices with not defined status_code field
1669    $db->query( $SQL );
1670    while ( $db->next_record() ) {
1671      if ( $db->f('id') == 'AA_Core_Fields..' )
1672        continue;
1673      $SQL = "REPLACE INTO field (id, type, slice_id, name, input_pri, input_help, input_morehlp, input_default, required, feed, multiple, input_show_func, content_id, search_pri, search_type, search_help, search_before, search_more_help, search_show, search_ft_show, search_ft_default, alias1, alias1_func, alias1_help, alias2, alias2_func, alias2_help, alias3, alias3_func, alias3_help, input_before, aditional, content_edit, html_default, html_show, in_item_tbl, input_validate, input_insert_func, input_show, text_stored) VALUES( 'status_code.....', '',\"";
1674      $SQL .= quote($db->f(id));
1675      $SQL .= "\", 'Status', '5020', '', '$AA_DOC_URL}help.html', 'qte:1', '1', '0', '0', 'sel:AA_Core_Bins....', '', '100', '', '', '', '', '0', '0', '0', '', '', '', '', '', '', '', '', '', '', '', '0', '0', '0', 'status_code', 'number', 'num', '0', '0')";
1676      safe_echo ($SQL);
1677      myquery($db2, $SQL );
1678    }
1679  }
1680  
1681  if ( $replacecateg ) {
1682    echo '<h2>Updating APC wide categories</h2>';
1683    reset( $SQL_apc_categ );
1684    while ( list( ,$SQL) = each( $SQL_apc_categ ) ) {
1685      safe_echo ($SQL);
1686      myquery($db, $SQL );
1687    }
1688  }
1689  
1690  if ( $replaceconst ) {
1691    echo '<h2>Updating Constants</h2>';
1692    reset( $SQL_constants );
1693    while ( list( ,$SQL) = each( $SQL_constants ) ) {
1694      safe_echo ($SQL);
1695      myquery($db, $SQL );
1696    }
1697  }
1698  
1699  if ( $newcore ) {
1700    echo '<h2>Updating Core field definitions</h2>';
1701    reset( $SQL_aacore );
1702    while ( list( ,$SQL) = each( $SQL_aacore ) ) {
1703      safe_echo ($SQL);
1704      myquery($db, $SQL );
1705    }
1706  }
1707  
1708  if ( $templates ) {
1709    echo '<h2>Updating Slice templates</h2>';
1710    reset( $SQL_templates );
1711    while ( list( ,$SQL) = each( $SQL_templates ) ) {
1712      safe_echo ($SQL);
1713      myquery($db, $SQL );
1714    }
1715  }
1716  
1717  if ( $view_templates ) {
1718      $SQL = "SELECT * FROM view WHERE slice_id='AA_Core_Fields..'";
1719      $select = GetTable2Array($SQL, "type");
1720  //    print_r($select);
1721      if ($view_templates_rewrite_existing) {
1722          echo '<h2>Replacing existing View templates</h2>';
1723          foreach ($select as $key => $val) {
1724              if ( !$SQL_view_templates[$key] ) continue;
1725              $SQL = "UPDATE ".$SQL_view_templates[$key]." WHERE id='".$val['id']."'";
1726              safe_echo( $SQL );
1727              myquery($db, $SQL );
1728          }
1729      }
1730      echo '<h2>Adding new View templates</h2>';
1731      foreach ($SQL_view_templates as $key=>$val) {
1732          if ( !$select[$key] ) {
1733              $SQL = "INSERT ".$SQL_view_templates[$key];
1734              safe_echo ($SQL);
1735              myquery($db, $SQL );
1736          }
1737      }
1738  }
1739  
1740  if ( $update_modules ) {
1741    echo '<h2>Updating Modules table</h2>';
1742    reset( $SQL_update_modules );
1743    while ( list( ,$SQL) = each( $SQL_update_modules ) ) {
1744      safe_echo ($SQL);
1745      myquery($db, $SQL );
1746    }
1747  }
1748  
1749  if ( $cron ) {
1750    echo '<h2>Adding to Cron table</h2>';
1751    reset( $SQL_cron );
1752    while ( list( ,$cron_entry) = each( $SQL_cron ) ) {
1753      $db->query("SELECT * FROM cron WHERE script='$cron_entry[script]'");
1754      if (! $db->next_record()) {
1755          foreach ($cron_entry["sql"] as $sql) {
1756              safe_echo( $sql );
1757              myquery($db, $sql );
1758          }
1759      }
1760    }
1761  }
1762  
1763  if ( $generic_emails ) {
1764    echo '<h2>Add generic mail templates</h2>';
1765    reset ($SQL_email_templates);
1766    while (list (, $SQL) = each ($SQL_email_templates)) {
1767      safe_echo ($SQL);
1768      myquery($db, $SQL );
1769    }
1770  }
1771  
1772  if ( $links_create ) {
1773    echo '<h2>Update Links module</h2>';
1774    $db->query("SELECT * FROM links");
1775    if (! $db->next_record()) {          // only if links are not installed
1776      reset ($SQL_links_create);
1777      while (list (, $SQL) = each ($SQL_links_create)) {
1778        safe_echo ($SQL);
1779        myquery($db, $SQL );
1780      }
1781    }
1782  }
1783  
1784  
1785  echo '<h2>Update OK</h2>
1786        </body>
1787        </html>';
1788  
1789  ?>


[ Powered by PHPXref - Served by Debian GNU/Linux ]