Note: this list is kept only as a demonstration for CVSNotice. For the latest CVS notices, see the Xaraya and Postnuke sites
View Statistics - Next Notice - Previous NoticeDirectory filter : [ all ] / postnuke_modules / PostContact / sql [ view in CVS ]
Date | Directory [filter] | File(s) [view] | Author [filter] |
06 Aug 2002 20:16:16 | postnuke_modules/PostContact/sql | contact_sql.php,1.2,1.3 | Richard Cave |
ADODB conversion. |
Update of /home/cvsroot/postnuke_modules/PostContact/sql In directory ns7.hostnuke.net:/tmp/cvs-serv17941/PostContact/sql Modified Files: contact_sql.php Log Message: ADODB conversion. Index: contact_sql.php =================================================================== RCS file: /home/cvsroot/postnuke_modules/PostContact/sql/contact_sql.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** contact_sql.php 23 Jul 2002 12:07:00 -0000 1.2 --- contact_sql.php 6 Aug 2002 20:16:13 -0000 1.3 *************** *** 1,4 **** --- 1,28 ---- <? // $Id$ $Name$ + // ---------------------------------------------------------------------- + // POST-NUKE Content Management System + // Copyright (C) 2002 by the PostNuke Development Team. + // http://www.postnuke.com/ + // ---------------------------------------------------------------------- + // LICENSE + // + // This program is free software; you can redistribute it and/or + // modify it under the terms of the GNU General Public License (GPL) + // as published by the Free Software Foundation; either version 2 + // of the License, or (at your option) any later version. + // + // This program is distributed in the hope that it will be useful, + // but WIthOUT ANY WARRANTY; without even the implied warranty of + // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + // GNU General Public License for more details. + // + // To read the license please visit http://www.gnu.org/copyleft/gpl.html + // ---------------------------------------------------------------------- + // Original Author of file: Bjarne Var�ystrand and Bjarne Var�ystrand + // Modifications by: Richard Cave + // Purpose of file: Retrieve PostContact information from database + // ---------------------------------------------------------------------- + function createTables($prefix,$drop){ *************** *** 19,26 **** $query[0] = "CREATE TABLE ".$prefix."_contact_departments ( departmentID INT(11) NOT NULL AUTO_INCREMENT PRIMARY KEY, - departmentEmail VARCHAR(250) NOT NULL, departmentName VARCHAR(250) NOT NULL, departmentPhone VARCHAR(20) NOT NULL, departmentFax VARCHAR(20) NOT NULL, departmentCountry VARCHAR(20) NOT NULL, countryID VARCHAR(11) NOT NULL, --- 43,51 ---- $query[0] = "CREATE TABLE ".$prefix."_contact_departments ( departmentID INT(11) NOT NULL AUTO_INCREMENT PRIMARY KEY, departmentName VARCHAR(250) NOT NULL, + departmentEmail VARCHAR(250) NOT NULL, departmentPhone VARCHAR(20) NOT NULL, departmentFax VARCHAR(20) NOT NULL, + departmentState VARCHAR(60) NOT NULL, departmentCountry VARCHAR(20) NOT NULL, countryID VARCHAR(11) NOT NULL, *************** *** 61,88 **** $query[6] = "CREATE TABLE ".$prefix."_contact_persons ( personID INT(11) NOT NULL AUTO_INCREMENT PRIMARY KEY, - personMail VARCHAR(250) NOT NULL, personFirstName VARCHAR(250) NOT NULL, personLastName VARCHAR(250) NOT NULL, - personMobile VARCHAR(20) NOT NULL, - personPhone VARCHAR(20) NOT NULL, personAddress VARCHAR(250) NOT NULL, personCountry VARCHAR(60) NOT NULL, ! personLang VARCHAR(60) NOT NULL, personFax VARCHAR(20) NOT NULL, ! personHide TINYINT(1) DEFAULT '0' NOT NULL, ! personCity VARCHAR(60) NOT NULL, ! personImage VARCHAR(60) NOT NULL, personPager VARCHAR(60) NOT NULL, personICQ VARCHAR(60) NOT NULL, personAIM VARCHAR(60) NOT NULL, personYIM VARCHAR(60) NOT NULL, personMSNM VARCHAR(60) NOT NULL, - personAddress2 VARCHAR(60) NOT NULL, - personTypePhone INT(11) NOT NULL, - personTypeFax INT(11) NOT NULL, personTitleID INT(11) NOT NULL, ! personTypePager INT(11) NOT NULL, ! personTypeMobile INT(11) NOT NULL, ! personZip VARCHAR(20) NOT NULL )"; --- 86,114 ---- $query[6] = "CREATE TABLE ".$prefix."_contact_persons ( personID INT(11) NOT NULL AUTO_INCREMENT PRIMARY KEY, personFirstName VARCHAR(250) NOT NULL, personLastName VARCHAR(250) NOT NULL, personAddress VARCHAR(250) NOT NULL, + personAddress2 VARCHAR(60) NOT NULL, + personCity VARCHAR(60) NOT NULL, + personState VARCHAR(60) NOT NULL, + personZip VARCHAR(20) NOT NULL, personCountry VARCHAR(60) NOT NULL, ! personMail VARCHAR(250) NOT NULL, ! personPhone VARCHAR(20) NOT NULL, personFax VARCHAR(20) NOT NULL, ! personMobile VARCHAR(20) NOT NULL, personPager VARCHAR(60) NOT NULL, + personTypePhone INT(11) NOT NULL, + personTypeFax INT(11) NOT NULL, + personTypeMobile INT(11) NOT NULL, + personTypePager INT(11) NOT NULL, + personLang VARCHAR(60) NOT NULL, personICQ VARCHAR(60) NOT NULL, personAIM VARCHAR(60) NOT NULL, personYIM VARCHAR(60) NOT NULL, personMSNM VARCHAR(60) NOT NULL, personTitleID INT(11) NOT NULL, ! personImage VARCHAR(60) NOT NULL, ! personHide TINYINT(1) DEFAULT '0' NOT NULL )"; *************** *** 93,109 **** attributeShowAddress TINYINT(1) DEFAULT '0' NOT NULL, attributeShowAddress2 TINYINT(1) DEFAULT '0' NOT NULL, attributeShowZip TINYINT(1) DEFAULT '0' NOT NULL, attributeShowCountry TINYINT(1) DEFAULT '0' NOT NULL, attributeShowPhone TINYINT(1) DEFAULT '0' NOT NULL, attributeShowFax TINYINT(1) DEFAULT '0' NOT NULL, attributeShowMobile TINYINT(1) DEFAULT '0' NOT NULL, attributeShowPager TINYINT(1) DEFAULT '0' NOT NULL, - attributeShowEmail TINYINT(1) DEFAULT '0' NOT NULL, - attributeShowTitle TINYINT(1) DEFAULT '0' NOT NULL, attributeShowICQ TINYINT(1) DEFAULT '0' NOT NULL, attributeShowAIM TINYINT(1) DEFAULT '0' NOT NULL, attributeShowYIM TINYINT(1) DEFAULT '0' NOT NULL, attributeShowMSNM TINYINT(1) DEFAULT '0' NOT NULL, ! attributeShowCity TINYINT(1) DEFAULT '0' NOT NULL, attributeShowDepartment TINYINT(1) DEFAULT '0' NOT NULL, attributeShowImage TINYINT(1) DEFAULT '0' NOT NULL, --- 119,136 ---- attributeShowAddress TINYINT(1) DEFAULT '0' NOT NULL, attributeShowAddress2 TINYINT(1) DEFAULT '0' NOT NULL, + attributeShowCity TINYINT(1) DEFAULT '0' NOT NULL, + attributeShowState TINYINT(1) DEFAULT '0' NOT NULL, attributeShowZip TINYINT(1) DEFAULT '0' NOT NULL, attributeShowCountry TINYINT(1) DEFAULT '0' NOT NULL, + attributeShowEmail TINYINT(1) DEFAULT '0' NOT NULL, attributeShowPhone TINYINT(1) DEFAULT '0' NOT NULL, attributeShowFax TINYINT(1) DEFAULT '0' NOT NULL, attributeShowMobile TINYINT(1) DEFAULT '0' NOT NULL, attributeShowPager TINYINT(1) DEFAULT '0' NOT NULL, attributeShowICQ TINYINT(1) DEFAULT '0' NOT NULL, attributeShowAIM TINYINT(1) DEFAULT '0' NOT NULL, attributeShowYIM TINYINT(1) DEFAULT '0' NOT NULL, attributeShowMSNM TINYINT(1) DEFAULT '0' NOT NULL, ! attributeShowTitle TINYINT(1) DEFAULT '0' NOT NULL, attributeShowDepartment TINYINT(1) DEFAULT '0' NOT NULL, attributeShowImage TINYINT(1) DEFAULT '0' NOT NULL, *************** *** 114,128 **** companyID INT(11) NOT NULL AUTO_INCREMENT PRIMARY KEY, companyName VARCHAR(250) NOT NULL, - companyPhone VARCHAR(20) NOT NULL, - companyFax VARCHAR(20) NOT NULL, - companyMail VARCHAR(250) NOT NULL, companyAddress VARCHAR(250) NOT NULL, companyAddress2 VARCHAR(250) NOT NULL, companyZip VARCHAR(20) NOT NULL, - companyLogo VARCHAR(200) NOT NULL, companyCountry VARCHAR(60) NOT NULL, companyHide TINYINT(1) DEFAULT '0' NOT NULL, ! companyDefaultCountry VARCHAR(60) DEFAULT 'eng' NOT NULL, ! companyCity VARCHAR(250) NOT NULL )"; --- 141,156 ---- companyID INT(11) NOT NULL AUTO_INCREMENT PRIMARY KEY, companyName VARCHAR(250) NOT NULL, companyAddress VARCHAR(250) NOT NULL, companyAddress2 VARCHAR(250) NOT NULL, + companyCity VARCHAR(60) NOT NULL, + companyState VARCHAR(60) NOT NULL, companyZip VARCHAR(20) NOT NULL, companyCountry VARCHAR(60) NOT NULL, + companyPhone VARCHAR(20) NOT NULL, + companyFax VARCHAR(20) NOT NULL, + companyMail VARCHAR(250) NOT NULL, + companyLogo VARCHAR(200) NOT NULL, companyHide TINYINT(1) DEFAULT '0' NOT NULL, ! companyDefaultCountry VARCHAR(60) DEFAULT 'eng' NOT NULL )"; *************** *** 138,153 **** for($i = 0;$i < count($dropQuery);$i++){ ! $query1 = $dropQuery[$i]; ! mysql_query($query1); ! if(mysql_error()){ ! $errors .= "<br>".$query1." --- ".mysql_error(); } } for($i = 0;$i < count($query);$i++){ ! $query2 = $query[$i]; ! mysql_query($query2); ! if(mysql_error()){ ! $errors .= "<br>".$query2." --- ".mysql_error(); ! } } --- 166,181 ---- for($i = 0;$i < count($dropQuery);$i++){ ! $query = $dropQuery[$i]; ! $result = $dbconn->Execute( $query ); ! if ( $result == false ) { ! PN_DBMsgError( $dbconn, __FILE__, __LINE__, "Error accessing the database" ); } } for($i = 0;$i < count($query);$i++){ ! $query = $query[$i]; ! $result = $dbconn->Execute( $query ); ! if ( $result == false ) { ! PN_DBMsgError( $dbconn, __FILE__, __LINE__, "Error accessing the database" ); ! } } *************** *** 158,186 **** // Contact Type $query = "INSERT INTO ".$prefix."_contact_infoType (typeID,countryID,typeName) VALUES ('','0','Home')"; ! mysql_query($query); $query = "INSERT INTO ".$prefix."_contact_infoType (typeID,countryID,typeName) VALUES ('','0','Work')"; ! mysql_query($query); $query = "INSERT INTO ".$prefix."_contact_infoType (typeID,countryID,typeName) VALUES ('','0','Private')"; ! mysql_query($query); // ---------------------------------------------------------------------------------------- // Titles $query = "INSERT INTO ".$prefix."_contact_titles (titleID,titleName) VALUES ('','VD')"; ! mysql_query($query); $query = "INSERT INTO ".$prefix."_contact_titles (titleID,titleName) VALUES ('','VVD')"; ! mysql_query($query); $query = "INSERT INTO ".$prefix."_contact_titles (titleID,titleName) VALUES ('','Support')"; ! mysql_query($query); $query = "INSERT INTO ".$prefix."_contact_titles (titleID,titleName) VALUES ('','Programmer')"; ! mysql_query($query); $query = "INSERT INTO ".$prefix."_contact_titles (titleID,titleName) VALUES ('','Sales')"; ! mysql_query($query); $query = "INSERT INTO ".$prefix."_contact_titles (titleID,titleName) VALUES ('','Webmaster')"; ! mysql_query($query); $query = "INSERT INTO ".$prefix."_contact_titles (titleID,titleName) VALUES ('','Copyrighter')"; ! mysql_query($query); // ---------------------------------------------------------------------------------------- // Departments // $query = "INSERT INTO ".$prefix."_contact_departments (departmentID,departmentEmail,departmentName,departmentPhone,departmentFax,countryID,departmentHide) VALUES ('','".$GLOBALS['AddEmail']."','".$GLOBALS['AddName']."','".$GLOBALS['AddPhone']."','".$GLOBALS['AddFax']."','".$GLOBALS['AddCountry']."','1')"; ! // mysql_query($query); // ---------------------------------------------------------------------------------------- --- 186,247 ---- // Contact Type $query = "INSERT INTO ".$prefix."_contact_infoType (typeID,countryID,typeName) VALUES ('','0','Home')"; ! $result = $dbconn->Execute( $query ); ! if ( $result == false ) { ! PN_DBMsgError( $dbconn, __FILE__, __LINE__, "Error accessing the database" ); ! } $query = "INSERT INTO ".$prefix."_contact_infoType (typeID,countryID,typeName) VALUES ('','0','Work')"; ! $result = $dbconn->Execute( $query ); ! if ( $result == false ) { ! PN_DBMsgError( $dbconn, __FILE__, __LINE__, "Error accessing the database" ); ! } $query = "INSERT INTO ".$prefix."_contact_infoType (typeID,countryID,typeName) VALUES ('','0','Private')"; ! $result = $dbconn->Execute( $query ); ! if ( $result == false ) { ! PN_DBMsgError( $dbconn, __FILE__, __LINE__, "Error accessing the database" ); ! } // ---------------------------------------------------------------------------------------- // Titles $query = "INSERT INTO ".$prefix."_contact_titles (titleID,titleName) VALUES ('','VD')"; ! $result = $dbconn->Execute( $query ); ! if ( $result == false ) { ! PN_DBMsgError( $dbconn, __FILE__, __LINE__, "Error accessing the database" ); ! } $query = "INSERT INTO ".$prefix."_contact_titles (titleID,titleName) VALUES ('','VVD')"; ! $result = $dbconn->Execute( $query ); ! if ( $result == false ) { ! PN_DBMsgError( $dbconn, __FILE__, __LINE__, "Error accessing the database" ); ! } $query = "INSERT INTO ".$prefix."_contact_titles (titleID,titleName) VALUES ('','Support')"; ! $result = $dbconn->Execute( $query ); ! if ( $result == false ) { ! PN_DBMsgError( $dbconn, __FILE__, __LINE__, "Error accessing the database" ); ! } $query = "INSERT INTO ".$prefix."_contact_titles (titleID,titleName) VALUES ('','Programmer')"; ! $result = $dbconn->Execute( $query ); ! if ( $result == false ) { ! PN_DBMsgError( $dbconn, __FILE__, __LINE__, "Error accessing the database" ); ! } $query = "INSERT INTO ".$prefix."_contact_titles (titleID,titleName) VALUES ('','Sales')"; ! $result = $dbconn->Execute( $query ); ! if ( $result == false ) { ! PN_DBMsgError( $dbconn, __FILE__, __LINE__, "Error accessing the database" ); ! } $query = "INSERT INTO ".$prefix."_contact_titles (titleID,titleName) VALUES ('','Webmaster')"; ! $result = $dbconn->Execute( $query ); ! if ( $result == false ) { ! PN_DBMsgError( $dbconn, __FILE__, __LINE__, "Error accessing the database" ); ! } $query = "INSERT INTO ".$prefix."_contact_titles (titleID,titleName) VALUES ('','Copyrighter')"; ! $result = $dbconn->Execute( $query ); ! if ( $result == false ) { ! PN_DBMsgError( $dbconn, __FILE__, __LINE__, "Error accessing the database" ); ! } // ---------------------------------------------------------------------------------------- // Departments // $query = "INSERT INTO ".$prefix."_contact_departments (departmentID,departmentEmail,departmentName,departmentPhone,departmentFax,countryID,departmentHide) VALUES ('','".$GLOBALS['AddEmail']."','".$GLOBALS['AddName']."','".$GLOBALS['AddPhone']."','".$GLOBALS['AddFax']."','".$GLOBALS['AddCountry']."','1')"; ! // $result = $dbconn->Execute( $query ); ! // if ( $result == false ) { ! // PN_DBMsgError( $dbconn, __FILE__, __LINE__, "Error accessing the database" ); ! // } // ---------------------------------------------------------------------------------------- *************** *** 188,190 **** return $errors; } ! ?> --- 249,251 ---- return $errors; } ! ?> \ No newline at end of file
View Statistics - Next Notice - Previous Notice
Visit Developer Site - Browse CVS Repository |
Syndicate via backend.rss (max. once per hour please) | Powered by CVSNotice 0.1.3 |