diff --git a/db/cats_demo_data.sql b/db/cats_demo_data.sql
new file mode 100644
index 000000000..2812f40d0
--- /dev/null
+++ b/db/cats_demo_data.sql
@@ -0,0 +1,200 @@
+-- Demo seed data for current OpenCATS schema.
+-- Load this file only after db/cats_schema.sql.
+
+INSERT INTO `activity` (`activity_id`,`data_item_id`,`data_item_type`,`joborder_id`,`site_id`,`entered_by`,`date_created`,`type`,`notes`,`date_modified`) VALUES
+('1','52','100','3','1','1','2007-01-14 14:30:26','100','Status change: Contacted','2007-01-14 14:30:26'),
+('2','68','100','3','1','1','2007-01-14 14:31:00','100','Status change: Contacted','2007-01-14 14:31:00'),
+('3','61','100','3','1','1','2007-01-16 14:31:43','100','Status change: Qualifying','2007-01-16 14:31:43'),
+('4','20','100','3','1','1','2007-01-15 14:32:03','100','Status change: Interviewing','2007-01-15 14:32:03'),
+('5','52','100','3','1','1','2007-01-16 14:32:45','100','Status change: Interviewing','2007-01-16 14:32:45'),
+('6','37','100','3','1','1','2007-01-17 14:33:05','100','Status change: Offered','2007-01-17 14:33:05'),
+('7','35','100','1','1','1','2007-01-17 15:14:23','100','Status change: Submitted. She\'s awesome! Submitting at 65.00/hr.','2007-01-17 15:14:23'),
+('8','56','100','2','1','1','2007-01-17 15:16:05','100','Status change: Submitted. Submitting at 98k.','2007-01-17 15:16:05');
+
+INSERT INTO `candidate` (`candidate_id`,`site_id`,`last_name`,`first_name`,`phone_home`,`phone_cell`,`phone_work`,`address2`,`city`,`state`,`zip`,`source`,`date_available`,`can_relocate`,`notes`,`key_skills`,`current_employer`,`entered_by`,`owner`,`date_created`,`date_modified`,`email1`,`email2`,`web_site`,`import_id`,`is_hot`) VALUES
+('1','1','Normand','Silas','954-530-9466','0','0','0','Pompano Beach','FL','33060','(none)','2005-01-01 00:00:00','1','0','C++, Java,, MySQL','0','1','1','2007-01-17 13:41:32','2007-01-17 13:41:32','Silas.M.Normand@mytrashmail.com','0','0','0','0'),
+('2','1','Jordan','Christine','212-831-4979','0','0','0','New York','NY','10029','0','2005-01-01 00:00:00','0','0','0','0','1','1','2007-01-16 13:56:25','2007-01-16 13:56:25','Christine.J.Jordan@mailinator.com','0','0','0','0'),
+('3','1','Jordan','Christine','212-831-4979','0','0','0','New York','NY','10029','0','2005-01-01 00:00:00','0','0','0','0','1','1','2007-01-16 13:57:00','2007-01-16 13:57:00','Christine.J.Jordan@mailinator.com','0','0','0','0'),
+('4','1','Johnson','Thomas','773-227-0465','0','0','0','Chicago','IL','60647','0','2005-01-01 00:00:00','0','0','0','0','1','1','2007-01-16 13:57:00','2007-01-16 13:57:00','Thomas.K.Johnson@pookmail.com','0','0','0','0'),
+('5','1','Mccluskey','Dale','805-935-1390','0','0','0','San Luis Obispo','CA','93401','0','2005-01-01 00:00:00','0','0','0','0','1','1','2007-01-16 13:57:00','2007-01-16 13:57:00','Dale.R.Mccluskey@mytrashmail.com','0','0','0','0'),
+('6','1','Stephens','Walter','614-720-0909','0','0','0','Columbus','OH','43223','0','2005-01-01 00:00:00','0','0','0','0','1','1','2007-01-15 13:57:00','2007-01-15 13:57:00','Walter.S.Stephens@mailinator.com','0','0','0','0'),
+('7','1','Gallardo','Larry','610-827-3984','0','0','0','Chester Springs','PA','19425','0','2005-01-01 00:00:00','0','0','0','0','1','1','2007-01-15 13:57:00','2007-01-15 13:57:00','Larry.J.Gallardo@mailinator.com','0','0','0','0'),
+('8','1','Sanchez','Danny','253-222-4881','0','0','0','Tacoma','WA','98402','0','2005-01-01 00:00:00','0','0','0','0','1','1','2007-01-15 13:57:00','2007-01-15 13:57:00','Danny.F.Sanchez@mailinator.com','0','0','0','0'),
+('9','1','Martin','Judith','920-226-2907','0','0','0','New Berlin','WI','53151','0','2005-01-01 00:00:00','0','0','0','0','1','1','2007-01-14 13:57:00','2007-01-14 13:57:00','Judith.M.Martin@spambob.com','0','0','0','0'),
+('10','1','Keith','Melinda','662-793-5056','0','0','0','Shuqualak','MS','39361','0','2005-01-01 00:00:00','0','0','0','0','1','1','2007-01-14 13:57:00','2007-01-14 13:57:00','Melinda.R.Keith@pookmail.com','0','0','0','0'),
+('11','1','Hensley','Sonia','276-259-5548','0','0','0','Dwight','VA','24614','0','2005-01-01 00:00:00','0','0','0','0','1','1','2007-01-14 13:57:00','2007-01-14 13:57:00','Sonia.N.Hensley@mytrashmail.com','0','0','0','0'),
+('12','1','Manning','Mary','660-542-1333','0','0','0','Carrollton','MO','64633','0','2005-01-01 00:00:00','0','0','0','0','1','1','2007-01-14 13:57:00','2007-01-14 13:57:00','Mary.J.Manning@pookmail.com','0','0','0','0'),
+('13','1','Hegland','Richard','281-947-8583','0','0','0','Houston','TX','77060','0','2005-01-01 00:00:00','0','0','0','0','1','1','2007-01-13 13:57:00','2007-01-13 13:57:00','Richard.A.Hegland@pookmail.com','0','0','0','0'),
+('14','1','Beer','Christopher','360-540-9573','0','0','0','Bothell','WA','98011','0','2005-01-01 00:00:00','0','0','0','0','1','1','2007-01-13 13:57:00','2007-01-13 13:57:00','Christopher.K.Beer@pookmail.com','0','0','0','0'),
+('15','1','Benham','Curt','626-500-9533','0','0','0','Los Angeles','CA','90017','0','2005-01-01 00:00:00','0','0','0','0','1','1','2007-01-13 13:57:00','2007-01-13 13:57:00','Curt.K.Benham@mytrashmail.com','0','0','0','0'),
+('16','1','Groce','Clinton','832-492-1380','0','0','0','Houston','TX','77063','0','2005-01-01 00:00:00','0','0','0','0','1','1','2007-01-13 13:57:00','2007-01-13 13:57:00','Clinton.I.Groce@dodgeit.com','0','0','0','0'),
+('17','1','Howley','Michael','906-343-6813','0','0','0','Sand River','MI','49822','0','2005-01-01 00:00:00','0','0','0','0','1','1','2007-01-13 13:57:00','2007-01-13 13:57:00','Michael.M.Howley@mailinator.com','0','0','0','0'),
+('18','1','Liu','Elizabeth','989-269-7943','0','0','0','Bad Axe','MI','48413','0','2005-01-01 00:00:00','0','0','0','0','1','1','2007-01-14 13:57:00','2007-01-14 13:57:00','Elizabeth.C.Liu@pookmail.com','0','0','0','0'),
+('19','1','Orosco','David','304-231-5787','0','0','0','Wheeling','WV','26003','0','2005-01-01 00:00:00','0','0','0','0','1','1','2007-01-14 13:57:00','2007-01-14 13:57:00','David.I.Orosco@spambob.com','0','0','0','0'),
+('20','1','Gregg','Maria','209-880-4429','0','0','0','Stockton','CA','95204','0','2005-01-01 00:00:00','0','0','0','0','1','1','2007-01-14 13:57:00','2007-01-17 14:32:03','Maria.T.Gregg@spambob.com','0','0','0','0'),
+('21','1','Hoffman','Evelyn','440-693-2886','0','0','0','Mesopotamia','OH','44439','0','2005-01-01 00:00:00','0','0','0','0','1','1','2007-01-12 13:57:00','2007-01-12 13:57:00','Evelyn.M.Hoffman@spambob.com','0','0','0','0'),
+('22','1','Byington','Lillian','706-548-9989','0','0','0','Athens','GA','30601','0','2005-01-01 00:00:00','0','0','0','0','1','1','2007-01-12 13:57:00','2007-01-12 13:57:00','Lillian.J.Byington@spambob.com','0','0','0','0'),
+('23','1','Nale','Denise','509-364-3524','0','0','0','Glenwood','WA','98619','0','2005-01-01 00:00:00','0','0','0','0','1','1','2007-01-14 13:57:00','2007-01-14 13:57:00','Denise.J.Nale@pookmail.com','0','0','0','0'),
+('24','1','Steele','Margaret','603-868-7799','0','0','0','Durham','NH','03824','0','2005-01-01 00:00:00','0','0','0','0','1','1','2007-01-15 13:57:00','2007-01-15 13:57:00','Margaret.A.Steele@mytrashmail.com','0','0','0','0'),
+('25','1','Milligan','Sherry','908-883-4070','0','0','0','Rochelle Park','NJ','07662','0','2005-01-01 00:00:00','0','0','0','0','1','1','2007-01-15 13:57:00','2007-01-15 13:57:00','Sherry.K.Milligan@mailinator.com','0','0','0','0'),
+('26','1','Cobb','Romeo','212-668-6127','0','0','0','New York','NY','10004','0','2005-01-01 00:00:00','0','0','0','0','1','1','2007-01-15 13:57:00','2007-01-15 13:57:00','Romeo.A.Cobb@mytrashmail.com','0','0','0','0'),
+('27','1','Paul','Erma','415-662-8179','0','0','0','Nicasio','CA','94946','0','2005-01-01 00:00:00','0','0','0','0','1','1','2007-01-15 13:57:00','2007-01-15 13:57:00','Erma.R.Paul@dodgeit.com','0','0','0','0'),
+('28','1','Robinson','Keith','641-581-8304','0','0','0','Forest City Rural','IA','50436','0','2005-01-01 00:00:00','0','0','0','0','1','1','2007-01-15 13:57:00','2007-01-15 13:57:00','Keith.M.Robinson@pookmail.com','0','0','0','0'),
+('29','1','Maynard','Leonard','218-543-4964','0','0','0','Ideal Corners','MN','56442','0','2005-01-01 00:00:00','0','0','0','0','1','1','2007-01-15 13:57:00','2007-01-15 13:57:00','Leonard.A.Maynard@mailinator.com','0','0','0','0'),
+('30','1','Ponce','Paula','415-265-3029','0','0','0','San Francisco','CA','94107','0','2005-01-01 00:00:00','0','0','0','0','1','1','2007-01-15 13:57:00','2007-01-15 13:57:00','Paula.E.Ponce@mailinator.com','0','0','0','0'),
+('31','1','Reeves','Mitchell','410-763-9118','0','0','0','Easton','MD','21601','0','2005-01-01 00:00:00','0','0','0','0','1','1','2007-01-16 13:57:00','2007-01-16 13:57:00','Mitchell.D.Reeves@mailinator.com','0','0','0','0'),
+('32','1','Harrell','Becky','212-268-4563','0','0','0','New York','NY','10018','0','2005-01-01 00:00:00','0','0','0','0','1','1','2007-01-15 13:57:00','2007-01-15 13:57:00','Becky.F.Harrell@mytrashmail.com','0','0','0','0'),
+('33','1','Perez','William','320-326-3196','0','0','0','Saint Cloud','MN','56301','0','2005-01-01 00:00:00','0','0','0','0','1','1','2007-01-17 13:57:00','2007-01-17 13:57:00','William.J.Perez@mailinator.com','0','0','0','0'),
+('34','1','Gilliam','Alex','619-313-3532','0','0','0','San Diego','CA','92121','Monster','2005-01-01 00:00:00','1','0','JSP, Apache, WebSphere','Wal-Mart','1','1','2007-01-17 13:57:00','2007-01-17 14:06:56','Alex.S.Gilliam@spambob.com','0','0','0','1'),
+('35','1','Johnson','Sherry','804-405-3668','0','0','0','Glen Allen','VA','23060','0','2005-01-01 00:00:00','0','0','0','0','1','1','2007-01-17 13:57:00','2007-01-17 15:14:23','Sherry.L.Johnson@pookmail.com','0','0','0','0'),
+('36','1','Rodriquez','Tracy','641-696-7658','0','0','0','Plymouth','IA','50464','0','2005-01-01 00:00:00','0','0','0','0','1','1','2007-01-17 13:57:00','2007-01-17 13:57:00','Tracy.J.Rodriquez@spambob.com','0','0','0','0'),
+('37','1','Burton','Robert','614-519-0928','0','0','0','Columbus','OH','43215','Monster','2005-01-01 00:00:00','0','0','SQL Server, T-SQL','0','1','1','2007-01-17 13:57:00','2007-01-17 14:33:05','Robert.A.Burton@spambob.com','0','0','0','0'),
+('38','1','Murphy','Louis','724-834-1737','0','0','0','Greensburg','PA','15601','0','2005-01-01 00:00:00','0','0','0','0','1','1','2007-01-17 13:57:00','2007-01-17 13:57:00','Louis.R.Murphy@spambob.com','0','0','0','0'),
+('39','1','Love','Patrick','304-449-6519','0','0','0','Fairview','WV','26570','0','2005-01-01 00:00:00','0','0','0','0','1','1','2007-01-13 13:57:00','2007-01-13 13:57:00','Patrick.M.Love@spambob.com','0','0','0','0'),
+('40','1','Russell','Marilyn','973-625-5931','0','0','0','Denville','NJ','07866','0','2005-01-01 00:00:00','0','0','0','0','1','1','2007-01-17 13:57:00','2007-01-17 13:57:00','Marilyn.B.Russell@spambob.com','0','0','0','0'),
+('41','1','Moshier','James','410-920-7343','0','0','0','Baltimore','MD','21202','0','2005-01-01 00:00:00','0','0','0','0','1','1','2007-01-17 13:57:00','2007-01-17 13:57:00','James.E.Moshier@mytrashmail.com','0','0','0','0'),
+('42','1','Walker','Dan','847-800-2536','0','0','0','Arlington Heights','IL','60004','0','2005-01-01 00:00:00','0','0','0','0','1','1','2007-01-12 13:57:00','2007-01-12 13:57:00','Dan.J.Walker@spambob.com','0','0','0','0'),
+('43','1','Mcintosh','Mary','850-255-8810','0','0','0','Pensacola','FL','32501','0','2005-01-01 00:00:00','0','0','0','0','1','1','2007-01-12 13:57:00','2007-01-12 13:57:00','Mary.M.Mcintosh@dodgeit.com','0','0','0','0'),
+('44','1','Tidwell','Veronica','863-678-5078','0','0','0','Lake Wales','FL','33853','0','2005-01-01 00:00:00','0','0','0','0','1','1','2007-01-17 13:57:00','2007-01-17 13:57:00','Veronica.R.Tidwell@mailinator.com','0','0','0','0'),
+('45','1','Tardiff','Zachary','763-591-2887','0','0','0','Golden Valley','MN','55427','0','2005-01-01 00:00:00','0','0','0','0','1','1','2007-01-14 13:57:00','2007-01-14 13:57:00','Zachary.A.Tardiff@spambob.com','0','0','0','0'),
+('46','1','Stem','Gerald','320-366-7449','0','0','0','Sunburg','MN','56289','0','2005-01-01 00:00:00','0','0','0','0','1','1','2007-01-17 13:57:00','2007-01-17 13:57:00','Gerald.M.Stem@spambob.com','0','0','0','0'),
+('47','1','Lyles','Melissa','954-430-6440','0','0','0','Hollywood','FL','33024','0','2005-01-01 00:00:00','0','0','0','0','1','1','2007-01-11 13:57:00','2007-01-11 13:57:00','Melissa.G.Lyles@pookmail.com','0','0','0','0'),
+('48','1','Mcreynolds','Kelle','832-565-7599','0','0','0','Houston','TX','77020','0','2005-01-01 00:00:00','0','0','0','0','1','1','2007-01-11 13:57:00','2007-01-11 13:57:00','Kelle.D.Mcreynolds@dodgeit.com','0','0','0','0'),
+('49','1','Davidson','Edward','773-772-1268','0','0','0','Chicago','IL','60647','0','2005-01-01 00:00:00','0','0','0','0','1','1','2007-01-11 13:57:00','2007-01-11 13:57:00','Edward.E.Davidson@mytrashmail.com','0','0','0','0'),
+('50','1','Schneider','Larry','216-625-2627','0','0','0','Cleveland','OH','44115','0','2005-01-01 00:00:00','0','0','0','0','1','1','2007-01-11 13:57:00','2007-01-11 13:57:00','Larry.M.Schneider@spambob.com','0','0','0','0'),
+('51','1','Hardin','Elsie','631-396-8747','0','0','0','Hicksville','NY','11612','0','2005-01-01 00:00:00','0','0','0','0','1','1','2007-01-11 13:57:00','2007-01-11 13:57:00','Elsie.W.Hardin@pookmail.com','0','0','0','0'),
+('52','1','Atnip','Teresa','517-523-3223','0','0','0','Osseo','MI','49266','0','2005-01-01 00:00:00','0','0','0','0','1','1','2007-01-11 13:57:00','2007-01-17 14:32:45','Teresa.J.Atnip@pookmail.com','0','0','0','0'),
+('53','1','Kistler','Melissa','609-443-1286','0','0','0','Hightstown','NJ','08520','0','2005-01-01 00:00:00','0','0','0','0','1','1','2007-01-11 13:57:00','2007-01-11 13:57:00','Melissa.W.Kistler@mailinator.com','0','0','0','0'),
+('54','1','Young','Anthony','901-601-9927','0','0','0','Memphis','TN','38110','0','2005-01-01 00:00:00','0','0','0','0','1','1','2007-01-11 13:57:00','2007-01-11 13:57:00','Anthony.C.Young@pookmail.com','0','0','0','0'),
+('55','1','Chapman','Paula','417-385-8201','0','0','0','Joplin','MO','64801','0','2005-01-01 00:00:00','0','0','0','0','1','1','2007-01-11 13:57:00','2007-01-11 13:57:00','Paula.A.Chapman@mailinator.com','0','0','0','0'),
+('56','1','Thomas','Kristin','661-746-3721','0','0','0','Shafter','CA','93263','0','2005-01-01 00:00:00','0','0','0','0','1','1','2007-01-11 13:57:00','2007-01-17 15:16:05','Kristin.B.Thomas@mytrashmail.com','0','0','0','0'),
+('57','1','Chase','Jessica','740-366-2709','0','0','0','Newark','OH','43055','0','2005-01-01 00:00:00','0','0','0','0','1','1','2007-01-11 13:57:00','2007-01-11 13:57:00','Jessica.H.Chase@pookmail.com','0','0','0','0'),
+('58','1','Williams','Joleen','215-597-1754','0','0','0','Philadelphia','PA','19107','0','2005-01-01 00:00:00','0','0','0','0','1','1','2007-01-10 13:57:00','2007-01-10 13:57:00','Joleen.W.Williams@pookmail.com','0','0','0','0'),
+('59','1','Smith','Juliana','603-297-5504','0','0','0','Portsmouth','NH','03801','0','2005-01-01 00:00:00','0','0','0','0','1','1','2007-01-10 13:57:00','2007-01-10 13:57:00','Juliana.J.Smith@spambob.com','0','0','0','0'),
+('60','1','Mesa','Julian','310-585-9597','0','0','0','Los Angeles','CA','90017','0','2005-01-01 00:00:00','0','0','0','0','1','1','2007-01-16 13:57:00','2007-01-16 13:57:00','Julian.T.Mesa@dodgeit.com','0','0','0','0'),
+('61','1','Black','Lisa','217-967-3105','0','0','0','Westfield','IL','62474','0','2005-01-01 00:00:00','0','0','0','0','1','1','2007-01-16 13:57:00','2007-01-17 14:31:43','Lisa.N.Black@mailinator.com','0','0','0','0'),
+('62','1','Carter','Randy','812-415-0068','0','0','0','Wheatland','IN','47597','0','2005-01-01 00:00:00','0','0','0','0','1','1','2007-01-16 13:57:00','2007-01-16 13:57:00','Randy.E.Carter@pookmail.com','0','0','0','0'),
+('63','1','Cox','Daniel','336-714-2774','0','0','0','Greensboro','NC','27401','0','2005-01-01 00:00:00','0','0','0','0','1','1','2007-01-15 13:57:00','2007-01-15 13:57:00','Daniel.L.Cox@spambob.com','0','0','0','0'),
+('64','1','Harris','Mabel','917-741-0209','0','0','0','Huntington','NY','11743','0','2005-01-01 00:00:00','0','0','0','0','1','1','2007-01-15 13:57:00','2007-01-15 13:57:00','Mabel.D.Harris@mytrashmail.com','0','0','0','0'),
+('65','1','Krebs','Harvey','281-574-3668','0','0','0','Katy','TX','77493','0','2005-01-01 00:00:00','0','0','0','0','1','1','2007-01-15 13:57:00','2007-01-15 13:57:00','Harvey.M.Krebs@mailinator.com','0','0','0','0'),
+('66','1','Milner','Wilma','773-252-3639','0','0','0','Chicago','IL','60647','0','2005-01-01 00:00:00','0','0','0','0','1','1','2007-01-16 13:57:00','2007-01-16 13:57:00','Wilma.J.Milner@mailinator.com','0','0','0','0'),
+('67','1','Clemons','Charles','269-429-3424','0','0','0','Saint Joseph','MI','49085','0','2005-01-01 00:00:00','0','0','0','0','1','1','2007-01-16 13:57:00','2007-01-16 13:57:00','Charles.G.Clemons@spambob.com','0','0','0','0'),
+('68','1','Blanco','Jessica','512-463-5692','0','0','0','Austin','TX','78759','0','2005-01-01 00:00:00','0','0','0','0','1','1','2007-01-16 13:57:00','2007-01-17 14:31:00','Jessica.D.Blanco@dodgeit.com','0','0','0','0'),
+('69','1','Martinez','Francisco','906-852-6736','0','0','0','Trout Creek','MI','49967','0','2005-01-01 00:00:00','0','0','0','0','1','1','2007-01-16 13:57:00','2007-01-16 13:57:00','Francisco.M.Martinez@mailinator.com','0','0','0','0'),
+('70','1','Smith','Lorraine','651-632-0403','0','0','0','Saint Paul','MN','55104','0','2005-01-01 00:00:00','0','0','0','0','1','1','2007-01-16 13:57:00','2007-01-16 13:57:00','Lorraine.J.Smith@mailinator.com','0','0','0','0'),
+('71','1','West','Luann','201-345-8791','0','0','0','New Brunswick','NJ','08901','0','2005-01-01 00:00:00','0','0','0','0','1','1','2007-01-16 13:57:00','2007-01-16 13:57:00','Luann.J.West@dodgeit.com','0','0','0','0');
+
+INSERT INTO `candidate_joborder` (`candidate_joborder_id`,`candidate_id`,`joborder_id`,`site_id`,`status`,`date_submitted`,`date_created`,`date_modified`,`rating_value`,`added_by`) VALUES
+('1','20','3','1','500','2005-01-01 00:00:00','2007-01-17 14:29:01','2007-01-17 14:32:03','5','0'),
+('2','61','3','1','300','2005-01-01 00:00:00','2007-01-17 14:29:15','2007-01-17 14:31:43','4','0'),
+('3','68','3','1','200','2005-01-01 00:00:00','2007-01-17 14:29:29','2007-01-17 14:31:00','4','0'),
+('4','26','3','1','100','2005-01-01 00:00:00','2007-01-17 14:29:44','2007-01-17 14:29:44','2','0'),
+('5','52','3','1','500','2005-01-01 00:00:00','2007-01-17 14:29:58','2007-01-17 14:32:45','5','0'),
+('6','37','3','1','600','2005-01-01 00:00:00','2007-01-17 14:32:19','2007-01-17 14:33:05','5','0'),
+('7','35','1','1','400','2005-01-01 00:00:00','2007-01-17 15:13:28','2007-01-17 15:14:23','4','0'),
+('8','56','2','1','400','2005-01-01 00:00:00','2007-01-17 15:15:25','2007-01-17 15:16:05','5','0');
+
+INSERT INTO `candidate_joborder_status_history` (`candidate_joborder_status_history_id`,`candidate_id`,`joborder_id`,`date`,`status_from`,`status_to`,`site_id`) VALUES
+('1','52','3','2007-01-17 14:30:26','100','200','1'),
+('2','68','3','2007-01-17 14:31:00','100','200','1'),
+('3','61','3','2007-01-17 14:31:43','100','300','1'),
+('4','20','3','2007-01-16 14:32:03','100','500','1'),
+('5','52','3','2007-01-17 14:32:45','200','500','1'),
+('6','37','3','2007-01-17 14:33:05','100','600','1'),
+('7','35','1','2007-01-16 15:14:23','100','400','1'),
+('8','56','2','2007-01-17 15:16:05','100','400','1');
+
+INSERT INTO `company` (`company_id`,`site_id`,`billing_contact`,`name`,`address2`,`city`,`state`,`zip`,`phone1`,`phone2`,`url`,`key_technologies`,`notes`,`entered_by`,`owner`,`date_created`,`date_modified`,`is_hot`,`fax_number`,`import_id`) VALUES
+('2','1','0','Best Buy','Bldg 100','San Diego','CA','92123','800-555-3456','800-555-1212','http://www.bestbuy.com/','Linux, Java, C++, JSP, Cisco','0','1','1','2007-01-17 12:24:40','2007-01-17 12:24:40','1','800-555-7777','0'),
+('3','1','0','McDonalds','0','Schenectady','NY','12345','800-555-6600','0','http://www.mcdonalds.com/','PHP, AJAX','0','1','1','2007-01-17 14:05:51','2007-01-17 14:05:51','0','0','0');
+
+INSERT INTO `company_department` (`company_department_id`,`name`,`company_id`,`site_id`,`date_created`,`created_by`) VALUES
+('1','Human Resources','2','1','2007-01-17 12:24:40','0'),
+('2','Information Technology','2','1','2007-01-17 12:24:40','0'),
+('3','Sales','2','1','2007-01-17 12:24:40','0'),
+('4','Human Resources','3','1','2007-01-17 14:05:51','0'),
+('5','Marketing','3','1','2007-01-17 14:05:51','0');
+
+INSERT INTO `contact` (`contact_id`,`company_id`,`site_id`,`last_name`,`first_name`,`title`,`email1`,`email2`,`phone_work`,`phone_cell`,`phone_other`,`address2`,`city`,`state`,`zip`,`is_hot`,`notes`,`entered_by`,`owner`,`date_created`,`date_modified`,`left_company`,`import_id`,`company_department_id`) VALUES
+('1','3','1','Walters','Ryan','Hiring Manager','rwalters@mcdonalds.com','0','0','0','0','0','Schenectady','NY','12345','1','0','1','1','2007-01-17 14:34:41','2007-01-17 14:34:41','0','0','4'),
+('2','2','1','Baker','Jim','Hiring Manager','jim.baker@bestbuy.com','0','0','0','0','Bldg 100','San Diego','CA','92123','0','0','1','1','2007-01-17 14:59:38','2007-01-17 14:59:38','0','0','1');
+
+INSERT INTO `history` (`history_id`,`data_item_type`,`data_item_id`,`the_field`,`previous_value`,`new_value`,`description`,`set_date`,`entered_by`,`site_id`) VALUES
+('1','200','2','!newEntry!','0','0','(USER) created entry.','2007-01-17 12:24:40','1','1'),
+('2','200','0','0','0','0','(USER) added Human Resources to departments.','2007-01-17 12:24:40','1','1'),
+('3','200','0','0','0','0','(USER) added Information Technology to departments.','2007-01-17 12:24:40','1','1'),
+('4','200','0','0','0','0','(USER) added Sales to departments.','2007-01-17 12:24:40','1','1'),
+('5','400','1','!newEntry!','0','0','(USER) created entry.','2007-01-17 12:42:35','1','1'),
+('6','100','1','!newEntry!','0','0','(USER) created entry.','2007-01-17 13:41:32','1','1'),
+('7','100','1','firstName','Silas M','Silas','(USER) changed field(s): firstName.','2007-01-17 13:42:16','1','1'),
+('8','200','3','!newEntry!','0','0','(USER) created entry.','2007-01-17 14:05:51','1','1'),
+('9','200','0','0','0','0','(USER) added Human Resources to departments.','2007-01-17 14:05:51','1','1'),
+('10','200','0','0','0','0','(USER) added Marketing to departments.','2007-01-17 14:05:51','1','1'),
+('11','100','34','source','0','Monster','0','2007-01-17 14:06:56','1','1'),
+('12','100','34','keySkills','0','JSP, Apache, WebSphere','0','2007-01-17 14:06:56','1','1'),
+('13','100','34','currentEmployer','0','Wal-Mart','0','2007-01-17 14:06:56','1','1'),
+('14','100','34','canRelocate','0','1','0','2007-01-17 14:06:56','1','1'),
+('15','100','34','isHot','0','1','(USER) changed field(s): source, keySkills, currentEmployer, canRelocate, isHot.','2007-01-17 14:06:56','1','1'),
+('16','600','0','0','0','0','(USER) added Monster to possible sources.','2007-01-17 14:06:56','1','1'),
+('17','100','37','source','0','Monster','0','2007-01-17 14:07:37','1','1'),
+('18','100','37','keySkills','0','SQL Server, T-SQL','(USER) changed field(s): source, keySkills.','2007-01-17 14:07:37','1','1'),
+('19','400','2','!newEntry!','0','0','(USER) created entry.','2007-01-17 14:10:01','1','1'),
+('20','400','3','!newEntry!','0','0','(USER) created entry.','2007-01-17 14:28:33','1','1'),
+('21','100','20','PIPELINE','(ADD)','3','(USER) added candidate to pipeline for job order 3.','2007-01-17 14:29:01','1','1'),
+('22','400','3','PIPELINE','(ADD)','20','(USER) added job order to pipeline for candidate 20.','2007-01-17 14:29:01','1','1'),
+('23','100','61','PIPELINE','(ADD)','3','(USER) added candidate to pipeline for job order 3.','2007-01-17 14:29:15','1','1'),
+('24','400','3','PIPELINE','(ADD)','61','(USER) added job order to pipeline for candidate 61.','2007-01-17 14:29:15','1','1'),
+('25','100','68','PIPELINE','(ADD)','3','(USER) added candidate to pipeline for job order 3.','2007-01-17 14:29:29','1','1'),
+('26','400','3','PIPELINE','(ADD)','68','(USER) added job order to pipeline for candidate 68.','2007-01-17 14:29:29','1','1'),
+('27','100','26','PIPELINE','(ADD)','3','(USER) added candidate to pipeline for job order 3.','2007-01-17 14:29:44','1','1'),
+('28','400','3','PIPELINE','(ADD)','26','(USER) added job order to pipeline for candidate 26.','2007-01-17 14:29:44','1','1'),
+('29','100','52','PIPELINE','(ADD)','3','(USER) added candidate to pipeline for job order 3.','2007-01-17 14:29:58','1','1'),
+('30','400','3','PIPELINE','(ADD)','52','(USER) added job order to pipeline for candidate 52.','2007-01-17 14:29:58','1','1'),
+('31','500','5','PIPELINERATING','0','5','(USER) changed rating status.','2007-01-17 14:30:05','1','1'),
+('32','500','4','PIPELINERATING','0','2','(USER) changed rating status.','2007-01-17 14:30:06','1','1'),
+('33','500','3','PIPELINERATING','0','4','(USER) changed rating status.','2007-01-17 14:30:07','1','1'),
+('34','500','2','PIPELINERATING','0','4','(USER) changed rating status.','2007-01-17 14:30:08','1','1'),
+('35','500','1','PIPELINERATING','0','5','(USER) changed rating status.','2007-01-17 14:30:09','1','1'),
+('36','100','52','ACTIVITY','(NEW)','Status change: Contacted','(USER) Added activity.','2007-01-17 14:30:26','1','1'),
+('37','500','5','PIPELINE','100','200','(USER) changed pipeline status of candidate 52 for job order3.','2007-01-17 14:30:26','1','1'),
+('38','100','68','ACTIVITY','(NEW)','Status change: Contacted','(USER) Added activity.','2007-01-17 14:31:00','1','1'),
+('39','500','3','PIPELINE','100','200','(USER) changed pipeline status of candidate 68 for job order3.','2007-01-17 14:31:00','1','1'),
+('40','100','61','ACTIVITY','(NEW)','Status change: Qualifying','(USER) Added activity.','2007-01-17 14:31:43','1','1'),
+('41','500','2','PIPELINE','100','300','(USER) changed pipeline status of candidate 61 for job order3.','2007-01-17 14:31:43','1','1'),
+('42','100','20','ACTIVITY','(NEW)','Status change: Interviewing','(USER) Added activity.','2007-01-17 14:32:03','1','1'),
+('43','500','1','PIPELINE','100','500','(USER) changed pipeline status of candidate 20 for job order3.','2007-01-17 14:32:03','1','1'),
+('44','100','37','PIPELINE','(ADD)','3','(USER) added candidate to pipeline for job order 3.','2007-01-17 14:32:19','1','1'),
+('45','400','3','PIPELINE','(ADD)','37','(USER) added job order to pipeline for candidate 37.','2007-01-17 14:32:19','1','1'),
+('46','500','6','PIPELINERATING','0','5','(USER) changed rating status.','2007-01-17 14:32:28','1','1'),
+('47','100','52','ACTIVITY','(NEW)','Status change: Interviewing','(USER) Added activity.','2007-01-17 14:32:45','1','1'),
+('48','500','5','PIPELINE','200','500','(USER) changed pipeline status of candidate 52 for job order3.','2007-01-17 14:32:45','1','1'),
+('49','100','37','ACTIVITY','(NEW)','Status change: Offered','(USER) Added activity.','2007-01-17 14:33:05','1','1'),
+('50','500','6','PIPELINE','100','600','(USER) changed pipeline status of candidate 37 for job order3.','2007-01-17 14:33:05','1','1'),
+('51','300','1','!newEntry!','0','0','(USER) created entry.','2007-01-17 14:34:41','1','1'),
+('52','300','2','!newEntry!','0','0','(USER) created entry.','2007-01-17 14:59:38','1','1'),
+('53','100','35','PIPELINE','(ADD)','1','(USER) added candidate to pipeline for job order 1.','2007-01-17 15:13:28','1','1'),
+('54','400','1','PIPELINE','(ADD)','35','(USER) added job order to pipeline for candidate 35.','2007-01-17 15:13:28','1','1'),
+('55','500','7','PIPELINERATING','0','4','(USER) changed rating status.','2007-01-17 15:13:40','1','1'),
+('56','100','35','ACTIVITY','(NEW)','Status change: Submitted. She\'s awesome! Submitting at 65.00/hr.','(USER) Added activity.','2007-01-17 15:14:23','1','1'),
+('57','500','7','PIPELINE','100','400','(USER) changed pipeline status of candidate 35 for job order1.','2007-01-17 15:14:23','1','1'),
+('58','100','56','PIPELINE','(ADD)','2','(USER) added candidate to pipeline for job order 2.','2007-01-17 15:15:25','1','1'),
+('59','400','2','PIPELINE','(ADD)','56','(USER) added job order to pipeline for candidate 56.','2007-01-17 15:15:25','1','1'),
+('60','500','8','PIPELINERATING','0','5','(USER) changed rating status.','2007-01-17 15:15:30','1','1'),
+('61','100','56','ACTIVITY','(NEW)','Status change: Submitted. Submitting at 98k.','(USER) Added activity.','2007-01-17 15:16:05','1','1'),
+('62','500','8','PIPELINE','100','400','(USER) changed pipeline status of candidate 56 for job order2.','2007-01-17 15:16:05','1','1');
+
+INSERT INTO `joborder` (`joborder_id`,`recruiter`,`contact_id`,`company_id`,`entered_by`,`owner`,`site_id`,`client_job_id`,`title`,`description`,`notes`,`type`,`duration`,`rate_max`,`salary`,`status`,`is_hot`,`openings`,`city`,`state`,`start_date`,`date_created`,`date_modified`,`public`,`company_department_id`) VALUES
+('1','1','2','2','1','1','1','BB1023','Cisco Specialist','We need a good Cisco specialist with 4+ years experience and a CCNP. The rate is 55.00/hr - 65.00/hr.','Hurry!','C2H','6 Months; Extendable','55.00/hr - 65.00/hr','0','Active','1','2','San Diego','CA','2007-02-05 00:00:00','2007-01-16 14:10:01','2007-01-17 15:14:23','1','2'),
+('2','1','1','3','1','1','1','MCD5','HR Manager','We need an experienced Human Resources manager.','0','H','0','0','100k','Active','0','1','Schenectady','NY','2007-02-10 00:00:00','2007-01-16 14:10:01','2007-01-17 15:16:05','1','4'),
+('3','1','1','3','1','1','1','MCD11','Marketing Specialist','We need a new Marketing Specialist. Must have 5 years of experience and a BS in Marketing.','0','H','0','0','98k','Active','1','1','Schenectady','NY','2005-01-01 00:00:00','2007-01-17 14:28:33','2007-01-17 14:33:05','1','5');
+
+INSERT INTO `mru` (`mru_id`,`user_id`,`site_id`,`data_item_type`,`data_item_text`,`url`,`date_created`) VALUES
+('53','1','1','400','HR Manager','index.php?m=joborders&a=show&jobOrderID=2','2007-01-17 15:16:08'),
+('50','1','1','400','Cisco Specialist','index.php?m=joborders&a=show&jobOrderID=1','2007-01-17 15:14:27'),
+('45','1','1','300','Ryan Walters','index.php?m=contacts&a=show&contactID=1','2007-01-17 14:44:45'),
+('55','1','1','100','Kristin Thomas','index.php?m=candidates&a=show&candidateID=56','2007-01-17 15:36:19'),
+('46','1','1','300','Jim Baker','index.php?m=contacts&a=show&contactID=2','2007-01-17 14:59:40'),
+('48','1','1','100','Sherry Johnson','index.php?m=candidates&a=show&candidateID=35','2007-01-17 15:13:31');
+
+INSERT INTO `saved_search` (`search_id`,`data_item_text`,`url`,`is_custom`,`data_item_type`,`user_id`,`site_id`,`date_created`) VALUES
+('2','license','/cats/index.php?m=candidates&a=search&getback=getback&mode=searchByResume&wildCardString=license&searchCandidates=Search&advancedSearchParser=&advancedSearchOn=0','0','100','1','1','2007-01-17 15:36:37');
diff --git a/db/cats_testdata.bak b/db/cats_testdata.bak
deleted file mode 100644
index 41e049e23..000000000
Binary files a/db/cats_testdata.bak and /dev/null differ
diff --git a/modules/install/ajax/ui.php b/modules/install/ajax/ui.php
index cc601d92f..a7f1de3f4 100755
--- a/modules/install/ajax/ui.php
+++ b/modules/install/ajax/ui.php
@@ -817,64 +817,18 @@
case 'onLoadDemoData':
CATSUtility::changeConfigSetting('ENABLE_DEMO_MODE', 'true');
- include_once(LEGACY_ROOT . '/lib/FileCompressor.php');
MySQLConnect();
- $extractor = new ZipFileExtractor('./db/cats_testdata.bak');
-
- /* Extract the file. This command also executes all sql commands in the file. */
- /* Normally, we could just do the following lines, but we want a custom extractor
- that ignores the file 'database', and executes all of the catsbackup.sql.xxx
- files rather than extracting them. */
- /*
- if (!$extractor->open() || !$extractor->extractAll())
- {
- echo($extractor->getErrorMessage());
- }
- */
-
- if (!$extractor->open())
- {
- echo($extractor->getErrorMessage());
- }
-
- $metaData = $extractor->getMetaData();
-
- foreach ($metaData['centralDirectory'] as $index => $data)
- {
- $fileName = $data['filename'];
-
- /* Execute all sql files */
- if (strpos($fileName, 'db/catsbackup.sql.') === 0)
- {
- $fileContents = $extractor->getFile($index);
- MySQLQueryMultiple($fileContents, '((ENDOFQUERY))');
- }
- /* Extract everything else but ./database */
- else if ($fileName != 'database')
- {
- if (strpos($fileName, '/') !== false)
- {
- $directorySplit = explode('/', $fileName);
- unset($directorySplit[count($directorySplit)-1]);
- $directory = implode('/', $directorySplit);
- @mkdir($directory, 0777, true);
- }
-
- $fileContents = $extractor->getFile($index);
-
- if ($fileContents === false)
- {
- /* Report error? */
- }
+ /* Demo mode installs the current schema and then demo-only seed data. */
+ $schema = file_get_contents('db/cats_schema.sql');
+ MySQLQueryMultiple($schema, ";\n");
- file_put_contents ($fileName, $fileContents);
- }
- }
+ $demoData = file_get_contents('db/cats_demo_data.sql');
+ MySQLQueryMultiple($demoData, ";\n");
echo '
';
break;