Your user name and temporary password are below. Note that passwords are case sensitive, and your user name is in the form of your email address. You'll be asked to change your password when you first log in."; $message10="User Name::    "."".$V_EmailId.""; $message11="Temporary Password::    "."".$V_FirstName.""; $messagedk="

Allow us to setup your account and we will send you a mail on successful setup.

You should receive your login details within 24 hours.

"; $message15="Temporary Password::    "."".$password.""; $message16="Company with Name  "."".stripslashes($V_CompanyName)." got registered on  ".$create_date."  for CRM Application"; $message17 = " Details::"; //$message18 = "Company Id::"."".$CompanyId; $message19 = "Company Name::"."".stripslashes($V_CompanyName).""; $message21 = "Admin User Name::"."".$V_EmailId.""; $message22 = "Admin Password::"."".$V_FirstName.""; $message23 = "User Phone No.::"."".$V_PhoneNo.",Mobile No :".$V_MobileNo.""; $message1 = "Please go to www.ensembler.com to login. Manually enter your user name, and copy and paste your temporary password, since it is case sensitive and the numbers and letters can look alike."; $message9="Password Tips:---"; $message2 = " - You cannot use the temporary password again once you have logged in and set your new password."; /*$message12=" - Make sure to choose a password question and answer that you will easily remember, since you will need this   information in the future should you forget your password.";*/ $message3 = "Once again, welcome to www.ensembler.com."; $message4 = "www.ensembler.com "; $message5 = "B-254 Okhla Phase I,New Delhi"; $message6 = "Phone:+91 11 2637 1851"; $message7 = "Fax:+91 11 2637 1852 "; $message8 = "Website:www.alliance-infotech.com "; $from = $from_subscription; $to = $V_EmailId ; /* On click of Registration Submit button :: Creates Comapny database */ if(isset($_REQUEST['addbtn'])) { $CompanyId =newmaxid(); // fetching the company id $BranchId =newmaxbranchid(); // fetching the Branch Id //$BranchI= sprintf("BR"."".$BranchId); /// fetching the Branch Id #####Database Name Created ####### $CompanyDatabase = sprintf("ensem8op_AE_CRM"."_".$CompanyId); $passdate=date("Y-m-d"); ################################################## $sql_check_email="select * from tbl_mst_user_company where V_EmailID='$to' and I_UserStatus='1'"; $result_query1=mysql_query($sql_check_email); $num_check_email=mysql_num_rows($result_query1); if($num_check_email == '0')// when record does not exist. { #MAIL FUNCTION#### $passwd = md5($V_FirstName); $v_maxuserid=newmaxuserid(); /***********************************************************************************************/ ## Last Modification :: RG [22-02-2009] ## Reason :: Added Telephony password as User ID; Added Mobile No for Authentication $sql_customer_user="insert into tbl_mst_user_company (I_UserID,I_CompanyID,V_EmailID,V_Password,Datetime_registration,V_MobileNo,V_Tel_Pwd) values ('$v_maxuserid','$CompanyId','$V_EmailId','$passwd','$creatdon','$V_MobileNo','$v_maxuserid');"; mysql_query($sql_customer_user); /**************************************************************************************************/ $sql_pass="insert into changepwd_history(UserID,OldPassword,NewPassword,CPass_Date,ModifiedBy )values('$v_maxuserid','','$passwd','$passdate','$v_maxuserid');"; $res_pass=mysql_query($sql_pass); $sql_customer_company = "insert into tbl_mst_company (I_CompanyID, V_CompanyName, V_CompanyAddress, V_Company_DBName,D_DateofRegistration,V_Country_Name,V_State_Name,V_ProductInterest,Website,V_PhoneNo,V_EmailID,V_FirstName,V_MobileNo) values ('$CompanyId', '$V_CompanyName', '$V_CompanyAddress', '$CompanyDatabase',NOW(),'$V_Country_Name','$V_State_Name','$string','$Website','$V_PhoneNo','$V_EmailID','$V_FirstName','$V_MobileNo');"; mysql_query($sql_customer_company); $sql_user_lience="insert into tb_mst_user_licence(I_organistionID,I_NUSERS,V_ModifiedOn) values ('$CompanyId','10','$creatdon');"; mysql_query($sql_user_lience); /* insert the value in tbl_mst_branch */ $sql_Branch="insert into tbl_mst_branch (I_CompanyID,Branch_Id,V_BranchName,V_Address) values ('$CompanyId','$BranchId','$V_CompanyName','$V_CompanyAddress');"; mysql_query($sql_Branch); /* End :: insert the value in tbl_mst_branch */ /* Creating database and tables for the new company */ mysql_query("CREATE DATABASE $CompanyDatabase"); mysql_query("USE $CompanyDatabase"); ############## AUTHOR :: SUSHILA MALIK ######################################## ############## MAKE DIRECTORY TO SAVE THE DOCUMENTS OF ALL MODULES ############ ############## DIRECTORY NAME IS SAME AS THE DATABASE NAME ##################### $current_dir=getcwd(); ##########MAKING DIRECTORY TO SAVE ALL THE DOCUMENTS ################## SUSHILA $directory_name=mkdir("$current_dir/document/$CompanyDatabase",0700); ##############END##################### ##########MAKING DIRECTORY TO SAVE THE EMP PHOTO ################## SUSHILA $directory_name1=mkdir("$current_dir/emp_photo/$CompanyDatabase",0700); ##############END##################### ##########MAKING DIRECTORY TO SAVE EMP DOCUMENTS ################## SUSHILA $directory_name2=mkdir("$current_dir/emp_doc/$CompanyDatabase",0700); ##############END##################### ##########MAKING DIRECTORY TO SAVE THE IMPORTED LEADS FROM EXCEL SHEET################## SUSHILA 20 DEC,2008 $directory_name3=mkdir("$current_dir/lead_doc/$CompanyDatabase",0700); ##############END##################### ##########MAKING DIRECTORY TO SAVE THE IMAGE ################## DEEPAK 30 DEC,2008 $directory_name4=mkdir("$current_dir/imag_doc/$CompanyDatabase",0700); ##############END##################### ##########MAKING DIRECTORY TO SAVE THE Voice Wikky ################## DEEPAK 21-02-2009 $directory_name5=mkdir("$current_dir/CRM/Recordings/$v_maxuserid",0700); $directory_name5=mkdir("$current_dir/CRM/Recordings/$v_maxuserid/VW",0700); $directory_name5=mkdir("$current_dir/CRM/Recordings/$v_maxuserid/FAX",0700); ##############END######################################################################## ##########MAKING DIRECTORY TO SAVE THE Journal ################## DEEPAK 18 March,2009 $directory_name6=mkdir("$current_dir/Journal/$CompanyDatabase",0700); ##############END###################################################################### ##########MAKING DIRECTORY TO SAVE THE Group-Category-Product ################## DEEPAK 27 April,2009 $directory_name6=mkdir("$current_dir/group_cate/$CompanyDatabase",0700); ##############END###################################################################### ##########MAKING DIRECTORY TO SAVE THE Group-Category-Product ################## DEEPAK 27 April,2009 $directory_name7=mkdir("$current_dir/uploaded/$CompanyDatabase",0700); ##############END###################################################################### mysql_query("CREATE TABLE `customised_fields` ( `id` int(10) NOT NULL auto_increment, `module` varchar(50) default NULL, `fields` blob , labels blob , PRIMARY KEY (`id`) )"); mysql_query("insert into `customised_fields` ( `module` , `fields` , `labels` ) values( 'LEAD' , 'leadname,source,group,cat,product,date,assignedto,status,desc,fname,lname,cname,title,address,bphone1,bphone2,mobile,fax,email,website,location,value,rating,cdate,dob,pob,tob,state,city,type,industry' , 'Lead Name ,Source,Product Group ,Product Category ,Product Category ,Date,Assigned To ,Status,Description,First Name ,Last Name,Company Name,Job Title ,Address,Business Phone 1 ,Business Phone 2 ,Mobile,Fax,Email ,Website,Location,Approximate Value ,Rating,Close Date,Date of Birth ,Place of Birth ,Time of Birth ,State ,city,Type ,Industry' );"); /* create table for dropdown > neeti */ mysql_query("CREATE TABLE if not exists `tbl_industry` ( `id` int(10) NOT NULL auto_increment, `industry` varchar(100) default NULL, `createddate` datetime default NULL, `createdby` varchar(100) default NULL, `modifieddate` datetime default NULL, `modifiedby` varchar(100) default NULL, `status` int(2) default '1', PRIMARY KEY (`id`) );"); mysql_query("CREATE TABLE if not exists `tbl_source` ( `id` int(10) NOT NULL auto_increment, `source` varchar(100) default NULL, `createddate` datetime default NULL, `createdby` varchar(100) default NULL, `modifieddate` datetime default NULL, `modifiedby` varchar(100) default NULL, `status` int(2) default '1', PRIMARY KEY (`id`) );"); mysql_query("CREATE TABLE if not exists `tbl_jobtitle` ( `id` int(10) NOT NULL auto_increment, `jobtitle` varchar(100) default NULL, `createddate` datetime default NULL, `createdby` varchar(100) default NULL, `modifieddate` datetime default NULL, `modifiedby` varchar(100) default NULL, `status` int(2) default '1', PRIMARY KEY (`id`) );"); mysql_query("CREATE TABLE if not exists `tbl_rating` ( `id` int(10) NOT NULL auto_increment, `rating` varchar(100) default NULL, `createddate` datetime default NULL, `createdby` varchar(100) default NULL, `modifieddate` datetime default NULL, `modifiedby` varchar(100) default NULL, `status` int(2) default '1', PRIMARY KEY (`id`) );"); mysql_query("CREATE TABLE if not exists `tbl_stage` ( `id` int(10) NOT NULL auto_increment, `stage` varchar(100) default NULL, `createddate` datetime default NULL, `createdby` varchar(100) default NULL, `modifieddate` datetime default NULL, `modifiedby` varchar(100) default NULL, `status` int(2) default '1', PRIMARY KEY (`id`) );"); mysql_query("CREATE TABLE `emp_adleave` ( `Leave_ID` int(10) NOT NULL default '0', `App_By` int(10) default NULL, `App_Date` date default NULL, `Status` int(1) default NULL, `cDisapproval` blob, PRIMARY KEY (`Leave_ID`) );"); mysql_query("CREATE TABLE `emp_leave_master` ( `UserID` int(10) NOT NULL default '0', `Annual_Leave` int(10) default NULL, `Medical_Leave` int(10) default NULL, `Maternity_Leave` int(10) default NULL, `Paternity_Leave` int(10) default NULL, `Casual_Leave` int(10) default NULL, `Special_Leave` int(10) default NULL, PRIMARY KEY (`UserID`) );"); mysql_query("CREATE TABLE `emp_trans_leave` ( `LeaveID` int(10) NOT NULL auto_increment, `UserID` varchar(20) default NULL, `ReportedOn` datetime default NULL, `LeaveType` int(11) default NULL, `FromDate` date default NULL, `EndDate` date default NULL, `Purpose` blob, `T_App_By` varchar(80) default NULL, `LeaveStatus` int(1) default '0', PRIMARY KEY (`LeaveID`) );"); mysql_query("CREATE TABLE if not exists `tbl_activityresult` ( `id` int(10) NOT NULL auto_increment, `activityresult` varchar(100) default NULL, `createddate` datetime default NULL, `createdby` varchar(100) default NULL, `modifieddate` datetime default NULL, `modifiedby` varchar(100) default NULL, `status` int(2) default '1', PRIMARY KEY (`id`) );"); mysql_query("CREATE TABLE if not exists `tbl_activitytype` ( `id` int(10) NOT NULL auto_increment, `activitytype` varchar(100) default NULL, `createddate` datetime default NULL, `createdby` varchar(100) default NULL, `modifieddate` datetime default NULL, `modifiedby` varchar(100) default NULL, `status` int(2) default '1', PRIMARY KEY (`id`) );"); mysql_query("CREATE TABLE if not exists `tbl_discount` ( `id` int(10) NOT NULL auto_increment, `discount` varchar(100) default NULL, `createddate` datetime default NULL, `createdby` varchar(100) default NULL, `modifieddate` datetime default NULL, `modifiedby` varchar(100) default NULL, `status` int(2) default '1', PRIMARY KEY (`id`) );"); mysql_query("CREATE TABLE if not exists `tbl_oppstage` ( `id` int(10) NOT NULL auto_increment, `oppstage` varchar(100) default NULL, `createddate` datetime default NULL, `createdby` varchar(100) default NULL, `modifieddate` datetime default NULL, `modifiedby` varchar(100) default NULL, `status` int(2) default '1', PRIMARY KEY (`id`) );"); mysql_query("CREATE TABLE if not exists `tbl_ownership` ( `id` int(10) NOT NULL auto_increment, `ownership` varchar(100) default NULL, `createddate` datetime default NULL, `createdby` varchar(100) default NULL, `modifieddate` datetime default NULL, `modifiedby` varchar(100) default NULL, `status` int(2) default '1', PRIMARY KEY (`id`) );"); mysql_query("CREATE TABLE if not exists `tbl_type` ( `id` int(10) NOT NULL auto_increment, `type` varchar(100) default NULL, `createddate` datetime default NULL, `createdby` varchar(100) default NULL, `modifieddate` datetime default NULL, `modifiedby` varchar(100) default NULL, `status` int(2) default '1', PRIMARY KEY (`id`) );"); mysql_query("CREATE TABLE if not exists `tbl_department` ( `id` int(10) NOT NULL auto_increment, `department` varchar(100) default NULL, `createddate` datetime default NULL, `createdby` varchar(100) default NULL, `modifieddate` datetime default NULL, `modifiedby` varchar(100) default NULL, `status` int(2) default '1', PRIMARY KEY (`id`) );"); mysql_query("CREATE TABLE `country` ( `id` int(11) NOT NULL auto_increment, `iso` char(2) NOT NULL, `name` varchar(80) NOT NULL, `nicename` varchar(80) NOT NULL, `iso3` char(3) default NULL, `numcode` smallint(6) default NULL, `phonecode` int(5) NOT NULL, PRIMARY KEY (`id`) );"); mysql_query("CREATE TABLE `tbl_live_call` ( `id` int(11) NOT NULL auto_increment, `client_db` int(10) NOT NULL, `v_filename` varchar(100) NOT NULL, `agent_id` int(10) NOT NULL, `dnis` bigint(20) NOT NULL, `flag` int(2) NOT NULL default '1', `D_Startdatetime` datetime , `V_SessionID` varchar(100) , PRIMARY KEY (`id`) );"); /*Data for the table `tbl_activityresult` */ mysql_query("insert into `tbl_activityresult`(`id`,`activityresult`,`createddate`,`createdby`,`modifieddate`,`modifiedby`,`status`) values (1,'accc',NOW(),'Alliance .Infotech',NOW(),'Alliance .Infotech',0),(2,'Disconnected',NOW(),'Alliance.Infotech',NULL,NULL,1),(3,'Follow Up',NOW(),'Alliance.Infotech',NULL,NULL,1),(4,'Not Available',NOW(),'Alliance.Infotech',NULL,NULL,1),(5,'Not Interested',NOW(),'Alliance.Infotech',NULL,NULL,1),(6,'Not longer there',NOW(),'Alliance.Infotech',NULL,NULL,1),(7,'Schedule Appointment',NOW(),'Alliance.Infotech',NULL,NULL,1),(8,'They have such tool',NOW(),'Alliance.Infotech',NULL,NULL,1),(9,'They will get back',NOW(),'Alliance.Infotech',NULL,NULL,1),(10,'hhhh',NOW(),'Alliance .Infotech',NOW(),'Alliance .Infotech',0);"); /*Data for the table `tbl_activitytype` */ mysql_query("insert into `tbl_activitytype`(`id`,`activitytype`,`createddate`,`createdby`,`modifieddate`,`modifiedby`,`status`) values (1,'None',NOW(),'Alliance.Infotech',NULL,NULL,1),(2,'Demo',NOW(),'Alliance.Infotech',NULL,NULL,1),(3,'Email',NOW(),'Alliance.Infotech',NULL,NULL,1),(4,'Meeting',NOW(),'Alliance.Infotech',NULL,NULL,1),(5,'Phone',NOW(),'Alliance.Infotech',NULL,NULL,1),(6,'Service Request',NOW(),'Alliance.Infotech',NULL,NULL,1);"); /*Data for the table `tbl_department` */ mysql_query("insert into `tbl_department`(`id`,`department`,`createddate`,`createdby`,`modifieddate`,`modifiedby`,`status`) values (1,'None',NOW(),'Alliance.Infotech',NULL,NULL,1),(2,'Marketing',NOW(),'Alliance.Infotech',NULL,NULL,1),(3,'Sales',NOW(),'Alliance.Infotech',NULL,NULL,1),(4,'Development',NOW(),'Alliance.Infotech',NULL,NULL,1),(5,'Technical Support',NOW(),'Alliance.Infotech',NULL,NULL,1),(6,'Finance',NOW(),'Alliance.Infotech',NULL,NULL,1),(7,'Operations',NOW(),'Alliance.Infotech',NULL,NULL,1),(8,'Customer Service',NOW(),'Alliance.Infotech',NULL,NULL,1),(9,'Administrator',NOW(),'Alliance.Infotech',NULL,NULL,1),(10,'Business Development',NOW(),'Alliance.Infotech',NULL,NULL,1);"); /*Data for the table `tbl_discount` */ mysql_query("insert into `tbl_discount`(`id`,`discount`,`createddate`,`createdby`,`modifieddate`,`modifiedby`,`status`) values (1,'10',NOW(),'Alliance.Infotech',NULL,NULL,1),(2,'5',NOW(),'Alliance.Infotech',NULL,NULL,1),(3,'4',NOW(),'Alliance.Infotech',NULL,NULL,1),(4,'3',NOW(),'Alliance.Infotech',NULL,NULL,1),(5,'2',NOW(),'Alliance.Infotech',NULL,NULL,1);"); /*Data for the table `tbl_industry` */ mysql_query("insert into `tbl_industry`(`id`,`industry`,`createddate`,`createdby`,`modifieddate`,`modifiedby`,`status`) values (1,'None',NOW(),'Alliance.Infotech',NULL,NULL,1),(2,'Agricilture',NOW(),'Alliance.Infotech',NULL,NULL,1),(3,'Apparel',NOW(),'Alliance.Infotech',NULL,NULL,1),(4,'Banking',NOW(),'Alliance.Infotech',NULL,NULL,1),(5,'Biotechnology',NOW(),'Alliance.Infotech',NULL,NULL,1),(6,'Call Centers',NOW(),'Alliance.Infotech',NULL,NULL,1),(7,'Call Center Solution Provider',NOW(),'Alliance.Infotech',NULL,NULL,1),(8,'Chemicals',NOW(),'Alliance.Infotech',NULL,NULL,1),(9,'Communications',NOW(),'Alliance.Infotech',NULL,NULL,1),(10,'Constructions',NOW(),'Alliance.Infotech',NULL,NULL,1),(11,'Consulting',NOW(),'Alliance.Infotech',NULL,NULL,1),(12,'Education',NOW(),'Alliance.Infotech',NULL,NULL,1),(13,'Electronics',NOW(),'Alliance.Infotech',NULL,NULL,1),(14,'Energy',NOW(),'Alliance.Infotech',NULL,NULL,1),(15,'Engineering',NOW(),'Alliance.Infotech',NULL,NULL,1),(16,'Entertainment',NOW(),'Alliance.Infotech',NULL,NULL,1),(17,'Environment',NOW(),'Alliance.Infotech',NULL,NULL,1),(18,'EPABX',NOW(),'Alliance.Infotech',NULL,NULL,1),(19,'Finance',NOW(),'Alliance.Infotech',NULL,NULL,1),(20,'Food & Beverage',NOW(),'Alliance.Infotech',NULL,NULL,1),(21,'Government',NOW(),'Alliance.Infotech',NULL,NULL,1),(22,'HealthCare',NOW(),'Alliance.Infotech',NULL,NULL,1),(23,'Hospitality',NOW(),'Alliance.Infotech',NULL,NULL,1),(24,'Insurance',NOW(),'Alliance.Infotech',NULL,NULL,1),(25,'Machinery',NOW(),'Alliance.Infotech',NULL,NULL,1),(26,'Manufacturing',NOW(),'Alliance.Infotech',NULL,NULL,1),(27,'Media',NOW(),'Alliance.Infotech',NULL,NULL,1),(28,'Not for Profit',NOW(),'Alliance.Infotech',NULL,NULL,1),(29,'Recreation',NOW(),'Alliance.Infotech',NULL,NULL,1),(30,'Retail',NOW(),'Alliance.Infotech',NULL,NULL,1),(31,'Shipping',NOW(),'Alliance.Infotech',NULL,NULL,1),(32,'System Integrator',NOW(),'Alliance.Infotech',NULL,NULL,1),(33,'Technology',NOW(),'Alliance.Infotech',NULL,NULL,1),(34,'Telecommunications',NOW(),'Alliance.Infotech',NULL,NULL,1),(35,'Transportation',NOW(),'Alliance.Infotech',NULL,NULL,1),(36,'Travel & Sports',NOW(),'Alliance.Infotech',NULL,NULL,1),(37,'Utilities',NOW(),'Alliance.Infotech',NULL,NULL,1),(38,'IT',NOW(),'Alliance.Infotech',NULL,NULL,1),(39,'DSA',NOW(),'Alliance.Infotech',NULL,NULL,1),(40,'Training & Recruitment',NOW(),'Alliance.Infotech',NULL,NULL,1),(41,'Other',NOW(),'Alliance.Infotech',NULL,NULL,1);"); /*Data for the table `tbl_jobtitle` */ mysql_query("insert into `tbl_jobtitle`(`id`,`jobtitle`,`createddate`,`createdby`,`modifieddate`,`modifiedby`,`status`) values (1,'President',NOW(),'Alliance.Infotech',NULL,NULL,1),(2,'Sr. VP',NOW(),'Alliance.Infotech',NULL,NULL,1),(3,'VP',NOW(),'Alliance.Infotech',NULL,NULL,1),(4,'Director',NOW(),'Alliance.Infotech',NULL,NULL,1),(5,'GM',NOW(),'Alliance.Infotech',NULL,NULL,1),(6,'Manager',NOW(),'Alliance.Infotech',NULL,NULL,1),(7,'Product Manager',NOW(),'Alliance.Infotech',NULL,NULL,1),(8,'Executive',NOW(),'Alliance.Infotech',NULL,NULL,1),(9,'Consultant',NOW(),'Alliance.Infotech',NULL,NULL,1),(10,'Partner',NOW(),'Alliance.Infotech',NULL,NULL,1),(11,'Developer',NOW(),'Alliance.Infotech',NULL,NULL,1),(12,'Trainee',NOW(),'Alliance.Infotech',NULL,NULL,1),(13,'Owner',NOW(),'Alliance.Infotech',NULL,NULL,1),(14,'Other',NOW(),'Alliance.Infotech',NULL,NULL,1),(15,'Administrator',NOW(),'Alliance.Infotech',NULL,NULL,1),(16,'Receptionist',NOW(),'Alliance.Infotech',NULL,NULL,1),(17,'Engineer',NOW(),'Alliance.Infotech',NULL,NULL,1),(18,'Astt. Manager',NOW(),'Alliance.Infotech',NULL,NULL,1),(19,'Manager Sales',NOW(),'Alliance.Infotech',NULL,NULL,1),(20,'None',NOW(),'Alliance.Infotech',NULL,NULL,1);"); /*Data for the table `tbl_oppstage` */ mysql_query("insert into `tbl_oppstage`(`id`,`oppstage`,`createddate`,`createdby`,`modifieddate`,`modifiedby`,`status`) values (1,'opp12',NOW(),'Alliance .Infotech',NOW(),'Alliance .Infotech',0),(2,'opp1',NOW(),'Alliance .Infotech',NOW(),'Alliance.Infotech',0),(3,'opp12',NOW(),'Alliance .Infotech',NOW(),'Alliance.Infotech',0),(4,'Prospecting',NOW(),'Alliance.Infotech',NULL,NULL,1),(5,'Qualification',NOW(),'Alliance.Infotech',NULL,NULL,1),(6,'Needs Analysis',NOW(),'Alliance.Infotech',NULL,NULL,1),(7,'Value Proposition',NOW(),'Alliance.Infotech',NULL,NULL,1),(8,'Id.Descision Maker',NOW(),'Alliance.Infotech',NULL,NULL,1),(9,'Perception Analysis',NOW(),'Alliance.Infotech',NULL,NULL,1),(10,'Proposal',NOW(),'Alliance.Infotech',NULL,NULL,1),(11,'Price Enquiry',NOW(),'Alliance.Infotech',NULL,NULL,1),(12,'Negotiation / Review',NOW(),'Alliance.Infotech',NULL,NULL,1),(13,'Closed Won',NOW(),'Alliance.Infotech',NULL,NULL,1),(14,'Closed Lost',NOW(),'Alliance.Infotech',NULL,NULL,1),(15,'Closed-Requirement Dismissed',NOW(),'Alliance.Infotech',NULL,NULL,1),(16,'Requirement On Hold',NOW(),'Alliance.Infotech',NULL,NULL,1);"); /*Data for the table `tbl_ownership` */ mysql_query("insert into `tbl_ownership`(`id`,`ownership`,`createddate`,`createdby`,`modifieddate`,`modifiedby`,`status`) values (1,'public',NOW(),'Alliance.Infotech',NULL,NULL,1),(2,'private',NOW(),'Alliance.Infotech',NULL,NULL,1),(3,'subsidiary',NOW(),'Alliance.Infotech',NULL,NULL,1),(4,'other',NOW(),'Alliance.Infotech',NULL,NULL,1);"); /*Data for the table `tbl_rating` */ mysql_query("insert into `tbl_rating`(`id`,`rating`,`createddate`,`createdby`,`modifieddate`,`modifiedby`,`status`) values (1,'None',NOW(),'Alliance.Infotech',NULL,NULL,1),(2,'Hot',NOW(),'Alliance.Infotech',NULL,NULL,1),(3,'warm',NOW(),'Alliance.Infotech',NULL,NULL,1),(4,'Cold',NOW(),'Alliance.Infotech',NULL,NULL,1);"); /*Data for the table `tbl_source` */ mysql_query("insert into `tbl_source`(`id`,`source`,`createddate`,`createdby`,`modifieddate`,`modifiedby`,`status`) values (1,'Advertisement',NOW(),'Alliance.Infotech',NULL,NULL,1),(2,'Employee Referral',NOW(),'Alliance.Infotech',NULL,NULL,1),(3,'External Referral',NOW(),'Alliance.Infotech',NULL,NULL,1),(4,'NewsPaper',NOW(),'Alliance.Infotech',NULL,NULL,1),(5,'Phone',NOW(),'Alliance.Infotech',NULL,NULL,1),(6,'Partner',NOW(),'Alliance.Infotech',NULL,NULL,1),(7,'Public Relations',NOW(),'Alliance.Infotech',NULL,NULL,1),(8,'Seminar - Internal',NOW(),'Alliance.Infotech',NULL,NULL,1),(9,'Seminar - Partner',NOW(),'Alliance.Infotech',NULL,NULL,1),(10,'Trade Show',NOW(),'Alliance.Infotech',NULL,NULL,1),(11,'Web',NOW(),'Alliance.Infotech',NULL,NULL,1),(12,'Word of mouth',NOW(),'Alliance.Infotech',NULL,NULL,1),(13,'Tender',NOW(),'Alliance.Infotech',NULL,NULL,1),(14,'other',NOW(),'Alliance.Infotech',NULL,NULL,1);"); /*Data for the table `tbl_stage` */ mysql_query("insert into `tbl_stage`(`id`,`stage`,`createddate`,`createdby`,`modifieddate`,`modifiedby`,`status`) values (1,'Not Assigned',NOW(),'Alliance.Infotech',NULL,NULL,1),(2,'Assigned',NOW(),'Alliance.Infotech',NULL,NULL,1);"); /*Data for the table `tbl_type` */ mysql_query("insert into `tbl_type`(`id`,`type`,`createddate`,`createdby`,`modifieddate`,`modifiedby`,`status`) values (1,'None',NOW(),'Alliance.Infotech',NULL,NULL,1),(2,'Analyst',NOW(),'Alliance.Infotech',NULL,NULL,1),(3,'Competitor',NOW(),'Alliance.Infotech',NULL,NULL,1),(4,'Customer',NOW(),'Alliance.Infotech',NULL,NULL,1),(5,'Integrator',NOW(),'Alliance.Infotech',NULL,NULL,1),(6,'Partner',NOW(),'Alliance.Infotech',NULL,NULL,1),(7,'Press',NOW(),'Alliance.Infotech',NULL,NULL,1),(8,'Prospect',NOW(),'Alliance.Infotech',NULL,NULL,1),(9,'Reseller',NOW(),'Alliance.Infotech',NULL,NULL,1),(10,'Other',NOW(),'Alliance.Infotech',NULL,NULL,1);"); mysql_query("INSERT INTO `country` (`id`, `iso`, `name`, `nicename`, `iso3`, `numcode`, `phonecode`) VALUES (1, 'AF', 'AFGHANISTAN', 'Afghanistan', 'AFG', 4, 93), (2, 'AL', 'ALBANIA', 'Albania', 'ALB', 8, 355), (3, 'DZ', 'ALGERIA', 'Algeria', 'DZA', 12, 213), (4, 'AS', 'AMERICAN SAMOA', 'American Samoa', 'ASM', 16, 1684), (5, 'AD', 'ANDORRA', 'Andorra', 'AND', 20, 376), (6, 'AO', 'ANGOLA', 'Angola', 'AGO', 24, 244), (7, 'AI', 'ANGUILLA', 'Anguilla', 'AIA', 660, 1264), (8, 'AQ', 'ANTARCTICA', 'Antarctica', NULL, NULL, 0), (9, 'AG', 'ANTIGUA AND BARBUDA', 'Antigua and Barbuda', 'ATG', 28, 1268), (10, 'AR', 'ARGENTINA', 'Argentina', 'ARG', 32, 54), (11, 'AM', 'ARMENIA', 'Armenia', 'ARM', 51, 374), (12, 'AW', 'ARUBA', 'Aruba', 'ABW', 533, 297), (13, 'AU', 'AUSTRALIA', 'Australia', 'AUS', 36, 61), (14, 'AT', 'AUSTRIA', 'Austria', 'AUT', 40, 43), (15, 'AZ', 'AZERBAIJAN', 'Azerbaijan', 'AZE', 31, 994), (16, 'BS', 'BAHAMAS', 'Bahamas', 'BHS', 44, 1242), (17, 'BH', 'BAHRAIN', 'Bahrain', 'BHR', 48, 973), (18, 'BD', 'BANGLADESH', 'Bangladesh', 'BGD', 50, 880), (19, 'BB', 'BARBADOS', 'Barbados', 'BRB', 52, 1246), (20, 'BY', 'BELARUS', 'Belarus', 'BLR', 112, 375), (21, 'BE', 'BELGIUM', 'Belgium', 'BEL', 56, 32), (22, 'BZ', 'BELIZE', 'Belize', 'BLZ', 84, 501), (23, 'BJ', 'BENIN', 'Benin', 'BEN', 204, 229), (24, 'BM', 'BERMUDA', 'Bermuda', 'BMU', 60, 1441), (25, 'BT', 'BHUTAN', 'Bhutan', 'BTN', 64, 975), (26, 'BO', 'BOLIVIA', 'Bolivia', 'BOL', 68, 591), (27, 'BA', 'BOSNIA AND HERZEGOVINA', 'Bosnia and Herzegovina', 'BIH', 70, 387), (28, 'BW', 'BOTSWANA', 'Botswana', 'BWA', 72, 267), (29, 'BV', 'BOUVET ISLAND', 'Bouvet Island', NULL, NULL, 0), (30, 'BR', 'BRAZIL', 'Brazil', 'BRA', 76, 55), (31, 'IO', 'BRITISH INDIAN OCEAN TERRITORY', 'British Indian Ocean Territory', NULL, NULL, 246), (32, 'BN', 'BRUNEI DARUSSALAM', 'Brunei Darussalam', 'BRN', 96, 673), (33, 'BG', 'BULGARIA', 'Bulgaria', 'BGR', 100, 359), (34, 'BF', 'BURKINA FASO', 'Burkina Faso', 'BFA', 854, 226), (35, 'BI', 'BURUNDI', 'Burundi', 'BDI', 108, 257), (36, 'KH', 'CAMBODIA', 'Cambodia', 'KHM', 116, 855), (37, 'CM', 'CAMEROON', 'Cameroon', 'CMR', 120, 237), (38, 'CA', 'CANADA', 'Canada', 'CAN', 124, 1), (39, 'CV', 'CAPE VERDE', 'Cape Verde', 'CPV', 132, 238), (40, 'KY', 'CAYMAN ISLANDS', 'Cayman Islands', 'CYM', 136, 1345), (41, 'CF', 'CENTRAL AFRICAN REPUBLIC', 'Central African Republic', 'CAF', 140, 236), (42, 'TD', 'CHAD', 'Chad', 'TCD', 148, 235), (43, 'CL', 'CHILE', 'Chile', 'CHL', 152, 56), (44, 'CN', 'CHINA', 'China', 'CHN', 156, 86), (45, 'CX', 'CHRISTMAS ISLAND', 'Christmas Island', NULL, NULL, 61), (46, 'CC', 'COCOS (KEELING) ISLANDS', 'Cocos (Keeling) Islands', NULL, NULL, 672), (47, 'CO', 'COLOMBIA', 'Colombia', 'COL', 170, 57), (48, 'KM', 'COMOROS', 'Comoros', 'COM', 174, 269), (49, 'CG', 'CONGO', 'Congo', 'COG', 178, 242), (50, 'CD', 'CONGO, THE DEMOCRATIC REPUBLIC OF THE', 'Congo, the Democratic Republic of the', 'COD', 180, 242), (51, 'CK', 'COOK ISLANDS', 'Cook Islands', 'COK', 184, 682), (52, 'CR', 'COSTA RICA', 'Costa Rica', 'CRI', 188, 506), (53, 'CI', 'COTE D''IVOIRE', 'Cote D''Ivoire', 'CIV', 384, 225), (54, 'HR', 'CROATIA', 'Croatia', 'HRV', 191, 385), (55, 'CU', 'CUBA', 'Cuba', 'CUB', 192, 53), (56, 'CY', 'CYPRUS', 'Cyprus', 'CYP', 196, 357), (57, 'CZ', 'CZECH REPUBLIC', 'Czech Republic', 'CZE', 203, 420), (58, 'DK', 'DENMARK', 'Denmark', 'DNK', 208, 45), (59, 'DJ', 'DJIBOUTI', 'Djibouti', 'DJI', 262, 253), (60, 'DM', 'DOMINICA', 'Dominica', 'DMA', 212, 1767), (61, 'DO', 'DOMINICAN REPUBLIC', 'Dominican Republic', 'DOM', 214, 1809), (62, 'EC', 'ECUADOR', 'Ecuador', 'ECU', 218, 593), (63, 'EG', 'EGYPT', 'Egypt', 'EGY', 818, 20), (64, 'SV', 'EL SALVADOR', 'El Salvador', 'SLV', 222, 503), (65, 'GQ', 'EQUATORIAL GUINEA', 'Equatorial Guinea', 'GNQ', 226, 240), (66, 'ER', 'ERITREA', 'Eritrea', 'ERI', 232, 291), (67, 'EE', 'ESTONIA', 'Estonia', 'EST', 233, 372), (68, 'ET', 'ETHIOPIA', 'Ethiopia', 'ETH', 231, 251), (69, 'FK', 'FALKLAND ISLANDS (MALVINAS)', 'Falkland Islands (Malvinas)', 'FLK', 238, 500), (70, 'FO', 'FAROE ISLANDS', 'Faroe Islands', 'FRO', 234, 298), (71, 'FJ', 'FIJI', 'Fiji', 'FJI', 242, 679), (72, 'FI', 'FINLAND', 'Finland', 'FIN', 246, 358), (73, 'FR', 'FRANCE', 'France', 'FRA', 250, 33), (74, 'GF', 'FRENCH GUIANA', 'French Guiana', 'GUF', 254, 594), (75, 'PF', 'FRENCH POLYNESIA', 'French Polynesia', 'PYF', 258, 689), (76, 'TF', 'FRENCH SOUTHERN TERRITORIES', 'French Southern Territories', NULL, NULL, 0), (77, 'GA', 'GABON', 'Gabon', 'GAB', 266, 241), (78, 'GM', 'GAMBIA', 'Gambia', 'GMB', 270, 220), (79, 'GE', 'GEORGIA', 'Georgia', 'GEO', 268, 995), (80, 'DE', 'GERMANY', 'Germany', 'DEU', 276, 49), (81, 'GH', 'GHANA', 'Ghana', 'GHA', 288, 233), (82, 'GI', 'GIBRALTAR', 'Gibraltar', 'GIB', 292, 350), (83, 'GR', 'GREECE', 'Greece', 'GRC', 300, 30), (84, 'GL', 'GREENLAND', 'Greenland', 'GRL', 304, 299), (85, 'GD', 'GRENADA', 'Grenada', 'GRD', 308, 1473), (86, 'GP', 'GUADELOUPE', 'Guadeloupe', 'GLP', 312, 590), (87, 'GU', 'GUAM', 'Guam', 'GUM', 316, 1671), (88, 'GT', 'GUATEMALA', 'Guatemala', 'GTM', 320, 502), (89, 'GN', 'GUINEA', 'Guinea', 'GIN', 324, 224), (90, 'GW', 'GUINEA-BISSAU', 'Guinea-Bissau', 'GNB', 624, 245), (91, 'GY', 'GUYANA', 'Guyana', 'GUY', 328, 592), (92, 'HT', 'HAITI', 'Haiti', 'HTI', 332, 509), (93, 'HM', 'HEARD ISLAND AND MCDONALD ISLANDS', 'Heard Island and Mcdonald Islands', NULL, NULL, 0), (94, 'VA', 'HOLY SEE (VATICAN CITY STATE)', 'Holy See (Vatican City State)', 'VAT', 336, 39), (95, 'HN', 'HONDURAS', 'Honduras', 'HND', 340, 504), (96, 'HK', 'HONG KONG', 'Hong Kong', 'HKG', 344, 852), (97, 'HU', 'HUNGARY', 'Hungary', 'HUN', 348, 36), (98, 'IS', 'ICELAND', 'Iceland', 'ISL', 352, 354), (99, 'IN', 'INDIA', 'India', 'IND', 356, 91), (100, 'ID', 'INDONESIA', 'Indonesia', 'IDN', 360, 62), (101, 'IR', 'IRAN, ISLAMIC REPUBLIC OF', 'Iran, Islamic Republic of', 'IRN', 364, 98), (102, 'IQ', 'IRAQ', 'Iraq', 'IRQ', 368, 964), (103, 'IE', 'IRELAND', 'Ireland', 'IRL', 372, 353), (104, 'IL', 'ISRAEL', 'Israel', 'ISR', 376, 972), (105, 'IT', 'ITALY', 'Italy', 'ITA', 380, 39), (106, 'JM', 'JAMAICA', 'Jamaica', 'JAM', 388, 1876), (107, 'JP', 'JAPAN', 'Japan', 'JPN', 392, 81), (108, 'JO', 'JORDAN', 'Jordan', 'JOR', 400, 962), (109, 'KZ', 'KAZAKHSTAN', 'Kazakhstan', 'KAZ', 398, 7), (110, 'KE', 'KENYA', 'Kenya', 'KEN', 404, 254), (111, 'KI', 'KIRIBATI', 'Kiribati', 'KIR', 296, 686), (112, 'KP', 'KOREA, DEMOCRATIC PEOPLE''S REPUBLIC OF', 'Korea, Democratic People''s Republic of', 'PRK', 408, 850), (113, 'KR', 'KOREA, REPUBLIC OF', 'Korea, Republic of', 'KOR', 410, 82), (114, 'KW', 'KUWAIT', 'Kuwait', 'KWT', 414, 965), (115, 'KG', 'KYRGYZSTAN', 'Kyrgyzstan', 'KGZ', 417, 996), (116, 'LA', 'LAO PEOPLE''S DEMOCRATIC REPUBLIC', 'Lao People''s Democratic Republic', 'LAO', 418, 856), (117, 'LV', 'LATVIA', 'Latvia', 'LVA', 428, 371), (118, 'LB', 'LEBANON', 'Lebanon', 'LBN', 422, 961), (119, 'LS', 'LESOTHO', 'Lesotho', 'LSO', 426, 266), (120, 'LR', 'LIBERIA', 'Liberia', 'LBR', 430, 231), (121, 'LY', 'LIBYAN ARAB JAMAHIRIYA', 'Libyan Arab Jamahiriya', 'LBY', 434, 218), (122, 'LI', 'LIECHTENSTEIN', 'Liechtenstein', 'LIE', 438, 423), (123, 'LT', 'LITHUANIA', 'Lithuania', 'LTU', 440, 370), (124, 'LU', 'LUXEMBOURG', 'Luxembourg', 'LUX', 442, 352), (125, 'MO', 'MACAO', 'Macao', 'MAC', 446, 853), (126, 'MK', 'MACEDONIA, THE FORMER YUGOSLAV REPUBLIC OF', 'Macedonia, the Former Yugoslav Republic of', 'MKD', 807, 389), (127, 'MG', 'MADAGASCAR', 'Madagascar', 'MDG', 450, 261), (128, 'MW', 'MALAWI', 'Malawi', 'MWI', 454, 265), (129, 'MY', 'MALAYSIA', 'Malaysia', 'MYS', 458, 60), (130, 'MV', 'MALDIVES', 'Maldives', 'MDV', 462, 960), (131, 'ML', 'MALI', 'Mali', 'MLI', 466, 223), (132, 'MT', 'MALTA', 'Malta', 'MLT', 470, 356), (133, 'MH', 'MARSHALL ISLANDS', 'Marshall Islands', 'MHL', 584, 692), (134, 'MQ', 'MARTINIQUE', 'Martinique', 'MTQ', 474, 596), (135, 'MR', 'MAURITANIA', 'Mauritania', 'MRT', 478, 222), (136, 'MU', 'MAURITIUS', 'Mauritius', 'MUS', 480, 230), (137, 'YT', 'MAYOTTE', 'Mayotte', NULL, NULL, 269), (138, 'MX', 'MEXICO', 'Mexico', 'MEX', 484, 52), (139, 'FM', 'MICRONESIA, FEDERATED STATES OF', 'Micronesia, Federated States of', 'FSM', 583, 691), (140, 'MD', 'MOLDOVA, REPUBLIC OF', 'Moldova, Republic of', 'MDA', 498, 373), (141, 'MC', 'MONACO', 'Monaco', 'MCO', 492, 377), (142, 'MN', 'MONGOLIA', 'Mongolia', 'MNG', 496, 976), (143, 'MS', 'MONTSERRAT', 'Montserrat', 'MSR', 500, 1664), (144, 'MA', 'MOROCCO', 'Morocco', 'MAR', 504, 212), (145, 'MZ', 'MOZAMBIQUE', 'Mozambique', 'MOZ', 508, 258), (146, 'MM', 'MYANMAR', 'Myanmar', 'MMR', 104, 95), (147, 'NA', 'NAMIBIA', 'Namibia', 'NAM', 516, 264), (148, 'NR', 'NAURU', 'Nauru', 'NRU', 520, 674), (149, 'NP', 'NEPAL', 'Nepal', 'NPL', 524, 977), (150, 'NL', 'NETHERLANDS', 'Netherlands', 'NLD', 528, 31), (151, 'AN', 'NETHERLANDS ANTILLES', 'Netherlands Antilles', 'ANT', 530, 599), (152, 'NC', 'NEW CALEDONIA', 'New Caledonia', 'NCL', 540, 687), (153, 'NZ', 'NEW ZEALAND', 'New Zealand', 'NZL', 554, 64), (154, 'NI', 'NICARAGUA', 'Nicaragua', 'NIC', 558, 505), (155, 'NE', 'NIGER', 'Niger', 'NER', 562, 227), (156, 'NG', 'NIGERIA', 'Nigeria', 'NGA', 566, 234), (157, 'NU', 'NIUE', 'Niue', 'NIU', 570, 683), (158, 'NF', 'NORFOLK ISLAND', 'Norfolk Island', 'NFK', 574, 672), (159, 'MP', 'NORTHERN MARIANA ISLANDS', 'Northern Mariana Islands', 'MNP', 580, 1670), (160, 'NO', 'NORWAY', 'Norway', 'NOR', 578, 47), (161, 'OM', 'OMAN', 'Oman', 'OMN', 512, 968), (162, 'PK', 'PAKISTAN', 'Pakistan', 'PAK', 586, 92), (163, 'PW', 'PALAU', 'Palau', 'PLW', 585, 680), (164, 'PS', 'PALESTINIAN TERRITORY, OCCUPIED', 'Palestinian Territory, Occupied', NULL, NULL, 970), (165, 'PA', 'PANAMA', 'Panama', 'PAN', 591, 507), (166, 'PG', 'PAPUA NEW GUINEA', 'Papua New Guinea', 'PNG', 598, 675), (167, 'PY', 'PARAGUAY', 'Paraguay', 'PRY', 600, 595), (168, 'PE', 'PERU', 'Peru', 'PER', 604, 51), (169, 'PH', 'PHILIPPINES', 'Philippines', 'PHL', 608, 63), (170, 'PN', 'PITCAIRN', 'Pitcairn', 'PCN', 612, 0), (171, 'PL', 'POLAND', 'Poland', 'POL', 616, 48), (172, 'PT', 'PORTUGAL', 'Portugal', 'PRT', 620, 351), (173, 'PR', 'PUERTO RICO', 'Puerto Rico', 'PRI', 630, 1787), (174, 'QA', 'QATAR', 'Qatar', 'QAT', 634, 974), (175, 'RE', 'REUNION', 'Reunion', 'REU', 638, 262), (176, 'RO', 'ROMANIA', 'Romania', 'ROM', 642, 40), (177, 'RU', 'RUSSIAN FEDERATION', 'Russian Federation', 'RUS', 643, 70), (178, 'RW', 'RWANDA', 'Rwanda', 'RWA', 646, 250), (179, 'SH', 'SAINT HELENA', 'Saint Helena', 'SHN', 654, 290), (180, 'KN', 'SAINT KITTS AND NEVIS', 'Saint Kitts and Nevis', 'KNA', 659, 1869), (181, 'LC', 'SAINT LUCIA', 'Saint Lucia', 'LCA', 662, 1758), (182, 'PM', 'SAINT PIERRE AND MIQUELON', 'Saint Pierre and Miquelon', 'SPM', 666, 508), (183, 'VC', 'SAINT VINCENT AND THE GRENADINES', 'Saint Vincent and the Grenadines', 'VCT', 670, 1784), (184, 'WS', 'SAMOA', 'Samoa', 'WSM', 882, 684), (185, 'SM', 'SAN MARINO', 'San Marino', 'SMR', 674, 378), (186, 'ST', 'SAO TOME AND PRINCIPE', 'Sao Tome and Principe', 'STP', 678, 239), (187, 'SA', 'SAUDI ARABIA', 'Saudi Arabia', 'SAU', 682, 966), (188, 'SN', 'SENEGAL', 'Senegal', 'SEN', 686, 221), (189, 'CS', 'SERBIA AND MONTENEGRO', 'Serbia and Montenegro', NULL, NULL, 381), (190, 'SC', 'SEYCHELLES', 'Seychelles', 'SYC', 690, 248), (191, 'SL', 'SIERRA LEONE', 'Sierra Leone', 'SLE', 694, 232), (192, 'SG', 'SINGAPORE', 'Singapore', 'SGP', 702, 65), (193, 'SK', 'SLOVAKIA', 'Slovakia', 'SVK', 703, 421), (194, 'SI', 'SLOVENIA', 'Slovenia', 'SVN', 705, 386), (195, 'SB', 'SOLOMON ISLANDS', 'Solomon Islands', 'SLB', 90, 677), (196, 'SO', 'SOMALIA', 'Somalia', 'SOM', 706, 252), (197, 'ZA', 'SOUTH AFRICA', 'South Africa', 'ZAF', 710, 27), (198, 'GS', 'SOUTH GEORGIA AND THE SOUTH SANDWICH ISLANDS', 'South Georgia and the South Sandwich Islands', NULL, NULL, 0), (199, 'ES', 'SPAIN', 'Spain', 'ESP', 724, 34), (200, 'LK', 'SRI LANKA', 'Sri Lanka', 'LKA', 144, 94), (201, 'SD', 'SUDAN', 'Sudan', 'SDN', 736, 249), (202, 'SR', 'SURINAME', 'Suriname', 'SUR', 740, 597), (203, 'SJ', 'SVALBARD AND JAN MAYEN', 'Svalbard and Jan Mayen', 'SJM', 744, 47), (204, 'SZ', 'SWAZILAND', 'Swaziland', 'SWZ', 748, 268), (205, 'SE', 'SWEDEN', 'Sweden', 'SWE', 752, 46), (206, 'CH', 'SWITZERLAND', 'Switzerland', 'CHE', 756, 41), (207, 'SY', 'SYRIAN ARAB REPUBLIC', 'Syrian Arab Republic', 'SYR', 760, 963), (208, 'TW', 'TAIWAN, PROVINCE OF CHINA', 'Taiwan, Province of China', 'TWN', 158, 886), (209, 'TJ', 'TAJIKISTAN', 'Tajikistan', 'TJK', 762, 992), (210, 'TZ', 'TANZANIA, UNITED REPUBLIC OF', 'Tanzania, United Republic of', 'TZA', 834, 255), (211, 'TH', 'THAILAND', 'Thailand', 'THA', 764, 66), (212, 'TL', 'TIMOR-LESTE', 'Timor-Leste', NULL, NULL, 670), (213, 'TG', 'TOGO', 'Togo', 'TGO', 768, 228), (214, 'TK', 'TOKELAU', 'Tokelau', 'TKL', 772, 690), (215, 'TO', 'TONGA', 'Tonga', 'TON', 776, 676), (216, 'TT', 'TRINIDAD AND TOBAGO', 'Trinidad and Tobago', 'TTO', 780, 1868), (217, 'TN', 'TUNISIA', 'Tunisia', 'TUN', 788, 216), (218, 'TR', 'TURKEY', 'Turkey', 'TUR', 792, 90), (219, 'TM', 'TURKMENISTAN', 'Turkmenistan', 'TKM', 795, 7370), (220, 'TC', 'TURKS AND CAICOS ISLANDS', 'Turks and Caicos Islands', 'TCA', 796, 1649), (221, 'TV', 'TUVALU', 'Tuvalu', 'TUV', 798, 688), (222, 'UG', 'UGANDA', 'Uganda', 'UGA', 800, 256), (223, 'UA', 'UKRAINE', 'Ukraine', 'UKR', 804, 380), (224, 'AE', 'UNITED ARAB EMIRATES', 'United Arab Emirates', 'ARE', 784, 971), (225, 'GB', 'UNITED KINGDOM', 'United Kingdom', 'GBR', 826, 44), (226, 'US', 'UNITED STATES', 'United States', 'USA', 840, 1), (227, 'UM', 'UNITED STATES MINOR OUTLYING ISLANDS', 'United States Minor Outlying Islands', NULL, NULL, 1), (228, 'UY', 'URUGUAY', 'Uruguay', 'URY', 858, 598), (229, 'UZ', 'UZBEKISTAN', 'Uzbekistan', 'UZB', 860, 998), (230, 'VU', 'VANUATU', 'Vanuatu', 'VUT', 548, 678), (231, 'VE', 'VENEZUELA', 'Venezuela', 'VEN', 862, 58), (232, 'VN', 'VIET NAM', 'Viet Nam', 'VNM', 704, 84), (233, 'VG', 'VIRGIN ISLANDS, BRITISH', 'Virgin Islands, British', 'VGB', 92, 1284), (234, 'VI', 'VIRGIN ISLANDS, U.S.', 'Virgin Islands, U.s.', 'VIR', 850, 1340), (235, 'WF', 'WALLIS AND FUTUNA', 'Wallis and Futuna', 'WLF', 876, 681), (236, 'EH', 'WESTERN SAHARA', 'Western Sahara', 'ESH', 732, 212), (237, 'YE', 'YEMEN', 'Yemen', 'YEM', 887, 967), (238, 'ZM', 'ZAMBIA', 'Zambia', 'ZMB', 894, 260), (239, 'ZW', 'ZIMBABWE', 'Zimbabwe', 'ZWE', 716, 263);"); /* end create table for dropdown > neeti */ /* Creating accounts table*/ mysql_query("CREATE TABLE `accounts` ( `AccountNumber` int(5) NOT NULL auto_increment, `AccountName` varchar(255) NOT NULL default '', `AccountSite` varchar(250) NOT NULL default '', `BranchID` varchar(25) NOT NULL default '1459', `AnnualRevenue` varchar(20) NOT NULL default '', `BillingStreet` varchar(255) NOT NULL default '', `BillingCity` varchar(40) NOT NULL default '', `BillingState` varchar(40) NOT NULL default '', `BillingPostalCode` varchar(20) NOT NULL default '', `BillingCountry` varchar(40) NOT NULL default '', `CreatedBy` varchar(80) NOT NULL default '', `CreatedOn` date NOT NULL default '0000-00-00', `ModifiedBy` varchar(80) NOT NULL default '', `ModifiedOn` varchar(40) NOT NULL default '0000-00-00 00:00:00', `Description` varchar(255) NOT NULL default '', `Employees` varchar(5) NOT NULL default '0', `Fax` varchar(40) NOT NULL default '', `Industry` varchar(80) NOT NULL default '', `Ownership` varchar(40) NOT NULL default '', `ParentAccount` int(1) NOT NULL default '0', `Phone` varchar(20) NOT NULL default '', `Rating` varchar(40) NOT NULL default '', `Resources` varchar(40) NOT NULL default '', `ShippingStreet` varchar(255) NOT NULL default '', `ShippingCity` varchar(64) NOT NULL default '', `ShippingState` varchar(40) NOT NULL default '', `ShippingCountry` varchar(40) NOT NULL default '', `Type` varchar(40) NOT NULL default '', `Website` varchar(120) NOT NULL default '', `ShippingPostalCode` varchar(20) NOT NULL default '', `TIN` varchar(250) default 'NULL', `LST` varchar(250) default 'NULL', `PanNo` varchar(250) default 'NULL', `Source` varchar(250) default NULL, `Note` varchar(255) default NULL, `Phone2` varchar(40) default NULL, `CustomerAccount` int(1) default '0', `CST` varchar(20) default NULL, `ProductList` varchar(80) default 'PL01', `DStatus` int(1) default '0', `Vendor_Code` varchar(80) default NULL, `AMC_StartDate` date default NULL, `AMC_EndDate` date default NULL, `I_accountstatus` int(10) default '1', `Transaction_Date` date default NULL, `Transaction_Module` int(5) default NULL, `Action` varchar(100) default NULL, `Actual_ID` varchar(100) default NULL, `Lead_ID` varchar(20) default NULL, `Lead_Convetreddate` datetime default NULL, `Lead_Convertedby` varchar(50) default NULL, `B_Tags` blob, `v_Other_indust` varchar(100) default NULL, `v_Other_type` varchar(100) default NULL, `last_interaction_datetime` datetime default NULL, `last_interaction_id` int(10) default NULL, `interaction_Stage` varchar(100) default NULL, PRIMARY KEY (`AccountNumber`,`BranchID`) ) ;"); /* End : Account creation table */ ################### CRATING MASTER TABLE FOR ACCOUNT OWNERSHIP ::SUSHILA DATE 24 DEC,2008 mysql_query("CREATE TABLE `tbl_mst_account_ownership` ( `Ownership` varchar(50) NOT NULL default '',`DStatus` int(1) default '1',`Default_Value` int(1) default '0',`CreatedOn` date default '2009-01-01', `ModifiedOn` date default '0000-00-00', `ModifiedBy` varchar(80) NOT NULL default '', `CreatedBy` varchar(80) NOT NULL default '',PRIMARY KEY (`Ownership`));"); ######## to insert records by default ### date 30dec,2008 sushila $insert_ownership="insert into tbl_mst_account_ownership (Ownership,DStatus,Default_Value,CreatedOn,ModifiedOn,ModifiedBy,CreatedBy) values ('public','1','0',NOW(),'0000-00-00','',''),('private','1','0',NOW(),'0000-00-00','',''),('subsidiary','1','0',NOW(),'0000-00-00','',''),('other','1','0',NOW(),'0000-00-00','','')"; $res_ownership=mysql_query($insert_ownership) or die (mysql_query(mysql_error)); ################# END OF THE TABLE #################3 ################### CRATING MASTER TABLE FOR ACCOUNT TYPE ::SUSHILA DATE 24 DEC,2008 mysql_query("CREATE TABLE `tbl_mst_account_type` ( `Type` varchar(50) NOT NULL default '',`DStatus` int(1) default '1',`Default_Value` int(1) default '0',`CreatedOn` date default '0000-00-00', `ModifiedOn` date default '0000-00-00', `ModifiedBy` varchar(80) NOT NULL default '', `CreatedBy` varchar(80) NOT NULL default '',PRIMARY KEY (`Type`));"); ######## to insert records by default ### date 30dec,2008 sushila $insert_type="insert into tbl_mst_account_type (Type,DStatus,Default_Value,CreatedOn,ModifiedOn,ModifiedBy,CreatedBy) values ('None','1','0',NOW(),'0000-00-00','',''),('Analyst','1','0',NOW(),'0000-00-00','',''),('Competitor','1','0',NOW(),'0000-00-00','',''),('Customer','1','0',NOW(),'0000-00-00','',''),('Integrator','1','0',NOW(),'0000-00-00','',''),('Partner','1','0',NOW(),'0000-00-00','',''),('Press','1','0',NOW(),'0000-00-00','',''),('Prospect','1','0',NOW(),'0000-00-00','',''),('Reseller','1','0',NOW(),'0000-00-00','',''),('Other','1','0',NOW(),'0000-00-00','','');"; $res_type=mysql_query($insert_type) or die (mysql_query(mysql_error)); ################# END OF THE TABLE #################3 ##author::sushila createdon::18-02-09 $sql_comment="CREATE TABLE `tbl_mst_comment` ( `Comment_ID` int(11) NOT NULL auto_increment, `Module_ID` int(11) default NULL, `Actual_ID` varchar(40) default NULL, `Description` varchar(255) default NULL, `CreatedBy` varchar(40) default NULL, `CreatedOn` datetime default NULL, PRIMARY KEY (`Comment_ID`) ); "; $res_comment=mysql_query($sql_comment); ## end of the table ## ################### CRATING MASTER TABLE FOR ACCOUNT INDUSTRY ::SUSHILA DATE 24 DEC,2008 mysql_query("CREATE TABLE `tbl_mst_account_industry` ( `Industry` varchar(50) NOT NULL default '',`DStatus` int(1) default '1',`Default_Value` int(1) default '0',`CreatedOn` date default '0000-00-00', `ModifiedOn` date default '0000-00-00', `ModifiedBy` varchar(80) NOT NULL default '', `CreatedBy` varchar(80) NOT NULL default '',PRIMARY KEY (`Industry`));"); $insert_industry="insert into tbl_mst_account_industry (Industry,DStatus,Default_Value,CreatedOn,ModifiedOn,ModifiedBy,CreatedBy) values ('None','1','0',NOW(),'0000-00-00','',''),('Agriculture','1','0',NOW(),'0000-00-00','',''),('Apparel','1','0',NOW(),'0000-00-00','',''),('Banking','1','0',NOW(),'0000-00-00','',''),('Biotechnology','1','0',NOW(),'0000-00-00','',''),('Call Centers','1','0',NOW(),'0000-00-00','',''),('Call Center Solution Provider','1','0',NOW(),'0000-00-00','',''),('Chemicals','1','0',NOW(),'0000-00-00','',''),('Communications','1','0',NOW(),'0000-00-00','',''),('Constructions','1','0',NOW(),'0000-00-00','',''),('Consulting','1','0',NOW(),'0000-00-00','',''),('Education','1','0',NOW(),'0000-00-00','',''),('Electronics','1','0',NOW(),'0000-00-00','',''),('Energy','1','0',NOW(),'0000-00-00','',''),('Engineering','1','0',NOW(),'0000-00-00','',''),('Entertainment','1','0',NOW(),'0000-00-00','',''),('Environment','1','0',NOW(),'0000-00-00','',''),('EPABX','1','0',NOW(),'0000-00-00','',''),('Finance,Food & Beverage ','1','0',NOW(),'0000-00-00','',''),('Government','1','0',NOW(),'0000-00-00','',''),('HealthCare','1','0',NOW(),'0000-00-00','',''),('Hospitality','1','0',NOW(),'0000-00-00','',''),('Insurance','1','0',NOW(),'0000-00-00','',''),('Machinery','1','0',NOW(),'0000-00-00','',''),('Manufacturing','1','0',NOW(),'0000-00-00','',''),('Media','1','0',NOW(),'0000-00-00','',''),('Not for profit','1','0',NOW(),'0000-00-00','',''),('Recreation','1','0',NOW(),'0000-00-00','','');"; $res_industry=mysql_query($insert_industry) or die (mysql_query(mysql_error)); ################# END OF THE TABLE #################3 ################### CRATING MASTER TABLE FOR ACCOUNT Source ::SUSHILA DATE 24 DEC,2008 mysql_query("CREATE TABLE `tbl_mst_account_source` ( `Source` varchar(50) NOT NULL default '',`DStatus` int(1) default '1',`Default_Value` int(1) default '0',`CreatedOn` date default '0000-00-00', `ModifiedOn` date default '0000-00-00', `ModifiedBy` varchar(80) NOT NULL default '', `CreatedBy` varchar(80) NOT NULL default '',PRIMARY KEY (`Source`));"); $insert_source="insert into tbl_mst_account_source (Source,DStatus,Default_Value,CreatedOn,ModifiedOn,ModifiedBy,CreatedBy) values ('Advertisement','1','0',NOW(),'0000-00-00','',''),('','1','0',NOW(),'0000-00-00','',''),('Convergence-2007','1','0',NOW(),'0000-00-00','',''),('Employee Referral','1','0',NOW(),'0000-00-00','',''),('External Referral','1','0',NOW(),'0000-00-00','',''),('GITEX 2007','1','0',NOW(),'0000-00-00','',''),('Newspaper','1','0',NOW(),'0000-00-00','',''),('Phone','1','0',NOW(),'0000-00-00','',''),('Partner','1','0',NOW(),'0000-00-00','',''),('Public Relations','1','0',NOW(),'0000-00-00','',''),('Seminar-Internal','1','0',NOW(),'0000-00-00','',''),('Seminar-Partner','1','0',NOW(),'0000-00-00','',''),('Trade Show','1','0',NOW(),'0000-00-00','',''),('Web','1','0',NOW(),'0000-00-00','',''),('World of mouth','1','0',NOW(),'0000-00-00','',''),('Tender','1','0',NOW(),'0000-00-00','',''),('Other','1','0',NOW(),'0000-00-00','','')"; $res_source=mysql_query($insert_source) or die (mysql_query(mysql_error)); ################# END OF THE TABLE #################3 ################### CRATING MASTER TABLE FOR ACCOUNT Rating ::SUSHILA DATE 24 DEC,2008 mysql_query("CREATE TABLE `tbl_mst_account_rating` ( `Rating` varchar(50) NOT NULL default '',`DStatus` int(1) default '1',`Default_Value` int(1) default '0',`CreatedOn` date default '0000-00-00', `ModifiedOn` date default '0000-00-00', `ModifiedBy` varchar(80) NOT NULL default '', `CreatedBy` varchar(80) NOT NULL default '',PRIMARY KEY (`Rating`));"); $insert_rating="insert into tbl_mst_account_rating (Rating,DStatus,Default_Value,CreatedOn,ModifiedOn,ModifiedBy,CreatedBy) values ('None','1','0',NOW(),'0000-00-00','',''),('Hot','1','0',NOW(),'0000-00-00','',''),('Warm','1','0',NOW(),'0000-00-00','',''),('Cold','1','0',NOW(),'0000-00-00','','');"; $res_rating=mysql_query($insert_rating) or die (mysql_query(mysql_error)); ################# END OF THE TABLE #################3 //include("dropdown_master.php"); ################### CRATING MASTER TABLE FOR all drop downs which will have all the drop down tables ::SUSHILA DATE 24 DEC,2008 mysql_query("CREATE TABLE `tbl_mst_heads_all` ( `ModuleName` varchar(50) NOT NULL default '',`TableName` varchar(50) NOT NULL default '',`HeadName` varchar(50) NOT NULL default '',`CreatedOn` date default '0000-00-00', `ModifiedOn` date default '0000-00-00', `ModifiedBy` varchar(80) NOT NULL default '', `CreatedBy` varchar(80) NOT NULL default '');"); //mysql_query("insert into `tbl_mst_heads_all`*/ ################ INSERT QUERY TO INSERT ALL THE DROP DOWN TABLE NAMES ################### $insert_ownership="insert into tbl_mst_heads_all (ModuleName,TableName,HeadName,CreatedOn,ModifiedOn,ModifiedBy,CreatedBy) values ('1','tbl_mst_account_ownership','Ownership',NOW(),'0000-00-00','',''),('1','tbl_mst_account_type','Type',NOW(),'0000-00-00','',''),('1','tbl_mst_account_industry','Industry',NOW(),'0000-00-00','',''),('1','tbl_mst_account_source','Source',NOW(),'0000-00-00','',''),('1','tbl_mst_account_rating','Rating',NOW(),'0000-00-00','','');"; $res_ownership=mysql_query($insert_ownership) or die (mysql_query(mysql_error)); ################# END OF THE TABLE #################3 /* Creating Contacts table 1-12-2008*/ $insert123="CREATE TABLE `crmcontactid` ( `BranchID` int(10) NOT NULL default '1459', `AtxContactID` int(20) NOT NULL, `uciUserID` varchar(20) NOT NULL default '', `GivenName` varchar(60) NOT NULL default '', `sn` varchar(60) NOT NULL default '', `DisplayName` varchar(60) default NULL, `AccountName` varchar(128) default NULL, `Department` varchar(32) NOT NULL default '', `Title` varchar(64) default NULL, `Mail` varchar(128) NOT NULL default '', `HomePhone` varchar(20) NOT NULL default '0', `CreatedOn` date default '0000-00-00', `ModifiedOn` date default '0000-00-00', `ModifiedBy` varchar(80) NOT NULL default '', `HStreet` varchar(128) NOT NULL default '', `HCity` varchar(64) NOT NULL default '', `HState` varchar(32) NOT NULL default '', `HCountry` varchar(32) NOT NULL default '', `Assistant` varchar(64) NOT NULL default '', `WTel2` varchar(64) NOT NULL default '', `HPostalCode` varchar(20) NOT NULL default '', `AssistantPhone` varchar(15) NOT NULL default '', `Birthday` date default '0000-00-00', `Hfax` varchar(64) NOT NULL default '', `Hmail` varchar(128) NOT NULL default '', `Ownership` varchar(64) NOT NULL default '', `HMobile` varchar(20) NOT NULL default '', `CreatedBy` varchar(80) NOT NULL default '', `fax` varchar(64) NOT NULL default '', `tel` varchar(64) NOT NULL default '', `ContactSource` smallint(1) NOT NULL default '0', `AccountID` int(20) NOT NULL default '0', `ContactType` int(1) NOT NULL default '0', `DStatus` int(1) NOT NULL default '0', `I_ContactStatus` int(10) default '1', `B_Tags` blob, `v_other_title` varchar(100), PRIMARY KEY (`BranchID`,`AtxContactID`) );"; $insert1=mysql_query($insert123); /* End : Contacts creation table */ /* Creating opportunities */ mysql_query("CREATE TABLE `opportunity` ( `OpportunityID` int(11) NOT NULL auto_increment, `BranchID` double default NULL, `Contact` varchar(50) default NULL, `CategoryID` varchar(60) default NULL, `GroupID` varchar(60) default NULL, `OpportunityName` varchar(128) default NULL, `AccountID` double default NULL, `AccountName` varchar(80) default NULL, `Type` varchar(40) default NULL, `LeadSource` varchar(64) default NULL, `Amount` double default NULL, `CloseDate` date default NULL, `NextStep` varchar(64) default NULL, `Stage` varchar(64) default NULL, `Probability` varchar(5) default NULL, `Description` blob, `AssignedTo` varchar(40) default NULL, `CreatedBy` varchar(80) default NULL, `CreatedOn` date default NULL, `AssignedBy` varchar(80) default NULL, `ModifiedOn` date default NULL, `ModifiedBy` varchar(40) default NULL, `Currency` varchar(20) default NULL, `Status` double default NULL, `SalesOrderNo` varchar(40) default NULL, `Tender` double default NULL, `last_interaction_datetime` datetime default NULL, `last_interaction_id` int(10) default NULL, `interaction_Stage` varchar(100) default NULL, `v_product` varchar(50) default NULL, PRIMARY KEY (`OpportunityID`) ); "); /* End : opportunities craetion table */ /* Creating quotation(`quotationcart` ) */ mysql_query("CREATE TABLE `quotationcart` ( `ID` double NOT NULL auto_increment, `QuotationNo` varchar(20) default NULL, `BranchID` double default NULL, `ProductCode` varchar(40) default NULL, `Description` blob, `Rate` varchar(20) default NULL, `Quantity` double default NULL, `Discount` varchar(5) default NULL, `CST` varchar(5) default NULL, `LST` varchar(5) default NULL, `FinalPrice` double default NULL, `Customer` varchar(40) default NULL, `Salesperson` varchar(40) default NULL, `DiscountedPrice` double default NULL, `TaxAmount` double default NULL, PRIMARY KEY (`ID`) ); "); ## commented by RG::22-02-2009~ Reason::ID set to primary key key mysql_query("CREATE TABLE `quotation_master` ( `BranchID` double NOT NULL, `Amount` double default '0', `QuotationNo` varchar(20) NOT NULL, `Id` double default NULL, `QuotationDate` date default NULL, `AccountName` varchar(128) default NULL, `CustomerName` varchar(64) default NULL, `ValidTill` datetime default NULL, `SalesPerson` varchar(128) default NULL, `AmtInWords` varchar(255) default '0', `QuotCurr` varchar(10) default NULL, `Status` double default '1', `flag` double default NULL, `ModifiedOn` date default NULL, `ModifiedBy` varchar(150) default NULL, `Approval` double default NULL, `ApprovedBy` double default NULL, `InvoiceNo` varchar(20) default NULL, `AccountID` double default NULL, `AtxContactID` double default NULL, `ApprovedOn` date default NULL, `SpecialTerms` blob, `PaymentMode` blob, PRIMARY KEY (`BranchID`,`QuotationNo`) );"); /* End : quotation creation table */ /* Creating quotation(quotationreference) */ mysql_query("create table `quotationreference` (`QuotationNo` varchar (40), `BranchID` double , `ReferenceNo` varchar (255), `ReferenceDate` date , `AccountName` varchar (120)); "); /* End : quotation creation table */ /* Creating quotation(termsconditions) */ mysql_query("create table `termsconditions` (`QuotationNo` varchar (30),`BranchID` double ,`Payment` varchar (255),`Delivery` varchar (255),`Warranty` varchar (255), `Tax` varchar (255),`Validity` varchar (255),`Price` varchar (255),`ClearanceHandling` varchar (255),`FreightInsurance` varchar (255),`MOQ` varchar (255),`SpecialTerms` blob ,`PaymentMode` double ); "); /* End : quotation creation table */ /* Creating User Management(uniuserprofile) */ mysql_query("create table `uniuserprofile` (`AtxUserID` varchar (20),`AtxUserName` varchar (60),`AtxPassword` varchar (32), `GivenName` varchar (60),`sn` varchar (60),`AtxDisplayName` varchar (60),`AtxCompany` varchar (128),`AtxDesignation` varchar (64),`AtxEmail` varchar (128),`AtxEmailPwd` varchar (20),`AtxUserCat` varchar (10),`AtxBirthDate` date ,`AtxGender` int , `AtxStreet` varchar (255),`AtxCity` varchar (64),`AtxState` varchar (64),`AtxCountry` varchar (32),`AtxPincode` varchar (8), `AtxHomePhone` varchar (20),`AtxContactPhone` varchar (20), `AtxContactFax` varchar (20),`AtxPager` varchar (20),`AtxMobile` varchar (20),`AtxWWWURL` varchar (255), `AtxDescription` varchar (255),`AtxUserStatus` int ,`AtxAccountExpires` datetime , `AtxPrefLang` varchar (255),`AtxMbxPublicPwd` varchar (20),`AtxMaliciousMailbox` int ,`AtxCurrBal` double ,`AtxCurrUsedDiskSpace` decimal (19),`AtxCurrUsedDuration` decimal (19),`AtxMsgRecTime` decimal (19),`AtxVoiceInitialGreet` double ,`AtxMaxNoMsg` int , `AtxSaveCopySentFolder` int ,`AtxReplyToMsgIncl` int ,`AtxKeepFwdCopy` int ,`AtxEmailForward` varchar (128),`AtxFromName` varchar (128),`AtxAcceptBlk` int ,`AtxBlockEmailList` int , `AtxMailStore` int ,`AtxRetrieveMailFrom` int , `AtxUseDefaultIMAPSever` int , `AtxLocalStoreName` varchar (255),`AtxMsgRdType` double ,`AtxMsgRdOrder` double ,`AtxUserCardNo` varchar (128),`File_up` varchar (255)); "); $sql_userprofile="insert into uniuserprofile (AtxUserID,AtxUserName,GivenName,sn,AtxDisplayName,AtxPassword,AtxCompany,AtxDesignation,AtxContactPhone,AtxEmail,AtxUserStatus,AtxBirthDate,AtxMobile)values('$v_maxuserid','$Username','$V_FirstName','$V_LastName','$displayname','$passwd','$V_CompanyName','$V_JobTitle','$V_PhoneNo','$V_EmailId','1','0000-00-00','$V_MobileNo');"; $result_userprofile= mysql_query($sql_userprofile); /* End : user management creation table */ /* Creating table Employee Attendance */ mysql_query("CREATE TABLE `empattendance` ( `empID` varchar(20) NOT NULL default '', `INTime` datetime NOT NULL default '0000-00-00 00:00:00', `OUTTime` datetime default '0000-00-00 00:00:00', `LAStatus` int(2) default NULL, `Credit` int(1) default '0', `DateCreditGranted` date default '0000-00-00', `CreditGivenBy` varchar(20) default NULL, `CreditApprovalComment` blob, PRIMARY KEY (`empID`,`INTime`) );"); /* End table Employee Attendance */ /* Creating table Sales */ mysql_query("CREATE TABLE `salesordermaster` ( `SalesOrderNo` varchar(30) NOT NULL default '', `SalesOrderDate` date default NULL, `SalesID` int(5) default NULL, `BranchID` int(10) default NULL, `AccountName` varchar(140) default NULL, `Contact` varchar(140) default NULL, `OrderMadeBy` varchar(80) default NULL, `cPurchaseOrderNo` varchar(30) default NULL, `PurchaseOrderDate` date default NULL, `TotalAmount` double default NULL, `AmountInWords` varchar(255) default NULL, `ApprovedBy` varchar(80) default NULL, `SignedBy` varchar(80) default NULL, `SalesCurr` varchar(10) default NULL, `Status` varchar(20) default NULL, `ReferenceNo` varchar(40) default NULL, `ReferenceDate` date default NULL, `Octroi` varchar(10) default NULL, `FreightInFig` varchar(10) default NULL, `Custom` double default NULL, `flag` int(1) default '0', `ApprovalDate` date default NULL, `ModifiedOn` date default NULL, `ModifiedBy` varchar(150) default NULL, `DStatus` smallint(1) default '1', `InvoiceMade` int(1) default '0', `InvoiceNo` varchar(20) default NULL, `PerformaNo` varchar(20) default NULL, `AccountID` int(10) default NULL, `Advance` smallint(1) default NULL, `SpecialTerms` varchar(200) default NULL, `BillingAddress` varchar(200) default NULL, `DeliveryAddress` varchar(200) default NULL, PRIMARY KEY (`SalesOrderNo`) );"); mysql_query("CREATE TABLE `salesordercart` ( `ID` int(11) NOT NULL auto_increment, `SalesOrderNo` varchar(30) default NULL, `BranchID` int(10) default NULL, `ProductCategory` varchar(40) default NULL, `ProductName` varchar(140) default NULL, `AccountName` varchar(140) default NULL, `Contact` varchar(140) default NULL, `OrderMadeBy` varchar(80) default NULL, `Description` blob, `Quantity` int(10) default NULL, `Rate` double default NULL, `FinalPrice` double default NULL, PRIMARY KEY (`ID`));"); mysql_query("CREATE TABLE `salesordertc` ( `SalesOrderNo` varchar(30) NOT NULL default '', `BranchID` int(10) default '1459', `Payment` varchar(255) default NULL, `Warranty` varchar(255) default NULL, `Delivery` varchar(255) default NULL, `DeliveryAddress` varchar(255) default NULL, `BillingAddress` varchar(255) default NULL, `Validity` varchar(255) default NULL, `SpecialTerms` blob, `Penalty` varchar(255) default NULL, `CST` float default NULL, `LST` float default NULL, `LstForm` varchar(80) default NULL, `CstForm` varchar(80) default NULL, `Freight` varchar(255) default NULL, PRIMARY KEY (`SalesOrderNo`));"); /* End table Sales */ /* Create Table P.O. */ mysql_query("CREATE TABLE `termsconditionspo` ( `PurchaseOrderNo` varchar(30) NOT NULL default '', `Payment` varchar(255) default NULL, `Warranty` varchar(255) default NULL, `Delivery` varchar(255) default NULL, `DeliveryAddress` varchar(255) default NULL, `BillingAddress` blob, `Validity` varchar(255) default NULL, `SpecialTerms` blob, `Penalty` varchar(255) default NULL, `CST` float default NULL, `LST` float default NULL, `ServiceTax` float default NULL, `LstForm` varchar(80) default NULL, `CstForm` varchar(80) default NULL, `Freight` varchar(255) default NULL, `SalesTax` varchar(255) default NULL, `BranchID` int(10) NOT NULL default '1459', PRIMARY KEY (`PurchaseOrderNo`,`BranchID`));"); mysql_query("CREATE TABLE `purchaseordermaster` ( `PurchaseOrderNo` varchar(30) NOT NULL default '', `AccountName` varchar(80) default NULL, `Contact` varchar(120) default NULL, `Salesperson` varchar(120) default NULL, `AmountInWords` varchar(255) default NULL, `TotalAmount` double default NULL, `ExTaxAmount` float default NULL, `PurchaseOrderDate` date default NULL, `CheckedBy` varchar(120) default NULL, `PreparedBy` varchar(120) default NULL, `SignedBy` varchar(120) default NULL, `Currency` varchar(10) default NULL, `Status` int(5) default NULL, `ModifiedOn` date default NULL, `ModifiedBy` varchar(150) default NULL, `BranchID` int(10) NOT NULL default '1459', `AccountID` int(10) default NULL, `MaterialReceiptNo` varchar(25) default NULL, PRIMARY KEY (`PurchaseOrderNo`,`BranchID`));"); mysql_query("CREATE TABLE `referencepo` ( `PurchaseOrderNo` varchar(30) NOT NULL default '', `ReferenceNo` varchar(180) default NULL, `ReferenceDate` date default NULL, `RequisationNo` varchar(120) default NULL, `BranchID` int(10) NOT NULL default '0', PRIMARY KEY (`PurchaseOrderNo`,`BranchID`)) ;"); mysql_query("CREATE TABLE `purchaseordercart` ( `ID` int(11) NOT NULL auto_increment, `PurchaseOrderNo` varchar(30) default NULL, `ProductName` blob, `AccountName` varchar(80) default NULL, `Contact` varchar(140) default NULL, `Salesperson` varchar(80) default NULL, `PurchaseOrderDate` date default NULL, `Description` blob, `Quantity` int(5) default NULL, `FinalPrice` double default NULL, `Rate` double default NULL, `BranchID` int(5) NOT NULL default '1459', PRIMARY KEY (`ID`));"); /* End Table P.O. */ /* Create Table Helpdesk */ mysql_query("CREATE TABLE `problemdefination` ( `IID` int(10) NOT NULL auto_increment, `ID` int(15) default '0', `BranchID` int(10) default '1459', `Subject` blob, `ReportedBy` varchar(40) default NULL, `ComplainDate` date default NULL, `ComplainTime` time default NULL, `ProblemDescription` blob, `Urgency` int(11) default NULL, `ProjectID` int(15) default NULL, `ProblemType` int(15) default NULL, `SubProblemType` int(15) default NULL, `DeadLine` date default NULL, `ComplainHandled` int(1) default '0', `User` int(1) default '0', `Type` int(1) default NULL, `ReportedDate` date default NULL, `ReportedTime` varchar(10) default NULL, `ResolvedDate` date default NULL, `ResolvedTime` varchar(10) default NULL, `UpdateRec` int(1) default '0', `DStatus` int(1) default '1', `I_SourceID` int(11) default NULL, `i_TimeSlot` int(4) default '0', PRIMARY KEY (`IID`) )"); mysql_query("CREATE TABLE `supporttask` ( `ID` int(15) NOT NULL auto_increment, `STeamID` int(10) default '0', `Work` int(1) default NULL, `ComplainID` int(15) default NULL, `ComplainHandled` int(1) default '0', PRIMARY KEY (`ID`));"); mysql_query("CREATE TABLE `supportteam` ( `SID` int(15) NOT NULL auto_increment, `STeamID` int(10) NOT NULL default '0', `SPriority` int(1) default NULL, `SActive` int(1) default NULL, `SMgrID` int(10) default NULL, `SType` int(10) default NULL, PRIMARY KEY (`SID`)); "); mysql_query("CREATE TABLE `complainthandled` ( `ComplaintID` int(10) NOT NULL default '0', `CSolution` blob, `CHandledDate` date default NULL, `CHandledTime` varchar(10) default NULL, PRIMARY KEY (`ComplaintID`));"); mysql_query("CREATE TABLE `prjmaster` ( `prjID` int(10) NOT NULL default '0', `clientID` int(10) default NULL, `prjName` varchar(80) default NULL, `prjType` varchar(20) default NULL, `prjStartDate` datetime default NULL, `prjEndDate` datetime default NULL, `prjActive` smallint(1) default NULL, `prjStatus` smallint(1) default NULL, `prjAccess` varchar(200) default NULL, `costHead` decimal(10,0) default NULL, `prjBudhrs` int(10) default NULL, `AMC_StartDate` date default NULL, `AMC_EndDate` date default NULL, `I_alertEmail` int(2) default '0', `v_type_cnc` varchar(100) default NULL, `v_remarks` blob, `V_pono` varchar(50) default NULL, `V_Budgetedhour` varchar(10) default NULL, `V_Budgetedvalue` varchar(10) default NULL, `v_createddate` date default NULL, `P_warranty_date` date default NULL, PRIMARY KEY (`prjID`) );"); mysql_query("CREATE TABLE `project_contact` ( `id` int(20) NOT NULL auto_increment, `projectid` int(20) default NULL, `contactid` int(20) default NULL, `type` varchar(50) default NULL, `datetime` datetime default NULL, `status` int(2) default '1', PRIMARY KEY (`id`) );"); #################### Create Table nature_problem and sub_nature_problem by deepak kumar 20-02-2009 #################################### mysql_query("CREATE TABLE `nature_problem` ( `ProblemID` int(10) NOT NULL auto_increment, `ProblemName` varchar(80) default NULL, `CreatedBY` varchar(100) default NULL, `I_Status` int(10) default '1', PRIMARY KEY (`ProblemID`));"); mysql_query("CREATE TABLE `sub_nature_problem` ( `ID` int(10) NOT NULL auto_increment, `ProblemType` int(10) default NULL, `SubID` int(10) default NULL, `SubProblemName` varchar(80) default NULL, `CreatedBY` varchar(100) default NULL, PRIMARY KEY (`ID`));"); ############################################################################################################################################## /* End Table Helpdesk */ /* Create Table Message */ mysql_query("CREATE TABLE `news` ( `NewsID` int(10) NOT NULL default '0', `NewsDate` datetime default '0000-00-00 00:00:00', `MsgFrom` varchar(10) default NULL, `Headline` text, `NewsDetail` blob, `MsgTo` varchar(100) default NULL, `BranchID` varchar(20) NOT NULL default '1459', PRIMARY KEY (`NewsID`,`BranchID`));"); /* End Table Message */ /* Create Table log ip */ mysql_query("CREATE TABLE `logip` ( `SNo` int(10) NOT NULL , `IP` varchar(250) default NULL, `AccessedAt` datetime default NULL, `UserName` varchar(255) default NULL, `TimePeriod` varchar(20) default NULL, `Reason` varchar(255) default NULL, PRIMARY KEY (`SNo`));"); mysql_query("CREATE TABLE `failed_login` ( `SNo` int(10) NOT NULL, `IP` varchar(250) default NULL, `AccessedAt` datetime default NULL, `UserName` varchar(255) default NULL, `TimePeriod` varchar(20) default NULL, `Reason` varchar(255) default NULL, PRIMARY KEY (`SNo`));"); mysql_query("CREATE TABLE `module` ( `Module_ID` int(10) NOT NULL default '0', `Module_Name` varchar(255) default NULL, PRIMARY KEY (`Module_ID`));"); mysql_query("insert into `module` values (1,'Account'),(2,'Contact') ,(3,'Marketing') ,(4,'Sales') ,(5,'Product') ,(6,'Activity') ,(7,'Journals') ,(8,'Admin') ,(9,'Document') ,(10,'HelpDesk') ,(11,'Report');"); /* End Table log ip */ /* Creating user management(encryp1) */ mysql_query("create table `encryp1`(`UserName` varchar (250),`Pwd` varchar (250),`BranchID` varchar (20),`SoftwareInstall` double,`IP_Address` varchar (30) ); "); $passwd = md5($V_FirstName); $sql_Password = "insert into encryp1(UserName,Pwd)values('$Username','$passwd')"; $result_Password = mysql_query($sql_Password); /* End : user management(encryp1) creation table */ /* creating user management(usersalary) */ mysql_query("create table `usersalary` (`UserID` varchar (10),`SNo` double ,`BasicSalary` float ,`LTA` float ,`TravelAllowance` float ,`ProjectIncentives` float ,`HRA` float ,`YearlyIncentives` float ); "); /* End : user management() creation table */ /* creating user management(userdetails) */ mysql_query("create table `userdetails` (`SNo` double , `UserID` varchar (10), `Company` varchar (255), `TimePeriod` double , `Reference` varchar (255)); "); /*End : user management(userdetails) creation table */ /* creating user management(usersecurity) */ mysql_query("create table `usersecurity` (`UserID` varchar (10),`LoginFromOne` int ,`ChangePwdNextLogin` int ,`NotChangePwd` int , `PwdExpired` int , `IPToLogIN` varchar (20)); "); /*End : user management(usersecurity) creation table */ /* creating other tables(unigroupid) */ mysql_query("create table `unigroupid` (`atxGid` varchar (40),`atxgroupPhID` varchar (20),`atxUserID` varchar (20), `DisplayName` varchar (60),`SamAccountName` varchar (60),`Description` varchar (255),`AtxgroupType` double); "); mysql_query("insert into `unigroupid`(`atxGid`,`atxgroupPhID`,`atxUserID`,`DisplayName`,`SamAccountName`,`Description`,`AtxgroupType`) values ('0000','','0000','Master Admin',NULL,NULL,2), ('010000','01','0000','Default Group','globalgroup@python.com','Default Group',0), ('0330000','033','0000','Marketing','Marketing@alliance-infotech.com','',2),('0450000','045','0000','Accounts','Accounts@alliance-infotech.com','',2), ('060000','06','0000','Support','Support@alliance-infotech.com','',2), ('070000','07','0000','Development','Development@alliance-infotech.com','',2),('080000','08','0000','Admin','Admin@alliance-infotech.com','',2);"); /* End : other tables (unigroupid) creation table */ /* Craete Table SMS Sender Name */ mysql_query("CREATE TABLE `tbl_smssendername` ( `id` int(20) NOT NULL auto_increment, `sender_name` varchar(50) default NULL, `Createby` varchar(50) default NULL, `Created_date` datetime default NULL, `status` int(2) default '1', PRIMARY KEY (`id`) );"); /* End Table leavetype */ mysql_query("CREATE TABLE `leavetype` ( `L_ID` int(2) default NULL, `L_Name` varchar(80) default NULL );"); mysql_query("insert into `leavetype`(`L_ID`,`L_Name`) values (1,'Annual Leave'),(2,'Casual Leave'),(3,'Medical Leave'),(4,'Maternity Leave'),(5,'Paternity Leave'),(6,'Special Leave'),(7,'Half Day'),(8,'LWOP');"); /* Craete Table journalcart */ mysql_query("CREATE TABLE `journalcart` ( `ID` int(11) NOT NULL auto_increment, `BranchID` int(10) default '1459', `JournalID` varchar(30) default NULL, `JournalName` varchar(255) default NULL, `JournalType` int(1) default '0', `ProjectName` varchar(255) default NULL, `TaskID` varchar(10) default NULL, `ProjectID` int(10) default NULL, `Description` blob, `CreatedBy` varchar(40) default NULL, `CreatedOn` date default NULL, `StartTime` time default NULL, `EndTime` time default NULL, `EntryType` int(5) default NULL, `flag` int(1) default '0', `Expense` int(1) NOT NULL default '0', `LinkID` int(10) default '0', `ContactNext` datetime default NULL, `ContactNextComment` blob, `Attachment` varchar(80) default NULL, `journalcontact` varchar(80) default NULL, `StartDate` date default NULL, `EndDate` date default NULL, `Voice_vicky` smallint(1) default '0', `I_StartTime` date default NULL,`I_Import` int(5) default NULL,PRIMARY KEY (`ID`));"); /* End Table journalcart */ /* Craete Table task */ /*mysql_query("CREATE TABLE `task` ( `TaskID` int(11) NOT NULL auto_increment, `TDay` date default NULL, `Enddate` date default NULL, `TaskTo` varchar(10) NOT NULL default '00:00:00', `TaskFrom` varchar(10) NOT NULL default '00:00:00', `UserName` text, `Contact` text, `Subject` varchar(255) default NULL, `Description` varchar(255) default NULL, `Done` int(1) default '0', `Priority` varchar(50) default 'normal', `Recurrence` varchar(5) default '0', PRIMARY KEY (`TaskID`));");*/ /* End Table task */ mysql_query("CREATE TABLE `task` ( `TaskID` int(11) NOT NULL auto_increment, `TDay` datetime default NULL, `Enddate` datetime default NULL, `TaskTo` varchar(10) NOT NULL default '00:00:00', `TaskFrom` varchar(10) NOT NULL default '00:00:00', `UserName` text, `Contact` text, `Subject` varchar(255) default NULL, `Description` varchar(255) default NULL, `Done` int(1) default '0', `Priority` varchar(50) default 'normal', `Recurrence` varchar(5) default '0', `Kind` int(11) default NULL, `Type` varchar(80) default NULL, `Category` varchar(80) default NULL, `ActivityResult` varchar(80) default NULL, `Status` int(11) default NULL, `Reminder` int(11) default NULL, `Complete_Percentage` int(11) default NULL, `AD_Timed_Activity` int(11) default NULL, `Location` varchar(80) default NULL, `DStatus` int(1) default '1', `CreatedOn` date default NULL, `Assigned_To` varchar(50) default NULL, `v_objectID` varchar(20) default NULL, `v_type` varchar(20) default NULL, `Lead_ID` varchar(50) default NULL, PRIMARY KEY (`TaskID`) );"); mysql_query("CREATE TABLE `tbl_mst_expense_type` ( `Expense_Type_ID` int(11) NOT NULL auto_increment, `Expense_Type_Name` varchar(90) default NULL, PRIMARY KEY (`Expense_Type_ID`) );"); /*Data for the table `tbl_mst_expense_type` */ mysql_query("insert into `tbl_mst_expense_type`(`Expense_Type_ID`,`Expense_Type_Name`) values (1,'Conveyance-Bike'),(2,'Conveyance-Car'),(3,'Food & Beverages'),(4,'Miscellaneous Expenses'),(5,'Train fare'),(6,NULL),(7,'Hotel Lodging Charges'),(8,'Auto/bus Fare'),(9,'Equipment Purchase'),(10,'Stationary Purchase'),(11,'Telephone/Fax');"); /* Craete Table userappraisals */ mysql_query("CREATE TABLE `userappraisals` ( `UserID` varchar(10) default NULL, `SNo` int(10) NOT NULL default '0', `Designation` varchar(50) default NULL, `DateOfJoining` date default NULL, `ConfirmationDate` date default NULL, `Salary` float default NULL, `RevisionDate` date default NULL, `Resignation` date default NULL, PRIMARY KEY (`SNo`) )"); /* End Table userappraisals */ /* Craete Table userhead */ mysql_query("CREATE TABLE `userhead` ( `UserID` varchar(250) NOT NULL default '', `HeadID` varchar(250) NOT NULL default '' );"); /* End Table userhead */ /* Craete Table custmaster */ mysql_query("CREATE TABLE `custmaster` ( `CustCode` int(10) NOT NULL default '0', `AccountCode` int(10) default NULL, `CustomerType` varchar(40) default NULL, `BusinessType` varchar(40) default NULL, `VATRegNo` varchar(40) default NULL, `Website` varchar(40) default NULL, `CompPanNo` varchar(40) default NULL, `BillingStreet` varchar(40) default NULL, `BillingCity` varchar(40) default NULL, `BillingState` varchar(20) default NULL, `BillingZip` varchar(10) default NULL, `BillingCountry` varchar(20) default NULL, `ShippingStreet` varchar(40) default NULL, `ShippingCity` varchar(20) default NULL, `ShippingState` varchar(40) default NULL, `ShippingZip` varchar(10) default NULL, `ShippingCountry` varchar(20) default NULL, `Rating` char(1) default NULL, `Fax` varchar(20) default NULL, `Phone` varchar(20) default NULL, `ServiceTaxNo` varchar(20) default NULL, `CreatedOn` date default NULL, `CreatedBy` int(10) default NULL, `ApprovedStatus` int(1) default '0', `ApprovedBy` int(10) default NULL, `CreditDuration` int(10) default NULL, `CreditPeriod` int(10) default NULL, `CreditLimit` int(10) default NULL, `CreditLimitX` int(10) default NULL, `Segment` int(5) default '0', `PaymentContact` varchar(30) default NULL, `PaymentEmail` varchar(20) default NULL, `PaymentPhone` varchar(15) default NULL, `ModifiedOn` date default NULL, `ModifiedBy` int(10) default NULL, `BranchID` int(10) NOT NULL default '1459', `Bank` varchar(80) default NULL, `BankAccount` varchar(40) default NULL, `MICRCode` varchar(40) default NULL, `BankAccountCode` varchar(40) default NULL, `Payment` varchar(40) default NULL, `CST` varchar(20) default NULL, `ApprovedOn` date default NULL, `DisapprovedOn` date default NULL, `DisapprovedBy` int(10) default NULL, `DeletedOn` date default NULL, `DeletedBy` int(11) default NULL, `ProductList` varchar(10) default NULL, PRIMARY KEY (`CustCode`,`BranchID`) );"); /* End Table custmaster */ /* Craete Table product_details */ mysql_query("CREATE TABLE `product_details` ( `ID` int(10) NOT NULL auto_increment, `ProdID` varchar(80) NOT NULL default '0', `CategoryID` varchar(255) NOT NULL default '', `ProdName` blob NOT NULL, `ProdDesc` blob NOT NULL, `CreatedOn` varchar(40) NOT NULL default '', `ModifiedOn` varchar(40) NOT NULL default '', `CreatedBy` varchar(80) NOT NULL default '', `ModifiedBy` varchar(80) NOT NULL default '', `CatID` varchar(15) default NULL, `ProductID` varchar(15) default NULL, `DStatus` int(1) NOT NULL default '0', PRIMARY KEY (`ID`,`ProdID`));"); /* End Table product_details */ /* Create Table tbl_quot_bterms :: Deepak Kumar::17-02-2009 */ mysql_query("CREATE TABLE `tbl_quot_bterms` ( `I_BT_ID` int(10) NOT NULL, `V_BT_Name` varchar(80) default NULL, `V_BT_FieldName` varchar(80) default NULL, `I_Order` int(2) default NULL, `I_Status` int(1) default '1', `Createdby` varchar(60) default NULL, `createdon` date default NULL, `LastModify` varchar(100) default NULL, PRIMARY KEY (`I_BT_ID`));"); /* End Table */ /* Create Table tbl_quot_bterms_answers :: Deepak Kumar::17-02-2009 */ mysql_query("CREATE TABLE `tbl_quot_bterms_answers` ( `I_BT_ID` int(10) NOT NULL, `I_BT_AnswerID` int(10) NOT NULL, `V_BT_Answer` blob, `I_Status` int(1) default '1', `Createdby` varchar(60) default NULL, `createdon` date default NULL, `LastModify` varchar(100) default NULL, PRIMARY KEY (`I_BT_ID`,`I_BT_AnswerID`));"); /* End Table */ /* Create Table tbl_quot_bterms_termsconditions :: Deepak Kumar::17-02-2009 */ /*mysql_query("CREATE TABLE `tbl_quot_bterms_termsconditions` ( `I_QuotationNo` varchar(20) NOT NULL, `I_BTermID` int(10) NOT NULL, `V_BTermAnswerID` blob, `V_BTermActualAnswer` blob, `I_Status` int(1) default '1', PRIMARY KEY (`I_QuotationNo`,`I_BTermID`));");*/ /* Create Table tbl_quot_bterms_termsconditions :: Update By Abhishek Baranwal::17-02-2010 */ mysql_query(" CREATE TABLE `tbl_quot_bterms_termsconditions` ( `I_QuotationNo` varchar(20) NOT NULL, `I_BTermID` int(10) NOT NULL, `V_BTermAnswerID` int(10) default NULL, `V_BTermActualAnswer` blob, `I_Status` int(1) default '1', `D_ModificationDate` datetime default NULL, `V_ModificationBy` varchar(100) default NULL, `I_BranchID` int(10) default NULL, PRIMARY KEY (`I_QuotationNo`,`I_BTermID`) );"); /* End Table */ /* Create Table tbl_sales_bterms :: Deepak Kumar::17-02-2009 */ mysql_query("CREATE TABLE `tbl_sales_bterms` ( `I_BT_ID` int(10) NOT NULL, `V_BT_Name` varchar(80) default NULL, `V_BT_FieldName` varchar(80) default NULL, `I_Order` int(2) default NULL, `I_Status` int(1) default '1', `Createdby` varchar(60) default NULL, `createdon` date default NULL, `LastModify` varchar(100) default NULL, PRIMARY KEY (`I_BT_ID`));"); /* End Table */ /* Create Table tbl_sales_bterms_answers :: Deepak Kumar::17-02-2009 */ mysql_query("CREATE TABLE `tbl_sales_bterms_answers` ( `I_BT_ID` int(10) default NULL, `I_BT_AnswerID` int(10) default NULL, `V_BT_Answer` blob, `I_Status` int(1) default '1', `Createdby` varchar(60) default NULL, `createdon` date default NULL, `LastModify` varchar(100) default NULL);"); /* End Table */ /* Create Table tbl_voice_vicky :: Deepak Kumar::17-02-2009 */ mysql_query("CREATE TABLE `tbl_voice_vicky` ( `JournalID` varchar(60) default NULL, `V_FileName` varchar(100) default NULL, `I_StartTime` date default NULL, `V_CallerId` varchar(50) default NULL);"); /* End Table */ /* Craete Table journalmaster */ mysql_query("CREATE TABLE `journalmaster` ( `ID` int(10) NOT NULL auto_increment, `BranchID` int(10) NOT NULL default '1459', `JournalID` varchar(30) default NULL, `CreatedBy` varchar(40) default NULL, `CreatedOn` date default NULL, `flag` int(1) default '0', PRIMARY KEY (`ID`,`BranchID`));"); /* End Table journalmaster */ /* Craete Table userrights */ mysql_query("CREATE TABLE `userrights` ( `UserID` varchar(20) NOT NULL default '', `atxGid` varchar(20) NOT NULL default '', `cInvoice` char(1) NOT NULL default '0', `dInvoice` char(1) NOT NULL default '0', `vInvoice` char(1) NOT NULL default '0', `aInvoice` char(1) NOT NULL default '0', `cQuotation` char(1) NOT NULL default '0', `dQuotation` char(1) NOT NULL default '0', `vQuotation` char(1) NOT NULL default '0', `cPurchaseOrders` char(1) NOT NULL default '0', `dPurchaseOrders` char(1) NOT NULL default '0', `vPurchaseOrders` char(1) NOT NULL default '0', `cMR` char(1) NOT NULL default '0', `dMR` char(1) NOT NULL default '0', `vMR` char(1) NOT NULL default '0', `cDR` char(1) NOT NULL default '0', `dDR` char(1) NOT NULL default '0', `vDR` char(1) NOT NULL default '0', `cProdGroup` char(1) NOT NULL default '0', `cProduct` char(1) NOT NULL default '0', `dProduct` char(1) NOT NULL default '0', `vProduct` char(1) NOT NULL default '0', `uploadproductdocument` char(1) NOT NULL default '0', `downloadproductdocument` char(1) NOT NULL default '0', `cOpportunities` char(1) NOT NULL default '0', `aOpportunities` char(1) NOT NULL default '0', `cProdCategory` char(1) NOT NULL default '0', `cSalesOrder` char(1) NOT NULL default '0', `vSalesOrder` char(1) NOT NULL default '0', `dSalesOrder` char(1) NOT NULL default '0', `cUGroup` char(1) NOT NULL default '0', `cMemberGroups` char(1) NOT NULL default '0', `AssignRights` char(1) NOT NULL default '0', `cAccount` char(1) NOT NULL default '0', `dAccount` char(1) NOT NULL default '0', `vAccount` char(1) NOT NULL default '0', `aAccount` char(1) NOT NULL default '0', `cContact` char(1) NOT NULL default '0', `dContact` char(1) NOT NULL default '0', `vContact` char(1) NOT NULL default '0', `aContact` char(1) NOT NULL default '0', `vReports` char(1) NOT NULL default '0', `cVendorProduct` char(1) NOT NULL default '0', `uPurchaseOrder` char(1) NOT NULL default '0', `uQuotation` char(1) NOT NULL default '0', `cPerforma` char(1) NOT NULL default '0', `cLead` char(1) NOT NULL default '0', `dLead` char(1) NOT NULL default '0', `ConvertLead` char(1) NOT NULL default '0', `Fax` char(1) NOT NULL default '0', `Email` char(1) NOT NULL default '0', `cJournal` char(1) NOT NULL default '1', `cRequisition` char(1) NOT NULL default '0', `dRequisition` char(1) NOT NULL default '0', `uRequisition` char(1) NOT NULL default '0', `uDR` char(1) NOT NULL default '0', `uMR` char(1) NOT NULL default '0', `uInvoice` char(1) NOT NULL default '0', `uPerforma` char(1) NOT NULL default '0', `sms` char(1) NOT NULL default '0', `HR` char(1) NOT NULL default '0', `Stock` char(1) NOT NULL default '0', `VTender` char(1) NOT NULL default '0', `UpdateTender` char(1) NOT NULL default '0', `CreateTender` char(1) NOT NULL default '0', `CreateBOM` char(1) NOT NULL default '0', `ViewBOM` char(1) NOT NULL default '0', `UpdateBOM` char(1) NOT NULL default '0', `DeleteBOM` char(1) NOT NULL default '0', `ApplyEMD` char(1) NOT NULL default '0', `UpdateAccount` char(1) NOT NULL default '0', `UpdateContact` char(1) NOT NULL default '0', `SignDR` char(1) NOT NULL default '0', `SignMR` char(1) NOT NULL default '0', `SignInvoice` char(1) NOT NULL default '0', `cBranch` char(1) NOT NULL default '0', `cCompany` char(1) NOT NULL default '0', `vBranch` char(1) NOT NULL default '0', `vCompany` char(1) NOT NULL default '0', `cWH` char(1) NOT NULL default '0', `vWH` char(1) NOT NULL default '0', `cCustomer` char(1) NOT NULL default '0', `ApproveCustomer` char(1) NOT NULL default '0', `Opportunity` char(1) NOT NULL default '0', `uCust` char(1) NOT NULL default '0', `dCust` char(1) NOT NULL default '0', `ViewProductPriceList` char(1) NOT NULL default '0', `EditProductPricelist` char(1) NOT NULL default '0', `DeleteProductPriceList` char(1) NOT NULL default '0', `EditQuotationPrice` char(1) NOT NULL default '0', `QuotationDiscount` char(1) NOT NULL default '0', `ApproveSO` char(1) NOT NULL default '0', `WorkOrder` char(1) NOT NULL default '0', `WorkOrderApproval` char(1) NOT NULL default '0', `DeleteSW` char(1) NOT NULL default '0', `UpdateSW` char(1) NOT NULL default '0', `CSW` char(1) NOT NULL default '0', `DeleteMachine` char(1) NOT NULL default '0', `UpdateWO` char(1) NOT NULL default '0', `QuotationApproval` char(1) NOT NULL default '0', `QuoteApprovalRight` char(1) NOT NULL default '0', `ViewAllContacts` char(1) NOT NULL default '0', `UpdateAllContacts` char(1) NOT NULL default '0', `vProject` char(1) NOT NULL default '0', `eProject` char(1) NOT NULL default '0', `cProject` char(1) NOT NULL default '0', `cActivity` char(1) NOT NULL default '0', `vActivity` char(1) NOT NULL default '0', `uActivity` char(1) NOT NULL default '0', `dActivity` char(1) NOT NULL default '0', `cCampaign` char(1) NOT NULL default '0', `vCampaign` char(1) NOT NULL default '0', `uCampaign` char(1) NOT NULL default '0', `dCampaign` char(1) NOT NULL default '0', `dProject` char(1) NOT NULL default '0', `CreateProductPricelist` char(1) NOT NULL default '0', `uUser` char(1) NOT NULL default '0', `attendance` char(1) NOT NULL default '0',`AssignLead` char(1) NOT NULL default '0', `vOpportunity` char(1) NOT NULL default '0',`Voicewiki` char(1) NOT NULL default '0',`problem` char(1) NOT NULL default '0', PRIMARY KEY (`UserID`) );"); /* End table */ /* Craete Table grouprights */ mysql_query("CREATE TABLE `grouprights` ( `atxGid` varchar(20) NOT NULL default '', `cInvoice` char(1) NOT NULL default '0', `dInvoice` char(1) NOT NULL default '0', `vInvoice` char(1) NOT NULL default '0', `aInvoice` char(1) NOT NULL default '0', `cQuotation` char(1) NOT NULL default '1', `dQuotation` char(1) NOT NULL default '0', `vQuotation` char(1) NOT NULL default '1', `cPurchaseOrders` char(1) NOT NULL default '1', `dPurchaseOrders` char(1) NOT NULL default '0', `vPurchaseOrders` char(1) NOT NULL default '1', `cMR` char(1) NOT NULL default '0', `dMR` char(1) NOT NULL default '0', `vMR` char(1) NOT NULL default '0', `cDR` char(1) NOT NULL default '0', `dDR` char(1) NOT NULL default '0', `vDR` char(1) NOT NULL default '0', `cProdGroup` char(1) NOT NULL default '0', `cProduct` char(1) NOT NULL default '0', `dProduct` char(1) NOT NULL default '0', `vProduct` char(1) NOT NULL default '1', `uploadproductdocument` char(1) NOT NULL default '0', `downloadproductdocument` char(1) NOT NULL default '0', `cOpportunities` char(1) NOT NULL default '1', `aOpportunities` char(1) NOT NULL default '1', `cProdCategory` char(1) NOT NULL default '0', `cSalesOrder` char(1) NOT NULL default '1', `vSalesOrder` char(1) NOT NULL default '0', `dSalesOrder` char(1) NOT NULL default '0', `cUGroup` char(1) NOT NULL default '0', `cMemberGroups` char(1) NOT NULL default '0', `AssignRights` char(1) NOT NULL default '0', `cAccount` char(1) NOT NULL default '1', `dAccount` char(1) NOT NULL default '0', `vAccount` char(1) NOT NULL default '1', `aAccount` char(1) NOT NULL default '1', `cContact` char(1) NOT NULL default '1', `dContact` char(1) NOT NULL default '1', `vContact` char(1) NOT NULL default '1', `aContact` char(1) NOT NULL default '1', `vReports` char(1) NOT NULL default '0', `cVendorProduct` char(1) NOT NULL default '0', `uPurchaseOrder` char(1) NOT NULL default '0', `uQuotation` char(1) NOT NULL default '0', `cPerforma` char(1) NOT NULL default '1', `cLead` char(1) NOT NULL default '0', `dLead` char(1) NOT NULL default '0', `ConvertLead` char(1) NOT NULL default '0', `Fax` char(1) NOT NULL default '1', `Email` char(1) NOT NULL default '1', `cJournal` char(1) NOT NULL default '0', `cRequisition` char(1) NOT NULL default '0', `dRequisition` char(1) NOT NULL default '0', `uRequisition` char(1) NOT NULL default '0', `uDR` char(1) NOT NULL default '0', `uMR` char(1) NOT NULL default '0', `uInvoice` char(1) NOT NULL default '0', `uPerforma` char(1) NOT NULL default '0', `sms` char(1) NOT NULL default '0', `HR` char(1) NOT NULL default '0', `Stock` char(1) NOT NULL default '0', `VTender` char(1) NOT NULL default '0', `UpdateTender` char(1) NOT NULL default '0', `CreateTender` char(1) NOT NULL default '0', `CreateBOM` char(1) NOT NULL default '0', `ViewBOM` char(1) NOT NULL default '0', `UpdateBOM` char(1) NOT NULL default '0', `DeleteBOM` char(1) NOT NULL default '0', `ApplyEMD` char(1) NOT NULL default '0', `UpdateAccount` char(1) NOT NULL default '0', `UpdateContact` char(1) NOT NULL default '0', `SignDR` char(1) NOT NULL default '0', `SignMR` char(1) NOT NULL default '0', `SignInvoice` char(1) NOT NULL default '0', `cBranch` char(1) NOT NULL default '0', `cCompany` char(1) NOT NULL default '0', `vBranch` char(1) NOT NULL default '0', `vCompany` char(1) NOT NULL default '0', `cWH` char(1) NOT NULL default '0', `vWH` char(1) NOT NULL default '0', `cCustomer` char(1) NOT NULL default '0', `ApproveCustomer` char(1) NOT NULL default '0', `DeleteProductPriceList` char(1) NOT NULL default '0', `EditProductPriceList` char(1) NOT NULL default '0', `uCust` char(1) NOT NULL default '0', `dCust` char(1) NOT NULL default '0', `cProject` char(1) NOT NULL default '0', `vProject` char(1) NOT NULL default '0', `eProject` char(1) NOT NULL default '0', `cActivity` char(1) NOT NULL default '0', `vActivity` char(1) NOT NULL default '0', `uActivity` char(1) NOT NULL default '0', `dActivity` char(1) NOT NULL default '0', `cCampaign` char(1) NOT NULL default '0', `vCampaign` char(1) NOT NULL default '0', `uCampaign` char(1) NOT NULL default '0', `dCampaign` char(1) NOT NULL default '0', `dProject` char(1) NOT NULL default '0', `CreateProductPricelist` char(1) NOT NULL default '0', `uUser` char(1) NOT NULL default '0',`attendance` char(1) NOT NULL default '0',`AssignLead` char(1) NOT NULL default '0', `vOpportunity` char(1) NOT NULL default '0',`Voicewiki` char(1) NOT NULL default '0',`problem` char(1) NOT NULL default '0', PRIMARY KEY (`atxGid`) );"); mysql_query("insert into `grouprights`(`atxGid`,`cInvoice`,`dInvoice`,`vInvoice`,`aInvoice`,`cQuotation`,`dQuotation`,`vQuotation`,`cPurchaseOrders`,`dPurchaseOrders`,`vPurchaseOrders`,`cMR`,`dMR`,`vMR`,`cDR`,`dDR`,`vDR`,`cProdGroup`,`cProduct`,`dProduct`,`vProduct`,`uploadproductdocument`,`downloadproductdocument`,`cOpportunities`,`aOpportunities`,`cProdCategory`,`cSalesOrder`,`vSalesOrder`,`dSalesOrder`,`cUGroup`,`cMemberGroups`,`AssignRights`,`cAccount`,`dAccount`,`vAccount`,`aAccount`,`cContact`,`dContact`,`vContact`,`aContact`,`vReports`,`cVendorProduct`,`uPurchaseOrder`,`uQuotation`,`cPerforma`,`cLead`,`dLead`,`ConvertLead`,`Fax`,`Email`,`cJournal`,`cRequisition`,`dRequisition`,`uRequisition`,`uDR`,`uMR`,`uInvoice`,`uPerforma`,`sms`,`HR`,`Stock`,`VTender`,`UpdateTender`,`CreateTender`,`CreateBOM`,`ViewBOM`,`UpdateBOM`,`DeleteBOM`,`ApplyEMD`,`UpdateAccount`,`UpdateContact`,`SignDR`,`SignMR`,`SignInvoice`,`cBranch`,`cCompany`,`vBranch`,`vCompany`,`cWH`,`vWH`,`cCustomer`,`ApproveCustomer`,`DeleteProductPriceList`,`EditProductPriceList`,`uCust`,`dCust`,`cProject`,`vProject`,`eProject`,`uUser`,`attendance`,`dProject`,`cActivity`,`vActivity`,`uActivity`,`dActivity`,`cCampaign`,`vCampaign`,`uCampaign`,`dCampaign`,`CreateProductPricelist`,`vOpportunity`,`Voicewiki`,`problem`) values ('0330000','0','0','0','0','1','0','1','0','0','0','0','0','0','0','0','0','1','1','0','1','0','0','1','1','1','1','0','0','1','0','0','1','0','1','1','1','1','1','1','0','0','0','0','1','0','0','0','1','1','1','0','0','0','0','0','0','0','0','0','0','1','1','0','1','1','1','0','1','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','1','1','1','1','1','1','1','1','0','0','0','0'),('070000','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','1','0','1','1','1','0','0','0','0','0','0','0','0','0','1','1','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','1','1','1','1','0','0','0','0','0','0','0','0'),('03330000','0','0','0','0','1','0','1','1','0','0','0','0','0','0','0','0','1','1','1','1','0','0','1','1','1','1','0','0','1','0','0','1','0','1','1','1','1','1','1','1','0','0','0','1','0','0','0','1','1','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','1','1','1','1','0','0','0','0','0','0','0','0'),('060000','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','1','0','1','0','1','1','1','0','0','0','0','0','0','0','0','0','1','1','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','1','1','1','1','0','0','0','0','0','0','0','0'),('080000','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1'),('0450000','0','0','0','0','1','0','1','1','0','0','0','0','0','0','0','0','1','1','1','1','0','0','1','1','1','1','0','0','1','0','0','1','0','1','1','1','1','1','1','1','0','0','0','1','0','0','0','1','1','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','1','1','1','1','0','0','0','0','0','0','0','0'),('0000','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','0','0','0','0','0','0','0','0','0','1','0','0','1','1','1','1','0','0','0','0','0','0','0','0'),('010000','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','1','0','0','0','0','0','0','0','0','0','1','1','1','1','1','1','0','0','0','0','0','0','0','0','1','1','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','1','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','1','1','1','1','0','0','0','0','0','1','1','0')"); //mysql_query($sql_right) or die(mysql_error()); /* End Table */ /* Create Table tbl_smsmessagesin */ mysql_query("CREATE TABLE `tbl_smsmessagesin` ( `v_mobileNo` varchar(32) default NULL, `v_smsString` varchar(255) default NULL, `d_timeStamp` datetime default '0000-00-00 00:00:00', `i_status` int(4) default NULL, `i_id` int(4) NOT NULL default '0', `v_FromSIM` varchar(50) default NULL, `v_msgkey` varchar(64) default NULL, PRIMARY KEY (`i_id`) );"); /* End Table */ /* Create Table `tbl_mst_fiscalyear` Deepak Kumar 06-02-2009*/ mysql_query("CREATE TABLE `tbl_mst_fiscalyear` ( `FISCAL_YEAR_ID` int(10) unsigned NOT NULL auto_increment, `FISCAL_YEAR_STARTMONTH` varchar(100) default NULL, `FISCAL_YEAR_ENDMONTH` varchar(100) default NULL, `FISCAL_YEAR_STARTDATE` varchar(100) default NULL, `FISCAL_YEAR_ENDDATE` varchar(100) default NULL, `I_STATUS` int(10) default '1', PRIMARY KEY (`FISCAL_YEAR_ID`) );"); mysql_query("insert into `tbl_mst_fiscalyear` (FISCAL_YEAR_STARTMONTH,FISCAL_YEAR_ENDMONTH,FISCAL_YEAR_STARTDATE,FISCAL_YEAR_ENDDATE) values ('04','03','01','31');"); /* End Table */ /* Create Table supervisor */ mysql_query("CREATE TABLE `supervisor` ( `SNo` int(5) NOT NULL auto_increment, `UserID` varchar(15) NOT NULL default '', `Supervises` varchar(250) default NULL, PRIMARY KEY (`SNo`) );"); /* End Table */ /* Create Table account_industry 13-11-2008*/ mysql_query("CREATE TABLE `account_industry` ( `IndustryID` int(10) NOT NULL auto_increment, `IndustryName` varchar(80) default NULL, PRIMARY KEY (`IndustryID`));"); /* End Table */ /* Create Table account_type 13-11-2008*/ mysql_query("CREATE TABLE `account_type` ( `account_type` int(5) NOT NULL default '0', `account_typename` varchar(40) default NULL, PRIMARY KEY (`account_type`));"); /* End Table */ /* Create Table accountcallcenter 13-11-2008*/ mysql_query("CREATE TABLE `accountcallcenter` ( `AccountID` int(10) NOT NULL default '0', `BranchID` int(10) NOT NULL default '0', `TCall` varchar(40) default NULL, `Seats` int(10) default NULL, `Switch` varchar(40) default NULL, `Phones` varchar(80) default NULL, `Headsets` varchar(120) default NULL, `ProdShown` varchar(120) default NULL, `Evaluation` int(1) default NULL, `Info1` varchar(255) default NULL, `Info2` varchar(255) default NULL, `Followup` varchar(255) default NULL, PRIMARY KEY (`AccountID`,`BranchID`));"); /* End Table */ /* Create Table approved 13-11-2008*/ mysql_query("CREATE TABLE `approved` ( `UserID` varchar(50) NOT NULL default '', `Designation` varchar(250) default NULL, `I_Status` int(10) default '1', PRIMARY KEY (`UserID`) );"); /* End Table */ //* Create Table audit_viewaccount 3-01-2009*/ mysql_query("CREATE TABLE `audit_viewaccount` ( `Account_ID` int(10) default NULL, `ModifiedOn` datetime default NULL, `ModifiedBy` varchar(30) default NULL, `FieldName` varchar(255) default NULL, `IPAddress` varchar(20) default NULL );"); /* End Table */ /* Create Table billofmaterial 13-11-2008*/ mysql_query("CREATE TABLE `billofmaterial` ( `ID` int(10) NOT NULL auto_increment, `TenderNo` varchar(80) default NULL, `BranchID` int(10) default NULL, `ProductCategory` varchar(80) default NULL, `Product` varchar(80) default NULL, `Description` blob, `Qty` int(5) default NULL, `BudgetedPrice` double default NULL, `OurCost` int(10) default NULL, `OurBid` double default NULL, `PriceBid` double default NULL, `Tax` float default NULL, `MarkUp` float default NULL, `Octroi` double default NULL, `CreatedBy` int(5) default NULL, PRIMARY KEY (`ID`));"); /* End Table */ /* Create Table bommaster 13-11-2008*/ mysql_query("CREATE TABLE `bommaster` ( `TenderNo` varchar(80) NOT NULL default '', `BranchID` int(10) default NULL, `Bommade` int(1) default NULL, `PreparedBy` int(10) default NULL, `PreparedOn` date default NULL, `AmcType` int(1) default NULL, `AmcFigure` double default NULL, `AmcYear` int(1) default NULL, PRIMARY KEY (`TenderNo`));"); /* End Table */ /* Create Table categorytarget 13-11-2008*/ mysql_query("CREATE TABLE `categorytarget` ( `SNo` int(20) NOT NULL default '0', `TID` int(20) default NULL, `UserID` char(20) NOT NULL default '', `TFrom` date NOT NULL default '0000-00-00', `TTo` date NOT NULL default '0000-00-00', `Target` float(20,2) NOT NULL default '0.00', `CategoryID` char(50) NOT NULL default '', `TDate` date default NULL, `TBy` char(100) default NULL, PRIMARY KEY (`UserID`,`TFrom`,`TTo`,`CategoryID`));"); /* End Table */ /* Create Table complainthandled 13-11-2008*/ mysql_query("CREATE TABLE `complainthandled` ( `ComplaintID` int(10) NOT NULL default '0', `CSolution` blob, `CHandledDate` date default NULL, `CHandledTime` varchar(10) default NULL, PRIMARY KEY (`ComplaintID`));"); /* End Table */ /* Create Table contacttype 13-11-2008*/ mysql_query("CREATE TABLE `complainthandled` ( `ComplaintID` int(10) NOT NULL default '0', `CSolution` blob, `CHandledDate` date default NULL, `CHandledTime` varchar(10) default NULL, PRIMARY KEY (`ComplaintID`));"); /* End Table */ /* Create Table costhours 13-11-2008*/ mysql_query("CREATE TABLE `costhours` ( `SNo` int(15) NOT NULL default '0', `ID` varchar(20) NOT NULL default '', `HoursPerDay` double default NULL, `CostPerHour` double default NULL, `CreatedOn` date default NULL, PRIMARY KEY (`SNo`,`ID`));"); /* End Table */ /* Create Table crm_smsmessagesin 13-11-2008*/ mysql_query("CREATE TABLE `crm_smsmessagesin` ( `v_mobileNo` char(32) default NULL, `v_smsString` char(255) default NULL, `d_timeStamp` datetime default '0000-00-00 00:00:00', `i_status` int(4) default NULL, `i_id` int(4) NOT NULL default '0', `v_FromSIM` char(50) default NULL, `v_msgkey` char(64) default NULL, PRIMARY KEY (`i_id`));"); /* End Table */ /* Create Table dailyexpensecart 13-11-2008*/ mysql_query("CREATE TABLE `dailyexpensecart` ( `serial` int(20) NOT NULL auto_increment, `ID` int(11) default NULL, `BranchID` int(10) default '1459', `JournalNo` varchar(30) default NULL, `JournalName` varchar(255) default NULL, `ExpenseType` int(2) default NULL, `Amount` float default NULL, `Currency` int(1) default NULL, `ExpenseDescription` blob, `CreatedOn` date default NULL, `CreatedBy` varchar(40) default NULL, `Km` float default NULL, PRIMARY KEY (`serial`) );"); /* End Table */ /* Create Table deleteditems 13-11-2008*/ mysql_query("CREATE TABLE `deleteditems` ( `ID` int(10) NOT NULL auto_increment, `ItemNo` varchar(30) default NULL, `DeletedItem` varchar(30) default NULL, `DeletedBy` varchar(40) default NULL, `DeletedOn` date default NULL, `BranchID` int(10) default '1459', PRIMARY KEY (`ID`));"); /* End Table */ /* Create Table deletedsales 13-11-2008*/ mysql_query("CREATE TABLE `deletedsales` ( `ID` int(10) NOT NULL auto_increment, `ItemNo` char(30) default NULL, `BranchID` int(10) NOT NULL default '0', `DeletedItemName` char(30) default NULL, `DeletedBy` char(40) default NULL, `DeletedOn` date default NULL, PRIMARY KEY (`ID`,`BranchID`));"); /* End Table */ /* Create Table department 13-11-2008*/ mysql_query("CREATE TABLE `department` ( `Dept_ID` int(10) NOT NULL auto_increment, `Dept_Name` varchar(80) default NULL, `CreatedBy` varchar(20) default NULL, `CreatedOn` date default NULL, `ModifiedBy` varchar(20) default NULL, `ModifiedOn` date default NULL, PRIMARY KEY (`Dept_ID`));"); /* End Table */ /* Create Table dproductlist 13-11-2008*/ mysql_query("CREATE TABLE `dproductlist` ( `ID` int(10) NOT NULL auto_increment, `PLCode` varchar(80) default NULL, `ProductCode` varchar(150) default NULL, `ProductPrice` float default NULL, PRIMARY KEY (`ID`));"); /* End Table */ /* Create Table faxsummaryrpt 13-11-2008*/ mysql_query("CREATE TABLE `faxsummaryrpt` ( `v_FaxStatus` varchar(16) NOT NULL default '', `i_NumFax` int(16) default NULL, PRIMARY KEY (`v_FaxStatus`));"); /* End Table */ /* Create Table formreminder 13-11-2008*/ mysql_query("CREATE TABLE `formreminder` ( `REMID` int(10) NOT NULL auto_increment, `InvoiceNo` varchar(30) default NULL, `FRDate` date default NULL, `FRMode` int(1) default NULL, `FReferenceNo` varchar(30) default NULL, PRIMARY KEY (`REMID`) );"); /* End Table 13-11-2008*/ /* Create Table formremindermaster 13-11-2008*/ mysql_query("CREATE TABLE `formremindermaster` ( `ReferenceNo` varchar(30) NOT NULL default '', `RefID` int(10) NOT NULL default '0', `RefDate` date default NULL, `RefMode` int(1) default NULL, `AccountID` int(10) default NULL, `AccountName` varchar(80) default NULL, `BranchID` int(10) default NULL, PRIMARY KEY (`ReferenceNo`,`RefID`));"); /* End Table 13-11-2008*/ /* Create Table holiday 13-11-2008*/ mysql_query("CREATE TABLE `holiday` ( `hdate` date NOT NULL default '0000-00-00', `description` varchar(40) NOT NULL default '', `I_status` int(5) default '1' );"); /* End Table 13-11-2008*/ /* Create Table image 13-11-2008*/ mysql_query("CREATE TABLE `image` ( `image_id` int(10) unsigned NOT NULL auto_increment, `image_type` varchar(50) NOT NULL default '', `image` longblob NOT NULL, `image_size` bigint(20) NOT NULL default '0', `image_name` varchar(255) NOT NULL default '', `image_date` datetime NOT NULL default '0000-00-00 00:00:00', PRIMARY KEY (`image_id`))"); /* End Table 13-11-2008*/ /* Create Table interaction_lead 13-11-2008*/ mysql_query("CREATE TABLE `interaction_lead` ( `SNo` int(10) NOT NULL auto_increment, `LeadID` int(10) default NULL, `BranchID` int(10) default '1459', `SalesPerson` varchar(50) default NULL, `Contact` varchar(50) default NULL, `IDate` datetime default NULL, `Stage` varchar(250) default NULL, `Subject` varchar(255) default NULL, `Type` varchar(150) default NULL, `Description` blob, `Followup_date` datetime default NULL,`Lead_ID` varchar(50) default NULL , `sms_flag` int(5) default 0 , PRIMARY KEY (`SNo`) ) ;"); /* End Table 13-11-2008*/ /* Create Table interaction_opportunity 13-11-2008*/ mysql_query("CREATE TABLE `interaction_opportunity` ( `SNo` int(10) NOT NULL default '0', `OpportunityID` int(10) default NULL, `BranchID` int(10) NOT NULL default '1459', `SalesPerson` varchar(50) default NULL, `Contact` varchar(50) default NULL, `IDate` datetime default NULL, `Stage` varchar(250) default NULL, `Subject` varchar(255) default NULL, `Type` varchar(150) default NULL, `Description` blob,`Followup_date` datetime default NULL, PRIMARY KEY (`SNo`,`BranchID`));"); /* End Table 13-11-2008*/ mysql_query("CREATE TABLE IF NOT EXISTS `interaction_account` ( `SNo` int(10) NOT NULL AUTO_INCREMENT, `AccountID` int(10) DEFAULT NULL, `BranchID` int(10) DEFAULT '1459', `SalesPerson` varchar(50) DEFAULT NULL, `Contact` varchar(50) DEFAULT NULL, `IDate` datetime DEFAULT NULL, `Stage` varchar(250) DEFAULT NULL, `Subject` varchar(255) DEFAULT NULL, `Type` varchar(150) DEFAULT NULL, `Description` blob, `Followup_date` datetime DEFAULT NULL, `sms_flag` int(5) DEFAULT '0', PRIMARY KEY (`SNo`) );"); /* Create Table ivrslogrpt 13-11-2008*/ mysql_query("CREATE TABLE `ivrslogrpt` ( `sessionid` varchar(24) default NULL, `Date1` varchar(20) default NULL, `Time1` varchar(20) default NULL, `userid` varchar(24) default NULL, `description` varchar(128) default NULL, `value` varchar(128) default NULL, `TimeSt` datetime default NULL);"); /* End Table 13-11-2008*/ /* Create Table jobposition 13-11-2008*/ mysql_query("CREATE TABLE `jobposition` ( `PositionID` varchar(15) NOT NULL default '', `PositionName` varchar(40) default NULL, `Position Description` varchar(250) default NULL, PRIMARY KEY (`PositionID`));"); /* End Table 13-11-2008*/ /* Create Table jobtitle 13-11-2008*/ mysql_query("CREATE TABLE `jobtitle` ( `JobTitle_ID` int(10) NOT NULL default '0', `JobTitle_Name` varchar(80) default NULL, `CreatedBy` varchar(20) default NULL, `CreatedOn` date default NULL, `ModifiedBy` varchar(20) default NULL, `ModifiedOn` date default NULL, PRIMARY KEY (`JobTitle_ID`));"); /* End Table 13-11-2008*/ /* Create Table journal 13-11-2008*/ mysql_query("CREATE TABLE `journal` ( `ID` int(10) NOT NULL auto_increment, `JID` int(10) default NULL, `BranchID` int(10) NOT NULL default '1459', `JournalType` int(1) default NULL, `JournalID` int(10) default NULL, `Subject` varchar(255) default NULL, `StartedOn` date default NULL, `StartTime` time default NULL, `EndTime` time default NULL, `CreatedBy` varchar(40) default NULL, `Description` blob, `EntryType` int(5) default NULL, PRIMARY KEY (`ID`,`BranchID`));"); /* End Table 13-11-2008*/ /* Create Table lead 13-11-2008*/ // description changed to blob:rg mysql_query("CREATE TABLE `lead` ( `LeadID` int(5) NOT NULL auto_increment, `LName` varchar(250) default NULL, `BranchID` int(10) NOT NULL default '0', `ProductName` varchar(50) default NULL, `ProductCat` varchar(100) default NULL, `Source` varchar(255) default NULL, `CreatdON` date default '0000-00-00', `AssigndTo` varchar(50) default NULL, `Description` blob, `FName` varchar(100) default NULL, `LastName` varchar(100) default NULL, `JobTitle` varchar(100) default NULL, `Company` varchar(100) default NULL, `Address` varchar(255) default NULL, `BPhne1` varchar(100) default NULL, `BPhne2` varchar(100) default NULL, `Mobile` varchar(100) default NULL, `Fax` varchar(100) default NULL, `Email` varchar(50) default NULL, `Site` varchar(50) default NULL, `location` varchar(30) default NULL, `Value` int(50) default NULL, `Rate` varchar(50) default NULL, `LastDate` varchar(50) default NULL, `CreatdBy` varchar(50) default NULL, `Accept` int(1) default '0', `Flag` int(1) default '0', `Stage` varchar(250) default NULL, `reason` varchar(250) default NULL, `ConvertedOn` date default '0000-00-00', `Status` smallint(1) default '1', `Remarks` blob, `OpportunityID` int(10) default NULL, `I_AssignListID` varchar(50) default NULL, `Lead_AssignOn` datetime default NULL, `I_AssignmentStatus` varchar(10) default NULL, `Lead_AssignBy` varchar(100) default NULL, `last_interaction_datetime` datetime default NULL, `last_interaction_id` int(10) default NULL, `v_ProductName` varchar(50) default NULL, `Stage1` varchar(20) default NULL, `v_Type` varchar(100) default NULL, `v_Industry` varchar(100) default NULL, `v_State` int(10) default NULL, `v_City` varchar(100) default NULL, `v_Other_indust` varchar(100) default NULL, `v_Other_type` varchar(100) default NULL, `interaction_Stage` varchar(100) default NULL, `date_of_birth` date default NULL, `place_of_birth` varchar(150) default NULL, `time_of_birth` varchar(150) default NULL, PRIMARY KEY (`LeadID`,`BranchID`) );"); /* End Table 13-11-2008*/ //////// mysql_query("CREATE TABLE `tbl_mst_state` ( `I_StateID` int(10) NOT NULL auto_increment, `V_StateName` varchar(40) default NULL, `I_StateStaus` int(2) default '1', `I_CountryID` int(10) default NULL, PRIMARY KEY (`I_StateID`) );"); mysql_query("insert into `tbl_mst_state`(`I_StateID`,`V_StateName`,`I_StateStaus`,`I_CountryID`) values (75,'bihar',1,71),(41,'Chennai',1,56),(76,'AP',1,71),(43,'Gujarat',1,56),(44,'Goa',1,70),(45,'delhi',1,71),(74,'ryfdgfdg',0,71),(72,'dsasdsd',0,72),(48,'Uttar Pradesh',1,56),(49,'Haryana',1,56),(50,'Andhra Pardesh',1,71),(78,'up',1,71),(77,'Delhi',0,71),(70,'madhy pradesh',1,71),(63,'Jharkhand',1,56),(62,'Anurachal Pradesh',1,71),(64,'Keral',1,71),(80,'mp',1,71); ;"); mysql_query("CREATE TABLE `tbl_mst_city` ( `I_CityCode` varchar(10) NOT NULL default '', `I_CityName` varchar(40) default NULL, `I_Region_ID` int(10) default NULL, `I_CityStatus` int(1) default '1', `I_StateCode` int(10) default NULL, PRIMARY KEY (`I_CityCode`) );"); mysql_query("insert into `tbl_mst_city`(`I_CityCode`,`I_CityName`,`I_Region_ID`,`I_CityStatus`,`I_StateCode`) values ('M02','Mehrauli',3,1,45),('O05','new delhi',3,1,45),('G02','Saket',3,1,45),('K05','Kanpur',1,1,48),('AP1','Hyderabad',3,1,50),('A23','AP',1,1,64),('JH2','Ranchi',2,1,63),('H02','Gurgaon',2,1,49),('BH01','Patna',2,1,75),('2','Adsulim',1,1,62),('1','Acaro',1,1,62),('AS2','ddsd',3,1,41),('eww','gfhfghgh',2,0,41),('DSA','sdfsdf',2,1,41),('L02','lucknow',1,1,48),('F06','lucknow',1,0,48),('all','allahabad',1,1,48),('3','Advolpale',1,1,62); "); /////////////// /* Create Table lead_assign 13-11-2008*/ mysql_query("CREATE TABLE `lead_assign` ( `SNo` int(10) NOT NULL default '0', `LeadID` int(10) default NULL, `BranchID` int(10) NOT NULL default '0', `AssignedBy` varchar(50) default NULL, `AssignedTo` varchar(50) default NULL, `LDate` date default NULL, PRIMARY KEY (`SNo`,`BranchID`));"); /* End Table 13-11-2008*/ /* Create Table linkeddocuments 13-11-2008*/ mysql_query("CREATE TABLE `linkeddocuments` ( `sno` int(10) NOT NULL auto_increment, `ID` varchar(200) default NULL, `Attachment` varchar(250) default NULL, PRIMARY KEY (`sno`));"); /* End Table 13-11-2008*/ /* Create Table list 13-11-2008*/ mysql_query("CREATE TABLE `list` ( `ListID` int(10) NOT NULL auto_increment, `AtxContactID` int(20) default '0', `BranchID` int(10) NOT NULL default '0', `AccountName` varchar(128) default NULL, `Department` varchar(32) NOT NULL default '', `Title` varchar(64) default NULL, `Mail` varchar(128) NOT NULL default '', `CreatedOn` date NOT NULL default '0000-00-00', `ModifiedOn` date NOT NULL default '0000-00-00', `ModifiedBy` varchar(80) NOT NULL default '', `WTel2` varchar(20) NOT NULL default '', `CreatedBy` varchar(80) NOT NULL default '', `fax` varchar(40) NOT NULL default '', `AccountID` int(10) default NULL, PRIMARY KEY (`ListID`,`BranchID`));"); /* End Table 13-11-2008*/ /* Create Table machardware 13-11-2008*/ mysql_query("CREATE TABLE `machardware` ( `MachineNo` int(10) NOT NULL default '0', `MachineName` varchar(40) NOT NULL default '', `AssignedTo` int(10) default NULL, `IPAddress` varchar(40) NOT NULL default '', `Department` varchar(15) default NULL, `DateofPurchase` date default NULL, PRIMARY KEY (`MachineNo`,`MachineName`,`IPAddress`));"); /* End Table 13-11-2008*/ /* Create Table macproblemcart 13-11-2008*/ mysql_query("CREATE TABLE `macproblemcart` ( `FormID` varchar(20) default NULL, `Problem` blob, `ProblemStatus` varchar(10) default NULL, `DueDate` date default NULL, `Comments` blob);"); /* End Table 13-11-2008*/ /* Create Table mailboxrpt 13-11-2008*/ mysql_query("CREATE TABLE `mailboxrpt` ( `UserID` varchar(10) NOT NULL default '', `MailBoxName` varchar(50) NOT NULL default '', `TotalVMsg` smallint(6) NOT NULL default '0', `TotalUnVMsg` smallint(6) NOT NULL default '0', `TotalFaxMsg` smallint(6) NOT NULL default '0', `TotalUnFaxMsg` smallint(6) NOT NULL default '0', `TotalNMsg` smallint(6) NOT NULL default '0', `TotalUnNMsg` smallint(6) NOT NULL default '0', `TotalSentMsg` smallint(6) NOT NULL default '0', `TotalDeletedMsg` smallint(6) NOT NULL default '0', `TotalAcessWeb` int(11) NOT NULL default '0', `TotalAcessIVRS` int(11) NOT NULL default '0', `TotalInCall` int(11) NOT NULL default '0', `TotalOutCall` int(11) NOT NULL default '0', `TotalGrMod` int(11) NOT NULL default '0', `TotalPwMod` int(11) NOT NULL default '0', `TotalLgMod` int(11) NOT NULL default '0', `AvgResTime` float NOT NULL default '0');"); /* End Table 13-11-2008*/ /* Create Table mailiciouscallrpt 13-11-2008*/ mysql_query("CREATE TABLE `mailiciouscallrpt` ( `sessionid` varchar(24) default NULL, `Date1` varchar(20) default NULL, `Time1` varchar(20) default NULL, `userid` varchar(24) default NULL, `Duration` varchar(20) default NULL);"); /* End Table 13-11-2008*/ /* Create Table mproductlist 13-11-2008 */ mysql_query("CREATE TABLE `mproductlist` (`PLCode` varchar(40) NOT NULL default '0', `PLID` int(10) default NULL, `PLName` varchar(80) default NULL, `CreatedBy` int(10) default NULL, `CreatedOn` date default NULL, `ModifiedBy` varchar(40) default NULL, `ModifiedOn` date default NULL, `Description` varchar(255) default NULL, `Discount` float default NULL, `Status` int(1) default '1',`Master` int(1) default '0', PRIMARY KEY (`PLCode`));"); /* End Table 13-11-2008*/ /* Create Table nature_problem 13-11-2008 */ mysql_query("CREATE TABLE `nature_problem` ( `ProblemID` int(10) NOT NULL auto_increment, `ProblemName` varchar(80) default NULL, PRIMARY KEY (`ProblemID`));"); /* End Table 13-11-2008*/ mysql_query("CREATE TABLE `prjdetail` ( `userID` decimal(10,0) default NULL, `prjID` decimal(10,0) default NULL, `AssgnTask` varchar(250) default NULL, `AssgnDate` datetime default NULL, `TaskType` varchar(20) default NULL);"); /* End Table 13-11-2008*/ /* Create Table prjdevelopment 13-11-2008 */ mysql_query("CREATE TABLE `prjdevelopment` ( `userID` decimal(10,0) NOT NULL default '0', `prjID` decimal(10,0) NOT NULL default '0', `prjModuleID` decimal(4,0) NOT NULL default '0', `prjMdDesc` varchar(250) default NULL, `prjMdHrs` decimal(2,0) default NULL, `prjMdComment` varchar(250) default NULL, `prjMdDate` datetime default NULL, PRIMARY KEY (`userID`,`prjID`,`prjModuleID`));"); /* End Table 13-11-2008*/ /* Create Table prjtask 13-11-2008 */ mysql_query("CREATE TABLE `prjtask` ( `prjID` int(4) NOT NULL default '0', `usrID` int(4) NOT NULL default '0', `taskID` int(4) NOT NULL default '0', `taskDetail` varchar(255) default NULL, `tskAsignDate` datetime default NULL, `tskDueDate` datetime default NULL, `tskHrs` int(4) default NULL, `tskStatus` int(1) default NULL, `tskPriority` int(1) default NULL, PRIMARY KEY (`prjID`,`usrID`,`taskID`));"); /* End Table 13-11-2008*/ /* Create Table prjtaskdetail 13-11-2008 */ mysql_query("CREATE TABLE `prjtaskdetail` ( `ID` int(11) NOT NULL auto_increment, `prjID` int(4) default NULL, `taskID` int(4) default NULL, `userID` int(2) default NULL, `budgetedHrs` int(5) default NULL, `assignDate` date default NULL, `dueDate` date default NULL, `Description` varchar(250) default NULL, `status` decimal(1,0) default '0', PRIMARY KEY (`ID`));"); /* End Table 13-11-2008*/ /* Create Table prjtaskmaster 13-11-2008 */ mysql_query("CREATE TABLE `prjtaskmaster` ( `taskID` int(10) NOT NULL auto_increment, `projectID` int(20) default NULL, `estimatedHrs` int(5) default NULL, `description` varchar(250) default NULL, `taskName` varchar(250) default NULL, PRIMARY KEY (`taskID`));"); /* End Table 13-11-2008*/ /* Create Table prjtskdetail 13-11-2008 */ mysql_query("CREATE TABLE `prjtskdetail` ( `prjID` int(4) default NULL, `usrID` int(4) default NULL, `wHrs` int(2) default NULL, `wDate` datetime default NULL, `tskDetails` varchar(255) default NULL, `tskID` int(4) default NULL);"); /* End Table 13-11-2008*/ /* Create Table prodcategory 13-11-2008 */ mysql_query("CREATE TABLE `prodcategory` ( `CatID` varchar(15) default NULL, `CategoryID` varchar(80) NOT NULL default '0', `Description` varchar(255) NOT NULL default '', PRIMARY KEY (`CategoryID`));"); /* End Table 13-11-2008*/ /* Create Table productgroupmaster 13-11-2008 */ mysql_query("CREATE TABLE `productgroupmaster` ( `GroupID` varchar(40) NOT NULL default '', `Description` varchar(255) default NULL, `Status` int(1) NOT NULL default '1', `V_CreatedBy` varchar(100) default NULL, `D_date` timestamp NULL default NULL, PRIMARY KEY (`GroupID`) );"); /* End Table 13-11-2008*/ /* Create Table productgrpcat 13-11-2008 */ mysql_query("CREATE TABLE `productgrpcat` ( `ID` int(11) NOT NULL auto_increment, `GroupID` varchar(30) NOT NULL default '0', `CategoryID` varchar(80) NOT NULL default '0', `Status` int(1) NOT NULL default '1', `Description` varchar(255) default NULL, `V_Create_BY` varchar(100) default NULL, `D_datetime` datetime default NULL, PRIMARY KEY (`ID`) );"); /* End Table 13-11-2008*/ mysql_query("CREATE TABLE `tmpopportunity` ( `OpportunityID` int(50) NOT NULL, `OpportunityName` varchar(255) default NULL, `AccountID` double default NULL, `CloseDate` date default NULL, `AssignedTo` varchar(255) default NULL, `Stage` varchar(255) default NULL, `Amount` double default NULL, `CreatedOn` date default NULL, `CategoryID` varchar(255) default NULL, `Currency` varchar(255) default NULL, `BranchID` int(20) NOT NULL, PRIMARY KEY (`OpportunityID`,`BranchID`) );"); /* Create Table productprice 13-11-2008 */ mysql_query("CREATE TABLE `productprice` ( `ProdID` varchar(200) NOT NULL default '', `UnitPrice` varchar(10) NOT NULL default '', `Discount` varchar(5) NOT NULL default '0', `FromDate` varchar(40) NOT NULL default '', `EndDate` varchar(40) NOT NULL default '', `Status` varchar(20) NOT NULL default '');"); /* End Table 13-11-2008*/ /* Create Table productpricehistory 13-11-2008 */ mysql_query("CREATE TABLE `productpricehistory` ( `ProdID` varchar(25) NOT NULL default '', `UnitPrice` varchar(10) NOT NULL default '', `Discount` varchar(5) NOT NULL default '0', `FromDate` varchar(40) NOT NULL default '', `EndDate` varchar(40) NOT NULL default '', `Status` varchar(20) NOT NULL default '', `ModifiedOn` date default NULL);"); /* End Table 13-11-2008*/ /* Create Table product_details 13-11-2008 */ mysql_query("CREATE TABLE `product_details` ( `ID` int(10) NOT NULL auto_increment, `ProdID` varchar(80) NOT NULL default '0', `CategoryID` varchar(255) NOT NULL default '', `ProdName` blob NOT NULL, `ProdDesc` blob NOT NULL, `CreatedOn` varchar(40) NOT NULL default '', `ModifiedOn` varchar(40) NOT NULL default '', `CreatedBy` varchar(80) NOT NULL default '', `ModifiedBy` varchar(80) NOT NULL default '', `CatID` varchar(15) default NULL, `ProductID` varchar(15) default NULL, `DStatus` int(1) NOT NULL default '0', PRIMARY KEY (`ID`,`ProdID`));"); /* End Table 13-11-2008*/ /* Create Table products_upload 14-11-2008 */ mysql_query("CREATE TABLE `products_upload` ( `Id` int(5) NOT NULL auto_increment, `ProductID` int(5) default NULL, `ActualFileName` varchar(150) default NULL, `FileName` varchar(150) default NULL, `directory_directoryId` int(5) default NULL, `DocumentType` int(5) default NULL, `UploadedBy` varchar(80) default NULL, `UploadedOn` datetime default NULL, `ModifiedBy` varchar(80) default NULL, `ModifiedOn` datetime default NULL, `Dstatus` int(1) default '0', PRIMARY KEY (`Id`));"); /* End Table 14-11-2008*/ /* Create Table producttax 14-11-2008 */ mysql_query("CREATE TABLE `producttax` ( `ProdID` varchar(60) NOT NULL default '', `LST` varchar(10) NOT NULL default '0', `CST` varchar(10) NOT NULL default '0', `CSTWCF` varchar(10) NOT NULL default '', `City` varchar(40) NOT NULL default '', `State` varchar(40) NOT NULL default '', `Fromdate` varchar(40) NOT NULL default '', `EndDate` varchar(40) NOT NULL default '', `Status` varchar(20) NOT NULL default '');"); /* End Table 14-11-2008*/ /* Create Table reminderdetails 14-11-2008 */ mysql_query("CREATE TABLE `reminderdetails` ( `ID` int(10) NOT NULL default '0', `ReferenceNo` varchar(25) NOT NULL default '', `InvoiceNo` varchar(25) NOT NULL default '', `BranchID` varchar(15) NOT NULL default '', `Count` int(5) default NULL, PRIMARY KEY (`ReferenceNo`,`InvoiceNo`,`BranchID`));"); /* End Table 14-11-2008*/ /* Create Table reminderdetails 14-11-2008 */ mysql_query("CREATE TABLE `reminderdetails` ( `ID` int(10) NOT NULL default '0', `ReferenceNo` varchar(25) NOT NULL default '', `InvoiceNo` varchar(25) NOT NULL default '', `BranchID` varchar(15) NOT NULL default '', `Count` int(5) default NULL, PRIMARY KEY (`ReferenceNo`,`InvoiceNo`,`BranchID`));"); /* End Table 14-11-2008*/ /* Create Table remindermaster 14-11-2008 */ mysql_query("CREATE TABLE `remindermaster` ( `ID` int(10) default NULL, `ReferenceNo` varchar(25) NOT NULL default '', `BranchID` varchar(10) NOT NULL default '', `ReferenceDate` date default NULL, `Mode` varchar(5) default NULL, `SentBy` varchar(15) default NULL, PRIMARY KEY (`ReferenceNo`,`BranchID`));"); /* End Table 14-11-2008*/ /* Create Table replacement_dr 14-11-2008 */ mysql_query("CREATE TABLE `replacement_dr` ( `DReceiptNo` varchar(30) default NULL, `SerialNo` varchar(80) default NULL, `RDate` date default NULL);"); /* End Table 14-11-2008*/ /* Create Table requisitioncart 14-11-2008 */ mysql_query("CREATE TABLE `requisitioncart` ( `sno` int(10) NOT NULL auto_increment, `RequisitionNo` varchar(30) default NULL, `RequisitionType` varchar(50) default NULL, `BranchID` int(10) NOT NULL default '1459', `ProductCategory` varchar(40) default NULL, `ProductName` varchar(140) default NULL, `AccountNumber` int(100) default NULL, `Contact` varchar(250) default NULL, `RequisitionPreparedBy` varchar(80) default NULL, `Description` blob, `Quantity` int(10) default NULL, `Rate` double default NULL, `RDate` date default NULL, `POFlag` smallint(1) default '0', PRIMARY KEY (`sno`,`BranchID`));"); /* End Table 14-11-2008*/ /* Create Table requisitiontc 14-11-2008 */ mysql_query("CREATE TABLE `requisitiontc` ( `RequisitionID` varchar(30) NOT NULL default '', `BranchID` int(10) NOT NULL default '1459', `Payment` blob, `Warranty` blob, `Delivery` blob, `DeliveryAddress` blob, `BillingAddress` blob, `Validity` blob, `SpecialTerms` blob, `Penalty` blob, `CST` float default NULL, `LST` float default NULL, `LstForm` varchar(80) default NULL, `CstForm` varchar(80) default NULL, `Freight` varchar(255) default NULL, PRIMARY KEY (`RequisitionID`,`BranchID`));"); /* End Table 14-11-2008*/ /* Create Table signature 14-11-2008 */ mysql_query("CREATE TABLE `signature` ( `SignID` int(10) NOT NULL default '0', `Signature` longblob, `LocalAddress` blob, `LocalEmergencyContact` varchar(250) default NULL, `LocalEmergencyPhone` varchar(15) default NULL, `OtherEmergencyContact` varchar(250) default NULL, `OtherEmergencyPhone` varchar(15) default NULL, `Login` smallint(1) default NULL, `LocalPhone` varchar(20) default NULL, PRIMARY KEY (`SignID`));"); /* End Table 14-11-2008*/ /* Create Table softwarecategory 14-11-2008 */ /* Create Table tbl_mst_personal 14-11-2008 */ mysql_query("CREATE TABLE `tbl_mst_personal` ( `ID` int(10) NOT NULL auto_increment, `AtxUserID` int(10) NOT NULL default '0', `AtxPlaceBirth` varchar(60) default NULL, `AtxBloodGroup` varchar(20) default NULL, `AtxMaritalStatus` smallint(1) default NULL, `AtxPermanentAddress` varchar(60) default NULL, `AtxPhone` varchar(20) default NULL, `AtxPassportNo` varchar(20) default NULL, `AtxIssuedOnP` date default NULL, `AtxIssuedAtP` varchar(40) default NULL, `AtxExpiryDateP` date default NULL, `AtxLicenseNo` varchar(20) default NULL, `AtxIssuedOnL` date default NULL, `AtxIssuedAtL` varchar(40) default NULL, `AtxExpiryDateL` date default NULL, `AtxBankName` varchar(60) default NULL, `AtxAccountNo` varchar(40) default NULL, `AtxBranch` varchar(20) default NULL, `AtxAccountType` varchar(30) default NULL, PRIMARY KEY (`ID`,`AtxUserID`));"); /* End Table 14-11-2008*/ /* Create Table tbl_mst_relation 14-11-2008 */ mysql_query("CREATE TABLE `tbl_mst_relation` ( `ID` int(10) NOT NULL auto_increment, `AtxUserID` varchar(10) NOT NULL default '', `FatherName` varchar(60) default NULL, `FatherAge` varchar(40) default NULL, `FatherOccupation` varchar(60) default NULL, `MotherName` varchar(60) default NULL, `MotherAge` varchar(40) default NULL, `MotherOccupation` varchar(60) default NULL, `SpouseName` varchar(60) default NULL, `SpouseAge` varchar(40) default NULL, `SpouseOccupation` varchar(60) default NULL, `Child1Name` varchar(60) default NULL, `Child1Age` varchar(40) default NULL, `Child1Occupation` varchar(60) default NULL, `Child2Name` varchar(60) default NULL, `Child2Age` varchar(40) default NULL, `Child2Occupation` varchar(60) default NULL, PRIMARY KEY (`ID`,`AtxUserID`));"); /* End Table 14-11-2008*/ /* Create Table sofwareinstalluser 14-11-2008 */ mysql_query("CREATE TABLE `tbl_mst_educational` ( `ID` int(10) NOT NULL auto_increment, `AtxUserID` varchar(10) NOT NULL default '', `TNameOfCollege` varchar(255) default NULL, `TFromDate` date default NULL, `TEndDate` date default NULL, `TSpecialization` varchar(255) default NULL, `TPercentage` varchar(255) default NULL, `THonours` varchar(255) default NULL, `TWNameOfCollege` varchar(255) default NULL, `TWFromDate` date default NULL, `TWEndDate` date default NULL, `TWSpecialization` varchar(255) default NULL, `TWPercentage` varchar(255) default NULL, `TWHonours` varchar(255) default NULL, `GNameOfCollege` varchar(255) default NULL, `GFromDate` date default NULL, `GEndDate` date default NULL, `GSpecialization` varchar(255) default NULL, `GPercentage` varchar(255) default NULL, `GHonours` varchar(255) default NULL, `PGNameOfCollege` varchar(255) default NULL, `PGFromDate` date default NULL, `PGEndDate` date default NULL, `PGSpecialization` varchar(255) default NULL, `PGPercentage` varchar(255) default NULL, `PGHonours` varchar(255) default NULL, `TQNameOfCollege` varchar(255) default NULL, `TQFromDate` date default NULL, `TQEndDate` date default NULL, `TQSpecialization` varchar(255) default NULL, `TQPercentage` varchar(255) default NULL, `TQHonours` varchar(255) default NULL, `Certification_Detail` varchar(255) default NULL, PRIMARY KEY (`ID`,`AtxUserID`));"); /* End Table 14-11-2008*/ /* Create Table tbl_mst_activities 14-11-2008 */ mysql_query("CREATE TABLE `tbl_mst_activities` ( `ID` int(10) NOT NULL auto_increment, `AtxUserID` varchar(10) NOT NULL default '', `Sports` varchar(255) default NULL, `Social` varchar(255) default NULL, `Hobbies` varchar(255) default NULL, `AwardsReceived` varchar(255) default NULL, PRIMARY KEY (`ID`,`AtxUserID`));"); /* End Table 14-11-2008*/ /* Create Table tbl_mst_previouscompany 14-11-2008 */ mysql_query("CREATE TABLE `tbl_mst_previouscompany` ( `ID` int(10) NOT NULL auto_increment, `AtxUserID` varchar(10) NOT NULL default '', `BasicMonthly` varchar(255) default NULL, `BasicAnnually` varchar(255) default NULL, `HouseRentMonthly` varchar(255) default NULL, `HouseRentAnnually` varchar(255) default NULL, `ConveyanceMonthly` varchar(255) default NULL, `ConveyanceAnnually` varchar(255) default NULL, `FlexiblePayMonthly` varchar(255) default NULL, `FlexiblePayAnnually` varchar(255) default NULL, `SpecialAllowanceMonthly` varchar(255) default NULL, `SpecialAllowanceAnnually` varchar(255) default NULL, `MedicalMonthly` varchar(255) default NULL, `MedicalAnnually` varchar(255) default NULL, `LTAMonthly` varchar(255) default NULL, `LTAAnnually` varchar(255) default NULL, `IncentivesMonthly` varchar(255) default NULL, `IncentivesAnnually` varchar(255) default NULL, `BonusMonthly` varchar(255) default NULL, `BonusAnnually` varchar(255) default NULL, `OthersMonthly` varchar(255) default NULL, `OthersAnnually` varchar(255) default NULL, `TotalGrossMonthly` varchar(255) default NULL, `TotalGrossAnnually` varchar(255) default NULL, PRIMARY KEY (`ID`,`AtxUserID`));"); /* End Table 14-11-2008*/ /* Create Table tbl_mst_documents 14-11-2008 */ mysql_query("CREATE TABLE `tbl_mst_document` ( `ID` int(10) NOT NULL auto_increment, `AtxUserID` varchar(10) NOT NULL default '', `IDProof` smallint(1) default NULL, `DateOfBirth` smallint(1) default NULL, `ResidenceProof` smallint(1) default NULL, `TClassMarkSheet` smallint(1) default NULL, `DrivingLicense` smallint(1) default NULL, `TWClassMarkSheet` smallint(1) default NULL, `Passport` smallint(1) default NULL, `Degree` smallint(1) default NULL, `RationCard` smallint(1) default NULL, `PreviousAppointment` smallint(1) default NULL, `RentAgreement` smallint(1) default NULL, `RelivingLetter` smallint(1) default NULL, `BankStatement` smallint(1) default NULL, `Frm` smallint(1) default NULL, `LICPolicy` smallint(1) default NULL, `SalarySlip` smallint(1) default NULL, `PANCard` smallint(1) default NULL, `BioData` smallint(1) default NULL, PRIMARY KEY (`ID`,`AtxUserID`));"); /* End Table 14-11-2008*/ /* Create Table tbl_mst_document_type 10-12-2008 */ mysql_query("CREATE TABLE `tbl_mst_document_type` ( `I_DocumentType` int(3) NOT NULL auto_increment, `V_DocumentType` varchar(200) default NULL, `I_D_Status` int(4) default NULL, PRIMARY KEY (`I_DocumentType`) );"); mysql_query("insert into `tbl_mst_document_type` values ('1','Account','1'),('2','Contact','1'),('3','Lead','1'),('4','Opportunity','1'),('5','Journal','1'),('6','Invoice','1'),('7','Quotation','1'),('8','SalesOrder','1'),('9','PurchaseOrder','1'),('10','Product','1'),('11','Problem','1')"); /* End Table 10-12-2008*/ /* Create Table tbl_mst_career 14-11-2008 */ mysql_query("CREATE TABLE `tbl_mst_career` ( `ID` int(10) NOT NULL auto_increment, `AtxUserID` varchar(10) NOT NULL default '', `PlansForFuture` blob, `PlansYes` int(1) default NULL, `StateCareer` blob, `AdditionalInformation` blob, `PhysicalDisability` blob, `PhysicalYes` int(1) default NULL, PRIMARY KEY (`ID`,`AtxUserID`));"); /* End Table 14-11-2008*/ /* Create Table tbl_mst_employment 14-11-2008 */ mysql_query("CREATE TABLE `tbl_mst_employment` ( `ID` int(10) NOT NULL auto_increment, `AtxUserID` varchar(10) NOT NULL default '', `FFromDate` date default NULL, `FEndDate` date default NULL, `FNameAndLocation` varchar(255) default NULL, `FLastPositionHeld` varchar(255) default NULL, `FRoleAndResponsibility` varchar(255) default NULL, `FReasonsForLeaving` varchar(255) default NULL, `SFromDate` date default NULL, `SEndDate` date default NULL, `SNameAndLocation` varchar(255) default NULL, `SLastPositionHeld` varchar(255) default NULL, `SRoleAndResponsibility` varchar(255) default NULL, `SReasonsForLeaving` varchar(255) default NULL, `THFromDate` date default NULL, `THEndDate` date default NULL, `TNameAndLocation` varchar(255) default NULL, `TLastPositionHeld` varchar(255) default NULL, `TRoleAndResponsibility` varchar(255) default NULL, `TReasonsForLeaving` varchar(255) default NULL, `TotalYears` int(3) default '0', PRIMARY KEY (`ID`,`AtxUserID`));"); /* End Table 14-11-2008*/ /* Create Table uniautoatt 14-11-2008 */ mysql_query("CREATE TABLE `uniautoatt` ( `uaaUserID` varchar(20) NOT NULL default '', `uaaExtnNo` varchar(20) NOT NULL default '', `uaaCallFwd` int(1) NOT NULL default '0', `uaaCoveringNos` varchar(255) default NULL, `uaaCallScreen` int(1) NOT NULL default '0', `uaaMediaType` varchar(255) NOT NULL default '', PRIMARY KEY (`uaaUserID`));"); /* End Table 14-11-2008*/ /* Create Table uninotificationstatus 14-11-2008 */ mysql_query("CREATE TABLE `uninotificationstatus` ( `nsTUID` varchar(32) NOT NULL default '', `nsStatus` smallint(6) NOT NULL default '0', PRIMARY KEY (`nsTUID`));"); /* End Table 14-11-2008*/ /* Create Table usersalary 14-11-2008 */ mysql_query("CREATE TABLE `usersalary` ( `UserID` varchar(10) NOT NULL default '', `SNo` int(10) NOT NULL default '0', `BasicSalary` float NOT NULL default '0', `LTA` float default NULL, `TravelAllowance` float default NULL, `ProjectIncentives` float default NULL, `HRA` float default NULL, `YearlyIncentives` float default NULL, PRIMARY KEY (`SNo`));"); /* End Table 14-11-2008*/ /* Create Table userappraisals 14-11-2008 */ mysql_query("CREATE TABLE `userappraisals` ( `UserID` varchar(10) default NULL, `SNo` int(10) NOT NULL default '0', `Designation` varchar(50) default NULL, `DateOfJoining` date default NULL, `ConfirmationDate` date default NULL, `Salary` float default NULL, `RevisionDate` date default NULL, `Resignation` date default NULL, PRIMARY KEY (`SNo`) );"); /* End Table 14-11-2008*/ /* Create Table userincentives 14-11-2008 */ mysql_query("CREATE TABLE `userincentives` ( `SNo` int(10) NOT NULL default '0', `UserID` varchar(10) default NULL, `Incentive` varchar(10) default NULL, `Description` blob, `FromDate` date default NULL, `EndDate` date default NULL, PRIMARY KEY (`SNo`));"); /* End Table 14-11-2008*/ /* Create Table usersecurity 14-11-2008 */ mysql_query("CREATE TABLE `usersecurity` ( `UserID` varchar(10) NOT NULL default '', `LoginFromOne` smallint(1) default '0', `ChangePwdNextLogin` smallint(1) default '0', `NotChangePwd` smallint(1) default '0', `PwdExpired` smallint(1) default '0', `IPToLogIN` varchar(20) default NULL, PRIMARY KEY (`UserID`));"); /* End Table 14-11-2008*/ /* Create Table tbl_joinleave 14-11-2008 */ mysql_query("CREATE TABLE `tbl_joinleave` ( `UserID` varchar(20) NOT NULL default '0', `JoiningDate` date default NULL, `LeavingDate` date default NULL, PRIMARY KEY (`UserID`));"); /* End Table 14-11-2008*/ /* Create Table tbl_joinleave 14-11-2008 */ mysql_query("CREATE TABLE `complainthandled_insert` ( `CID` int(10) unsigned NOT NULL auto_increment, `ComplaintID` int(10) default NULL, `v_CreatedBy` varchar(255) default NULL, `v_Description` blob, `i_Problemstatus` int(10) default '0', `d_createddatetime` datetime default NULL, `i_InterationType` varchar(50) default NULL, `F_datetime` datetime default NULL, `v_Subject` varchar(150) default NULL, PRIMARY KEY (`CID`) ) ;"); /* End Table 14-11-2008*/ /* Create Table tbl_mst_documents 15-11-2008 */ mysql_query("CREATE TABLE `tbl_mst_documents` ( `I_DocumentID` int(11) NOT NULL auto_increment, `I_DocumentType` int(11) default NULL, `I_section_ID` varchar(50), `V_Doc_Name` varchar(40) default NULL, `I_Doc_Status` int(4) default NULL, `V_Doc_Description` varchar(250) default NULL, `V_Path` varchar(140) default NULL, `I_UploadedBY` varchar(40) default NULL, `I_UploadedON` datetime default NULL, `I_PP` varchar(4) default NULL, `ModifiedOn` datetime default NULL, `ModifiedBy` varchar(50) default NULL, PRIMARY KEY (`I_DocumentID`));"); /* End Table 15-11-2008*/ /* Create Table opportunity_comment 15-11-2008 */ mysql_query("CREATE TABLE `opportunity_comment` ( `OpportunityID` varchar(150) NOT NULL default '', `DID` int(20) default NULL, `Comment` varchar(255) NOT NULL default '', `CDate` date default NULL, `CreatedBy` varchar(150) default NULL, `type` varchar(250) default NULL, `BranchID` int(10) default NULL);"); /* End Table 15-11-2008*/ /* Create Table tbl_mst_leadlist 16-11-2008 */ mysql_query("CREATE TABLE `tbl_mst_leadlist` ( `I_CampaignID` int(10) NOT NULL auto_increment, `V_CampaignName` varchar(40) default NULL, `D_CampaignCreationDate` date default NULL, `I_CampaignCreatedBy` varchar(100) default NULL, `I_CampaignStatus` int(1) default '1', `V_Description` varchar(250) default NULL, `groupiid` varchar(100) default NULL, `categoryid` varchar(100) default NULL, `I_PP` int(10) default NULL, `DeletedOn` date default NULL, `Deletedby` varchar(100) default NULL, `UploadFile` varchar(200) default NULL, `RenameFile` varchar(200) default NULL, `V_ImportChoose` int(10) default NULL COMMENT '1-Account and 2-Lead', PRIMARY KEY (`I_CampaignID`) );"); /* End Table 15-11-2008*/ /* Create Table tbl_temp_lead 16-11-2008 */ mysql_query("CREATE TABLE `tbl_temp_lead` ( `I_LeadID` int(10) NOT NULL auto_increment, `I_CampaignID` int(20) default NULL COMMENT 'list id from tbl_mst_leadlist', `V_TPANAME` varchar(200) default NULL, `V_Contact` varchar(200) default NULL, `V_CAONAME` varchar(200) default NULL, `V_Address` varchar(200) default NULL, `ResPhone` varchar(200) default NULL, `Emailid` varchar(100) default NULL, `Fax` varchar(200) default NULL, `Website` varchar(200) default NULL, `V_Mobie` varchar(200) default NULL, `V_Description` blob, `V_Jobtitle` varchar(200) default NULL, `V_Amount` varchar(20) default NULL, `V_BusinessPhone` varchar(20) default NULL, `V_Remarks` blob, `D_Closedate` varchar(100) default NULL, `I_LeadStatus` int(10) default '1', `CreatedBy` varchar(200) default NULL, `Importleadlist_Status` int(10) default '0', `FailedImportReason` varchar(200) default 'NULL', `I_ActualLeadID` int(10) default NULL, `I_ActualAccountID` int(10) default NULL, `V_ImportChoose` int(10) default NULL COMMENT '1-Account and 2-Lead', PRIMARY KEY (`I_LeadID`) )"); /* End Table 16-11-2008 */ /* Create Table audit_viewaccount 26-11-2008 */ mysql_query("CREATE TABLE `audit_viewaccount` ( `Account_ID` int(10) default NULL, `ModifiedOn` datetime default NULL, `ModifiedBy` varchar(30) default NULL, `FieldName` varchar(255) default NULL, `IPAddress` varchar(20) default NULL);"); /* End Table 26-11-2008 */ /* Create Table tmpsalesordercart 26-11-2008 */ mysql_query("CREATE TABLE `tmpsalesordercart` ( `ID` int(11) NOT NULL auto_increment, `SalesOrderNo` varchar(30) default NULL, `BranchID` int(10) default NULL, `ProductCategory` varchar(40) default NULL, `ProductName` varchar(140) default NULL, `AccountName` varchar(140) default NULL, `Contact` varchar(140) default NULL, `OrderMadeBy` varchar(80) default NULL, `Description` blob, `Quantity` int(10) default NULL, `Rate` double default NULL, `FinalPrice` double default NULL, PRIMARY KEY (`ID`));"); /* End Table 26-11-2008 */ /* Create Table tmpsalesorder 26-11-2008 */ mysql_query("CREATE TABLE `tmpsalesorder` ( `SalesOrderNo` varchar(150) NOT NULL default '', `AccountName` varchar(255) default NULL, `Contact` varchar(255) default NULL, `TotalAmount` float default NULL, `ApprovedBy` varchar(255) default NULL, `ApprovalDate` date default '0000-00-00', `Status` int(5) default '0', `SalesOrderDate` date default '0000-00-00', `OrderMadeBy` varchar(250) default NULL, `Advance` smallint(1) default NULL, PRIMARY KEY (`SalesOrderNo`));"); /* End Table 26-11-2008 */ /* Create Table audit_viewcontact 03-01-2009 */ mysql_query("CREATE TABLE `audit_viewcontact` ( `Contact_ID` int(10) default NULL, `ModifiedOn` datetime default NULL, `ModifiedBy` char(30) default NULL, `FieldName` char(255) default NULL, `IPAddress` char(20) default NULL);"); /* End Table 26-11-2008 */ /* creating other tables(unigroupdetails) */ mysql_query("create table `unigroupdetails` (`atxGid` varchar (40),`ugdContactID` varchar (20),`ugdContactType` double); "); mysql_query("insert into unigroupdetails (atxGid,ugdContactID) values ('080000','$v_maxuserid');"); /* End : other tables (unigroupdetails) creation table */ /* creating other tables(changeorg_history) 26-11-2008 */ mysql_query("CREATE TABLE `changeorg_history` ( `SerialNo` int(10) NOT NULL auto_increment, `UserID` varchar(20) default NULL, `AccountNumber` varchar(80) default NULL, `Chng_Date` datetime default NULL, `ModifiedBy` varchar(20) default NULL, PRIMARY KEY (`SerialNo`));"); /* End : other tables (changeorg_history) 26-11-2008*/ mysql_query("CREATE TABLE `tbl_cdrlog` ( `V_SessionID` varchar(20) default NULL, `V_CallerId` varchar(20) default NULL, `I_StartTime` datetime default NULL, `I_EndTime` datetime default NULL, `V_VoicePath` varchar(100) default NULL, `I_Flag` int(1) default '0', `EASYNUMBER_STATUS` varchar(100) default NULL, `V_DNIS` varchar(100) default NULL , `I_AgentID` int(10) ) ;"); /* End : tables tendercontactdetails 27-11-2008*/ /* creating tmpquotationcart 28-11-2008 */ mysql_query("CREATE TABLE `tmpquotationcart` ( `ID` int(10) NOT NULL auto_increment, `QuotationNo` varchar(20) NOT NULL default '', `BranchID` int(10) default NULL, `ProductCode` varchar(40) NOT NULL default '', `Description` blob NOT NULL, `Rate` varchar(20) NOT NULL default '', `Quantity` int(5) NOT NULL default '0', `Discount` varchar(5) NOT NULL default '', `CST` varchar(5) NOT NULL default '', `LST` varchar(5) NOT NULL default '', `FinalPrice` double NOT NULL default '0', `Customer` varchar(40) NOT NULL default '', `Salesperson` varchar(40) NOT NULL default '', `DiscountedPrice` double default NULL, `TaxAmount` double default NULL, PRIMARY KEY (`ID`));"); /* End : tables tmpquotationcart 28-11-2008*/ /* creating tmpperformainvoicecart 28-11-2008 */ mysql_query("CREATE TABLE `tmpperformainvoicecart` ( `ID` int(10) NOT NULL auto_increment, `PInvoiceNo` varchar(30) default NULL, `BranchID` int(10) default '1459', `ProductName` varchar(140) default NULL, `AccountName` varchar(140) default NULL, `Contact` varchar(140) default NULL, `PerformaMadeBy` varchar(80) default NULL, `PerformaDate` date default NULL, `Description` blob, `Quantity` int(10) default NULL, `Rate` double default NULL, `FinalPrice` double default NULL, PRIMARY KEY (`ID`));"); /* End : tables tmpperformainvoicecart 28-11-2008*/ /* creating tmpquotationcart 28-11-2008 */ mysql_query("CREATE TABLE `tmpinvoicecart` ( `ID` int(10) NOT NULL auto_increment, `BranchID` int(10) default '1459', `InvoiceNo` char(30) default NULL, `ProductCategory` char(40) default NULL, `ProductName` char(140) default NULL, `AccountName` char(140) default NULL, `Contact` char(140) default NULL, `InvoiceMadeBy` char(80) default NULL, `InvoiceDate` date default NULL, `Description` char(255) default NULL, `Quantity` int(10) default NULL, `Rate` double default NULL, `FinalPrice` double default NULL, `AccountID` int(10) default NULL, PRIMARY KEY (`ID`));"); /* End : tables tmpquotationcart 28-11-2008*/ /* creating tbl_mst_customcampaign 10-04-2008 deepak kumar */ mysql_query("CREATE TABLE `tbl_mst_customcampaign` ( `I_CampaignID` int(10) NOT NULL default '0', `V_CampaignName` varchar(180) default NULL, `D_CampaignStartDate` date default NULL, `D_CampaignEndDate` date default NULL, `V_CreatedBy` varchar(20) default NULL, `I_DeletionStatus` int(1) default '1', `V_Campaign_mode` varchar(200) default NULL, `V_Content` text, `I_CampaignRunStatus` varchar(200) default '0', `I_recurr_campaign` varchar(100) default '0', `I_ListID` int(10) default '0', `I_WList` int(1) default '0', PRIMARY KEY (`I_CampaignID`) );"); /* End : tables tbl_mst_customcampaign 11-12-2008*/ /* creating tbl_mst_campaign_execution deepak kumar 19-12-2008 */ mysql_query("CREATE TABLE `tbl_mst_campaign_execution` ( `compaign_id` int(10) NOT NULL auto_increment, `V_BulkMessage_Type` varchar(100) default NULL, `V_ListName` varchar(100) default NULL, `V_ContactName` varchar(100) default NULL, `V_Campaign_mode` varchar(100) default NULL, `V_Content` text, `D_Dateofcreation` date default NULL, `I_Status` int(10) default '1', `userfile` varchar(100) default NULL, `I_CampaignID` varchar(100) default NULL, PRIMARY KEY (`compaign_id`));"); /* End : tables tbl_mst_campaign_execution 19-12-2008*/ /* creating tbl_campaign_recurrence deepak kumar 19-12-2008 */ mysql_query("CREATE TABLE `tbl_campaign_recurrence` ( `I_Campaign_Id` int(10) NOT NULL, `D_Dateofrecurrence` date default NULL, PRIMARY KEY (`I_Campaign_Id`));"); /* End : tables tbl_campaign_recurrence 19-12-2008*/ /* creating tbl_mst_currency deepak kumar 27-01-2009 */ //mysql_query("CREATE TABLE `tbl_mst_currency` ( `CURR_ID` int(10) NOT NULL auto_increment, `V_CURRENCYName` varchar(200) default NULL, `I_Status` int(10) default '1', PRIMARY KEY (`CURR_ID`))"); mysql_query("CREATE TABLE `tbl_mst_currency` ( `CURR_ID` int(10) NOT NULL auto_increment, `V_CURRENCYName` varchar(200) default NULL, `I_Status` int(10) default '1', `concar` decimal(11,2) default NULL, `conbyk` decimal(11,2) default NULL, PRIMARY KEY (`CURR_ID`));"); mysql_query("insert into `tbl_mst_currency` values (1,'Rs',1,4.50,2.50),(2,'Dollar',1,4.50,2.50),(3,'Euro',1,4.50,2.50);"); /* End : tables tbl_campaign_recurrence 19-12-2008*/ /* Create tbl_mst_project_type deepak kumar 19-01-2009 */ mysql_query("CREATE TABLE `tbl_mst_project_type` ( `I_ProjectTypeId` int(10) NOT NULL auto_increment, `V_ProjectType` varchar(200) default NULL, `I_ProjectStatus` int(10) default '1', PRIMARY KEY (`I_ProjectTypeId`));"); mysql_query("insert into `tbl_mst_project_type` values (1,'IVR',1),(2,'Logger',1),(3,'UMS',1),(4,'Marketing',1),(5,'Sales',1),(6,'HR',1),(7,'WEB',1), (8,'OTHERS',1);"); /* End tbl_mst_project_type 19-12-2008*/ /* Create tbl_trans_campaignexec_details deepak kumar 10-04-2009 */ mysql_query("CREATE TABLE `tbl_trans_campaignexec_details` ( `I_CampaignId` int(10) NOT NULL, `I_InstanceId` int(10) NOT NULL, `I_ID` int(10) NOT NULL, `V_Response` text, `D_DateofResponse` date default NULL, `D_DateTimeResponse` datetime default NULL COMMENT 'Time stamp when the response was added', `V_ResponseAddedBy` varchar(100) default NULL, PRIMARY KEY (`I_CampaignId`,`I_InstanceId`,`I_ID`));"); /* End */ /* Create tbl_temp_journaluploadmaster deepak kumar 10-04-2009 */ mysql_query("CREATE TABLE `tbl_temp_journaluploadmaster` ( `ImportJournlList_ID` int(10) default NULL, `I_JournalID` int(10) unsigned NOT NULL auto_increment, `V_Journal_Name` varchar(200) default NULL, `D_JournalDate` varchar(100) default NULL, `Start_Time` time default NULL, `End_Time` time default NULL, `V_Description` varchar(200) default NULL, `ProjectID` varchar(100) default NULL, `V_JournalType` varchar(100) default NULL, `ACOID` varchar(50) default NULL, `CreatedBy` varchar(200) default NULL, `ListImportStatus` int(1) default '0', `Status` int(1) default '1', `FailureReason` varchar(250) default NULL, PRIMARY KEY (`I_JournalID`));"); /* End */ /* Create tbl_mst_import_journal deepak kumar 10-04-2009 */ mysql_query("CREATE TABLE `tbl_mst_import_journal` ( `Import_Id` int(10) NOT NULL auto_increment, `Import_By` varchar(200) default NULL, `DateOfImport` date default NULL, `File_name` varchar(200) default NULL, `Actualfilename` varchar(200) default NULL, PRIMARY KEY (`Import_Id`) );"); /* End */ /* Create tbl_mst_campaign_newexection deepak kumar 10-04-2009 */ mysql_query("CREATE TABLE `tbl_mst_campaign_newexection` ( `I_CampaignID` int(10) NOT NULL, `I_InstanceID` int(10) NOT NULL, `I_ExecutedBy` varchar(100) default NULL, `I_ExecutedOn` datetime default NULL, `I_Content` text, `U_UserFile` varchar(200) default NULL, `V_Subject` varchar(250) default NULL, PRIMARY KEY (`I_CampaignID`,`I_InstanceID`));"); /* End */ /* Create tbl_mst_group_cat_prolist deepak kumar 05-05-2009 */ mysql_query("CREATE TABLE `tbl_mst_group_cat_prolist` ( `I_GROUPCATPRODUCTID` int(10) NOT NULL auto_increment, `D_GropucatproductCreationDate` date default NULL, `I_GropucatproductCreatedBy` varchar(100) default NULL, `I_GropucatproductStatus` int(1) default '1', `UploadFile` varchar(200) default NULL, `RenameFile` varchar(200) default NULL, PRIMARY KEY (`I_GROUPCATPRODUCTID`) );"); /* End */ /* Create tbl_mst_group_cat_prolist deepak kumar 05-05-2009 */ mysql_query("CREATE TABLE `tbl_temp_groupcate` ( `I_GCPID` int(10) NOT NULL auto_increment, `I_GROUPCATPRODUCTID` int(20) default NULL COMMENT 'list id from tbl_mst_leadlist', `V_Group` varchar(200) default NULL, `V_Category` varchar(200) default NULL, `V_Product` varchar(200) default NULL, `V_Price` varchar(200) default NULL, `I_GCPStatus` int(10) default '1', `CreatedBy` varchar(200) default NULL, `ImportGCP_Status` int(10) default '0', `FailedImportReason` varchar(200) default 'NULL', `I_ActualGCPID` int(10) default NULL, `v_productdesc` blob, PRIMARY KEY (`I_GCPID`) );"); /* End */ mysql_query("CREATE TABLE IF NOT EXISTS $database.`tbl_wrapcallinfo` ( `I_WrapID` int(10) NOT NULL AUTO_INCREMENT, `I_CustID` int(10) DEFAULT NULL, `D_Startdatetime` datetime DEFAULT NULL, `D_enddatetime` varchar(100) DEFAULT NULL, `I_Status` int(10) DEFAULT '1', `v_Filename` varchar(120) DEFAULT NULL, `V_SessionID` varchar(100) , PRIMARY KEY (`I_WrapID`) );"); /* creating tmpquotationcart 1-12-2008 */ mysql_query("CREATE TABLE `tbl_mst_logo` ( `id` int(10) NOT NULL default '1', `userfile` varchar(200) default NULL, PRIMARY KEY (`id`));"); $smsstring="Dear"." ".$V_FirstName."."." "."Login to ensembler.com using username"." ".$V_EmailId; $smstring=$smsstring.","."Password"." ".$V_FirstName.".Thank You."; $sms_timestamp=date("Y-m-d H:i:s"); $sql_sms="insert into $dbname.tbl_smsmessages(v_mobileNo,v_smsString,d_timestamp,d_lastTriedAt,i_MaxRetries,i_status,v_Category,i_retries) values('$V_MobileNo','$smstring','$sms_timestamp','$sms_timestamp','5','1','ALLNCE','1');"; //print $sql_sms."
"; $res_sms=mysql_query($sql_sms); mysql_query("CREATE TABLE IF NOT EXISTS $dbname.`tbl_wrapcallinfo` ( `I_WrapID` int(10) NOT NULL AUTO_INCREMENT, `I_CustID` int(10) DEFAULT NULL, `D_Startdatetime` datetime DEFAULT NULL, `D_enddatetime` varchar(100) DEFAULT NULL, `I_Status` int(10) DEFAULT '1', `v_Filename` varchar(120) DEFAULT NULL, PRIMARY KEY (`I_WrapID`) );"); ################### mysql_query("CREATE TABLE `tbl_message_master` ( `IID` int(10) NOT NULL auto_increment, `I_ContactId` int(10) default NULL, `V_CreatedBY` varchar(100) default NULL, `V_UMS_Type` varchar(50) default NULL, `datetime` datetime default NULL, `V_Account_Name` varchar(150) default NULL, PRIMARY KEY (`IID`) );"); mysql_query("CREATE TABLE `tbl_message_sms_ums` ( `I_ID` int(10) NOT NULL auto_increment, `I_ContactId` int(50) default NULL, `I_MobileNumber` varchar(150) default NULL, `V_Content` blob, `V_Type` varchar(50) default NULL, `V_AccountName` varchar(150) default NULL, `V_CreatedBY` varchar(150) default NULL, `Date` datetime default NULL, `I_Status` int(10) default '1', PRIMARY KEY (`I_ID`) ); "); mysql_query("CREATE TABLE `tbl_message_email_ums` ( `I_IDEMAIL` int(10) NOT NULL auto_increment, `I_ContactId` int(10) default NULL, `V_Emailto` varchar(150) default NULL, `V_EmailFrom` varchar(150) default NULL, `V_Subject` varchar(100) default NULL, `V_BodyMessage` blob, `V_Type` varchar(50) default NULL, `V_Attachment` varchar(100) default NULL, `AccountName` varchar(150) default NULL, `Date` datetime default NULL, `V_CreatedBY` varchar(150) default NULL, `I_Status` int(10) default '1', PRIMARY KEY (`I_IDEMAIL`) );"); ########################### mysql_query("CREATE TABLE `tbl_mst_tax_forms` ( `I_FormID` int(11) NOT NULL auto_increment, `V_FormName` varchar(100) default NULL, `I_Status` int(11) default '1', PRIMARY KEY (`I_FormID`) );"); /* Create smtp_email_auth Abhishek Baranwal 17-09-2009 */ mysql_query("CREATE TABLE `smtp_email_auth` ( `rid` int(11) NOT NULL auto_increment, `nsmtp` varchar(255) default NULL, `nport` varchar(10) default NULL, `nusername` varchar(50) default NULL, `npassword` varchar(50) default NULL, `Createdby` varchar(50) default NULL, `Created_date` datetime default NULL, PRIMARY KEY (`rid`) );"); // insert data in smtp_email_auth Abhishek Baranwal 17-09-2009 mysql_query("INSERT INTO `smtp_email_auth` (`rid` , `nsmtp`, `nport` ) VALUES ('1','smtp','25');"); $subject = $subject1; $headers = "MIME-Version: 1.0\r\n"; $headers.= "Content-type: text/html; charset=iso-8859-1\r\n"; $body=""; $body=$body."
"; $body=$body." "; $body=$body." "; $body=$body."Welcome to www.ensembler.com."; /*$body=$body."Your Password Is Enclosed.";*/ $body=$body." "; $body=$body.""."Dear  ".$V_FirstName; $body=$body.""; //$body=$body.""; $body=$body.""; $body=$body.""; $body=$body.""; $body=$body.""; $body=$body."
"."".$messagedk; $body=$body."
 
