|
From: <dts...@us...> - 2003-05-30 20:58:40
|
Update of /cvsroot/phpwebsite-comm/modules/contacts/boost
In directory sc8-pr-cvs1:/tmp/cvs-serv29639/boost
Modified Files:
install.php
Log Message:
Pre-loading items
Index: install.php
===================================================================
RCS file: /cvsroot/phpwebsite-comm/modules/contacts/boost/install.php,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** install.php 27 May 2003 16:47:49 -0000 1.1
--- install.php 30 May 2003 20:07:41 -0000 1.2
***************
*** 27,30 ****
--- 27,70 ----
}
+
+ // Pre-Add Phone Types
+ $phonetype["owner"] = "install";
+ $phonetype["editor"] = "install";
+ $phonetype["name"] = "Home";
+ $phonetype["abbreviation"] = "H";
+ $GLOBALS["core"]->sqlInsert($phonetype, "mod_contacts_phonetypes");
+ $phonetype["name"] = "Work";
+ $phonetype["abbreviation"] = "W";
+ $GLOBALS["core"]->sqlInsert($phonetype, "mod_contacts_phonetypes");
+ $phonetype["name"] = "Cell";
+ $phonetype["abbreviation"] = "C";
+ $GLOBALS["core"]->sqlInsert($phonetype, "mod_contacts_phonetypes");
+ $phonetype["name"] = "Pager";
+ $phonetype["abbreviation"] = "P";
+ $GLOBALS["core"]->sqlInsert($phonetype, "mod_contacts_phonetypes");
+
+ // Pre-Add Address Types
+ $addresstype["owner"] = "install";
+ $addresstype["editor"] = "install";
+ $addresstype["name"] = "Home";
+ $addresstype["abbreviation"] = "H";
+ $GLOBALS["core"]->sqlInsert($addresstype, "mod_contacts_addresstypes");
+ $addresstype["name"] = "Work";
+ $addresstype["abbreviation"] = "W";
+ $GLOBALS["core"]->sqlInsert($addresstype, "mod_contacts_addresstypes");
+
+ // Pre-Add Countries
+ if(file_exists("mod/contacts/boost/countries.txt")) {
+ $lines = file("mod/contacts/boost/countries.txt");
+ foreach ($lines as $line) {
+ list($code,$country) = explode(":",$line);
+ $countries["owner"] = "install";
+ $countries["editor"] = "install";
+ $countries["country"] = $country;
+ $countries["code"] = $code;
+ $GLOBALS["core"]->sqlInsert($countries, "mod_contacts_countries");
+ }
+ }
+
} else {
$content .= "There was a problem writing to the database!<br />";
|