<?php

include('include/database/PearDatabase.php');
require_once('config.php');
$dbconn = new PearDatabase("mysql",$dbconfig['db_host_name'],$dbconfig['db_name'],$dbconfig['db_user_name'],$dbconfig['db_password']);
$dbconn->connect();

//Leads leadsource
$query="delete from leadsource";
$dbconn->query($query);
$query="insert into leadsource values('','--无--',0,1)";
$dbconn->query($query);
$query="insert into leadsource values('','广告',1,1)";
$dbconn->query($query);
$query="insert into leadsource values('','员工推荐',2,1)";
$dbconn->query($query);
$query="insert into leadsource values('','外部推荐',3,1)";
$dbconn->query($query);
$query="insert into leadsource values('','合作伙伴',4,1)";
$dbconn->query($query);
$query="insert into leadsource values('','公共关系',5,1)";
$dbconn->query($query);
$query="insert into leadsource values('','研讨会-内部',6,1)";
$dbconn->query($query);
$query="insert into leadsource values('','研讨会-合作伙伴',7,1)";
$dbconn->query($query);
$query="insert into leadsource values('','展览会',8,1)";
$dbconn->query($query);
$query="insert into leadsource values('','web',9,1)";
$dbconn->query($query);
$query="insert into leadsource values('','口头推荐',10,1)";
$dbconn->query($query);
$query="insert into leadsource values('','其他',11,1)";
$dbconn->query($query);
//Leads salutationtype
$query="delete from salutationtype";
$dbconn->query($query);
$query="insert into salutationtype values('','--无--',0,1)";
$dbconn->query($query);
$query="insert into salutationtype values('','先生',1,1)";
$dbconn->query($query);
$query="insert into salutationtype values('','女士',2,1)";
$dbconn->query($query);
$query="insert into salutationtype values('','夫人',3,1)";
$dbconn->query($query);
$query="insert into salutationtype values('','博士',4,1)";
$dbconn->query($query);
$query="insert into salutationtype values('','教授',5,1)";
$dbconn->query($query);
//Leads leadstatus
$query="delete from leadstatus";
$dbconn->query($query);
$query="insert into leadstatus values('','--无--',0,1)";
$dbconn->query($query);
$query="insert into leadstatus values('','已联系',1,1)";
$dbconn->query($query);
$query="insert into leadstatus values('','未处理',2,1)";
$dbconn->query($query);
$query="insert into leadstatus values('','合格',3,1)";
$dbconn->query($query);
$query="insert into leadstatus values('','不合格',4,1)";
$dbconn->query($query);
//Leads industry
$query="delete from industry";
$dbconn->query($query);
$query="insert into industry values('','--无--',0,1)";
$dbconn->query($query);
$query="insert into industry values('','农业',1,1)";
$dbconn->query($query);
$query="insert into industry values('','服装',2,1)";
$dbconn->query($query);
$query="insert into industry values('','银行',3,1)";
$dbconn->query($query);
$query="insert into industry values('','生物技术',4,1)";
$dbconn->query($query);
$query="insert into industry values('','化学',5,1)";
$dbconn->query($query);
$query="insert into industry values('','通讯',6,1)";
$dbconn->query($query);
$query="insert into industry values('','建筑',7,1)";
$dbconn->query($query);
$query="insert into industry values('','咨询',8,1)";
$dbconn->query($query);
$query="insert into industry values('','教育',9,1)";
$dbconn->query($query);
$query="insert into industry values('','电子',10,1)";
$dbconn->query($query);
$query="insert into industry values('','能源',11,1)";
$dbconn->query($query);
$query="insert into industry values('','工程',12,1)";
$dbconn->query($query);
$query="insert into industry values('','娱乐',13,1)";
$dbconn->query($query);
$query="insert into industry values('','环境',14,1)";
$dbconn->query($query);
$query="insert into industry values('','金融',15,1)";
$dbconn->query($query);
$query="insert into industry values('','食品与饮料',16,1)";
$dbconn->query($query);
$query="insert into industry values('','政府',17,1)";
$dbconn->query($query);
$query="insert into industry values('','卫生保健',18,1)";
$dbconn->query($query);
$query="insert into industry values('','酒店',19,1)";
$dbconn->query($query);
$query="insert into industry values('','保险',20,1)";
$dbconn->query($query);
$query="insert into industry values('','机械',21,1)";
$dbconn->query($query);
$query="insert into industry values('','制造',22,1)";
$dbconn->query($query);
$query="insert into industry values('','媒体',23,1)";
$dbconn->query($query);
$query="insert into industry values('','非盈利事业',24,1)";
$dbconn->query($query);
$query="insert into industry values('','其他',25,1)";
$dbconn->query($query);
$query="insert into industry values('','休闲娱乐',26,1)";
$dbconn->query($query);
$query="insert into industry values('','零售',27,1)";
$dbconn->query($query);
$query="insert into industry values('','航运',28,1)";
$dbconn->query($query);
$query="insert into industry values('','技术',29,1)";
$dbconn->query($query);
$query="insert into industry values('','电信',30,1)";
$dbconn->query($query);
$query="insert into industry values('','运输',31,1)";
$dbconn->query($query);
$query="insert into industry values('','公用事业',32,1)";
$dbconn->query($query);
//Leads rating
$query="delete from rating";
$dbconn->query($query);
$query="insert into rating values('','--无--',0,1)";
$dbconn->query($query);
$query="insert into rating values('','高',1,1)";
$dbconn->query($query);
$query="insert into rating values('','较高',2,1)";
$dbconn->query($query);
$query="insert into rating values('','低',3,1)";
$dbconn->query($query);
//Accounts accounttype
$query="delete from accounttype";
$dbconn->query($query);
$query="insert into accounttype values('','--无--',0,1)";
$dbconn->query($query);
$query="insert into accounttype values('','分析师',1,1)";
$dbconn->query($query);
$query="insert into accounttype values('','竞争者',2,1)";
$dbconn->query($query);
$query="insert into accounttype values('','客户',3,1)";
$dbconn->query($query);
$query="insert into accounttype values('','集成商',4,1)";
$dbconn->query($query);
$query="insert into accounttype values('','投资者',5,1)";
$dbconn->query($query);
$query="insert into accounttype values('','合作伙伴',6,1)";
$dbconn->query($query);
$query="insert into accounttype values('','新闻媒体',7,1)";
$dbconn->query($query);
$query="insert into accounttype values('','潜在客户',8,1)";
$dbconn->query($query);
$query="insert into accounttype values('','转售商',9,1)";
$dbconn->query($query);
$query="insert into accounttype values('','其他',10,1)";
$dbconn->query($query);
//Potentials opportunity_type
$query="delete from opportunity_type";
$dbconn->query($query);
$query="insert into opportunity_type values('','现有业务',0,1)";
$dbconn->query($query);
$query="insert into opportunity_type values('','新业务',1,1)";
$dbconn->query($query);
//Potentials opportunity_type
$query="delete from opportunity_type";
$dbconn->query($query);
$query="insert into opportunity_type values('','现有业务',0,1)";
$dbconn->query($query);
$query="insert into opportunity_type values('','新业务',1,1)";
$dbconn->query($query);
//Potentials currency
$query="delete from currency";
$dbconn->query($query);
$query="insert into currency values('','人民币',0,1)";
$dbconn->query($query);
$query="insert into currency values('','美元',1,1)";
$dbconn->query($query);
$query="insert into currency values('','欧元',2,1)";
$dbconn->query($query);
//Potentials sales_stage
$query="delete from sales_stage";
$dbconn->query($query);
$query="insert into sales_stage values('','--无--',0,1)";
$dbconn->query($query);
$query="insert into sales_stage values('','发现机会',1,1)";
$dbconn->query($query);
$query="insert into sales_stage values('','验证机会',2,1)";
$dbconn->query($query);
$query="insert into sales_stage values('','需分析',3,1)";
$dbconn->query($query);
$query="insert into sales_stage values('','价值说明',4,1)";
$dbconn->query($query);
$query="insert into sales_stage values('','确定决策者',5,1)";
$dbconn->query($query);
$query="insert into sales_stage values('','认知分析',6,1)";
$dbconn->query($query);
$query="insert into sales_stage values('','建议报价',7,1)";
$dbconn->query($query);
$query="insert into sales_stage values('','谈判审核',8,1)";
$dbconn->query($query);
$query="insert into sales_stage values('','中标，已结业务',9,1)";
$dbconn->query($query);
$query="insert into sales_stage values('','客户流失，已结业务',10,1)";
$dbconn->query($query);
//HelpDesk ticketpriorities
$query="delete from ticketpriorities";
$dbconn->query($query);
$query="insert into ticketpriorities values('','低',0,1)";
$dbconn->query($query);
$query="insert into ticketpriorities values('','正常',1,1)";
$dbconn->query($query);
$query="insert into ticketpriorities values('','高',2,1)";
$dbconn->query($query);
$query="insert into ticketpriorities values('','重要',3,1)";
$dbconn->query($query);
//HelpDesk ticketseverities
$query="delete from ticketseverities";
$dbconn->query($query);
$query="insert into ticketseverities values('','次要',0,1)";
$dbconn->query($query);
$query="insert into ticketseverities values('','主要',1,1)";
$dbconn->query($query);
$query="insert into ticketseverities values('','特性',2,1)";
$dbconn->query($query);
$query="insert into ticketseverities values('','严重',3,1)";
$dbconn->query($query);
//HelpDesk ticketstatus
$query="delete from ticketstatus";
$dbconn->query($query);
$query="insert into ticketstatus values('','打开',0,1)";
$dbconn->query($query);
$query="insert into ticketstatus values('','进行中',1,1)";
$dbconn->query($query);
$query="insert into ticketstatus values('','等待确认',2,1)";
$dbconn->query($query);
$query="insert into ticketstatus values('','已修复',3,1)";
$dbconn->query($query);
$query="insert into ticketstatus values('','关闭',4,1)";
$dbconn->query($query);
//HelpDesk ticketcategories
$query="delete from ticketcategories";
$dbconn->query($query);
$query="insert into ticketcategories values('','大问题',0,1)";
$dbconn->query($query);
$query="insert into ticketcategories values('','小问题',1,1)";
$dbconn->query($query);
$query="insert into ticketcategories values('','其它问题',2,1)";
$dbconn->query($query);
//HelpDesk faqcategories
$query="delete from faqcategories";
$dbconn->query($query);
$query="insert into faqcategories values('','一般问题',0,1)";
$dbconn->query($query);
$query="insert into faqcategories values('','常见问题',1,1)";
$dbconn->query($query);
//Products manufacturer
$query="delete from manufacturer";
$dbconn->query($query);
$query="insert into manufacturer values('','--无--',0,1)";
$dbconn->query($query);
$query="insert into manufacturer values('','C3CRM Inc.',1,1)";
$dbconn->query($query);
$query="insert into manufacturer values('','IBM Inc.',2,1)";
$dbconn->query($query);
$query="insert into manufacturer values('','HP Inc.',3,1)";
$dbconn->query($query);
//Products productcategory
$query="delete from productcategory";
$dbconn->query($query);
$query="insert into productcategory values('','--无--',0,1)";
$dbconn->query($query);
$query="insert into productcategory values('','硬件',1,1)";
$dbconn->query($query);
$query="insert into productcategory values('','软件',2,1)";
$dbconn->query($query);
$query="insert into productcategory values('','CRM系统',3,1)";
$dbconn->query($query);
//Products usageunit
$query="delete from usageunit";
$dbconn->query($query);
$query="insert into usageunit values('','套',0,1)";
$dbconn->query($query);
$query="insert into usageunit values('','包',1,1)";
$dbconn->query($query);
$query="insert into usageunit values('','公斤',2,1)";
$dbconn->query($query);
$query="insert into usageunit values('','吨',3,1)";
$dbconn->query($query);
$query="insert into usageunit values('','米',4,1)";
$dbconn->query($query);
$query="insert into usageunit values('','小时',5,1)";
$dbconn->query($query);
//Products taxclass
$query="delete from taxclass";
$dbconn->query($query);
$query="insert into taxclass values('','营业税',0,1)";
$dbconn->query($query);
$query="insert into taxclass values('','增值税',1,1)";
$dbconn->query($query);
//Products glacct
$query="delete from glacct";
$dbconn->query($query);
$query="insert into glacct values('','300-Sales-Software',0,1)";
$dbconn->query($query);
$query="insert into glacct values('','301-Sales-Hardware',1,1)";
$dbconn->query($query);
$query="insert into glacct values('','302-Rental-Income',2,1)";
$dbconn->query($query);
$query="insert into glacct values('','303-Interest-Income',3,1)";
$dbconn->query($query);
$query="insert into glacct values('','304-Sales-Software-Support',4,1)";
$dbconn->query($query);
$query="insert into glacct values('','305-Sales Other',5,1)";
$dbconn->query($query);
$query="insert into glacct values('','306-Internet Sales',6,1)";
$dbconn->query($query);
$query="insert into glacct values('','307-Service-Hardware Labor',7,1)";
$dbconn->query($query);
$query="insert into glacct values('','308-Sales-Books',8,1)";
$dbconn->query($query);
//Events eventstatus
$query="delete from eventstatus";
$dbconn->query($query);
$query="insert into eventstatus values('','已约定',0,1)";
$dbconn->query($query);
$query="insert into eventstatus values('','已挂起',1,1)";
$dbconn->query($query);
$query="insert into eventstatus values('','未挂起',2,1)";
$dbconn->query($query);
//Activities taskstatus
$query="delete from taskstatus";
$dbconn->query($query);
$query="insert into taskstatus values('','未开始',0,1)";
$dbconn->query($query);
$query="insert into taskstatus values('','进行中',1,1)";
$dbconn->query($query);
$query="insert into taskstatus values('','已完成',2,1)";
$dbconn->query($query);
$query="insert into taskstatus values('','正在等待其他人',3,1)";
$dbconn->query($query);
$query="insert into taskstatus values('','已推迟',4,1)";
$dbconn->query($query);
//Activities taskpriority
$query="delete from taskpriority";
$dbconn->query($query);
$query="insert into taskpriority values('','高',0,1)";
$dbconn->query($query);
$query="insert into taskpriority values('','中',1,1)";
$dbconn->query($query);
$query="insert into taskpriority values('','低',2,1)";
$dbconn->query($query);
//Quotes quotestage
$query="delete from quotestage";
$dbconn->query($query);
$query="insert into quotestage values('','已创建',0,1)";
$dbconn->query($query);
$query="insert into quotestage values('','已发送',1,1)";
$dbconn->query($query);
$query="insert into quotestage values('','已审核',2,1)";
$dbconn->query($query);
$query="insert into quotestage values('','已接受',3,1)";
$dbconn->query($query);
$query="insert into quotestage values('','已拒绝',4,1)";
$dbconn->query($query);
//Rss rsscategory
$query="delete from rsscategory";
$dbconn->query($query);
$query="insert into rsscategory values('','热门',0,1)";
$dbconn->query($query);
$query="insert into rsscategory values('','IT',1,1)";
$dbconn->query($query);
echo "<BR> <BR>";
echo "<font color=red><center> *** DataBase Successfully modified!!!  *** </center></font>";
?>