"."".$messagedk1; $body=$body."
"."".$message11; $body=$body."
 
"."".$message1; $body=$body."
 
"."".$message9; $body=$body."
"."".$message2; $body=$body."
"."".$message1211; // comment : Ritu Gupta $body=$body."
 
"."".$message3; $body=$body."
"."".$message4; $body=$body."
"."".$message5; $body=$body."
"."".$message6; $body=$body."
"."".$message7; $body=$body."
"."".$message8; $body=$body."
 
"; #MAIL FUNCTION $ok_mail=mailcompose($to,$subject,$body,$headers,$from); $message="



Mail Successfully Sent!

"; ################################################################################################## //$from = $to ; # Email id of the sender :: The person who registers. $to_dk = $superadmin_emailid; # Email id of the super admin who will receive a notification on registration. Defined in setup.php. $adminsubject=$g_registration_admin_sub.$V_CompanyName; $subject1 = "Customer Create on successfully or unsuccessfully registration Message"; $subject = $adminsubject; $headers = "MIME-Version: 1.0\r\n"; $headers.= "Content-type: text/html; charset=iso-8859-1\r\n"; $body=""; $body=$body."
"; $body=$body." "; $body=$body." "; $body=$body." Welcome to www.ensembler.com"; $body=$body." "; $body=$body.""; $body=$body."".$message16; $body=$body.""; $body=$body.""; $body=$body.""; $body=$body.""; $body=$body.""; $body=$body.""; $body=$body.""; $body=$body.""; $body=$body.""; $body=$body.""; $body=$body.""; $body=$body.""; $body=$body."
 
 
"."".$message17; $body=$body."
 
