예제 #1
0
<?php

include 'DBpedia.php';
error_reporting(E_ALL | E_STRICT);
echo 'START' . PHP_EOL;
$ultrapedia_instances = array('Daimler_AG', '2_stroke', 'Aachener', 'AAG_%281900_automobile%29', 'AAG_%281906_automobile%29', 'Abt_Sportsline', 'Adam_Opel', 'Adler_%28automobile%29', 'Adolf_Hitler', 'Adventurewagen', 'AEG', 'AGA_%28automobile%29', 'Alan_%28automobile%29', 'Alfi', 'Alliance_%281904_automobile%29', 'Allright', 'Alpina', 'Altmann_%281905_automobile%29', 'Amor_%28automobile%29', 'Amphicar', 'Andy_Collins_%28radio%29', 'Anker_%28automobile%29', 'Ansbach_%28automobile%29', 'Anvis_Group', 'Apollo_%281910_automobile%29', 'Archibald_Nye', 'Ardie-Ganz', 'Argus_%28automobile%29', 'Arimofa', 'Arthur_Oliver_Wheeler', 'Arthur_Waskow', 'Atlantic_%281921_automobile%29', 'Audi', 'Audi_100', 'Audi_4000', 'Audi_4000CS_quattro', 'Audi_50', 'Audi_80', 'Audi_A1', 'Audi_A2', 'Audi_A3', 'Audi_A3_TDI_clubsport_quattro_concept', 'Audi_A4', 'Audi_A5', 'Audi_A6', 'Audi_A6_allroad_quattro', 'Audi_A8', 'Audi_Avantissimo', 'Audi_Avus_quattro', 'Audi_Cabriolet', 'Audi_Coup%C3%A9', 'Audi_Coup%C3%A9_GT', 'Audi_Coup%C3%A9_quattro', 'Audi_F103', 'Audi_Front', 'Audi_hybrid_vehicles', 'Audi_Le_Mans_quattro', 'Audi_Nuvolari_quattro', 'Audi_Pikes_Peak_quattro', 'Audi_Q1', 'Audi_Q3', 'Audi_Q5', 'Audi_Q7', 'Audi_Quattro', 'Audi_R10_TDI', 'Audi_R15_TDI', 'Audi_R4', 'Audi_R8', 'Audi_R8_%28race_car%29', 'Audi_r8_gt3', 'Audi_R8C', 'Audi_R8R', 'Audi_Roadjet', 'Audi_Rosemeyer', 'Audi_RS2_Avant', 'Audi_RS4', 'Audi_RS6', 'Audi_RSQ', 'Audi_S_and_RS_models', 'Audi_S3', 'Audi_S4', 'Audi_S6', 'Audi_S7', 'Audi_S8', 'Audi_Shooting_Brake', 'Audi_Sportback_concept', 'Audi_Steppenwolf', 'Audi_TT', 'Audi_Ur-S4_/_Ur-S6', 'Audi_V8', 'Aufsichtsrat', 'August_Horch', 'Auto_Union', 'Auto_Union_1000', 'Automobilwerk_Eisenach', 'AWS_Shopper', 'B%C3%BCssing', 'Baja_Bug', 'Barkas', 'Beaufort_%28automobiles%29', 'Beetle_restoration', 'Benz_Patent_Motorwagen', 'Benz_Velo', 'Bernd_Pischetsrieder', 'Bertone_Birusa', 'Bill_Carroll', 'Biogas', 'BMW', 'BMW_1_Series', 'BMW_2002tii', 'BMW_247_engine', 'BMW_3/15', 'BMW_3/20', 'BMW_3_Series', 'BMW_3_Series_%28E21%29', 'BMW_3_Series_%28E30%29', 'BMW_3_Series_%28E36%29', 'BMW_3_Series_%28E46%29', 'BMW_3_Series_%28E90%29', 'BMW_3_Series_%28E90%29', 'BMW_300_%28Isetta%29', 'BMW_303', 'BMW_315', 'BMW_320', 'BMW_3200_CS', 'BMW_321', 'BMW_326', 'BMW_327', 'BMW_328', 'BMW_335_%281939_-_1941%29', 'BMW_340', 'BMW_5_Series', 'BMW_5_Series_%28E12%29', 'BMW_5_Series_%28E28%29', 'BMW_5_Series_%28E34%29', 'BMW_5_Series_%28E39%29', 'BMW_5_Series_%28E60%29', 'BMW_5_Series_Gran_Turismo', 'BMW_501', 'BMW_503', 'BMW_507', 'BMW_525i', 'BMW_6_Series', 'BMW_6_Series_%28E63%29', 'BMW_600', 'BMW_7_Series', 'BMW_7_Series_%28E23%29', 'BMW_7_Series_%28E32%29', 'BMW_7_Series_%28E38%29', 'BMW_7_Series_%28E65%29', 'BMW_7_Series_%28F01%29', 'BMW_700', 'BMW_8_Series', 'BMW_Compact', 'BMW_Concept_5_Series_Gran_Turismo', 'BMW_Concept_7_Series_ActiveHybrid', 'BMW_Concept_X6_ActiveHybrid', 'BMW_CS_Concept', 'BMW_Dixi', 'BMW_E24', 'BMW_E26', 'BMW_E3', 'BMW_E30', 'BMW_E52', 'BMW_E83', 'BMW_E85', 'BMW_E87', 'BMW_E89', 'BMW_E9', 'BMW_F07', 'BMW_F3', 'BMW_GINA', 'BMW_Goldfish_V16', 'BMW_H2R', 'BMW_Hydrogen_7', 'BMW_M', 'BMW_M_Coupe', 'BMW_M_Roadster', 'BMW_M06', 'BMW_M1', 'BMW_M10', 'BMW_M102', 'BMW_M106', 'BMW_M12', 'BMW_M20', 'BMW_M21', 'BMW_M3', 'BMW_M30', 'BMW_M40', 'BMW_M41', 'BMW_M42', 'BMW_M43', 'BMW_M44', 'BMW_M47', 'BMW_M5', 'BMW_M5_%28E28%29', 'BMW_M5_%28E34%29', 'BMW_M50', 'BMW_M51', 'BMW_M52', 'BMW_M535i', 'BMW_M54', 'BMW_M56', 'BMW_M57', 'BMW_M6', 'BMW_M60', 'BMW_M62', 'BMW_M67', 'BMW_M70', 'BMW_M73', 'BMW_M78', 'BMW_M88', 'BMW_N42', 'BMW_N45', 'BMW_N46', 'BMW_N52', 'BMW_N53', 'BMW_N54', 'BMW_N55', 'BMW_N57', 'BMW_N62', 'BMW_N63', 'BMW_N73', 'BMW_Nazca_C2', 'BMW_New_Class', 'BMW_New_Six', 'BMW_OHV_V8_engine', 'BMW_Progressive_Activity_Series', 'BMW_S14', 'BMW_S38', 'BMW_S50', 'BMW_S62', 'BMW_S65', 'BMW_S85', 'BMW_Sports_Activity_Series', 'BMW_Turbo', 'BMW_V12_LM', 'BMW_V12_LMR', 'BMW_V3', 'BMW_V7', 'BMW_X_Series', 'BMW_X1', 'BMW_X3', 'BMW_X3_%28E83%29', 'BMW_X5', 'BMW_X5_%28E53%29', 'BMW_X5_%28E70%29', 'BMW_X5_M', 'BMW_X6', 'BMW_X6_M', 'BMW_X-Coupe', 'BMW_Z_Series', 'BMW_Z1', 'BMW_Z3', 'BMW_Z4', 'BMW_Z8', 'BMW_Z9', 'Borgward', 'Borgward_Hansa_1500', 'Borgward_Hansa_2400', 'Borgward_Isabella', 'Borgward_P100', 'Br%C3%BCtsch', 'Brabus', 'Brabus_Rocket', 'Breyton', 'Bungartz_Butz', 'C43_AMG', 'Canada', 'Carlsson_%28car_company%29', 'CEO', 'Chair_%28official%29', 'Chairman', 'Champion_%28automobile%29', 'Chief_executive_officer', 'Chief_financial_officer', 'Christian_Abt', 'Christian_Klingler', 'Claude_S._Fischer', 'Claus_Luthe', 'Continental_AG', 'Cubic_centimetre', 'Cudell', 'Cyklon', 'Daimler_Motorized_Carriage', 'Daimler-Benz', 'Daimler-Hyundai_Truck', 'Daniel_Appleton', 'Dauer_962_Le_Mans', 'David_Swinford', 'Diesel_engine', 'Diesel_particulate_filter', 'Dieter_Zetsche', 'DKW', 'DKW_3%3D6', 'DKW_F102', 'DKW_F5', 'DKW_F7', 'DKW_F8', 'DKW_F89', 'DKW_Junior', 'DOHC', 'Dorothea_Lange', 'Dual_overhead_cam', 'Dune_buggy', 'EAM_Nuvolari_S1', 'Earl_Thompson', 'Eberhard_von_Kuenheim', 'Ed_Miller_%28poker_player%29', 'EDAG_Biwak', 'Edelsbrunner_Automobile_M%C3%BCnchen', 'Egon_Br%C3%BCtsch', 'Ehrhardt_%28automobile%29', 'Ehrhardt-Szawe', 'Eisenacher_Motorenwerk', 'EMPI_Imp', 'Erhard_Melcher', 'ERuf_Model_A', 'Esther_Bubley', 'Excelsior-Mascot', 'Fafnir_%28automobile%29', 'Fagbug', 'Fend_Flitzer', 'Ferdinand_Pi%C3%ABch', 'Ferdinand_Porsche', 'Flat_engine', 'Flat_twin', 'Flat-2', 'Flat-4', 'Flat-6', 'Flexible_fuel', 'Ford_AJD-V6/PSA_DT17', 'Ford_of_Europe', 'Ford_Pinto_engine', 'Formula_Palmer_Audi', 'Formula_Vee', 'Four-wheel_drive', 'FR_layout', 'Framo_%28car%29', 'Franz_Josef_Popp', 'Fritz_von_Opel', 'Front-engine_design', 'Fuel_Stratified_Injection', 'Fuldamobil', 'G%C3%A9rard_Charles_%C3%89douard_Th%C3%A9riault', 'G60', 'Gasoline_direct_injection', 'Gemballa', 'Glas', 'Gloria_Vanderbilt', 'GM_Epsilon_II_platform', 'GM_Epsilon_platform', 'GM_Gamma_platform', 'Goggomobil', 'Goliath_%28car%29', 'Goliath_1100', 'Goliath_GP700', 'Gotec_Group', 'Gottlieb_Daimler', 'G-Power', 'Gumpert', 'Gumpert_Apollo', 'Gutbrod', 'H%C3%A5kan_Samuelsson', 'Hamann_Motorsport', 'Hanomag', 'Hanomag_2_/_10_PS', 'Hans_Werner_Aufrecht', 'Hansa_%28car%29', 'Hartge', 'Hay_Automobiltechnik', 'Heinkel_Kabine', 'Heinrich_Nordhoff', 'Herman_Wouk', 'Hermann_Appel', 'Holden_Astra', 'Holden_Barina', 'Horch', 'Horch', 'Horsepower', 'HQM_Sachsenring_GmbH', 'I4', 'I4_engine', 'I6', 'I-6', 'IAV', 'IFA_F9', 'Inline-four_engine', 'Irmscher', 'Isdera', 'Isetta', 'J%C3%BCrgen_Abt', 'Jacques_Cartier', 'James_Albert_Manning_Aikins', 'Je_Design', 'Jeffrey_Montgomery', 'Jerry_Rubin', 'Jim_Hickman_%28driver%29', 'Jobst_Wellensiek', 'Johann_Abt', 'John_de_Saulles', 'John_Moore_%28broadcaster%29', 'Joswin', 'Juho', 'K%C3%A4ssbohrer', 'K%C3%BChlstein', 'Karl_Benz', 'Karmann', 'Kdf-Wagen', 'Kenter', 'Kevin_Greenaugh', 'Kilowatt', 'Kleinschnittger', 'Komet_%28German_automobile%29', 'Kondor', 'Kremer_K8_Spyder', 'Kurt_Blumenr%C3%B6der', 'Kurt_Lotz', 'Lamborghini_V10', 'Lamborghini_V12', 'Leslie_Roberts', 'List_of_BMW_engines', 'List_of_discontinued_Volkswagen_Group_diesel_engines', 'List_of_discontinued_Volkswagen_Group_petrol_engines', 'List_of_Mercedes-Benz_cars', 'List_of_North_American_Volkswagen_engines', 'List_of_Volkswagen_Group_diesel_engines', 'List_of_Volkswagen_Group_petrol_engines', 'Litre', 'Lloyd_%28car%29', 'Lohner-Porsche_Mixte_Hybrid', 'Loremo', 'Louis_Marie_Turreau', 'Mahle_GmbH', 'Maik%C3%A4fer', 'MAN_24.310', 'MAN_Fortuna', 'MAN_Lion%27s_City', 'MAN_NL262', 'MAN_SE', 'MAN_SL202', 'Managing_Director', 'Mansory', 'Martin_Winterkorn', 'Maybach', 'Maybach_57_and_62', 'Maybach_Exelero', 'Maybach_Zeppelin', 'Mel_Allen', 'Mercedes_35_hp', 'Mercedes_Benz_Limousine_W126', 'Mercedes_Benz_Limousine_W126_%281000SEL%29', 'Mercedes_E550', 'Mercedes_S63_AMG', 'Mercedes_Simplex', 'Mercedes-AMG', 'Mercedes-Benz', 'Mercedes-Benz_190', 'Mercedes-Benz_190SL', 'Mercedes-Benz_200', 'Mercedes-Benz_220', 'Mercedes-Benz_230', 'Mercedes-Benz_240D', 'Mercedes-Benz_250', 'Mercedes-Benz_260_D', 'Mercedes-Benz_280', 'Mercedes-Benz_300', 'Mercedes-Benz_300_SLR', 'Mercedes-Benz_300D', 'Mercedes-Benz_300SEL_6.3', 'Mercedes-Benz_300SL', 'Mercedes-Benz_320', 'Mercedes-Benz_350', 'Mercedes-Benz_380', 'Mercedes-Benz_400', 'Mercedes-Benz_420', 'Mercedes-Benz_430', 'Mercedes-Benz_450', 'Mercedes-Benz_450SEL_6.9', 'Mercedes-Benz_500', 'Mercedes-Benz_500E', 'Mercedes-Benz_500K', 'Mercedes-Benz_560', 'Mercedes-Benz_600', 'Mercedes-Benz_600_%28disambiguation%29', 'Mercedes-Benz_770', 'Mercedes-Benz_A-Class', 'Mercedes-Benz_Actros', 'Mercedes-Benz_Atego', 'Mercedes-Benz_Axor', 'Mercedes-Benz_B-Class', 'Mercedes-Benz_Bionic', 'Mercedes-Benz_BlueZERO', 'Mercedes-Benz_C11', 'Mercedes-Benz_C111', 'Mercedes-Benz_C112', 'Mercedes-Benz_C291', 'Mercedes-Benz_C292', 'Mercedes-Benz_C-Class', 'Mercedes-Benz_Citaro', 'Mercedes-Benz_Cito', 'Mercedes-Benz_CLC-Class', 'Mercedes-Benz_CL-Class', 'Mercedes-Benz_CLK_GTR', 'Mercedes-Benz_CLK-AMG_Black_Series', 'Mercedes-Benz_CLK-Class', 'Mercedes-Benz_CLR', 'Mercedes-Benz_CLS-Class', 'Mercedes-Benz_ConceptFASCINATION', 'Mercedes-Benz_E-Class', 'Mercedes-Benz_Econic', 'Mercedes-Benz_F_200_Imagination', 'Mercedes-Benz_F700', 'Mercedes-Benz_Fintail', 'Mercedes-Benz_G-Class', 'Mercedes-Benz_GL-Class', 'Mercedes-Benz_GLK-Class', 'Mercedes-Benz_L-series_truck', 'Mercedes-Benz_M100_engine', 'Mercedes-Benz_M103_engine', 'Mercedes-Benz_M104_engine', 'Mercedes-Benz_M110_engine', 'Mercedes-Benz_M110_engine', 'Mercedes-Benz_M116_engine', 'Mercedes-Benz_M117_engine', 'Mercedes-Benz_M119_engine', 'Mercedes-Benz_M120_engine', 'Mercedes-Benz_M156_engine', 'Mercedes-Benz_MB100', 'Mercedes-Benz_M-Class', 'Mercedes-Benz_O305', 'Mercedes-Benz_O309', 'Mercedes-Benz_O370', 'Mercedes-Benz_O405', 'Mercedes-Benz_OC500LE', 'Mercedes-Benz_Ocean_Drive', 'Mercedes-Benz_OM602_engine', 'Mercedes-Benz_OM603', 'Mercedes-Benz_OM603_engine', 'Mercedes-Benz_OM611_engine', 'Mercedes-Benz_OM612_engine', 'Mercedes-Benz_OM616', 'Mercedes-Benz_OM617_engine', 'Mercedes-Benz_OM647', 'Mercedes-Benz_Ponton', 'Mercedes-Benz_R107', 'Mercedes-Benz_R129', 'Mercedes-Benz_R170', 'Mercedes-Benz_R231', 'Mercedes-Benz_R-Class', 'Mercedes-Benz_S-Class', 'Mercedes-Benz_S-Class_Hybrid', 'Mercedes-Benz_SL-Class', 'Mercedes-Benz_SLK-Class', 'Mercedes-Benz_SLR_McLaren', 'Mercedes-Benz_SLS_AMG', 'Mercedes-Benz_Sprinter', 'Mercedes-Benz_SSK', 'Mercedes-Benz_T2', 'Mercedes-Benz_T80', 'Mercedes-Benz_TN', 'Mercedes-Benz_Type_300', 'Mercedes-Benz_Vario', 'Mercedes-Benz_V-Class', 'Mercedes-Benz_Viano', 'Mercedes-Benz_Vito', 'Mercedes-Benz_W10', 'Mercedes-Benz_W107_350SL', 'Mercedes-Benz_W108', 'Mercedes-Benz_W109', 'Mercedes-Benz_W111', 'Mercedes-Benz_W112', 'Mercedes-Benz_W113', 'Mercedes-Benz_W114', 'Mercedes-Benz_W116', 'Mercedes-Benz_W116', 'Mercedes-Benz_W120/121', 'Mercedes-Benz_W120/121', 'Mercedes-Benz_W123', 'Mercedes-Benz_W125', 'Mercedes-Benz_W125_Rekordwagen', 'Mercedes-Benz_W126', 'Mercedes-Benz_W128', 'Mercedes-Benz_W136', 'Mercedes-Benz_W140', 'Mercedes-Benz_W154', 'Mercedes-Benz_W180', 'Mercedes-Benz_W187', 'Mercedes-Benz_W196', 'Mercedes-Benz_W201', 'Mercedes-Benz_W211', 'Mercedes-Benz_W212', 'Mercedes-Benz_W219', 'Mercedes-Benz_W219', 'Mercedes-Benz_W220', 'Mercedes-Benz_W221', 'Mercedes-Benz_W245', 'Mercedes-Benz_W25', 'Mercedes-Benz_W251', 'Mercedes-Benz_Zetros', 'Merkur_XR4Ti', 'Messerschmitt', 'Messerschmitt-B%C3%B6lkow-Blohm', 'Metric_horsepower', 'Meyers_Manx', 'Michael_Macht', 'Michael_Schubert', 'Mid-engine_design', 'Mini_%28BMW%29', 'Mini_E', 'MK-Motorsport', 'Mots%27eoa_Senyane', 'Multi-valve', 'Neckar_%28car%29', 'Nelson_Algren', 'Neoplan', 'Neue_Automobil_Gesellschaft', 'Norbert_Haug', 'Norbert_Reithofer', 'Novitec_Rosso', 'NSU_Motorenwerke_AG', 'NSU_Ro_80', 'NSU_Spider', 'NSU_Typ_110', 'Ohc', 'OHV', 'Ohv', 'Opel', 'Opel_Admiral', 'Opel_Agila', 'Opel_Antara', 'Opel_Ascona', 'Opel_Astra', 'Opel_Blitz', 'Opel_Calibra', 'Opel_Combo', 'Opel_Commodore', 'Opel_Corsa', 'Opel_Diplomat', 'Opel_Flextreme', 'Opel_Frogster', 'Opel_GT', 'Opel_GTC', 'Opel_Insignia', 'Opel_Kadett', 'Opel_Kapit%C3%A4n', 'Opel_Laubfrosch', 'Opel_Manta', 'Opel_Meriva', 'Opel_Movano', 'Opel_Olympia', 'Opel_Omega', 'Opel_RAK.1', 'Opel_Rekord', 'Opel_Senator', 'Opel_Signum', 'Opel_Sintra', 'Opel_Super_Six', 'Opel_Tigra', 'Opel_Trixx', 'Opel_Vectra', 'Opel_Vivaro', 'Opel_Zafira', 'Opelit_Mopetta', 'Overhead_camshaft', 'Overhead_valve', 'Pawi_%28automobile%29', 'Petrol_engine', 'Pilot_%28automobile%29', 'Porsche', 'Porsche_114', 'Porsche_356', 'Porsche_356/1', 'Porsche_360', 'Porsche_550', 'Porsche_597', 'Porsche_64', 'Porsche_695', 'Porsche_718', 'Porsche_787', 'Porsche_804', 'Porsche_901', 'Porsche_904', 'Porsche_906', 'Porsche_907', 'Porsche_908', 'Porsche_909', 'Porsche_910', 'Porsche_911', 'Porsche_911', 'Porsche_911_classic', 'Porsche_911_GT1', 'Porsche_911_GT2', 'Porsche_911_GT3', 'Porsche_911T', 'Porsche_912', 'Porsche_914', 'Porsche_914-6_GT', 'Porsche_917', 'Porsche_924', 'Porsche_928', 'Porsche_930', 'Porsche_934', 'Porsche_935', 'Porsche_936', 'Porsche_944', 'Porsche_953', 'Porsche_956', 'Porsche_959', 'Porsche_961', 'Porsche_962', 'Porsche_964', 'Porsche_968', 'Porsche_989', 'Porsche_993', 'Porsche_996', 'Porsche_997', 'Porsche_9FF_GT9', 'Porsche_Boxster', 'Porsche_Carrera_GT', 'Porsche_Cayenne', 'Porsche_Cayman', 'Porsche_GT1', 'Porsche_Junior', 'Porsche_LMP', 'Porsche_Panamera', 'Porsche_Panamericana', 'Porsche_Roxster', 'Porsche_RS_Spyder', 'Porsche_Salzburg', 'Porsche_Super', 'Porsche_Varrera', 'Porsche_WSC-95', 'PPI_Automotive_Design', 'President', 'Prince_engine', 'Quattro_GmbH', 'Rainer_G%C3%B6lz', 'Rear-Engine_Mercedes-Benz', 'Rear-wheel_drive', 'Red_Barber', 'Rheinmetall', 'Robur_%28truck%29', 'Rodney_Scott_Webb', 'Roland_Gumpert', 'Rolf-W._Walter', 'Rolls-Royce_Ghost', 'Rolls-Royce_Phantom_%282003%29', 'Rudolf_Diesel', 'Rudolf_Leiding', 'Ruf_3400S', 'Ruf_Automobile', 'Ruf_BTR', 'Ruf_CTR', 'Ruf_CTR2', 'Ruf_CTR3', 'Ruf_R_Kompressor', 'Ruf_RGT', 'Ruf_RK_Coupe', 'Ruf_Rt_12', 'Ruf_RTurbo', 'Ruf_Turbo_R', 'Rumpler_Tropfenwagen', 'Rupert_Stadler', 'Rupinder_Nagra', 'Sablatnig-Beuchelt', 'Sachsenring_P240', 'SAIC-Volkswagen_Lavida', 'Saltus-Werk_Max_Forst_GmbH', 'Samaria_%28Mitcham%29_Bailey', 'Samba_%28bus%29', 'Samuel_de_Champlain', 'Scotty_Bloch', 'Selve', 'Semcon', 'Serena_Wilson', 'Side_valve', 'Siegmund_Lubin', 'Single_cylinder_engine', 'Smart_%28automobile%29', 'Smart_Crosstown', 'Smart_ED', 'Smart_Forfour', 'Smart_Formore', 'Smart_Fortwo', 'Smart_Roadster', 'SOHC', 'Solidor', 'Standard_%281911_automobile%29', 'Standard_%281933_automobile%29', 'Standard_Superior', 'Stanley_%28vehicle%29', 'Staunau', 'Steiger_%28automobile_company%29', 'Stephan_Reil', 'Stephan_Schaller', 'Steven_Woods', 'Stoewer', 'Straight-2', 'Straight-3', 'Straight-4', 'Straight-5', 'Straight-6', 'Straight-8', 'Straight-three_engine', 'Suction_Diesel_Injection', 'Supercharged', 'Supervisory_board', 'Supervisory_Board', 'T._I._Weerathunga', 'TDI', 'TechArt_997_Carrera', 'TechArt_997_Turbo', 'TECHART_GTsport', 'TechArt_Magnum', 'Tempo_%28car%29', 'Toni_Schm%C3%BCcker', 'Trabant', 'Trabant', 'Tritec_engine', 'Turbo', 'Turbo_Direct_Injection', 'Turbocharged', 'Turbocharged_Direct_Injection', 'Turbocharger', 'Turbodiesel', 'Twincharger', 'Twin-Turbo', 'Twin-turbo', 'Two_stroke', 'Two-stroke', 'Unimog', 'United_States', 'V10_engine', 'V12_engine', 'V6', 'V6_engine', 'V8', 'V8_engine', 'V8_TT', 'Vauxhall_Carlton', 'Volkswagen', 'Volkswagen_181', 'Volkswagen_1-litre_car', 'Volkswagen_A_platform', 'Volkswagen_A0_platform', 'Volkswagen_air_cooled_engine', 'Volkswagen_Amarok', 'Volkswagen_Apollo', 'Volkswagen_ARVW', 'Volkswagen_B_platform', 'Volkswagen_Beetle', 'Volkswagen_Beetle_in_Mexico', 'Volkswagen_Bio_Runner', 'Volkswagen_Brasilia', 'Volkswagen_Bus', 'Volkswagen_Caddy', 'Volkswagen_California', 'Volkswagen_Caravelle', 'Volkswagen_Citi_Golf', 'Volkswagen_Commercial_Vehicles', 'Volkswagen_Concept_A', 'Volkswagen_Concept_BlueSport', 'Volkswagen_Concept_R', 'Volkswagen_Constellation', 'Volkswagen_Corrado', 'Volkswagen_Country_Buggy', 'Volkswagen_Crafter', 'Volkswagen_D24_engine', 'Volkswagen_D24T_engine', 'Volkswagen_D24TIC_engine', 'Volkswagen_Delivery', 'Volkswagen_Derby', 'Volkswagen_EA489_Basistransporter', 'Volkswagen_EA827_engine', 'Volkswagen_EcoRacer', 'Volkswagen_Eos', 'Volkswagen_Fox', 'Volkswagen_Gol', 'Volkswagen_Golf', 'Volkswagen_Golf_Cabriolet', 'Volkswagen_Golf_Mk1', 'Volkswagen_Golf_Mk2', 'Volkswagen_Golf_Mk3', 'Volkswagen_Golf_Mk4', 'Volkswagen_Golf_Mk5', 'Volkswagen_Golf_Mk6', 'Volkswagen_Golf_Variant', 'Volkswagen_Group_A_platform', 'Volkswagen_Group_A0_platform', 'Volkswagen_Group_A00_platform', 'Volkswagen_Group_B_platform', 'Volkswagen_Group_C_platform', 'Volkswagen_Group_D_platform', 'Volkswagen_Group_PL71_platform', 'Volkswagen_Group_T_platform', 'Volkswagen_GX3', 'Volkswagen_Iltis', 'Volkswagen_Jetta', 'Volkswagen_K%C3%BCbelwagen', 'Volkswagen_K70', 'Volkswagen_Karmann_Ghia', 'Volkswagen_L80', 'Volkswagen_LT', 'Volkswagen_Lupo', 'Volkswagen_Microbus_Concept', 'Volkswagen_New_Beetle', 'Volkswagen_New_Compact_Sedan', 'Volkswagen_New_Midsize_Sedan', 'Volkswagen_New_Small_Family', 'Volkswagen_Passat', 'Volkswagen_Passat_CC', 'Volkswagen_Phaeton', 'Volkswagen_Plattenwagen', 'Volkswagen_Pointer', 'Volkswagen_Polo', 'Volkswagen_Polo_G40', 'Volkswagen_Polo_GTI', 'Volkswagen_Polo_Mk1', 'Volkswagen_Polo_Mk2', 'Volkswagen_Polo_Mk3', 'Volkswagen_Polo_Mk4', 'Volkswagen_Polo_Mk5', 'Volkswagen_Polo_Playa', 'Volkswagen_Routan', 'Volkswagen_Schwimmwagen', 'Volkswagen_Scirocco', 'Volkswagen_Sharan', 'Volkswagen_SP2', 'Volkswagen_Taro', 'Volkswagen_Tiguan', 'Volkswagen_Touareg', 'Volkswagen_Touran', 'Volkswagen_Transporter', 'Volkswagen_Transporter_%28T4%29', 'Volkswagen_Transporter_%28T5%29', 'Volkswagen_Type_147_Kleinlieferwagen', 'Volkswagen_Type_14A_%28Hebm%C3%BCller_Cabriolet%29', 'Volkswagen_Type_18A', 'Volkswagen_Type_2', 'Volkswagen_Type_2_%28T3%29', 'Volkswagen_Type_3', 'Volkswagen_Type_4', 'Volkswagen_up%21', 'Volkswagen_Volksbus', 'Volkswagen_W12', 'Volkswagen_Westfalia_Campers', 'Volkswagen_Worker', 'Vorstand', 'VR5_engine', 'VR6_engine', 'VW_276_Schlepperfahrzeug', 'VW_Camper-Riviera', 'W12_engine', 'W16_engine', 'Wankel_engine', 'Wartburg_%28car%29', 'Wartburg_311', 'Wartburg_353', 'Wasserboxer', 'Weineck_Cobra_Limited_Edition', 'Wenkelmobil', 'Westfalia', 'Wiesmann', 'Wilbur_Mitcham', 'Wilhelm_Maybach', 'William_Trautmann', 'Winfred_Dukes', 'Witte_Automotive', 'Woco_Group', 'Z%C3%BCndapp', 'Zollner', 'Zwickau_%28car%29');
foreach ($ultrapedia_instances as $pageTitle) {
    $pageSource = getSource($pageTitle);
    if (!$pageSource) {
        echo 'Cannot retrieve \'' . $pageTitle . '\'' . PHP_EOL;
        continue;
    }
    $pageTitle = str_replace('/', '%2F', $pageTitle);
    if (file_put_contents("../resources/source/" . $pageTitle . ".txt", $pageSource) === false) {
        echo 'Could no write file ' . $pageTitle . '.txt' . PHP_EOL;
    }
}
echo 'DONE' . PHP_EOL;
function getSource($pageID)
{
    //$url = "http://en.wikipedia.org/wiki/Special:Export/$pageID";
    $url = "http://wiking.vulcan.com/wp/index.php/Special:Export/{$pageID}";
    //echo $url; die;
    $context = stream_context_create(array("http" => array("user_agent" => "DBpedia")));
    //echo $context;die;
    $xml = simplexml_load_string(file_get_contents($url, false, $context));
    //echo  $xml->page->revision->text;die;
    if (!$xml->page || !$xml->page->revision) {
        return null;
    }
    return $xml->page->revision->text;
예제 #2
0
파일: Pert.php 프로젝트: hardwork2015/cdp
 public function calculPlusTot($etat, $arc)
 {
     $taches = Tache::all();
     foreach ($taches as $tache) {
         $duree[$tache->code] = abs(strtotime($tache->start_date) - strtotime($tache->end_date)) / 60 / 60 / 24;
     }
     if ($arc->isReel()) {
         if ($arc->getSource()->getAuPlusTot() + $duree[$arc->getTache()->code] > $etat->getAuPlusTot()) {
             $etat->setAuPlusTot($arc->getSource()->getAuPlusTot() + $duree[$arc->getTache()->code]);
             for ($i = 1; $i < count($this->getArcReals()); $i++) {
                 $arc = $this->getArcReals()[$i];
                 if ($arc . getSource() == $etat) {
                     $this->calculateAuPlusTard($arc->getDestination(), $arc);
                 }
             }
         }
     }
 }
예제 #3
0
    print 'Sorry, you need to enter an address to edit</body></html>';
    die;
}
$s = new Site($_GET['address']);
if (!$s->loaded) {
    $s->checkWWW();
}
if ($s->lock) {
    print "Sorry, this page is locked</body></html>";
    die;
}
?>
<h1 class="center">Edit this page</h1>
<?php 
if (isset($_SESSION['userdata'])) {
    $source = WikiWideWebize($s, getSource($_GET['address']));
    ?>

<form action="/doedit" method="post">
<input type="hidden" name="address" value="<?php 
    print $_GET['address'];
    ?>
" />
<textarea rows="15" cols="80" name="source"><?php 
    print $source;
    ?>
</textarea><br />
Comment: <input type="text" name="comment" />
<p class="center"><input type="submit" value="Make Changes" /></p>
</form>
<?php 
예제 #4
0
function showPollGroupAnswerPreview($group)
{
    echo '<div class="poll_item">';
    echo '<center><h1>' . $group['title'] . '</h1></center>';
    echo '<center><p style="padding-bottom: 30px;">' . $group['description'] . '</p></center>';
    $polls_group = getPollsFromGroup($group['groupId']);
    foreach ($polls_group as $poll) {
        echo '<div style="width: 100%; overflow: hidden; padding-top: 20px; padding-bottom: 20px;  padding-left: 5px;">';
        echo '<div style="width:70%; float: left;">';
        echo '<h2>' . $poll['title'] . '</h2>';
        $poll_options = getPollOptionsByPollId($poll['id']);
        foreach ($poll_options as $poll_option) {
            //echo '<p>'.'ggggg'.'</p>'.'<br>';
            echo '<p>' . $poll_option['optionText'] . '</p>' . '<br>';
        }
        echo '</div>';
        echo '<div class="square" style="margin-left: 70%">';
        $src = getSource($poll['id']);
        echo '<img src="' . $src . '" alt="" width:"auto"; height:"auto;">';
        echo '</div>';
        echo '</div>';
    }
    echo '</div>';
}
예제 #5
0
function showResults()
{
    global $Actual_link;
    global $Lang;
    $Actual_link = "http://{$_SERVER['HTTP_HOST']}{$_SERVER['REQUEST_URI']}";
    if (strpos($Actual_link, '/en/') !== false) {
        $Lang = 'en/';
    } else {
        if (strpos($Actual_link, '/el/') !== false) {
            $Lang = 'el/';
        } else {
            $Lang = '';
        }
    }
    global $prefix;
    global $Results;
    $source = ' ';
    $double = array();
    //make array unique
    $uniqueResults = unique_multidim_array($Results, 'link');
    ////////check for diaugeiaKhmdhs////////
    ////////////////////////////////////////
    //////////////////////////////////////////
    foreach ($uniqueResults as $key => $row) {
        $id[$key] = $row['id'];
    }
    //print_r($id);
    array_multisort($id, SORT_ASC, $uniqueResults);
    $uniqueResults = array_reverse($uniqueResults);
    //print_r ($uniqueResults);
    $last_item = NULL;
    $last_item_2 = NULL;
    $last_item_3 = NULL;
    $last_item_4 = NULL;
    $numItems = count($uniqueResults);
    $c = 0;
    foreach ($uniqueResults as $key => &$row) {
        //diaygeia + khmdhs (2 records) become  diaygeiakhmdhs (1 record) for buyer and one for seller if exist
        echo $c . 'for<br>';
        if (strpos($row['link'], 'diaugeia/organization-hybrid') !== false) {
            $row['link'] = str_replace('diaugeia/organization-hybrid', 'zdiaugeia/diaugeia-hybrids', $row['link']);
        }
        if (strpos($row['link'], 'organization-beneficiary') !== false) {
            $row['link'] = str_replace('organization-beneficiary', 'zorganization-beneficiary', $row['link']);
        }
        echo 'r=' . $row['link'] . '<br>';
        echo 'l2=' . $last_item_2['link'] . '<br>';
        //echo substr($row['link'],strpos($row['link'], "?=") );
        if ($last_item['id'] === $row['id']) {
            //if (($last_item['id'] === $row['id']) || (substr($row['link'],strpos($row['link'], "?=") ) ==  substr($last_item['link'],strpos($last_item['link'], "?=") ) ))  {
            //if	((substr($row['id'],strpos($row['id'], "?=") )) == (substr($last_item['id'],strpos($last_item['id'], "?=") ))) {
            $double[] = $last_item;
            //copy doubles to other table
            //echo $last_item['id'].'/deleted<br>';
            if (strpos($row['link'], '/diaugeia/') !== false) {
                //DIAUGEIA
                $row['dk_flag'] = 'd';
                $row['link'] = str_replace('diaugeia', 'diaugeiakhmdhs', $row['link']);
                $row['lastUpdate_2'] = $last_item['lastUpdate'];
                $row['contractAmountPrev_2'] = $last_item['contractAmountPrev'];
                $row['contractAmountCur_2'] = $last_item['contractAmountCur'];
                $row['paymentAmountPrev_2'] = $last_item['paymentAmountPrev'];
                $row['paymentAmountCur_2'] = $last_item['paymentAmountCur'];
                $row['contractItemsNo_2'] = $last_item['contractItemsNo'];
                $row['paymentItemsNo_2'] = $last_item['paymentItemsNo'];
            } else {
                if (strpos($row['link'], '/khmdhs/') !== false) {
                    //KHMDHS
                    $row['dk_flag'] = 'k';
                    $row['link'] = str_replace('khmdhs', 'diaugeiakhmdhs', $row['link']);
                    $row['address'] = $last_item['address'];
                    $row['pc'] = $last_item['pc'];
                    $row['city'] = $last_item['city'];
                    $row['lastUpdate_2'] = $last_item['lastUpdate'];
                    //echo $row['lastUpdate_2'];
                    $row['award0_2'] = $last_item['award0'];
                    $row['award1_2'] = $last_item['award1'];
                    $row['award2_2'] = $last_item['award2'];
                    $row['awardCnt0_2'] = $last_item['awardCnt0'];
                    $row['awardCnt1_2'] = $last_item['awardCnt1'];
                    $row['awardCnt2_2'] = $last_item['awardCnt2'];
                    $row['spend0_2'] = $last_item['spend0'];
                    $row['spend1_2'] = $last_item['spend1'];
                    $row['spend2_2'] = $last_item['spend2'];
                    $row['spendCnt0_2'] = $last_item['spendCnt0'];
                    $row['spendCnt1_2'] = $last_item['spendCnt1'];
                    $row['spendCnt2_2'] = $last_item['spendCnt2'];
                }
            }
            $row['score'] = $row['score'] + $last_item['score'];
        }
        if (substr($row['id'], strpos($row['id'], "?=")) == substr($last_item['id'], strpos($last_item['id'], "?=")) && substr($last_item_2['id'], strpos($last_item_2['id'], "?=")) == substr($last_item['id'], strpos($last_item['id'], "?="))) {
            echo 'found:' . substr($row['id'], strpos($row['id'], "?="));
            echo 'found:' . substr($last_item_2['id'], strpos($last_item_2['id'], "?="));
            $double[] = $last_item_2;
            echo $last_item_2['link'] . 'ok!<br>';
        }
        //echo 'current '.$row['id'].'<br>';
        //echo 'prev '.$last_item['id'].'<br>';
        if (++$c !== $numItems) {
            //echo "not last index!";
            $last_item = $row;
            $last_item_2 = $last_item;
        }
    }
    //print_r($double);
    $c = 0;
    $toMerge = 0;
    //$sort = array();
    /////////////////hybrid///////////////////////////////////////////////////////////////////////////////////
    /////////////////////////////////////////////////////////////////////////////////////////////////////////
    ////////////////////////////////////////////////////////////////////////////////////////////////////////
    foreach ($uniqueResults as $key => &$row) {
        $sort['id'][$key] = substr($row['id'], strpos($row['id'], "?="));
        $sort['link'][$key] = $row['link'];
    }
    array_multisort($sort['id'], SORT_ASC, $sort['link'], SORT_ASC, $uniqueResults);
    foreach ($uniqueResults as $key => &$row) {
        //echo $row['link'].'<br>';
        if (strpos($row['link'], 'zdiaugeia') !== false) {
            if (substr($row['id'], strpos($row['id'], "?=")) == substr($last_item['id'], strpos($last_item['id'], "?="))) {
                //echo $last_item['id'].'<br>';
                if (strpos($last_item['link'], '/diaugeia/') !== false || strpos($last_item['link'], '/diaugeiakhmdhs/') !== false) {
                    $double[] = $last_item;
                }
                if (strpos($last_item['link'], '/khmdhs/') !== false) {
                    $double[] = $last_item;
                    if (strpos($last_item['link'], 'seller') !== false) {
                        $row['linkHKS'] = $last_item['link'];
                        $row['contractAmountPrevHKS'] = $last_item['contractAmountPrev'];
                        $row['contractAmountCurHKS'] = $last_item['contractAmountCur'];
                        $row['paymentAmountPrevHKS'] = $last_item['paymentAmountPrev'];
                        $row['paymentAmountCurHKS'] = $last_item['paymentAmountCur'];
                        $row['contractItemsNoHKS'] = $last_item['contractItemsNo'];
                        $row['paymentItemsNoHKS'] = $last_item['paymentItemsNo'];
                        $row['lastUpdateHKS'] = $last_item['lastUpdate'];
                    } else {
                        $row['linkHKB'] = $last_item['link'];
                        $row['contractAmountPrevHKB'] = $last_item['contractAmountPrev'];
                        $row['contractAmountCurHKB'] = $last_item['contractAmountCur'];
                        $row['paymentAmountPrevHKB'] = $last_item['paymentAmountPrev'];
                        $row['paymentAmountCurHKB'] = $last_item['paymentAmountCur'];
                        $row['contractItemsNoHKB'] = $last_item['contractItemsNo'];
                        $row['paymentItemsNoHKB'] = $last_item['paymentItemsNo'];
                        $row['lastUpdateHKB'] = $last_item['lastUpdate'];
                    }
                }
                if (substr($last_item_2['id'], strpos($last_item_2['id'], "?=")) == substr($last_item['id'], strpos($last_item['id'], "?="))) {
                    //echo $last_item_2['id'].'<br>';
                    if (strpos($last_item_2['link'], '/diaugeia/') !== false || strpos($last_item_2['link'], '/diaugeiakhmdhs/') !== false) {
                        $double[] = $last_item_2;
                    }
                    if (strpos($last_item_2['link'], '/khmdhs/') !== false) {
                        $double[] = $last_item_2;
                        if (strpos($last_item_2['link'], 'seller') !== false) {
                            $row['linkHKS'] = $last_item_2['link'];
                            $row['contractAmountPrevHKS'] = $last_item_2['contractAmountPrev'];
                            $row['contractAmountCurHKS'] = $last_item_2['contractAmountCur'];
                            $row['paymentAmountPrevHKS'] = $last_item_2['paymentAmountPrev'];
                            $row['paymentAmountCurHKS'] = $last_item_2['paymentAmountCur'];
                            $row['contractItemsNoHKS'] = $last_item_2['contractItemsNo'];
                            $row['paymentItemsNoHKS'] = $last_item_2['paymentItemsNo'];
                            $row['lastUpdateHKS'] = $last_item_2['lastUpdate'];
                        } else {
                            $row['linkHKB'] = $last_item_2['link'];
                            $row['contractAmountPrevHKB'] = $last_item_2['contractAmountPrev'];
                            $row['contractAmountCurHKB'] = $last_item_2['contractAmountCur'];
                            $row['paymentAmountPrevHKB'] = $last_item_2['paymentAmountPrev'];
                            $row['paymentAmountCurHKB'] = $last_item_2['paymentAmountCur'];
                            $row['contractItemsNoHKB'] = $last_item_2['contractItemsNo'];
                            $row['paymentItemsNoHKB'] = $last_item_2['paymentItemsNo'];
                            $row['lastUpdateHKB'] = $last_item_2['lastUpdate'];
                        }
                    }
                    if (substr($last_item_3['id'], strpos($last_item_3['id'], "?=")) == substr($last_item_2['id'], strpos($last_item_2['id'], "?="))) {
                        // echo $last_item_3['id'].'<br>';
                        if (strpos($last_item_3['link'], '/diaugeia/') !== false || strpos($last_item_3['link'], '/diaugeiakhmdhs/') !== false) {
                            $double[] = $last_item_3;
                        }
                        if (strpos($last_item_3['link'], '/khmdhs/') !== false) {
                            $double[] = $last_item_3;
                            if (strpos($last_item_3['link'], 'seller') !== false) {
                                $row['linkHKS'] = $last_item_3['link'];
                                $row['contractAmountPrevHKS'] = $last_item_3['contractAmountPrev'];
                                $row['contractAmountCurHKS'] = $last_item_3['contractAmountCur'];
                                $row['paymentAmountPrevHKS'] = $last_item_3['paymentAmountPrev'];
                                $row['paymentAmountCurHKS'] = $last_item_3['paymentAmountCur'];
                                $row['contractItemsNoHKS'] = $last_item_3['contractItemsNo'];
                                $row['paymentItemsNoHKS'] = $last_item_3['paymentItemsNo'];
                                $row['lastUpdateHKS'] = $last_item_3['lastUpdate'];
                            } else {
                                $row['linkHKB'] = $last_item_3['link'];
                                $row['contractAmountPrevHKB'] = $last_item_3['contractAmountPrev'];
                                $row['contractAmountCurHKB'] = $last_item_3['contractAmountCur'];
                                $row['paymentAmountPrevHKB'] = $last_item_3['paymentAmountPrev'];
                                $row['paymentAmountCurHKB'] = $last_item_3['paymentAmountCur'];
                                $row['contractItemsNoHKB'] = $last_item_3['contractItemsNo'];
                                $row['paymentItemsNoHKB'] = $last_item_3['paymentItemsNo'];
                                $row['lastUpdateHKB'] = $last_item_3['lastUpdate'];
                            }
                        }
                        if (substr($last_item_4['id'], strpos($last_item_4['id'], "?=")) == substr($last_item_3['id'], strpos($last_item_3['id'], "?="))) {
                            //echo $last_item_4['id'].'<br>';
                            if (strpos($last_item_4['link'], '/diaugeia/') !== false || strpos($last_item_4['link'], '/diaugeiakhmdhs/') !== false) {
                                $double[] = $last_item_4;
                            }
                            if (strpos($last_item_4['link'], '/khmdhs/') !== false) {
                                $double[] = $last_item_4;
                                if (strpos($last_item_4['link'], 'seller') !== false) {
                                    $row['linkHKS'] = $last_item_4['link'];
                                    $row['contractAmountPrevHKS'] = $last_item_4['contractAmountPrev'];
                                    $row['contractAmountCurHKS'] = $last_item_4['contractAmountCur'];
                                    $row['paymentAmountPrevHKS'] = $last_item_4['paymentAmountPrev'];
                                    $row['paymentAmountCurHKS'] = $last_item_4['paymentAmountCur'];
                                    $row['contractItemsNoHKS'] = $last_item_4['contractItemsNo'];
                                    $row['paymentItemsNoHKS'] = $last_item_4['paymentItemsNo'];
                                    $row['lastUpdateHKS'] = $last_item_4['lastUpdate'];
                                } else {
                                    $row['linkHKB'] = $last_item_4['link'];
                                    $row['contractAmountPrevHKB'] = $last_item_4['contractAmountPrev'];
                                    $row['contractAmountCurHKB'] = $last_item_4['contractAmountCur'];
                                    $row['paymentAmountPrevHKB'] = $last_item_4['paymentAmountPrev'];
                                    $row['paymentAmountCurHKB'] = $last_item_4['paymentAmountCur'];
                                    $row['contractItemsNoHKB'] = $last_item_4['contractItemsNo'];
                                    $row['paymentItemsNoHKB'] = $last_item_4['paymentItemsNo'];
                                    $row['lastUpdateHKB'] = $last_item_4['lastUpdate'];
                                }
                            }
                        }
                    }
                }
            }
        }
        if (++$c !== $numItems) {
            //echo "not last index!";
            $last_item_4 = $last_item_3;
            $last_item_3 = $last_item_2;
            $last_item_2 = $last_item;
            $last_item = $row;
        }
    }
    /////////Espa///////////////////////////////////////////////////////////////////////////////////////
    ///////////////////////////////////////////////////////////////////////////////////////////////////
    //////////////////////////////////////////////////////////////////////////////////////////////////
    foreach ($uniqueResults as $key => &$row) {
        $sort['id'][$key] = substr($row['id'], strpos($row['id'], "?="));
        $sort['link'][$key] = $row['link'];
    }
    array_multisort($sort['id'], SORT_ASC, $sort['link'], SORT_ASC, $uniqueResults);
    foreach ($uniqueResults as $key => &$row) {
        //echo 'r='.$row['link'].'<br>';
        //echo 'l='.$last_item['link'].'<br>';
        //echo 'l2='.$last_item_2['link'].'<br>';
        //echo 'l3='.$last_item_3['link'].'<br>';
        //echo 'l4='.$last_item_4['link'].'<br>';
        if (strpos($row['link'], 'espa') !== false || strpos($row['link'], 'beneficiary') !== false) {
            if (substr($row['id'], strpos($row['id'], "?=")) == substr($last_item['id'], strpos($last_item['id'], "?="))) {
                //echo '1'.$last_item['link'].'<br>';
                if (strpos($last_item['link'], '/diaugeia/') !== false || strpos($last_item['link'], '/diaugeiakhmdhs/') !== false || strpos($last_item['link'], 'hybrid') !== false) {
                    $double[] = $last_item;
                    //for hide
                    if (strpos($last_item['link'], 'seller') !== false) {
                        $row['linkEDS'] = $last_item['link'];
                        $row['award0EDS'] = $last_item['award0'];
                        $row['award1EDS'] = $last_item['award1'];
                        $row['award2EDS'] = $last_item['award2'];
                        $row['awardCnt0EDS'] = $last_item['awardCnt0'];
                        $row['awardCnt1EDS'] = $last_item['awardCnt1'];
                        $row['awardCnt2EDS'] = $last_item['awardCnt2'];
                        $row['spend0EDS'] = $last_item['spend0'];
                        $row['spend1EDS'] = $last_item['spend1'];
                        $row['spend2EDS'] = $last_item['spend2'];
                        $row['spendCnt0EDS'] = $last_item['spendCnt0'];
                        $row['spendCnt1EDS'] = $last_item['spendCnt1'];
                        $row['spendCnt2EDS'] = $last_item['spendCnt2'];
                        $row['lastUpdateEDS'] = $last_item['lastUpdate'];
                    } else {
                        $row['linkEDB'] = $last_item['link'];
                        $row['award0EDB'] = $last_item['award0'];
                        $row['award1EDB'] = $last_item['award1'];
                        $row['award2EDB'] = $last_item['award2'];
                        $row['awardCnt0EDB'] = $last_item['awardCnt0'];
                        $row['awardCnt1EDB'] = $last_item['awardCnt1'];
                        $row['awardCnt2EDB'] = $last_item['awardCnt2'];
                        $row['spend0EDB'] = $last_item['spend0'];
                        $row['spend1EDB'] = $last_item['spend1'];
                        $row['spend2EDB'] = $last_item['spend2'];
                        $row['spendCnt0EDB'] = $last_item['spendCnt0'];
                        $row['spendCnt1EDB'] = $last_item['spendCnt1'];
                        $row['spendCnt2EDB'] = $last_item['spendCnt2'];
                        $row['lastUpdateEDB'] = $last_item['lastUpdate'];
                    }
                }
                if (strpos($last_item['link'], '/khmdhs/') !== false) {
                    $double[] = $last_item;
                    // for hide
                    if (strpos($last_item['link'], 'seller') !== false) {
                        $row['linkEKS'] = $last_item['link'];
                        $row['contractAmountPrevEKS'] = $last_item['contractAmountPrev'];
                        $row['contractAmountCurEKS'] = $last_item['contractAmountCur'];
                        $row['paymentAmountPrevEKS'] = $last_item['paymentAmountPrev'];
                        $row['paymentAmountCurEKS'] = $last_item['paymentAmountCur'];
                        $row['contractItemsNoEKS'] = $last_item['contractItemsNo'];
                        $row['paymentItemsNoEKS'] = $last_item['paymentItemsNo'];
                        $row['lastUpdateEKS'] = $last_item['lastUpdate'];
                    } else {
                        $row['linkEKB'] = $last_item['link'];
                        $row['contractAmountPrevEKB'] = $last_item['contractAmountPrev'];
                        $row['contractAmountCurEKB'] = $last_item['contractAmountCur'];
                        $row['paymentAmountPrevEKB'] = $last_item['paymentAmountPrev'];
                        $row['paymentAmountCurEKB'] = $last_item['paymentAmountCur'];
                        $row['contractItemsNoEKB'] = $last_item['contractItemsNo'];
                        $row['paymentItemsNoEKB'] = $last_item['paymentItemsNo'];
                        $row['lastUpdateEKB'] = $last_item['lastUpdate'];
                    }
                }
                if (substr($last_item_2['id'], strpos($last_item_2['id'], "?=")) == substr($last_item['id'], strpos($last_item['id'], "?="))) {
                    //echo '2'.$last_item_2['link'].'<br>';
                    if (strpos($last_item_2['link'], '/diaugeia/') !== false || strpos($last_item_2['link'], '/diaugeiakhmdhs/') !== false || strpos($last_item_2['link'], 'hybrid') !== false) {
                        $double[] = $last_item_2;
                        //for hide
                        if (strpos($last_item_2['link'], 'seller') !== false) {
                            $row['linkEDS'] = $last_item_2['link'];
                            $row['award0EDS'] = $last_item_2['award0'];
                            $row['award1EDS'] = $last_item_2['award1'];
                            $row['award2EDS'] = $last_item_2['award2'];
                            $row['awardCnt0EDS'] = $last_item_2['awardCnt0'];
                            $row['awardCnt1EDS'] = $last_item_2['awardCnt1'];
                            $row['awardCnt2EDS'] = $last_item_2['awardCnt2'];
                            $row['spend0EDS'] = $last_item_2['spend0'];
                            $row['spend1EDS'] = $last_item_2['spend1'];
                            $row['spend2EDS'] = $last_item_2['spend2'];
                            $row['spendCnt0EDS'] = $last_item_2['spendCnt0'];
                            $row['spendCnt1EDS'] = $last_item_2['spendCnt1'];
                            $row['spendCnt2EDS'] = $last_item_2['spendCnt2'];
                            $row['lastUpdateEDS'] = $last_item_2['lastUpdate'];
                        } else {
                            $row['linkEDB'] = $last_item_2['link'];
                            $row['award0EDB'] = $last_item_2['award0'];
                            $row['award1EDB'] = $last_item_2['award1'];
                            $row['award2EDB'] = $last_item_2['award2'];
                            $row['awardCnt0EDB'] = $last_item_2['awardCnt0'];
                            $row['awardCnt1EDB'] = $last_item_2['awardCnt1'];
                            $row['awardCnt2EDB'] = $last_item_2['awardCnt2'];
                            $row['spend0EDB'] = $last_item_2['spend0'];
                            $row['spend1EDB'] = $last_item_2['spend1'];
                            $row['spend2EDB'] = $last_item_2['spend2'];
                            $row['spendCnt0EDB'] = $last_item_2['spendCnt0'];
                            $row['spendCnt1EDB'] = $last_item_2['spendCnt1'];
                            $row['spendCnt2EDB'] = $last_item_2['spendCnt2'];
                            $row['lastUpdateEDB'] = $last_item_2['lastUpdate'];
                        }
                    }
                    if (strpos($last_item_2['link'], '/khmdhs/') !== false) {
                        $double[] = $last_item_2;
                        if (strpos($last_item_2['link'], 'seller') !== false) {
                            $row['linkEKS'] = $last_item_2['link'];
                            $row['contractAmountPrevEKS'] = $last_item_2['contractAmountPrev'];
                            $row['contractAmountCurEKS'] = $last_item_2['contractAmountCur'];
                            $row['paymentAmountPrevEKS'] = $last_item_2['paymentAmountPrev'];
                            $row['paymentAmountCurEKS'] = $last_item_2['paymentAmountCur'];
                            $row['contractItemsNoEKS'] = $last_item_2['contractItemsNo'];
                            $row['paymentItemsNoEKS'] = $last_item_2['paymentItemsNo'];
                            $row['lastUpdateEKS'] = $last_item_2['lastUpdate'];
                        } else {
                            $row['linkEKB'] = $last_item_2['link'];
                            $row['contractAmountPrevEKB'] = $last_item_2['contractAmountPrev'];
                            $row['contractAmountCurEKB'] = $last_item_2['contractAmountCur'];
                            $row['paymentAmountPrevEKB'] = $last_item_2['paymentAmountPrev'];
                            $row['paymentAmountCurEKB'] = $last_item_2['paymentAmountCur'];
                            $row['contractItemsNoEKB'] = $last_item_2['contractItemsNo'];
                            $row['paymentItemsNoEKB'] = $last_item_2['paymentItemsNo'];
                            $row['lastUpdateEKB'] = $last_item_2['lastUpdate'];
                        }
                    }
                    if (substr($last_item_3['id'], strpos($last_item_3['id'], "?=")) == substr($last_item_2['id'], strpos($last_item_2['id'], "?="))) {
                        //echo '3'.$last_item_3['link'].'<br>';
                        if (strpos($last_item_3['link'], '/diaugeia/') !== false || strpos($last_item_3['link'], '/diaugeiakhmdhs/') !== false || strpos($last_item_3['link'], 'hybrid') !== false) {
                            $double[] = $last_item_3;
                            if (strpos($last_item_3['link'], 'seller') !== false) {
                                $row['linkEDS'] = $last_item_3['link'];
                                $row['award0EDS'] = $last_item_3['award0'];
                                $row['award1EDS'] = $last_item_3['award1'];
                                $row['award2EDS'] = $last_item_3['award2'];
                                $row['awardCnt0EDS'] = $last_item_3['awardCnt0'];
                                $row['awardCnt1EDS'] = $last_item_3['awardCnt1'];
                                $row['awardCnt2EDS'] = $last_item_3['awardCnt2'];
                                $row['spend0EDS'] = $last_item_3['spend0'];
                                $row['spend1EDS'] = $last_item_3['spend1'];
                                $row['spend2EDS'] = $last_item_3['spend2'];
                                $row['spendCnt0EDS'] = $last_item_3['spendCnt0'];
                                $row['spendCnt1EDS'] = $last_item_3['spendCnt1'];
                                $row['spendCnt2EDS'] = $last_item_3['spendCnt2'];
                                $row['lastUpdateEDS'] = $last_item_3['lastUpdate'];
                            } else {
                                $row['linkEDB'] = $last_item_3['link'];
                                $row['award0EDB'] = $last_item_3['award0'];
                                $row['award1EDB'] = $last_item_3['award1'];
                                $row['award2EDB'] = $last_item_3['award2'];
                                $row['awardCnt0EDB'] = $last_item_3['awardCnt0'];
                                $row['awardCnt1EDB'] = $last_item_3['awardCnt1'];
                                $row['awardCnt2EDB'] = $last_item_3['awardCnt2'];
                                $row['spend0EDB'] = $last_item_3['spend0'];
                                $row['spend1EDB'] = $last_item_3['spend1'];
                                $row['spend2EDB'] = $last_item_3['spend2'];
                                $row['spendCnt0EDB'] = $last_item_3['spendCnt0'];
                                $row['spendCnt1EDB'] = $last_item_3['spendCnt1'];
                                $row['spendCnt2EDB'] = $last_item_3['spendCnt2'];
                                $row['lastUpdateEDB'] = $last_item_3['lastUpdate'];
                            }
                        }
                        if (strpos($last_item_3['link'], '/khmdhs/') !== false) {
                            $double[] = $last_item_3;
                            if (strpos($last_item_3['link'], 'seller') !== false) {
                                $row['linkEKS'] = $last_item_3['link'];
                                $row['contractAmountPrevEKS'] = $last_item_3['contractAmountPrev'];
                                $row['contractAmountCurEKS'] = $last_item_3['contractAmountCur'];
                                $row['paymentAmountPrevEKS'] = $last_item_3['paymentAmountPrev'];
                                $row['paymentAmountCurEKS'] = $last_item_3['paymentAmountCur'];
                                $row['contractItemsNoEKS'] = $last_item_3['contractItemsNo'];
                                $row['paymentItemsNoEKS'] = $last_item_3['paymentItemsNo'];
                                $row['lastUpdateEKS'] = $last_item_3['lastUpdate'];
                            } else {
                                $row['linkEKB'] = $last_item_3['link'];
                                $row['contractAmountPrevEKB'] = $last_item_3['contractAmountPrev'];
                                $row['contractAmountCurEKB'] = $last_item_3['contractAmountCur'];
                                $row['paymentAmountPrevEKB'] = $last_item_3['paymentAmountPrev'];
                                $row['paymentAmountCurEKB'] = $last_item_3['paymentAmountCur'];
                                $row['contractItemsNoEKB'] = $last_item_3['contractItemsNo'];
                                $row['paymentItemsNoEKB'] = $last_item_3['paymentItemsNo'];
                                $row['lastUpdateEKB'] = $last_item_3['lastUpdate'];
                            }
                        }
                        if (substr($last_item_4['id'], strpos($last_item_4['id'], "?=")) == substr($last_item_3['id'], strpos($last_item_3['id'], "?="))) {
                            //	echo '4'.$last_item_4['link'].'<br>';
                            if (strpos($last_item_4['link'], '/diaugeia/') !== false || strpos($last_item_4['link'], '/diaugeiakhmdhs/') !== false || strpos($last_item_4['link'], 'hybrid') !== false) {
                                $double[] = $last_item_4;
                                if (strpos($last_item_4['link'], 'seller') !== false) {
                                    $row['linkEDS'] = $last_item_4['link'];
                                    $row['award0EDS'] = $last_item_4['award0'];
                                    $row['award1EDS'] = $last_item_4['award1'];
                                    $row['award2EDS'] = $last_item_4['award2'];
                                    $row['awardCnt0EDS'] = $last_item_4['awardCnt0'];
                                    $row['awardCnt1EDS'] = $last_item_4['awardCnt1'];
                                    $row['awardCnt2EDS'] = $last_item_4['awardCnt2'];
                                    $row['spend0EDS'] = $last_item_4['spend0'];
                                    $row['spend1EDS'] = $last_item_4['spend1'];
                                    $row['spend2EDS'] = $last_item_4['spend2'];
                                    $row['spendCnt0EDS'] = $last_item_4['spendCnt0'];
                                    $row['spendCnt1EDS'] = $last_item_4['spendCnt1'];
                                    $row['spendCnt2EDS'] = $last_item_4['spendCnt2'];
                                    $row['lastUpdateEDS'] = $last_item_4['lastUpdate'];
                                } else {
                                    $row['linkEDB'] = $last_item_4['link'];
                                    $row['award0EDB'] = $last_item_4['award0'];
                                    $row['award1EDB'] = $last_item_4['award1'];
                                    $row['award2EDB'] = $last_item_4['award2'];
                                    $row['awardCnt0EDB'] = $last_item_4['awardCnt0'];
                                    $row['awardCnt1EDB'] = $last_item_4['awardCnt1'];
                                    $row['awardCnt2EDB'] = $last_item_4['awardCnt2'];
                                    $row['spend0EDB'] = $last_item_4['spend0'];
                                    $row['spend1EDB'] = $last_item_4['spend1'];
                                    $row['spend2EDB'] = $last_item_4['spend2'];
                                    $row['spendCnt0EDB'] = $last_item_4['spendCnt0'];
                                    $row['spendCnt1EDB'] = $last_item_4['spendCnt1'];
                                    $row['spendCnt2EDB'] = $last_item_4['spendCnt2'];
                                    $row['lastUpdateEDB'] = $last_item_4['lastUpdate'];
                                }
                            }
                            if (strpos($last_item_4['link'], '/khmdhs/') !== false) {
                                $double[] = $last_item_4;
                                if (strpos($last_item_4['link'], 'seller') !== false) {
                                    $row['linkEKS'] = $last_item_4['link'];
                                    $row['contractAmountPrevEKS'] = $last_item_4['contractAmountPrev'];
                                    $row['contractAmountCurEKS'] = $last_item_4['contractAmountCur'];
                                    $row['paymentAmountPrevEKS'] = $last_item_4['paymentAmountPrev'];
                                    $row['paymentAmountCurEKS'] = $last_item_4['paymentAmountCur'];
                                    $row['contractItemsNoEKS'] = $last_item_4['contractItemsNo'];
                                    $row['paymentItemsNoEKS'] = $last_item_4['paymentItemsNo'];
                                    $row['lastUpdateEKS'] = $last_item_4['lastUpdate'];
                                } else {
                                    $row['linkEKB'] = $last_item_4['link'];
                                    $row['contractAmountPrevEKB'] = $last_item_4['contractAmountPrev'];
                                    $row['contractAmountCurEKB'] = $last_item_4['contractAmountCur'];
                                    $row['paymentAmountPrevEKB'] = $last_item_4['paymentAmountPrev'];
                                    $row['paymentAmountCurEKB'] = $last_item_4['paymentAmountCur'];
                                    $row['contractItemsNoEKB'] = $last_item_4['contractItemsNo'];
                                    $row['paymentItemsNoEKB'] = $last_item_4['paymentItemsNo'];
                                    $row['lastUpdateEKB'] = $last_item_4['lastUpdate'];
                                }
                            }
                        }
                    }
                    //end of last item3, 4
                }
            }
        }
        if (++$c !== $numItems) {
            //echo "not last index!";
            $last_item_4 = $last_item_3;
            $last_item_3 = $last_item_2;
            $last_item_2 = $last_item;
            $last_item = $row;
        }
    }
    //print_r($double);
    $i = 0;
    $sumResults = count($uniqueResults);
    $sumSpend = 0;
    $sumAward = 0;
    $sumContracts = 0;
    $sumPayments = 0;
    $counterContracts = 0;
    $sumAwardSel = 0;
    $sumSpendSel = 0;
    echo "<table id='searchResults' class='display'  ><thead><tr><th></th><th></th></thead>";
    //<th>Score</th><th>id</th></tr>
    echo "<tbody>";
    while ($i < $sumResults) {
        if (isset($uniqueResults[$i]['link']) && strpos($uniqueResults[$i]['link'], 'person') == false && hideDuplicate($double, $uniqueResults[$i]['link']) != 1) {
            $link = $uniqueResults[$i]['link'];
            //fix hybrid link
            if (strpos($link, 'zdiaugeia/diaugeia-hybrids') !== false) {
                $link = str_replace('zdiaugeia/', 'diaugeia/', $link);
            }
            //generate espa link http://83.212.86.158:5984/elod_espa_beneficiaries/_design/all/_view/all
            if ($uniqueResults[$i]['pageKind'] == 'sellerBoth') {
                $link = str_replace('zorganization-beneficiary', 'espa-both-organization-seller', $link);
            } else {
                if ($uniqueResults[$i]['pageKind'] == 'buyerBoth') {
                    $link = str_replace('zorganization-beneficiary', 'espa-both-organization-buyer', $link);
                } else {
                    if ($uniqueResults[$i]['pageKind'] == 'sellerDiavgeia') {
                        $link = str_replace('zorganization-beneficiary', 'espa-diavgeia-organization-seller', $link);
                    } else {
                        if ($uniqueResults[$i]['pageKind'] == 'buyerDiavgeia') {
                            $link = str_replace('zorganization-beneficiary', 'espa-diavgeia-organization-buyer', $link);
                        } else {
                            if ($uniqueResults[$i]['pageKind'] == 'sellerKhmdhs') {
                                $link = str_replace('zorganization-beneficiary', 'espa-khmdhs-organization-seller', $link);
                            } else {
                                if ($uniqueResults[$i]['pageKind'] == 'buyerKhmdhs') {
                                    $link = str_replace('zorganization-beneficiary', 'espa-khmdhs-organization-buyer', $link);
                                } else {
                                    if ($uniqueResults[$i]['pageKind'] == '' || $uniqueResults[$i]['pageKind'] == 'general') {
                                        $link = str_replace('zorganization-beneficiary', 'organization-beneficiary', $link);
                                    }
                                }
                            }
                        }
                    }
                }
            }
            $nameLink = $link;
            $name = $uniqueResults[$i]['name'];
            $psName = $uniqueResults[$i]['psName'];
            if (strpos($link, 'seller') !== false && strpos($link, 'espa') == false) {
                $property = 'ΑΝΑΔΟΧΟΣ';
            } else {
                if (strpos($link, 'buyer') !== false && strpos($link, 'espa') == false) {
                    $property = 'ΦΟΡΕΑΣ';
                } else {
                    if (strpos($link, 'hybrid') !== false) {
                        $property = 'ΥΒΡΙΔΙΚΟΣ';
                    } else {
                        if (strpos($link, 'espa') !== false || strpos($link, 'beneficiary') !== false) {
                            $property = 'ΔΙΚΑΙΟΥΧΟΣ';
                        } else {
                            $property = ' ';
                        }
                    }
                }
            }
            echo "<tr>";
            if (strpos($link, 'diaugeia/org') !== false) {
                //διαυγεια 035970655
                echo "<td style=\" text-align:left; border-left: 0px solid #ccc; font-size:15px; padding-right:0px;  width:400px;\">";
                //echo "<a href='".$nameLink."'target='_blank' >$name</a> </br>";
                //echo '<B>'.$name.'</B><br>';
                echo "<a class='nameLink' href='" . $nameLink . "'target='_blank' >{$name}</a> </br>";
                //echo "<FONT COLOR='#006621 '>$link</FONT></br>";
                echo '<I>';
                echo hide_not_avail($uniqueResults[$i]['address']);
                echo ' ';
                echo hide_not_avail($uniqueResults[$i]['pc']);
                echo ' ';
                echo hide_not_avail_space($uniqueResults[$i]['city']);
                echo ' ';
                echo 'Α.Φ.Μ. ' . hide_not_avail($uniqueResults[$i]['vat'] . "</br>");
                echo '</I>';
                //echo  '<B>'.(getSource($link,'d')).'<sup><font size="1">'.$property.'</font></sup> :  </B>';
                //echo "<a href='".$nameLink."'target='_blank'  > <B>Στη ΔΙΑΥΓΕΙΑ</B></a> </br>";
                //echo '<B>';
                echo ' <font class="dataset" color="#006621" style="font-size: 0.77em">ΔΙΑΥΓΕΙΑ</font></br> ';
                echo ' <font color="#FFA500" size="1">' . $property . '</font> ';
                //echo '</B>';
                echo 'Οριστικοποίηση Πληρωμών: ';
                $sumSpend = fromTextToNumber($uniqueResults[$i]['spend0']) + fromTextToNumber($uniqueResults[$i]['spend1']) + fromTextToNumber($uniqueResults[$i]['spend2']);
                echo '<B> ' . fromNumberToText($sumSpend, '€') . '</B>';
                echo ' (<B>' . round($uniqueResults[$i]['spendCnt0'] + $uniqueResults[$i]['spendCnt1'] + $uniqueResults[$i]['spendCnt2'], 0) . '</B>) ';
                echo 'Κατακυρώσεις: ';
                $sumAward = fromTextToNumber($uniqueResults[$i]['award0']) + fromTextToNumber($uniqueResults[$i]['award1']) + fromTextToNumber($uniqueResults[$i]['award2']);
                echo '<B> ' . fromNumberToText($sumAward, '€') . '</B>';
                echo ' (<B>' . round($uniqueResults[$i]['awardCnt0'] + $uniqueResults[$i]['awardCnt1'] + $uniqueResults[$i]['awardCnt2'], 0) . '</B>) ';
                echo ' &nbsp [έως ' . $uniqueResults[$i]['lastUpdate'] . ']';
                echo "</td>";
            } else {
                if (strpos($link, 'espa') !== false || strpos($link, 'beneficiary') !== false) {
                    echo "<td style=\" text-align:left; border-left: 0px solid #ccc; font-size:15px; padding-right:0px;  width:400px;\">";
                    //echo '<B>'.$name.'</B><br>';
                    echo "<a class='nameLink' href='" . $nameLink . "'target='_blank' >{$name}</a> </br>";
                    echo '<I>';
                    echo hide_not_avail($uniqueResults[$i]['address']);
                    echo ' ';
                    echo hide_not_avail($uniqueResults[$i]['pc']);
                    echo ' ';
                    echo hide_not_avail_space($uniqueResults[$i]['city']);
                    echo ' ';
                    echo 'Α.Φ.Μ. ' . hide_not_avail($uniqueResults[$i]['vat'] . "</br>");
                    echo '</I>';
                    if ($uniqueResults[$i]['pageKind'] == 'sellerBoth') {
                        //eg 999243471 099360290 fixed 099360290 double problem
                        //echo "<a href='".$nameLink."'target='_blank'  > <B>Στη ΔΙΑΥΓΕΙΑ</B></a> </br>"; //use namelink for superprofile
                        echo ' <font class="dataset" color="#006621" style="font-size: 0.77em">ΔΙΑΥΓΕΙΑ</font></br> ';
                        $link4 = $uniqueResults[$i]['linkEDB'];
                        if (isset($link4) && $link4 !== ' ') {
                            //missing buyer for 099360290
                            //echo $link4."</br>";
                            //echo "<a href='".$nameLink."'target='_blank'  > <B>Στη ΔΙΑΥΓΕΙΑ</B></a> </br>"; //use namelink for superprofile
                            //echo "<a href='".$link4."'target='_blank' fontcolor='#FFA500' size='1' > <B>Φορέας </B></a> ";
                            echo "<a href='" . $link4 . "'target='_blank' style='font-size: 10px; color: #FFA500;'  <B>ΦΟΡΕΑΣ</B> </a> ";
                            //echo ' <font color="#FFA500" size="1">Ανάδοχος</font> ';
                            echo 'Οριστικοποίηση Πληρωμών: ';
                            $sumSpend = fromTextToNumber($uniqueResults[$i]['spend0EDB']) + fromTextToNumber($uniqueResults[$i]['spend1EDB']) + fromTextToNumber($uniqueResults[$i]['spend2EDB']);
                            echo '<B> ' . fromNumberToText($sumSpend, '€') . '</B>';
                            echo ' (<B>' . round($uniqueResults[$i]['spendCnt0EDB'] + $uniqueResults[$i]['spendCnt1EDB'] + $uniqueResults[$i]['spendCnt2EDB'], 0) . '</B>) ';
                            echo 'Κατακυρώσεις: ';
                            $sumAward = fromTextToNumber($uniqueResults[$i]['award0EDB']) + fromTextToNumber($uniqueResults[$i]['award1EDB']) + fromTextToNumber($uniqueResults[$i]['award2EDB']);
                            echo '<B> ' . fromNumberToText($sumAward, '€') . '</B>';
                            echo ' (<B>' . round($uniqueResults[$i]['awardCnt0EDB'] + $uniqueResults[$i]['awardCnt1EDB'] + $uniqueResults[$i]['awardCnt2EDB'], 0) . '</B>) ';
                            echo ' &nbsp [έως ' . $uniqueResults[$i]['lastUpdateEDB'] . ']</br>';
                        }
                        $link2 = $uniqueResults[$i]['linkEDS'];
                        //must be diaugeiakhmdhs
                        if (isset($link2) && $link2 !== ' ') {
                            //echo $link2."</br>";
                            //echo '<B>';
                            echo ' <font color="#FFA500" size="1">ΑΝΑΔΟΧΟΣ</font> ';
                            //echo '</B>';
                            echo 'Οριστικοποίηση Πληρωμών: ';
                            $sumSpend = fromTextToNumber($uniqueResults[$i]['spend0EDS']) + fromTextToNumber($uniqueResults[$i]['spend1EDS']) + fromTextToNumber($uniqueResults[$i]['spend2EDS']);
                            echo '<B> ' . fromNumberToText($sumSpend, '€') . '</B>';
                            echo ' (<B>' . round($uniqueResults[$i]['spendCnt0EDS'] + $uniqueResults[$i]['spendCnt1EDS'] + $uniqueResults[$i]['spendCnt2EDS'], 0) . '</B>) ';
                            echo 'Κατακυρώσεις: ';
                            $sumAward = fromTextToNumber($uniqueResults[$i]['award0EDS']) + fromTextToNumber($uniqueResults[$i]['award1EDS']) + fromTextToNumber($uniqueResults[$i]['award2EDS']);
                            echo '<B> ' . fromNumberToText($sumAward, '€') . '</B>';
                            echo ' (<B>' . round($uniqueResults[$i]['awardCnt0EDS'] + $uniqueResults[$i]['awardCnt1EDS'] + $uniqueResults[$i]['awardCnt2EDS'], 0) . '</B>) ';
                            echo ' &nbsp [έως ' . $uniqueResults[$i]['lastUpdateEDS'] . ']</br>';
                        }
                        $link3 = $uniqueResults[$i]['linkEKS'];
                        if (isset($link3) && $link3 !== ' ') {
                            //echo $link3."</br>";
                            //echo "<a href='".$nameLink."'target='_blank'  > <B>Στo ΚΗΜΔΗΣ</B></a> </br>";
                            echo ' <font class="dataset" color="#006621" style="font-size: 0.77em">ΚΗΜΔΗΣ</font></br> ';
                            //echo '<B>';
                            echo ' <font color="#FFA500" size="1">ΑΝΑΔΟΧΟΣ</font> ';
                            //echo '</B>';
                            echo 'Συμβάσεις: ';
                            $sumContracts = fromTextToNumber($uniqueResults[$i]['contractAmountPrevEKS']) + fromTextToNumber($uniqueResults[$i]['contractAmountCurEKS']);
                            echo '<B>' . fromNumberToText($sumContracts, '€') . '</B>';
                            echo ' (<B>' . round($uniqueResults[$i]['contractItemsNoEKS'], 0) . '</B>) ';
                            echo 'Πληρωμές: ';
                            $sumPayments = fromTextToNumber($uniqueResults[$i]['paymentAmountPrevEKS']) + fromTextToNumber($uniqueResults[$i]['paymentAmountCurEKS']);
                            echo '<B>' . fromNumberToText($sumPayments, '€') . '</B>';
                            echo ' (<B>' . round($uniqueResults[$i]['paymentItemsNoEKS'], 0) . '</B>) ';
                            echo ' &nbsp [έως ' . $uniqueResults[$i]['lastUpdateEKS'] . ']</br>';
                        }
                    } else {
                        if ($uniqueResults[$i]['pageKind'] == 'buyerBoth') {
                            //eg 090050779 χάνουμε τον  πιθανο seller -fixed 090050779 double problem
                            $link2 = $uniqueResults[$i]['linkEDB'];
                            if (isset($link2) && $link2 !== ' ') {
                                //echo "<a href='".$nameLink."'target='_blank'  > <B>Στη ΔΙΑΥΓΕΙΑ</B></a> </br>"; //use namelink for superprofile
                                echo ' <font class="dataset" color="#006621" style="font-size: 0.77em">ΔΙΑΥΓΕΙΑ</font></br> ';
                                //echo '<B>';
                                echo ' <font color="#FFA500" size="1">ΦΟΡΕΑΣ</font> ';
                                //echo '</B>';
                                echo 'Οριστικοποίηση Πληρωμών: ';
                                $sumSpend = fromTextToNumber($uniqueResults[$i]['spend0EDB']) + fromTextToNumber($uniqueResults[$i]['spend1EDB']) + fromTextToNumber($uniqueResults[$i]['spend2EDB']);
                                echo '<B> ' . fromNumberToText($sumSpend, '€') . '</B>';
                                echo ' (<B>' . round($uniqueResults[$i]['spendCnt0EDB'] + $uniqueResults[$i]['spendCnt1EDB'] + $uniqueResults[$i]['spendCnt2EDB'], 0) . '</B>) ';
                                echo 'Κατακυρώσεις: ';
                                $sumAward = fromTextToNumber($uniqueResults[$i]['award0EDB']) + fromTextToNumber($uniqueResults[$i]['award1EDB']) + fromTextToNumber($uniqueResults[$i]['award2EDB']);
                                echo '<B> ' . fromNumberToText($sumAward, '€') . '</B>';
                                echo ' (<B>' . round($uniqueResults[$i]['awardCnt0EDB'] + $uniqueResults[$i]['awardCnt1EDB'] + $uniqueResults[$i]['awardCnt2EDB'], 0) . '</B>) ';
                                echo ' &nbsp [έως ' . $uniqueResults[$i]['lastUpdateEDB'] . ']</br>';
                            }
                            $link4 = $uniqueResults[$i]['linkEDS'];
                            if (isset($link4) && $link4 !== ' ') {
                                //test for missing seller, works
                                //echo $link4."</br>";
                                //echo "<a href='".$nameLink."'target='_blank'  > <B>Στη ΔΙΑΥΓΕΙΑ</B></a> </br>"; //use namelink for superprofile
                                echo "<a href='" . $link4 . "'target='_blank' style='font-size: 10px; color: #FFA500;'  <B>ΑΝΑΔΟΧΟΣ</B> </a> ";
                                //echo ' <font color="#FFA500" size="1">Ανάδοχος</font> ';
                                echo 'Οριστικοποίηση Πληρωμών: ';
                                $sumSpend = fromTextToNumber($uniqueResults[$i]['spend0EDS']) + fromTextToNumber($uniqueResults[$i]['spend1EDS']) + fromTextToNumber($uniqueResults[$i]['spend2EDS']);
                                echo '<B> ' . fromNumberToText($sumSpend, '€') . '</B>';
                                echo ' (<B>' . round($uniqueResults[$i]['spendCnt0EDS'] + $uniqueResults[$i]['spendCnt1EDS'] + $uniqueResults[$i]['spendCnt2EDS'], 0) . '</B>) ';
                                echo 'Κατακυρώσεις: ';
                                $sumAward = fromTextToNumber($uniqueResults[$i]['award0EDS']) + fromTextToNumber($uniqueResults[$i]['award1EDS']) + fromTextToNumber($uniqueResults[$i]['award2EDS']);
                                echo '<B> ' . fromNumberToText($sumAward, '€') . '</B>';
                                echo ' (<B>' . round($uniqueResults[$i]['awardCnt0EDS'] + $uniqueResults[$i]['awardCnt1EDS'] + $uniqueResults[$i]['awardCnt2EDS'], 0) . '</B>) ';
                                echo ' &nbsp [έως ' . $uniqueResults[$i]['lastUpdateEDS'] . ']</br>';
                            }
                            $link3 = $uniqueResults[$i]['linkEKB'];
                            if (isset($link3) && $link3 !== ' ') {
                                //echo $link4."</br>";
                                //echo "<a href='".$nameLink."'target='_blank'  > <B>Στo ΚΗΜΔΗΣ</B></a> </br>";
                                echo ' <font class="dataset" color="#006621" style="font-size: 0.77em">ΚΗΜΔΗΣ</font></br> ';
                                //echo '<B>';
                                echo ' <font color="#FFA500" size="1">ΦΟΡΕΑΣ</font> ';
                                //echo '</B>';
                                echo 'Συμβάσεις: ';
                                $sumContracts = fromTextToNumber($uniqueResults[$i]['contractAmountPrevEKB']) + fromTextToNumber($uniqueResults[$i]['contractAmountCurEKB']);
                                echo '<B>' . fromNumberToText($sumContracts, '€') . '</B>';
                                echo ' (<B>' . round($uniqueResults[$i]['contractItemsNoEKB'], 0) . '</B>) ';
                                echo 'Πληρωμές: ';
                                $sumPayments = fromTextToNumber($uniqueResults[$i]['paymentAmountPrevEKB']) + fromTextToNumber($uniqueResults[$i]['paymentAmountCurEKB']);
                                echo '<B>' . fromNumberToText($sumPayments, '€') . '</B>';
                                echo ' (<B>' . round($uniqueResults[$i]['paymentItemsNoEKB'], 0) . '</B>) ';
                                echo ' &nbsp [έως ' . $uniqueResults[$i]['lastUpdateEKB'] . ']</br>';
                            }
                        } else {
                            if ($uniqueResults[$i]['pageKind'] == 'sellerDiavgeia') {
                                //eg  004322968 012377598
                                //echo "<a href='".$nameLink."'target='_blank'  > <B>Στη ΔΙΑΥΓΕΙΑ</B></a> </br>"; //use namelink for superprofile
                                echo ' <font class="dataset" color="#006621" style="font-size: 0.77em">ΔΙΑΥΓΕΙΑ</font></br> ';
                                //echo '<B>';
                                echo ' <font color="#FFA500" size="1">ΑΝΑΔΟΧΟΣ</font> ';
                                //echo '</B>';
                                echo 'Οριστικοποίηση Πληρωμών: ';
                                $sumSpend = fromTextToNumber($uniqueResults[$i]['spend0EDS']) + fromTextToNumber($uniqueResults[$i]['spend1EDS']) + fromTextToNumber($uniqueResults[$i]['spend2EDS']);
                                echo '<B> ' . fromNumberToText($sumSpend, '€') . '</B>';
                                echo ' (<B>' . round($uniqueResults[$i]['spendCnt0EDS'] + $uniqueResults[$i]['spendCnt1EDS'] + $uniqueResults[$i]['spendCnt2EDS'], 0) . '</B>) ';
                                echo 'Κατακυρώσεις: ';
                                $sumAward = fromTextToNumber($uniqueResults[$i]['award0EDS']) + fromTextToNumber($uniqueResults[$i]['award1EDS']) + fromTextToNumber($uniqueResults[$i]['award2EDS']);
                                echo '<B> ' . fromNumberToText($sumAward, '€') . '</B>';
                                echo ' (<B>' . round($uniqueResults[$i]['awardCnt0EDS'] + $uniqueResults[$i]['awardCnt1EDS'] + $uniqueResults[$i]['awardCnt2EDS'], 0) . '</B>) ';
                                echo ' &nbsp [έως ' . $uniqueResults[$i]['lastUpdateEDS'] . ']</br>';
                            } else {
                                if ($uniqueResults[$i]['pageKind'] == 'buyerDiavgeia') {
                                    //eg 017130241 χανουμε τον seller (buyerdiaugeia ενω εχει seller) δεν δουλεύει 018133333 + double problem
                                    //  echo "<a href='".$nameLink."'target='_blank'  > <B>Στη ΔΙΑΥΓΕΙΑ</B></a> </br>"; //use namelink for superprofile
                                    echo ' <font class="dataset" color="#006621" style="font-size: 0.77em">ΔΙΑΥΓΕΙΑ</font></br> ';
                                    //echo '<B>';
                                    echo ' <font color="#FFA500" size="1">ΦΟΡΕΑΣ</font> ';
                                    //echo '</B>';
                                    echo 'Οριστικοποίηση Πληρωμών: ';
                                    $sumSpend = fromTextToNumber($uniqueResults[$i]['spend0EDB']) + fromTextToNumber($uniqueResults[$i]['spend1EDB']) + fromTextToNumber($uniqueResults[$i]['spend2EDB']);
                                    echo '<B> ' . fromNumberToText($sumSpend, '€') . '</B>';
                                    echo ' (<B>' . round($uniqueResults[$i]['spendCnt0EDB'] + $uniqueResults[$i]['spendCnt1EDB'] + $uniqueResults[$i]['spendCnt2EDB'], 0) . '</B>) ';
                                    echo 'Κατακυρώσεις: ';
                                    $sumAward = fromTextToNumber($uniqueResults[$i]['award0EDB']) + fromTextToNumber($uniqueResults[$i]['award1EDB']) + fromTextToNumber($uniqueResults[$i]['award2EDB']);
                                    echo '<B> ' . fromNumberToText($sumAward, '€') . '</B>';
                                    echo ' (<B>' . round($uniqueResults[$i]['awardCnt0EDB'] + $uniqueResults[$i]['awardCnt1EDB'] + $uniqueResults[$i]['awardCnt2EDB'], 0) . '</B>) ';
                                    echo ' &nbsp [έως ' . $uniqueResults[$i]['lastUpdateEDB'] . ']</br>';
                                    $link2 = $uniqueResults[$i]['linkEDS'];
                                    if (isset($link2) && $link2 !== ' ') {
                                        //
                                        //echo $link4."</br>";
                                        //echo "<a href='".$nameLink."'target='_blank'  > <B>Στη ΔΙΑΥΓΕΙΑ</B></a> </br>"; //use namelink for superprofile
                                        echo "<a href='" . $link2 . "'target='_blank' style='font-size: 10px; color: #FFA500;'  <B>ΑΝΑΔΟΧΟΣ</B> </a> ";
                                        //echo ' <font color="#FFA500" size="1">Ανάδοχος</font> ';
                                        echo 'Οριστικοποίηση Πληρωμών: ';
                                        $sumSpend = fromTextToNumber($uniqueResults[$i]['spend0EDS']) + fromTextToNumber($uniqueResults[$i]['spend1EDS']) + fromTextToNumber($uniqueResults[$i]['spend2EDS']);
                                        echo '<B> ' . fromNumberToText($sumSpend, '€') . '</B>';
                                        echo ' (<B>' . round($uniqueResults[$i]['spendCnt0EDS'] + $uniqueResults[$i]['spendCnt1EDS'] + $uniqueResults[$i]['spendCnt2EDS'], 0) . '</B>) ';
                                        echo 'Κατακυρώσεις: ';
                                        $sumAward = fromTextToNumber($uniqueResults[$i]['award0EDS']) + fromTextToNumber($uniqueResults[$i]['award1EDS']) + fromTextToNumber($uniqueResults[$i]['award2EDS']);
                                        echo '<B> ' . fromNumberToText($sumAward, '€') . '</B>';
                                        echo ' (<B>' . round($uniqueResults[$i]['awardCnt0EDS'] + $uniqueResults[$i]['awardCnt1EDS'] + $uniqueResults[$i]['awardCnt2EDS'], 0) . '</B>) ';
                                        echo ' &nbsp [έως ' . $uniqueResults[$i]['lastUpdateEDS'] . ']</br>';
                                    }
                                } else {
                                    if ($uniqueResults[$i]['pageKind'] == 'sellerKhmdhs') {
                                        //echo "<a href='".$nameLink."'target='_blank'  > <B>Στo ΚΗΜΔΗΣ</B></a> </br>";
                                        echo ' <font class="dataset" color="#006621" style="font-size: 0.77em">ΚΗΜΔΗΣ</font></br> ';
                                        //echo '<B>';
                                        echo ' <font color="#FFA500" size="1">ΑΝΑΔΟΧΟΣ</font> ';
                                        //echo '</B>';
                                        echo 'Συμβάσεις: ';
                                        $sumContracts = fromTextToNumber($uniqueResults[$i]['contractAmountPrevEKS']) + fromTextToNumber($uniqueResults[$i]['contractAmountCurEKS']);
                                        echo '<B>' . fromNumberToText($sumContracts, '€') . '</B>';
                                        echo ' (<B>' . round($uniqueResults[$i]['contractItemsNoEKS'], 0) . '</B>) ';
                                        echo 'Πληρωμές: ';
                                        $sumPayments = fromTextToNumber($uniqueResults[$i]['paymentAmountPrevEKS']) + fromTextToNumber($uniqueResults[$i]['paymentAmountCurEKS']);
                                        echo '<B>' . fromNumberToText($sumPayments, '€') . '</B>';
                                        echo ' (<B>' . round($uniqueResults[$i]['paymentItemsNoEKS'], 0) . '</B>) ';
                                        echo ' &nbsp [έως ' . $uniqueResults[$i]['lastUpdateEKS'] . ']</br>';
                                    }
                                }
                            }
                        }
                    }
                    if ($uniqueResults[$i]['pageKind'] == 'buyerKhmdhs') {
                        //eg 090034024 buyerKhmdhs αλλα έχει και διαυγεια fixed
                        $link2 = $uniqueResults[$i]['linkEDB'];
                        if (isset($link2) && $link2 !== ' ') {
                            if (strpos($link2, 'diaugeiakhmdhs') !== false) {
                                $link2 = str_replace('diaugeiakhmdhs', 'diaugeia', $link2);
                            }
                            echo ' <font class="dataset" color="#006621" style="font-size: 0.77em">ΔΙΑΥΓΕΙΑ</font></br> ';
                            //echo "<a href='".$link2."'target='_blank'  > <B>Στη ΔΙΑΥΓΕΙΑ</B></a> </br>";
                            //echo '<B>';
                            echo ' <font color="#FFA500" size="1">ΦΟΡΕΑΣ</font> ';
                            //echo '</B>';
                            echo 'Οριστικοποίηση Πληρωμών: ';
                            $sumSpend = fromTextToNumber($uniqueResults[$i]['spend0EDB']) + fromTextToNumber($uniqueResults[$i]['spend1EDB']) + fromTextToNumber($uniqueResults[$i]['spend2EDB']);
                            echo '<B> ' . fromNumberToText($sumSpend, '€') . '</B>';
                            echo ' (<B>' . round($uniqueResults[$i]['spendCnt0EDB'] + $uniqueResults[$i]['spendCnt1EDB'] + $uniqueResults[$i]['spendCnt2EDB'], 0) . '</B>) ';
                            echo 'Κατακυρώσεις: ';
                            $sumAward = fromTextToNumber($uniqueResults[$i]['award0EDB']) + fromTextToNumber($uniqueResults[$i]['award1EDB']) + fromTextToNumber($uniqueResults[$i]['award2EDB']);
                            echo '<B> ' . fromNumberToText($sumAward, '€') . '</B>';
                            echo ' (<B>' . round($uniqueResults[$i]['awardCnt0EDB'] + $uniqueResults[$i]['awardCnt1EDB'] + $uniqueResults[$i]['awardCnt2EDB'], 0) . '</B>) ';
                            echo ' &nbsp [έως ' . $uniqueResults[$i]['lastUpdateEDB'] . ']</br>';
                        }
                        //echo "<a href='".$nameLink."'target='_blank'  > <B>Στo ΚΗΜΔΗΣ</B></a> </br>";
                        echo ' <font class="dataset" color="#006621" style="font-size: 0.77em">ΚΗΜΔΗΣ</font></br> ';
                        //	echo '<B>';
                        echo ' <font color="#FFA500" size="1">ΦΟΡΕΑΣ</font> ';
                        //echo '<B>';
                        echo 'Συμβάσεις: ';
                        $sumContracts = fromTextToNumber($uniqueResults[$i]['contractAmountPrevEKB']) + fromTextToNumber($uniqueResults[$i]['contractAmountCurEKB']);
                        echo '<B>' . fromNumberToText($sumContracts, '€') . '</B>';
                        echo ' (<B>' . round($uniqueResults[$i]['contractItemsNoEKB'], 0) . '</B>) ';
                        echo 'Πληρωμές: ';
                        $sumPayments = fromTextToNumber($uniqueResults[$i]['paymentAmountPrevEKB']) + fromTextToNumber($uniqueResults[$i]['paymentAmountCurEKB']);
                        echo '<B>' . fromNumberToText($sumPayments, '€') . '</B>';
                        echo ' (<B>' . round($uniqueResults[$i]['paymentItemsNoEKB'], 0) . '</B>) ';
                        echo ' &nbsp [έως ' . $uniqueResults[$i]['lastUpdateEKB'] . ']</br>';
                    }
                    //only espa
                    //echo "<a href='".$nameLink."'target='_blank'  > <B>Στις ΕΠΙΔΟΤΗΣΕΙΣ ΕΣΠΑ</B></a> </br>";
                    echo ' <font class="dataset" color="#006621" style="font-size: 0.77em">Επιδοτήσεις ΕΣΠΑ</font></br> ';
                    //echo '<B>';
                    echo ' <font color="#FFA500" size="1">' . $property . '</font> ';
                    //echo '</B>';
                    echo 'Συμβάσεις: ';
                    //$sumContracts=fromTextToNumber($uniqueResults[$i]['contractAmountPrev']) + fromTextToNumber($uniqueResults[$i]['contractAmountCur'])  ;
                    echo '<B>' . $uniqueResults[$i]['SubsContractsAmount'] . '</B>';
                    echo ' (<B>' . round($uniqueResults[$i]['SubsContractsCounter'], 0) . '</B>) ';
                    echo 'Πληρωμές: ';
                    //$sumPayments=fromTextToNumber($uniqueResults[$i]['paymentAmountPrev']) + fromTextToNumber($uniqueResults[$i]['paymentAmountCur'])  ;
                    echo '<B>' . $uniqueResults[$i]['SubsPaymentsAmount'] . '</B>';
                    echo ' (<B>' . round($uniqueResults[$i]['SubsPaymentsCounter'], 0) . '</B>) ';
                    echo ' &nbsp [έως ' . convertDate($uniqueResults[$i]['lastUpdate']) . ']</br>';
                    echo "</td>";
                } else {
                    if (strpos($link, 'diaugeia/dia') !== false) {
                        //υβριδικος Διαύγεια + ελεγχος Κημδης 090166291
                        echo "<td style=\" text-align:left; border-left: 0px solid #ccc; font-size:15px; padding-right:0px;  width:400px;\">";
                        //echo "<a href='".$nameLink."'target='_blank' >$name</a> </br>";
                        //echo '<B>'.$name.'</B><br>';
                        //echo "<FONT COLOR='#006621 '>$link</FONT></br>";
                        echo "<a class='nameLink' href='" . $nameLink . "'target='_blank' >{$name}</a> </br>";
                        echo '<I>';
                        echo hide_not_avail($uniqueResults[$i]['address']);
                        echo ' ';
                        echo hide_not_avail($uniqueResults[$i]['pc']);
                        echo ' ';
                        echo hide_not_avail_space($uniqueResults[$i]['city']);
                        echo ' ';
                        echo 'Α.Φ.Μ. ' . hide_not_avail($uniqueResults[$i]['vat'] . "</br>");
                        echo '</I>';
                        //echo  '<B>ΣΤΗ ΔΙΑΥΓΕΙΑ<sup><font size="1">ΦΟΡΕΑΣ</font></sup> :  </B>';
                        //echo  '<B>ΣΤΗ ΔΙΑΥΓΕΙΑ :  </B>';
                        //echo 'Στη ';
                        //echo "<a href='".$nameLink."'target='_blank' > <B>Στη ΔΙΑΥΓΕΙΑ</B></a> </br>";
                        echo ' <font class="dataset" color="#006621" style="font-size: 0.77em">ΔΙΑΥΓΕΙΑ</font></br> ';
                        //echo '<B> ';
                        echo ' <font color="#FFA500" size="1">ΦΟΡΕΑΣ&nbsp </font> ';
                        //	echo '</B> ';
                        echo 'Οριστικοποίηση Πληρωμών: ';
                        $sumSpend = fromTextToNumber($uniqueResults[$i]['spend0']) + fromTextToNumber($uniqueResults[$i]['spend1']) + fromTextToNumber($uniqueResults[$i]['spend2']);
                        echo '<B> ' . fromNumberToText($sumSpend, '€') . '</B>';
                        echo ' (<B>' . round($uniqueResults[$i]['spendCnt0'] + $uniqueResults[$i]['spendCnt1'] + $uniqueResults[$i]['spendCnt2'], 0) . '</B>) ';
                        echo 'Κατακυρώσεις: ';
                        $sumAward = fromTextToNumber($uniqueResults[$i]['award0']) + fromTextToNumber($uniqueResults[$i]['award1']) + fromTextToNumber($uniqueResults[$i]['award2']);
                        echo '<B> ' . fromNumberToText($sumAward, '€') . '</B>';
                        echo ' (<B>' . round($uniqueResults[$i]['awardCnt0'] + $uniqueResults[$i]['awardCnt1'] + $uniqueResults[$i]['awardCnt2'], 0) . '</B>)';
                        echo ' &nbsp [έως ' . $uniqueResults[$i]['lastUpdate'] . ']<BR>';
                        // echo '<sup><font size="2">ΑΝΑΔΟΧΟΣ: </font></sup>';
                        //echo '<B> ';
                        echo ' <font color="#FFA500" size="1">ΑΝΑΔΟΧΟΣ&nbsp </font> ';
                        //echo ' <font color="#006621" font  size="1">ΑΝΑΔΟΧΟΣ&nbsp </font> ';
                        //echo '</B> ';
                        echo 'Οριστικοποίηση Πληρωμών: ';
                        $sumSpendSel = fromTextToNumber($uniqueResults[$i]['spendSel0']) + fromTextToNumber($uniqueResults[$i]['spendSel1']) + fromTextToNumber($uniqueResults[$i]['spendSel2']);
                        echo '<B> ' . fromNumberToText($sumSpendSel, '€') . '</B>';
                        echo ' (<B>' . round($uniqueResults[$i]['spendCntSel0'] + $uniqueResults[$i]['spendCntSel1'] + $uniqueResults[$i]['spendCntSel2'], 0) . '</B>) ';
                        echo 'Κατακυρώσεις: ';
                        $sumAwardSel = fromTextToNumber($uniqueResults[$i]['awardSel0']) + fromTextToNumber($uniqueResults[$i]['awardSel1']) + fromTextToNumber($uniqueResults[$i]['awardSel2']);
                        echo '<B> ' . fromNumberToText($sumAwardSel, '€') . '</B>';
                        echo ' (<B>' . round($uniqueResults[$i]['awardCnt0'] + $uniqueResults[$i]['awardCnt1'] + $uniqueResults[$i]['awardCnt2'], 0) . '</B>) ';
                        echo ' &nbsp [έως ' . $uniqueResults[$i]['lastUpdate'] . ']<br>';
                        //echo  substr($nameLink,strpos($nameLink, "?="));
                        //$link2=fromHidden($hidden,(substr($nameLink,strpos($nameLink, "?="))));
                        $link2 = $uniqueResults[$i]['linkHKB'];
                        if (isset($link2) && $link2 !== ' ') {
                            //echo "<a href='".$link2."'target='_blank' <FONT COLOR='#006621' >$link2</FONT></a> </br>";
                            //echo "<a href='".$link2."'target='_blank'  > <font  <B>Στο ΚΗΜΔΗΣ</B></font> </a> </br>";
                            echo ' <font class="dataset" color="#006621" style="font-size: 0.77em">ΚΗΜΔΗΣ</font></br> ';
                            //echo '<sup><font size="2">ΦΟΡΕΑΣ: </font></sup>';
                            //echo '<B> ';
                            echo ' <font color="#FFA500" size="1">ΦΟΡΕΑΣ&nbsp </font> ';
                            //echo ' <font color="#006621" size="1">ΦΟΡΕΑΣ&nbsp </font> ';
                            //echo '</B> ';
                            echo 'Συμβάσεις: ';
                            $sumContracts = fromTextToNumber($uniqueResults[$i]['contractAmountPrevHKB']) + fromTextToNumber($uniqueResults[$i]['contractAmountCurHKB']);
                            echo '<B>' . fromNumberToText($sumContracts, '€') . '</B>';
                            echo ' (<B>' . round($uniqueResults[$i]['contractItemsNoHKB'], 0) . '</B>) ';
                            echo 'Πληρωμές: ';
                            $sumPayments = fromTextToNumber($uniqueResults[$i]['paymentAmountPrevHKB']) + fromTextToNumber($uniqueResults[$i]['paymentAmountCurHKB']);
                            echo '<B>' . fromNumberToText($sumPayments, '€') . '</B>';
                            echo ' (<B>' . round($uniqueResults[$i]['paymentItemsNoHKB'], 0) . '</B>) ';
                            echo ' &nbsp [έως ' . $uniqueResults[$i]['lastUpdateHKB'] . ']<br>';
                        }
                        $link3 = $uniqueResults[$i]['linkHKS'];
                        if (isset($link3) && $link3 !== ' ') {
                            //$link3=fromHidden($hidden,(substr($nameLink,strpos($nameLink, "?="))));
                            //echo "<a href='".$link3."'target='_blank' <FONT COLOR='#006621' >$link3</FONT></a> </br>";
                            //echo 'Στο ';
                            echo ' <font class="dataset" color="#006621" style="font-size: 0.77em">ΚΗΜΔΗΣ</font></br> ';
                            //echo "<a href='".$link3."'target='_blank' > <B>Στο ΚΗΜΔΗΣ</B></a> </br>";
                            //echo '<B> ';
                            echo ' <font color="#FFA500" size="1">ΑΝΑΔΟΧΟΣ&nbsp </font> ';
                            //echo ' <font color="#006621" size="1">ΑΝΑΔΟΧΟΣ&nbsp </font> ';
                            //echo '</B> ';
                            //echo  '<B>ΚΗΜΔΗΣ<sup><font size="1">ΑΝΑΔΟΧΟΣ</font></sup> :  </B>';
                            $sumContracts = fromTextToNumber($uniqueResults[$i]['contractAmountPrevHKS']) + fromTextToNumber($uniqueResults[$i]['contractAmountCurHKS']);
                            echo 'Συμβάσεις: ';
                            echo '<B>' . fromNumberToText($sumContracts, '€') . '</B>';
                            echo ' (<B>' . round($uniqueResults[$i]['contractItemsNoHKS'], 0) . '</B>) ';
                            echo 'Πληρωμές: ';
                            $sumPayments = fromTextToNumber($uniqueResults[$i]['paymentAmountPrevHKS']) + fromTextToNumber($uniqueResults[$i]['paymentAmountCurHKS']);
                            echo '<B>' . fromNumberToText($sumPayments, '€') . '</B>';
                            echo ' (<B>' . round($uniqueResults[$i]['paymentItemsNoHKS'], 0) . '</B>) ';
                            echo ' &nbsp [έως ' . $uniqueResults[$i]['lastUpdateHKS'] . ']<br>';
                        }
                        //echo  '<B>ΚΗΜΔΗΣ<sup><font size="1">ΑΝΑΔΟΧΟΣ</font></sup> :  </B><br>';
                        echo "</td>";
                    } else {
                        if (strpos($link, 'diaugeiakhmdhs') !== false) {
                            //και Διαυγεια και κημδης 998154476
                            echo "<td style=\" text-align:left; border-left: 0px solid #ccc; font-size:15px; padding-right:0px;  width:400px;\">";
                            echo "<a class='nameLink' href='" . $nameLink . "'target='_blank' >{$name}</a> </br>";
                            //echo '<B>'.$name.'</B><br>';
                            //echo "<FONT COLOR='#006621 '>$link</FONT></br>";
                            echo '<I>';
                            echo hide_not_avail($uniqueResults[$i]['address']);
                            echo ' ';
                            echo hide_not_avail($uniqueResults[$i]['pc']);
                            echo ' ';
                            echo hide_not_avail_space($uniqueResults[$i]['city']);
                            echo ' ';
                            echo 'Α.Φ.Μ. ' . hide_not_avail($uniqueResults[$i]['vat'] . "</br>");
                            echo '</I>';
                            //echo  '<B>'.(getSource($link,'d')).'<sup><font size="1">'.$property.'</font></sup> :  </B>'; //DIAVGEIA
                            if ($uniqueResults[$i]['dk_flag'] == 'd') {
                                //αν δηλαδή η τρέχουσα γραμμή είναι όντως απο διαύγεια
                                //echo "<a href='".$nameLink."'target='_blank'  > <B>Στη ΔΙΑΥΓΕΙΑ - ΚΗΜΔΗΣ</B></a> </br>";
                                //echo "<a href='".$nameLink."'target='_blank'  > <B>Στη ΔΙΑΥΓΕΙΑ</B></a> </br>";
                                echo ' <font class="dataset" color="#006621" style="font-size: 0.77em">ΔΙΑΥΓΕΙΑ</font></br> ';
                                //echo '<B>';
                                echo ' <font color="#FFA500" size="1">' . $property . '</font> ';
                                //echo '</B>';
                                echo 'Οριστικοποίηση Πληρωμών: ';
                                $sumSpend = fromTextToNumber($uniqueResults[$i]['spend0']) + fromTextToNumber($uniqueResults[$i]['spend1']) + fromTextToNumber($uniqueResults[$i]['spend2']);
                                echo '<B> ' . fromNumberToText($sumSpend, '€') . '</B>';
                                echo ' (<B>' . round($uniqueResults[$i]['spendCnt0'] + $uniqueResults[$i]['spendCnt1'] + $uniqueResults[$i]['spendCnt2'], 0) . '</B>) ';
                                echo 'Κατακυρώσεις: ';
                                $sumAward = fromTextToNumber($uniqueResults[$i]['award0']) + fromTextToNumber($uniqueResults[$i]['award1']) + fromTextToNumber($uniqueResults[$i]['award2']);
                                echo '<B> ' . fromNumberToText($sumAward, '€') . '</B>';
                                echo ' (<B>' . round($uniqueResults[$i]['awardCnt0'] + $uniqueResults[$i]['awardCnt1'] + $uniqueResults[$i]['awardCnt2'], 0) . '</B>) ';
                                echo ' &nbsp [έως ' . $uniqueResults[$i]['lastUpdate'] . ']<br>';
                            } else {
                                //η τρέχουσα γραμμή είναι απο κημδης
                                //echo "<a href='".$nameLink."'target='_blank'  > <font  <B>Στο ΚΗΜΔΗΣ</B></font> </a> </br>";
                                //echo ' <font color="#FFA500" size="1">'.$property.'</font> ';
                                //echo "<a href='".$nameLink."'target='_blank'  > <B>Στη ΔΙΑΥΓΕΙΑ</B></a> </br>";
                                echo ' <font class="dataset" color="#006621" style="font-size: 0.77em">ΔΙΑΥΓΕΙΑ</font></br> ';
                                //echo '<B>';
                                echo ' <font color="#FFA500" size="1">' . $property . '</font> ';
                                //echo '</B>';
                                echo 'Οριστικοποίηση Πληρωμών: ';
                                $sumSpend = fromTextToNumber($uniqueResults[$i]['spend0_2']) + fromTextToNumber($uniqueResults[$i]['spend1_2']) + fromTextToNumber($uniqueResults[$i]['spend2_2']);
                                echo '<B> ' . fromNumberToText($sumSpend, '€') . '</B>';
                                echo ' (<B>' . round($uniqueResults[$i]['spendCnt0_2'] + $uniqueResults[$i]['spendCnt1_2'] + $uniqueResults[$i]['spendCnt2_2'], 0) . '</B>) ';
                                echo 'Κατακυρώσεις: ';
                                $sumAward = fromTextToNumber($uniqueResults[$i]['award0_2']) + fromTextToNumber($uniqueResults[$i]['award1_2']) + fromTextToNumber($uniqueResults[$i]['award2_2']);
                                echo '<B> ' . fromNumberToText($sumAward, '€') . '</B>';
                                echo ' (<B>' . round($uniqueResults[$i]['awardCnt0_2'] + $uniqueResults[$i]['awardCnt1_2'] + $uniqueResults[$i]['awardCnt2_2'], 0) . '</B>) ';
                                echo ' &nbsp [έως ' . $uniqueResults[$i]['lastUpdate_2'] . ']<br>';
                            }
                            //echo  '<B>'.(getSource($link,'k')).'<sup><font size="1">'.$property.'</font></sup> :  </B>'; //KHMDHS
                            // echo "<a href='".$nameLink."'target='_blank'  > <B>Στo ΚΗΜΔΗΣ</B></a> </br>";
                            echo ' <font class="dataset" color="#006621" style="font-size: 0.77em">ΚΗΜΔΗΣ</font></br> ';
                            //echo '<B>';
                            echo ' <font color="#FFA500" size="1">' . $property . '</font> ';
                            //echo '</B>';
                            if ($uniqueResults[$i]['dk_flag'] == 'k') {
                                //αν δηλαδή η τρέχουσα γραμμή είναι όντως απο κημδης
                                echo 'Συμβάσεις: ';
                                $sumContracts = fromTextToNumber($uniqueResults[$i]['contractAmountPrev']) + fromTextToNumber($uniqueResults[$i]['contractAmountCur']);
                                echo '<B>' . fromNumberToText($sumContracts, '€') . '</B>';
                                echo ' (<B>' . round($uniqueResults[$i]['contractItemsNo'], 0) . '</B>) ';
                                echo 'Πληρωμές: ';
                                $sumPayments = fromTextToNumber($uniqueResults[$i]['paymentAmountPrev']) + fromTextToNumber($uniqueResults[$i]['paymentAmountCur']);
                                echo '<B>' . fromNumberToText($sumPayments, '€') . '</B>';
                                echo ' (<B>' . round($uniqueResults[$i]['paymentItemsNo'], 0) . '</B>) ';
                                echo ' &nbsp [έως ' . $uniqueResults[$i]['lastUpdate'] . ']';
                            } else {
                                echo 'Συμβάσεις: ';
                                $sumContracts = fromTextToNumber($uniqueResults[$i]['contractAmountPrev_2']) + fromTextToNumber($uniqueResults[$i]['contractAmountCur_2']);
                                echo '<B>' . fromNumberToText($sumContracts, '€') . '</B>';
                                echo ' (<B>' . round($uniqueResults[$i]['contractItemsNo_2'], 0) . '</B>) ';
                                echo 'Πληρωμές: ';
                                $sumPayments = fromTextToNumber($uniqueResults[$i]['paymentAmountPrev_2']) + fromTextToNumber($uniqueResults[$i]['paymentAmountCur_2']);
                                echo '<B>' . fromNumberToText($sumPayments, '€') . '</B>';
                                echo ' (<B>' . round($uniqueResults[$i]['paymentItemsNo_2'], 0) . '</B>) ';
                                echo ' &nbsp [έως ' . $uniqueResults[$i]['lastUpdate_2'] . ']';
                                echo "</td>";
                            }
                        } else {
                            if (strpos($link, '/australia/') !== false) {
                                //australia
                                echo "<td style=\" text-align:left; border-left: 0px solid #ccc; font-size:15px; padding-right:0px;  width:400px;\">";
                                echo "<a href='" . $nameLink . "'target='_blank' >{$name}</a> </br>";
                                echo "<FONT COLOR='#006621 '>{$link}</FONT></br>";
                                echo hide_not_avail($uniqueResults[$i]['address']);
                                echo ' ';
                                echo hide_not_avail($uniqueResults[$i]['pc']);
                                echo ' ';
                                echo hide_not_avail_space($uniqueResults[$i]['city']);
                                echo ' ';
                                echo 'V.A.T. ' . hide_not_avail($uniqueResults[$i]['vat'] . "</br>");
                                echo '<B>' . getSource($link, 'all') . '<sup><font size="1">' . $property . '</font></sup> :  </B>';
                                echo 'Συμβάσεις: ';
                                $sumContracts = fromTextToNumber($uniqueResults[$i]['contractAmount0']) + fromTextToNumber($uniqueResults[$i]['contractAmount1']) + fromTextToNumber($uniqueResults[$i]['contractAmount2']);
                                echo '<B>' . fromNumberToText($sumContracts, '$') . '</B>';
                                $counterContracts = $uniqueResults[$i]['contractCounter0'] + $uniqueResults[$i]['contractCounter1'] + $uniqueResults[$i]['contractCounter2'];
                                echo ' (<B>' . round($counterContracts, 0) . '</B>) ';
                                echo ' &nbsp [έως ' . $uniqueResults[$i]['lastUpdate'] . ']';
                                echo "</td>";
                            } else {
                                if (strpos($link, '/london/') !== false) {
                                    //Λονδίνο
                                    echo "<td style=\" text-align:left; border-left: 0px solid #ccc; font-size:15px; padding-right:0px;  width:400px;\">";
                                    echo "<a href='" . $nameLink . "'target='_blank' >{$name}</a> </br>";
                                    echo "<FONT COLOR='#006621 '>{$link}</FONT></br>";
                                    echo hide_not_avail($uniqueResults[$i]['address']);
                                    echo ' ';
                                    echo hide_not_avail($uniqueResults[$i]['pc']);
                                    echo ' ';
                                    echo hide_not_avail_space($uniqueResults[$i]['city']);
                                    echo ' ';
                                    echo 'V.A.T. ' . hide_not_avail($uniqueResults[$i]['vat'] . "</br>");
                                    echo '<B>' . getSource($link, 'all') . '<sup><font size="1">' . $property . '</font></sup> :  </B>';
                                    if (strpos($link, 'buyer') !== false) {
                                        echo 'Συμβάσεις: ';
                                    } else {
                                        echo 'Πληρωμές: ';
                                    }
                                    $sumContracts = fromTextToNumber($uniqueResults[$i]['contractAmount0']) + fromTextToNumber($uniqueResults[$i]['contractAmount1']) + fromTextToNumber($uniqueResults[$i]['contractAmount2']) + fromTextToNumber($uniqueResults[$i]['contractAmount3']);
                                    echo '<B>' . fromNumberToText($sumContracts, '£') . '</B>';
                                    $counterContracts = $uniqueResults[$i]['contractCounter0'] + $uniqueResults[$i]['contractCounter1'] + $uniqueResults[$i]['contractCounter2'] + $uniqueResults[$i]['contractCounter3'];
                                    echo ' (<B>' . round($counterContracts, 0) . '</B>) ';
                                    echo ' &nbsp [έως ' . $uniqueResults[$i]['lastUpdate'] . ']';
                                    echo "</td>";
                                } else {
                                    if (strpos($link, '/eu/') !== false) {
                                        //ευρώπη
                                        echo "<td style=\" text-align:left; border-left: 0px solid #ccc; font-size:15px; padding-right:0px;  width:400px;\">";
                                        //echo $name;
                                        echo "<a href='" . $nameLink . "'target='_blank' >{$name}</a> </br>";
                                        echo "<FONT COLOR='#006621 '>{$link}</FONT></br>";
                                        echo hide_not_avail($uniqueResults[$i]['address']);
                                        echo ' ';
                                        echo hide_not_avail($uniqueResults[$i]['pc']);
                                        echo ' ';
                                        echo hide_not_avail_space($uniqueResults[$i]['city']);
                                        echo ' ';
                                        echo 'V.A.T. ' . hide_not_avail($uniqueResults[$i]['vat'] . "</br>");
                                        echo '<B>' . getSource($link, 'all') . '<sup><font size="1">' . $property . '</font></sup> :  </B>';
                                        echo 'Συμβάσεις: ';
                                        $sumContracts = fromTextToNumber($uniqueResults[$i]['contractAmount0']) + fromTextToNumber($uniqueResults[$i]['contractAmount1']) + fromTextToNumber($uniqueResults[$i]['contractAmount2']);
                                        echo '<B>' . fromNumberToText($sumContracts, '€') . '</B>';
                                        $counterContracts = $uniqueResults[$i]['contractCounter0'] + $uniqueResults[$i]['contractCounter1'] + $uniqueResults[$i]['contractCounter2'];
                                        echo ' (<B>' . round($counterContracts, 0) . '</B>) ';
                                        echo ' &nbsp [έως ' . $uniqueResults[$i]['lastUpdate'] . ']';
                                        echo "</td>";
                                    } else {
                                        if (strpos($link, '/newyork/') !== false) {
                                            //Νέα Υόρκη-πόλη
                                            echo "<td style=\" text-align:left; border-left: 0px solid #ccc; font-size:15px; padding-right:0px;  width:400px;\">";
                                            echo "<a href='" . $nameLink . "'target='_blank' >{$name}</a> </br>";
                                            echo "<FONT COLOR='#006621 '>{$link}</FONT></br>";
                                            echo hide_not_avail($uniqueResults[$i]['address']);
                                            echo ' ';
                                            echo hide_not_avail($uniqueResults[$i]['pc']);
                                            echo ' ';
                                            echo hide_not_avail_space($uniqueResults[$i]['city']);
                                            echo ' ';
                                            echo 'V.A.T. ' . hide_not_avail($uniqueResults[$i]['vat'] . "</br>");
                                            echo '<B>' . getSource($link, 'all') . '<sup><font size="1">' . $property . '</font></sup> :  </B>';
                                            echo 'Συμβάσεις: ';
                                            $sumContracts = fromTextToNumber($uniqueResults[$i]['contractAmount0']) + fromTextToNumber($uniqueResults[$i]['contractAmount1']) + fromTextToNumber($uniqueResults[$i]['contractAmount2']);
                                            echo '<B>' . fromNumberToText($sumContracts, '$') . '</B>';
                                            $counterContracts = $uniqueResults[$i]['contractCounter0'] + $uniqueResults[$i]['contractCounter1'] + $uniqueResults[$i]['contractCounter2'];
                                            echo ' (<B>' . round($counterContracts, 0) . '</B>) ';
                                            echo ' &nbsp [έως ' . $uniqueResults[$i]['lastUpdate'] . ']';
                                            echo "</td>";
                                        } else {
                                            if (strpos($link, '/newyorkstate/') !== false) {
                                                //Νέα Υόρκη-πόλιτεία
                                                echo "<td style=\" text-align:left; border-left: 0px solid #ccc; font-size:15px; padding-right:0px;  width:400px;\">";
                                                echo "<a href='" . $nameLink . "'target='_blank' >{$name}</a> </br>";
                                                echo "<FONT COLOR='#006621 '>{$link}</FONT></br>";
                                                echo hide_not_avail($uniqueResults[$i]['address']);
                                                echo ' ';
                                                echo hide_not_avail($uniqueResults[$i]['pc']);
                                                echo ' ';
                                                echo hide_not_avail_space($uniqueResults[$i]['city']);
                                                echo ' ';
                                                echo 'V.A.T. ' . hide_not_avail($uniqueResults[$i]['vat'] . "</br>");
                                                echo '<B>' . getSource($link, 'all') . '<sup><font size="1">' . $property . '</font></sup> :  </B>';
                                                echo 'Συμβάσεις: ';
                                                $sumContracts = fromTextToNumber($uniqueResults[$i]['contractAmount0']) + fromTextToNumber($uniqueResults[$i]['contractAmount1']) + fromTextToNumber($uniqueResults[$i]['contractAmount2']);
                                                echo '<B>' . fromNumberToText($sumContracts, '$') . '</B>';
                                                $counterContracts = $uniqueResults[$i]['contractCounter0'] + $uniqueResults[$i]['contractCounter1'] + $uniqueResults[$i]['contractCounter2'];
                                                echo ' (<B>' . round($counterContracts, 0) . '</B>) ';
                                                echo ' &nbsp [έως ' . $uniqueResults[$i]['lastUpdate'] . ']';
                                                echo "</td>";
                                            } else {
                                                if (strpos($link, 'product') !== false && strpos($link, 'eprices') !== false) {
                                                    //φασόλια
                                                    echo "<td style=\" text-align:left; border-left: 0px solid #ccc; font-size:15px; padding-right:0px;  width:400px;\">";
                                                    //echo '<B>'.$psName.'</B><br>';
                                                    echo "<a class='nameLink' href='" . $nameLink . "'target='_blank' >{$psName}</a> </br>";
                                                    //echo '<B>';
                                                    //echo "<a href='".$nameLink."'target='_blank' >Στο ΠΑΡΑΤΗΡΗΤΗΡΙΟ ΤΙΜΩΝ</a> </br>";
                                                    echo ' <font class="dataset" color="#006621" style="font-size: 0.75em">ΠΑΡΑΤΗΡΗΤΗΡΙΟ ΤΙΜΩΝ-Προϊόν</font></br> ';
                                                    //echo '</B>';
                                                    //echo '<B>';
                                                    //echo ' <font color="#FFA500" size="1">ΠΡΟΙΟΝ</font></br> ';
                                                    //echo '</B>';
                                                    echo '<font color="#FFA500" style="font-size: 0.80em">Μέση 2015&nbsp</font> ';
                                                    echo '<B>';
                                                    echo $uniqueResults[$i]['average'];
                                                    echo '</B>';
                                                    echo '&nbsp';
                                                    echo '<font color="#FFA500" style="font-size: 0.80em">Διαφορά Τιμής 2015&nbsp</font> ';
                                                    echo '<B>';
                                                    echo $uniqueResults[$i]['variationPrice'];
                                                    echo '</B>';
                                                    echo '</br>';
                                                    echo '<font color="#FFA500" style="font-size: 0.80em">Χαμηλότερη τιμή 2015&nbsp</font> ';
                                                    echo '<B>';
                                                    echo $uniqueResults[$i]['minPrice'] . '/' . $uniqueResults[$i]['unitOfMeasurement'];
                                                    echo '</B>';
                                                    echo '&nbsp';
                                                    $locMin = $uniqueResults[$i]['locMin'];
                                                    echo "<FONT size='2'>{$locMin}</FONT>";
                                                    echo '</br>';
                                                    echo '<font color="#FFA500" style="font-size: 0.80em">Υψηλότερη τιμή 2015&nbsp</font> ';
                                                    echo '<B>';
                                                    echo $uniqueResults[$i]['maxPrice'] . '/' . $uniqueResults[$i]['unitOfMeasurement'];
                                                    echo '</B>';
                                                    echo '&nbsp';
                                                    $locMax = $uniqueResults[$i]['locMax'];
                                                    echo "<FONT size='2'>{$locMax}</FONT>";
                                                    echo '</br>';
                                                    echo '[';
                                                    echo '<font  style="font-size: 0.80em">Τελευταία ενημέρωση&nbsp</font> ';
                                                    echo $uniqueResults[$i]['lastUpdate'];
                                                    echo ']';
                                                    echo "</td>";
                                                    echo "</td>";
                                                } else {
                                                    if (strpos($link, 'product') !== false && strpos($link, 'kath') !== false) {
                                                        //Αγγουράκια
                                                        echo "<td style=\" text-align:left; border-left: 0px solid #ccc; font-size:15px; padding-right:0px;  width:400px;\">";
                                                        //echo '<B>'.mb_strtoupper($psName, "UTF-8").'</B><br>';
                                                        $psName = mb_strtoupper($psName, "UTF-8");
                                                        echo "<a class='nameLink' href='" . $nameLink . "'target='_blank' >{$psName}</a> </br>";
                                                        //echo '<B>';
                                                        //echo "<a href='".$nameLink."'target='_blank' >Στην ΚΕΝΤΡΙΚΗ ΑΓΟΡΑ ΘΕΣ/ΝΙΚΗΣ</a> </br>";
                                                        echo ' <font class="dataset" color="#006621" style="font-size: 0.75em">ΚΕΝΤΡΙΚΗ ΑΓΟΡΑ ΘΕΣ/ΝΙΚΗΣ-Προϊόν</font></br> ';
                                                        //echo '</B>';
                                                        //echo '<B>';
                                                        //echo ' <font color="#FFA500" size="1">ΠΡΟΙΟΝ</font></br> ';
                                                        //echo '</B>';
                                                        echo '<font color="#FFA500" style="font-size: 0.80em">Επικρατέστερη τιμή&nbsp</font> ';
                                                        echo '&nbsp';
                                                        echo '<B>';
                                                        echo $uniqueResults[$i]['dominantPriceDetails'] . ' €/' . $uniqueResults[$i]['unitOfMeasurement'];
                                                        echo '</B>';
                                                        echo '&nbsp';
                                                        echo '<font color="#FFA500" style="font-size: 0.80em">Επικρατέστερη εβδομάδας&nbsp</font> ';
                                                        echo '&nbsp';
                                                        echo '<B>';
                                                        echo $uniqueResults[$i]['weekDominantPriceDetails'] . ' €/' . $uniqueResults[$i]['unitOfMeasurement'];
                                                        echo '</B>';
                                                        echo '</br>';
                                                        echo '<font color="#FFA500" style="font-size: 0.80em">Επικρατέστερη έτους&nbsp</font> ';
                                                        echo '&nbsp';
                                                        echo '<B>';
                                                        echo $uniqueResults[$i]['yearDominantPriceDetails'] . ' €/' . $uniqueResults[$i]['unitOfMeasurement'];
                                                        echo '</B>';
                                                        echo '&nbsp';
                                                        echo '<font color="#FFA500" style="font-size: 0.80em">Ποσότητα προς διάθεση&nbsp</font> ';
                                                        echo '&nbsp';
                                                        echo '<B>';
                                                        echo $uniqueResults[$i]['quantityDetails'] . '&nbspκιλά';
                                                        echo '</br>';
                                                        echo '</B>';
                                                        echo '[';
                                                        echo '<font  style="font-size: 0.80em">Τελευταία ενημέρωση&nbsp</font> ';
                                                        echo $uniqueResults[$i]['lastUpdate'];
                                                        echo ']';
                                                        echo "</td>";
                                                    } else {
                                                        if (strpos($link, 'shop') !== false && strpos($link, 'eprices') !== false) {
                                                            //ΣΚΛΑΒΕΝΙΤΗΣ ΒΑΡΗΣ
                                                            echo "<td style=\" text-align:left; border-left: 0px solid #ccc; font-size:15px; padding-right:0px;  width:400px;\">";
                                                            //echo '<B>'.$name.'</B><br>';
                                                            //echo "<FONT COLOR='#006621 '>$link</FONT></br>";
                                                            //echo '<B>'.$psName.'</B><br>';
                                                            echo "<a class='nameLink' href='" . $nameLink . "'target='_blank' >{$psName}</a> </br>";
                                                            echo ' <font class="dataset" color="#006621" style="font-size: 0.77em">ΠΑΡΑΤΗΡΗΤΗΡΙΟ ΤΙΜΩΝ-Σημείο Πώλησης</font></br> ';
                                                            //echo '<B>';
                                                            //echo "<a href='".$nameLink."'target='_blank' >Στο ΠΑΡΑΤΗΡΗΤΗΡΙΟ ΤΙΜΩΝ</a> </br>";
                                                            //echo '</B>';
                                                            //echo '<B>';
                                                            //echo ' <font color="#FFA500" size="1">ΣΗΜΕΙΟ ΠΩΛΗΣΗΣ</font></br> ';
                                                            //echo '</B>';
                                                            //echo 'Πλήθος Ειδών ';
                                                            echo '<font color="#FFA500" style="font-size: 0.80em">Προϊόντα&nbsp</font> ';
                                                            echo '<B>';
                                                            echo $uniqueResults[$i]['countOfProducts'];
                                                            echo '</B>';
                                                            echo '&nbsp';
                                                            echo '<font color="#FFA500" style="font-size: 0.80em">Κατηγορίες&nbsp</font> ';
                                                            echo '<B>';
                                                            echo $uniqueResults[$i]['countOfCategories'];
                                                            echo '</B>';
                                                            echo '</br>';
                                                            echo '<font color="#FFA500" style="font-size: 0.80em">Υψηλότερη τιμή&nbsp</font> ';
                                                            echo '<B>';
                                                            echo $uniqueResults[$i]['maxPrice'] . '/' . $uniqueResults[$i]['unitOfMeasurementMax'];
                                                            echo '</B>';
                                                            echo '&nbsp';
                                                            $maxProdName = $uniqueResults[$i]['maxProdName'];
                                                            echo "<FONT size='2'>{$maxProdName}</FONT>";
                                                            echo '</br>';
                                                            echo '<font color="#FFA500" style="font-size: 0.80em">Χαμηλότερη τιμή&nbsp</font> ';
                                                            echo '<B>';
                                                            echo $uniqueResults[$i]['minPrice'] . '/' . $uniqueResults[$i]['unitOfMeasurementMin'];
                                                            echo '</B>';
                                                            echo '&nbsp';
                                                            $minProdName = $uniqueResults[$i]['minProdName'];
                                                            echo "<FONT size='2'>{$minProdName}</FONT>";
                                                            echo '</br>';
                                                            echo '[';
                                                            echo '<font  style="font-size: 0.80em">Τελευταία ενημέρωση&nbsp</font> ';
                                                            echo $uniqueResults[$i]['lastUpdate'];
                                                            echo ']';
                                                            echo "</td>";
                                                        } else {
                                                            //κημδης και τα αλλα 023199666
                                                            echo "<td style=\" text-align:left; border-left: 0px solid #ccc; font-size:15px; padding-right:0px;  width:400px;\">";
                                                            //echo "<a href='".$nameLink."'target='_blank' >$name</a> </br>";
                                                            //echo '<B>'.$name.'</B><br>';
                                                            echo "<a class='nameLink' href='" . $nameLink . "'target='_blank' >{$name}</a> </br>";
                                                            //echo "<FONT COLOR='#006621 '>$link</FONT></br>";
                                                            echo '<I>';
                                                            echo hide_not_avail($uniqueResults[$i]['address']);
                                                            echo ' ';
                                                            echo hide_not_avail($uniqueResults[$i]['pc']);
                                                            echo ' ';
                                                            echo hide_not_avail_space($uniqueResults[$i]['city']);
                                                            echo ' ';
                                                            echo 'Α.Φ.Μ. ' . hide_not_avail($uniqueResults[$i]['vat'] . "</br>");
                                                            echo '</I>';
                                                            //echo "<a href='".$nameLink."'target='_blank'  > <B>Στo ΚΗΜΔΗΣ</B></a> </br>";
                                                            echo ' <font class="dataset" color="#006621" style="font-size: 0.77em">ΚΗΜΔΗΣ</font></br> ';
                                                            //echo '<B>';
                                                            echo ' <font color="#FFA500" size="1">' . $property . '</font> ';
                                                            //echo '<B>';
                                                            //echo  '<B>'.(getSource($link,'all')).'<sup><font size="1">'.$property.'</font></sup> :  </B>';
                                                            echo 'Συμβάσεις: ';
                                                            $sumContracts = fromTextToNumber($uniqueResults[$i]['contractAmountPrev']) + fromTextToNumber($uniqueResults[$i]['contractAmountCur']);
                                                            echo '<B>' . fromNumberToText($sumContracts, '€') . '</B>';
                                                            echo ' (<B>' . round($uniqueResults[$i]['contractItemsNo'], 0) . '</B>) ';
                                                            echo 'Πληρωμές: ';
                                                            $sumPayments = fromTextToNumber($uniqueResults[$i]['paymentAmountPrev']) + fromTextToNumber($uniqueResults[$i]['paymentAmountCur']);
                                                            echo '<B>' . fromNumberToText($sumPayments, '€') . '</B>';
                                                            echo ' (<B>' . round($uniqueResults[$i]['paymentItemsNo'], 0) . '</B>) ';
                                                            echo ' &nbsp [έως ' . $uniqueResults[$i]['lastUpdate'] . ']';
                                                            echo "</td>";
                                                        }
                                                    }
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
            /*echo "<td style=\" text-align:left; border-left: 0px solid #ccc; font-size:15px; padding-right:0px;  width:200px;\">";
             if(empty($uniqueResults[$i]['vat']) ||  ((strpos($link,'newyorkstate') !== false) &&  (strpos($link,'seller') !== false))  ) {
             echo "-";
             }
             else
             echo $uniqueResults[$i]['vat']; //HIDDEN
             echo "</td>";
             
             echo "<td style=\" text-align:left; border-left: 0px solid #ccc; font-size:15px; padding-right:0px;  width:200px;\">";
             //echo getSource($link); 
             echo "</td>";
              */
            echo "<td style=\" text-align:left; border-left: 0px solid #ccc; font-size:15px; padding-right:0px;  width:80px;\">";
            echo $uniqueResults[$i]['score'];
            //hidden
            echo "</td>";
            echo "</tr>";
        }
        $i++;
    }
    echo "</tbody>";
    echo "</table>";
}
예제 #6
0
    $metaformat = $blogparams['metaformat'];
}
$imageW = $imgW = 350;
$imageH = $imgH = 225;
?>

<?php 
while (have_posts()) {
    the_post();
    $sourceData = get_post_meta($post->ID, "sourceData", true);
    $sourceOpen = get_post_meta($post->ID, "sourceOpen", true);
    $useResizer = get_post_meta($post->ID, "useResizer", true);
    $cropPos = get_post_meta($post->ID, "cropPos", true);
    $cropPos = $cropPos == '' ? 'c' : $cropPos;
    $sourceType = getMediaType($sourceData);
    $sourceStr = getSource($sourceData, $imgW, $imgH);
    ?>
	<div id="post-<?php 
    the_ID();
    ?>
"  <?php 
    post_class('blogitem');
    ?>
>
		<h3><?php 
    the_title();
    ?>
</h3>
		<?php 
    if (has_post_thumbnail() || !empty($sourceStr) && $sourceOpen == 'e') {
        $thumbnail_src = wp_get_attachment_url(get_post_thumbnail_id($post->ID));
예제 #7
0
function abc($divName, $item, $link)
{
    ?>
    <script type="text/javascript" src="https://www.google.com/jsapi"></script>
    <script type="text/javascript">
   
      // Load the Visualization API and the piechart package.
      google.load('visualization', '1.0', {'packages':['corechart']});
     
      // Set a callback to run when the Google Visualization API is loaded.
      google.setOnLoadCallback(drawChart);


      // Callback that creates and populates a data table, 
      // instantiates the pie chart, passes in the data and
      // draws it.
      function drawChart() {

      // Create the data table.
      var data = new google.visualization.DataTable();
      data.addColumn('string', 'Choices');
      data.addColumn('number', 'Votes');

      //Adds all the votes
      <?php 
    $poll_options = getPollOptions($item['title']);
    foreach ($poll_options as $poll_option) {
        ?>
            data.addRow(['<?php 
        echo $poll_option['optionText'];
        ?>
',<?php 
        echo $poll_option['counter'];
        ?>
]);
            <?php 
    }
    ?>

      // Set chart options
      var options = {/*'title': "<?php 
    echo $divName;
    ?>
",*/
      sliceVisibilityThreshold: 0,
                     'width':'300',
                     'height':'300', 'backgroundColor': { fill:'transparent' },'legend.alignment':"center"};

      // Instantiate and draw our chart, passing in some options.


      var chart = new google.visualization.PieChart(document.getElementById("<?php 
    echo $item['title'];
    ?>
"));
      chart.draw(data, options);

   
    }

       // And then:
    $(window).resize(function () {
        chart.draw(data, otions);
    });

    </script>

    <script type="text/javascript">
        //create trigger to resizeEnd event     
        $(window).resize(function() {
            if(this.resizeTO) clearTimeout(this.resizeTO);
            this.resizeTO = setTimeout(function() {
                $(this).trigger('resizeEnd');
            }, 500);
        });

        //redraw graph when window resize is completed  
        $(window).on('resizeEnd', function() {
            drawChart(data);
        });


    </script>
    

        <h2><?php 
    echo $divName;
    ?>
</h2>
       <!-- <div   id="<?php 
    echo $divName;
    ?>
" style="background-color:# width:400; height:300"></div>-->

       <div class="pollGoogle" style=" float: left"> 
        <div   id="<?php 
    echo $divName;
    ?>
" style="background-color:# ;width:"auto"; height:"auto"; "></div>
        </div>


        <div class="square" style="margin-left: 70%"> 
          
       <!-- <div class="fb-share-button" data-href="<?php 
    echo $link;
    ?>
" data-layout="button_count"  style="float:right"></div> -->
            <?php 
    $idPoll = $item['id'];
    $src = getSource($idPoll);
    ?>
          <img src="<?php 
    echo $src;
    ?>
" alt="" width:"auto"; height:"auto;"> 

        </div>
      

        
    

<?php 
}
예제 #8
0
function getTheme($theme_type,$themeTree,$source) {
    $layersCheckedThemes = array();
    if(count($layersChecked) > 0) {
        $query = <<<EOF
            SELECT DISTINCT theme_id FROM "Theme_Layer_Mapping" WHERE layer_id IN
(SELECT layer_id
FROM "Meta_Layer"
WHERE layer_tablename IN (
EOF;
        $arr = $layersChecked;
        array_walk($arr, "quoteString");
        $query .= implode(",", $arr);
        $query .= "))";

        $result_theme = db_query($query);
        if(!$result_theme) {
        //Error occured
            $errmsgstr = $GLOBALS['errmsgstr'];
            die('Error fetching layers. ' . $errmsgstr);
        } else {
            while($theme_obj = db_fetch_object($result_theme)) {
                $layersCheckedThemes[] = $theme_obj->theme_id;
            }
        }
    }
    $arr_theme = array();
    switch ($theme_type) {
        case 1:
        case 2:
            if ($source == "source") {
                $arr_theme = getSource($theme_type);
            } else {
                $theme_id = $source;
                $arr_theme = array_merge(getSubThemes($theme_id), getLayersForTheme($theme_id));
            }
            break;
        case 3:
            $arr_theme = getParticipatoryLayers();
            break;
        case 6:
            $arr_theme = getInactiveLayers();
            break;
    }
    $str = json_encode($arr_theme);
    return $str;
}
예제 #9
0
function translateCommonlabel($template)
{
    global $pagesize, $articleid;
    $template = str_replace("【#sitename】", getSitename(), $template);
    $template = str_replace("【#htmltitle】", getHtmltitle(), $template);
    $template = str_replace("【#copyright】", getCopyright(), $template);
    $template = str_replace("【#path】", getPath(), $template);
    $template = str_replace("【#logo】", getLogo(), $template);
    $template = str_replace("【#chanels】", getChanels(), $template);
    $template = str_replace("【#childcolumnlist】", getChildcolumnlist(), $template);
    //网站,栏目,文章关键字
    $template = str_replace("【#sitekeywords】", getSitekeywords(), $template);
    $template = str_replace("【#columnkeywords】", getColumnkeywords(), $template);
    $template = str_replace("【#articlekeywords】", getArticlekeywords(), $template);
    $template = str_replace("【#columnname】", getColumnname(), $template);
    $template = str_replace("【#articleid】", $articleid, $template);
    $template = str_replace("【#articletitle】", getArticletitle(), $template);
    $template = str_replace("【#articlecontent】", getArticlecontent(), $template);
    $template = str_replace("【#date】", getAdddate(), $template);
    $template = str_replace("【#hits】", getHits(), $template);
    $template = str_replace("【#author】", getAuthor(), $template);
    $template = str_replace("【#source】", getSource(), $template);
    $template = str_replace("【#picurl】", getPicurl(), $template);
    $template = str_replace("【#pre】", getPre(), $template);
    $template = str_replace("【#next】", getNext(), $template);
    $template = str_replace("【#notes】", getNotes(), $template);
    $template = str_replace("【#commentform】", getCommentform(), $template);
    //替换自定义字段标签
    $template = translateSdefFeildlabel($template);
    $template = str_replace("【#showpage】", getPage($pagesize), $template);
    return $template;
}
예제 #10
0
}
$s = new Site($_POST['address']);
if (!$s->loaded) {
    $s->checkWWW();
}
if ($s->lock) {
    print "Sorry, this page is locked";
    die;
}
if (!$s->loaded) {
    $s->save();
}
$ip = $_SERVER['REMOTE_ADDR'];
$rating = 0;
$comment = htmlentities($_POST['comment']);
$source = str_replace("\r", '', WikiWideWebize($s, getSource($_POST['address'])));
$source = str_replace(" />", ">", $source);
$nsource = str_replace("\r", '', stripslashes($_POST['source']));
$nsource = str_replace(" />", ">", $nsource);
$nsource = preg_replace("/<\\/?([A-Z]+)[^>]*>/Ue", "strtolower('\$1')", $nsource);
$source = preg_replace("/<\\/?([A-Z]+)[^>]*>/Ue", "strtolower('\$1')", $source);
$source2 = explode("\n", $source);
$source = explode("\n", entityScrub($source));
$nsource = explode("\n", $nsource);
$diff = array_diff($nsource, $source);
$diff2 = array_diff($source, $nsource);
if (current($diff2)) {
    $temp = new Diff();
    $temp->uid = $_SESSION['uid'];
    $temp->sid = $s->sid;
    $temp->comment = $comment;
예제 #11
0
function sh_blog($attr, $content = null)
{
    global $paged, $wpdb, $more, $blogparams, $pageTitle;
    $blogparams = $attr;
    $cats = '';
    $postperpage = 10;
    $directlink = true;
    if ($blogparams['directlink'] == 'true') {
        $directlink = true;
    }
    if (!empty($blogparams['postperpage'])) {
        $postperpage = $blogparams['postperpage'];
    }
    if (!empty($blogparams['cats'])) {
        $cats = $blogparams['cats'];
    }
    $dataformat = 'd.m.Y';
    $metaformat = 'posted, comments, tag';
    $useImage = true;
    if (!empty($blogparams['dateformat'])) {
        $dataformat = $blogparams['dateformat'];
    }
    if (!empty($blogparams['metaformat'])) {
        $metaformat = $blogparams['metaformat'];
    }
    $imageW = $imgW = 350;
    $imageH = $imgH = 225;
    wp_reset_postdata();
    $the_query_arr = 'post_type=post&posts_per_page=' . $postperpage . '&cat=' . $cats . '&paged=' . $paged;
    $the_query = new WP_Query($the_query_arr);
    $re = '';
    while ($the_query->have_posts()) {
        $the_query->the_post();
        $sourceData = get_post_meta(get_the_ID(), "sourceData", true);
        $sourceOpen = get_post_meta(get_the_ID(), "sourceOpen", true);
        $useResizer = get_post_meta(get_the_ID(), "useResizer", true);
        $cropPos = get_post_meta(get_the_ID(), "cropPos", true);
        $cropPos = $cropPos == '' ? 'c' : $cropPos;
        $sourceType = getMediaType($sourceData);
        $sourceStr = getSource($sourceData, $imgW, $imgH);
        $blogClass = '';
        $blogClassArr = get_post_class(array('blogitem'), get_the_ID());
        foreach ($blogClassArr as $blogClassArrItem) {
            $blogClass .= $blogClassArrItem . ' ';
        }
        $re .= '<div id="post-' . get_the_ID() . '" class="' . $blogClass . '">
		<h3>' . get_the_title() . '</h3>';
        if (has_post_thumbnail() || !empty($sourceStr) && $sourceOpen == 'e') {
            $thumbnail_src = wp_get_attachment_url(get_post_thumbnail_id(get_the_ID()));
            if ($useResizer == 'use') {
                $thumbnail_url = get_template_directory_uri() . '/includes/timthumb.php?src=' . $thumbnail_src . '&h=' . $imageH . '&w=' . $imageW . '&zc=1&a=' . $cropPos . '&q=100';
            } else {
                $thumbnail_url = $thumbnail_src;
            }
            $useImage = true;
            $re .= '<div class="blogimage">
			<div class="image_frame">';
            if ($sourceOpen == 'm' || empty($sourceOpen) || empty($sourceData)) {
                if (!$directlink) {
                    $re .= '<a href="' . (empty($sourceData) ? $thumbnail_src : $sourceData) . '" title="' . get_the_title() . '">';
                } else {
                    $re .= '<a href="#!' . get_ajax_permalink() . '" title="' . get_the_title() . '">';
                }
                $re .= '<img ' . ($directlink ? 'class="nomodal"' : '') . ' src="' . $thumbnail_url . '" width="' . $imgW . '" height="' . $imgH . '" alt="' . get_the_title() . '" />

					<div class="hoverWrapperBg"></div>
					<div class="hoverWrapper">
						<span class="link" rel="#!' . get_ajax_permalink() . '"></span>';
                if (!$directlink) {
                    $modalClass = 'modal';
                    if ($sourceType == 'vimeo' || $sourceType == 'youtube' || $sourceType == 'jwplayer') {
                        $modalClass = 'modalVideo';
                    }
                    $re .= '<span class="' . $modalClass . '"></span>';
                }
                $re .= '</div>';
                $re .= '</a>';
            } elseif ($sourceOpen == 'e') {
                $re .= '<div style="position: relative; width:' . $imageW . 'px; height:' . $imageH . 'px; background-image: none; opacity: 1;">
					' . $sourceStr . '
				</div>';
            }
            $re .= '</div>
		</div>';
        } else {
            $useImage = false;
        }
        $re .= '<div class="blogcontent" ' . (!$useImage ? 'style="width:600px; margin-left:0"' : '') . '>
			<div class="blogdatemeta">';
        if ($dataformat != 'none') {
            $re .= '<div class="blogdate">' . get_the_time($dataformat) . '</div>';
        }
        if ($metaformat != 'none') {
            $re .= '<div class="meta-links">';
            if (strpos($metaformat, 'posted') !== false) {
                $re .= '<a class="meta-author" href="javascript:void(0);" rel="' . posted_on_template() . '"></a>';
            }
            if (strpos($metaformat, 'comments') !== false) {
                $commentCount = get_comments_number(get_the_ID());
                if ($commentCount == 0) {
                    $commentStr = __('No Comment', 'rb');
                } elseif ($commentCount == 1) {
                    $commentStr = __('1 Comment', 'rb');
                } else {
                    $commentStr = $commentCount . __('Comments', 'rb');
                }
                $re .= '<a class="meta-comments" href="javascript:void(0);" rel="' . $commentStr . '"></a>';
            }
            if (strpos($metaformat, 'tag') !== false) {
                $tags_list = wp_get_post_tags(get_the_ID(), array('fields' => 'names'));
                if ($tags_list) {
                    $re .= '<a class="meta-tags" href="javascript:void(0);" rel="' . implode(' ,', $tags_list) . '"></a>';
                }
            }
            $re .= '</div>';
        }
        $re .= '</div> 
			<p>';
        $more = 0;
        $re .= get_the_content('') . '
			</p>
			<a class="morelink" href="#!' . get_ajax_permalink() . '">' . __('READ MORE', 'rb') . '</a>
		</div>
		<hr class="seperator"/>
		<div class="clearfix"></div>
	</div>';
    }
    if (function_exists('wp_pagenavi')) {
        $re .= wp_pagenavi(array('query' => $the_query, 'options' => array('return_string' => true)));
    }
    wp_reset_postdata();
    $re .= '
	<div class="divider" style="height:10px"></div>
	<div class="clearfix"></div>';
    return $re;
}