Location: PHPKode > projects > O - OpenSource GroupWare > osgw/users/config/db_install.php
<?php

$tables['o_users'] = array(
'user_id'=> array("type"=>'INT', 'size'=>'6','null'=>'NO','key'=>'PRI','ex'=>'INC','default'=>''),
'username'=> array("type"=>'CHAR', 'size'=>'20','null'=>'NO','key'=>'IND','ex'=>'UNI','default'=>''),
'firstname'=> array("type"=>'VARCHAR', 'size'=>'20','null'=>'YES','key'=>'','ex'=>'','default'=>''),
'lastname'=> array("type"=>'VARCHAR', 'size'=>'20','null'=>'YES','key'=>'','ex'=>'','default'=>''),
'password'=> array("type"=>'VARCHAR', 'size'=>'255','null'=>'YES','key'=>'','ex'=>'','default'=>''),
'email'=> array("type"=>'VARCHAR', 'size'=>'255','null'=>'YES','key'=>'','ex'=>'','default'=>''),
'website'=> array("type"=>'VARCHAR', 'size'=>'255','null'=>'YES','key'=>'','ex'=>'','default'=>''),
'icq'=> array("type"=>'VARCHAR', 'size'=>'20','null'=>'YES','key'=>'','ex'=>'','default'=>''),
'yahop'=> array("type"=>'VARCHAR', 'size'=>'20','null'=>'YES','key'=>'','ex'=>'','default'=>''),
'aim'=> array("type"=>'VARCHAR', 'size'=>'20','null'=>'YES','key'=>'','ex'=>'','default'=>''),
'msg'=> array("type"=>'VARCHAR', 'size'=>'20','null'=>'YES','key'=>'','ex'=>'','default'=>''),
'date_created'=> array("type"=>'INT', 'size'=>'11','null'=>'YES','key'=>'','ex'=>'','default'=>''));

$tables['o_home_layout'] = array(
	'id'=> array("type"=>'INT', 'size'=>'11','null'=>'NO','key'=>'PRI','ex'=>'INC','default'=>''),
	'user_id'=> array('type'=>'INT', 'size'=>'6','null'=>'NO','key'=>'','ex'=>'','default'=>''),
	'position'=>array('type'=>'INT', 'size'=>'1','null'=>'','key'=>'','ex'=>'','default'=>''),
	'service'=>array("type"=>'CHAR', 'size'=>'2','null'=>'','key'=>'','ex'=>'','default'=>''));
	
$record['o_user_locale'] = array(
	array("user_id"=>"1","locale"=>"en_ca","country"=>"23","language"=>"en_ca","num_decimal"=>".","num_separator"=>",","num_pos"=>"",
	"num_neg"=>"-","money_currency"=>"$","money_decimal"=>".","money_thousands"=>",","money_fraction_digits"=>"2",
	"pos_pfx_symbol"=>"TRUE","pos_position"=>"Before Quantity","neg_pfx_symbol"=>"TRUE","neg_position"=>"Before Quantity",
	"date"=>"F d, Y","short_date"=>"d/m/y","time"=>"h:i:s"));

/*
$O->db->query("INSERT INTO user_locale (user_id, locale, language, country, num_decimal, num_separator, num_pos, num_neg, money_currency, money_decimal, money_thousands, money_fraction_digits, pos_pfx_symbol, pos_position, neg_pfx_symbol, neg_position, date, short_date, time) VALUES
('1','en-ca', 'en_ca', '23', '.',',','','-','$','.',',','2','TRUE','Before Quantity','TRUE','Before Quantity','F d, Y','d/m/y','h:i:s A')");
*/

$record['o_home_layout'] = array(
	array("user_id"=>"1","position"=>"0","service"=>"tl"),
	array("user_id"=>"1","position"=>"1","service"=>"cl"),
	array("user_id"=>"1","position"=>"2","service"=>"bm"),
	array("user_id"=>"1","position"=>"3","service"=>"nb"),
	array("user_id"=>"1","position"=>"4","service"=>"ct"),
	array("user_id"=>"1","position"=>"5","service"=>"us"),
	array("user_id"=>"1","position"=>"6","service"=>""),
	array("user_id"=>"1","position"=>"7","service"=>""),
	array("user_id"=>"1","position"=>"8","service"=>"")
);

$record['o_users'] = array(
	array("user_id"=>"1","username"=>"default","firstname"=>"Default","lastname"=>"User","password"=>"!!","date_created"=>"". time() .""));

array_push($record['o_text'],
	array("id_text"=>"service_name","language"=>"en_ca","service"=>"us","type"=>"gen","message"=>"User Preferences"),
	array("id_text"=>"1000","language"=>"en_ca","service"=>"us","type"=>"err","message"=>"Either the username entered does not exist or the password entered is invalid."),
	array("id_text"=>"1001","language"=>"en_ca","service"=>"us","type"=>"err","message"=>"The password for this account has expired."),
	array("id_text"=>"1002","language"=>"en_ca","service"=>"us","type"=>"err","message"=>"This account has been disabled."),
	array("id_text"=>"1003","language"=>"en_ca","service"=>"us","type"=>"err","message"=>"Could not find account with matching email address."),
	array("id_text"=>"3000","language"=>"en_ca","service"=>"us","type"=>"err","message"=>"The category field is blank. A category must have a name."));
	


Return current item: O - OpenSource GroupWare