"."".$message18; $body=$body."
 
"."".$message19; $body=$body."
 
"."".$message20; $body=$body."
 
"."".$message23; $body=$body."
 
"."".$message21; $body=$body."
 
"."".$message22; $body=$body."
 
"."".$message201; $body=$body."
 
"."".$message211; $body=$body."
 
"."".$message221; $body=$body."
 
"; //print_r($body); #MAIL FUNCTION $ok_mail=mailcompose($to_dk,$subject,$body,$headers,$from); ?>login or forgot password"; } } //$veri_msg='Verification Code is valid proceed the message'; $veri_msg=''; #----------------end of insert---------------------------------------------------------------------- ?> Ensembler-Signup

Welcome to ENSEMBLER

Ensembler provides a fully integrated package for Sales Force Automation, Customer Relationship Management and Helpdesk Management Inventory.


GROW YOUR BUSINESS

Get 1000 new prospects in 60 days!
Are you ready to explore how?
India’s first telephony enabled, consulting driven cloud CRM.

CHOOSE ENSEMBLER

Your search for the perfect solution ends here. Just start a guided demo and you will realize how robust yet simple the solution is. It's the easiest way to help you grow your business.

HELP US HELP YOU

We would love to work with you and put together a marketing strategy which has a lasting effect on your business. Lets do something amazing together. India’s first telephony enabled, consulting driven cloud CRM.

Sign up for Free Trial

I agree to the Ensembler agreement