Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: LATC/EU-data-cloud
base: 9bb0fa2337
...
head fork: LATC/EU-data-cloud
compare: c026a352dd
  • 2 commits
  • 7 files changed
  • 0 commit comments
  • 1 contributor
View
271 business/competition/import_script/import_data.php
@@ -19,8 +19,8 @@
foreach ($data2DArray as $data)
{
- //$url = $data[0];
- $url = "http://ec.europa.eu/competition/elojade/isef/case_details.cfm?proc_code=2_M_1001";
+ $url = $data[0];
+ //$url = "http://ec.europa.eu/competition/elojade/isef/case_details.cfm?proc_code=2_M_1016";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_HEADER, 0);
@@ -41,14 +41,14 @@
preg_match_all("/ClassLink\"\s>([^<]*)/s", $company, $match);
foreach ($match[1] as $matching_company)
{
- $company_trim = rtrim($matching_company);
+ $company_trim = trim($matching_company);
$company_match_array[$j] = $company_trim;
}
$j++;
}
preg_match("/Notification on\:<[^>]*>\s*<[^>]*>([^<]*)/s", $website, $notification);
- preg_match("/Provisional deadline\:<[^>]*>\s*<[^>]*>(\d\d.\d\d.\d\d\d\d)(.*)<\/td>/isU",$website, $deadline);
+ preg_match("/Provisional deadline\:<[^>]*>\s*<[^>]*>(\d\d.\d\d.\d\d\d\d)\s*<br>\s*(.*)<\/td>/isU",$website, $deadline);
$deadline_text = trim($deadline[2]);
preg_match("/Prior publication in Official Journal\:(.*)<\/tr>/isU", $website, $publication);
preg_match_all("/<a\shref=\"([^\"]*)/s", $publication[1], $publication_link);
@@ -66,10 +66,11 @@
preg_match("/Regulation\:<[^>]*>\s*<[^>]*>([^<]*)/s", $website, $regulation);
preg_match("/Decisi[^<]*<[^>]*>(.*)<\/tr>/isU", $website, $decisions_2);
- $date = "\d\d.\d\d.\d\d\d\d:";
- preg_match_all($date, $decisions_2,$decision_date);
- $decisions_split = preg_split($date, $decisions_2);
+ $date = "/(\d\d.\d\d.\d\d\d\d):/s";
+ preg_match_all($date, $decisions_2[1],$decision_date);
+ $decisions_split = preg_split("/\d\d.\d\d.\d\d\d\d:/s", $decisions_2[1]);
$k =0;
+ unset ($decisions_split[0]);
foreach ($decisions_split as $decision_art)
{
@@ -79,22 +80,27 @@
$k = 0;
$l = 1;
$m = 0;
- foreach ($decisions[1] as $decision_date)
- {
- $pattern = '/'.$decision_date."\:(.*)".$decisions[1][$l].'/s';
- preg_match($pattern, $decisions_2[1], $decision_text[$m]);
- preg_match_all("/<a\shref=\"(http:\/\/**.europa.eu[^\"]*)/s", $decision_text[$m][1], $decision_document_link[$m]);
- preg_match_all("/<a\shref=\"(http:\/\/eur-lex.europa.eu[^\"]*)/s", $decision_text[$m][1], $decision_journal_link[$m]);
- $decision_text[$m] = preg_replace ("/\&nbsp\;/", "", $decision_text[$m]);
- $decision_text[$m] = preg_replace("/<[^>]*>/", "", $decision_text[$m]);
- $l++;
+ foreach ($decisions_art as $decision_mission)
+ {
+ $decision_mission = preg_replace("/\&nbsp\;/", "", $decision_mission);
+ preg_match("/(Art.*)<br>/isU", $decision_mission, $decision_article[$m]);
+ preg_match("/(http\:\/\/eur-lex.europa.eu\/[^\"]*)[^>]*>([^<]*)<\/a>\s*Of\s(\d\d.\d\d.\d\d\d\d)/s", $decision_mission, $journal_links[$m]);
+ preg_match("/(http\:\/\/ec.europa.eu\/[^\"]*)[^>]*>([^<]*)/s", $decision_mission, $decision_links[$m]);
+ preg_match("/(http\:\/\/europa.eu\/rapid\/[^\"]*)[^>]*>Press Release\:\s([^<]*)/s", $decision_mission, $press_releases[$m]);
$m++;
}
preg_match("/Other case related information\(s\)\:(.*)tr>/isU", $website, $related);
- preg_match("/<a\shref=\"([^\"]*)/s", $related[1], $related_links);
+ preg_match("/<a\shref=\"([^\"]*)[^>]*>([^<]*)/s", $related[1], $related_links);
$related_text = preg_replace("/<[^>]*>/", "", $related[1]);
- $related_text = trim($related_text);
+ $related_text = preg_replace("/<\//","", $related_text);
$related_text = preg_replace ("/\&nbsp\;/", " ",$related_text);
+ $related_text = preg_replace ("/\n/","",$related_text);
+ $related_text = trim($related_text);
+ $check_none = preg_match("/\(none\)/s",$related_text);
+ if ($check_none == true)
+ {
+ unset ($related_text);
+ }
preg_match_all("/Relation with other case\(s\)\:<[^>]*>\s*<[^>]*>\s*([^<]*)/s", $website, $related_cases);
foreach ($related_cases[1] as $case)
{
@@ -106,21 +112,49 @@
}
}
preg_match("/Related link\(s\)\:<[^>]*>\s*<[^>]*>\s*([^<]*)/s", $website, $links_related);
- rtrim($links_related[1][0]);
+ $links_related[1] = rtrim($links_related[1]);
+ $check_none_1 = preg_match("/\(none\)/s",$links_related[1]);
+ if ($check_none_1 == true)
+ {
+ unset ($links_related[1]);
+ }
// format date in xsd:date
- preg_match("/(\d\d).(\d\d).(\d\d\d\d)", $notification[1], $notification_match);
+ preg_match("/(\d\d).(\d\d).(\d\d\d\d)/s", $notification[1], $notification_match);
+ if (count($notification_match) > 3)
+ {
$notification[1] = $notification_match[3]."-".$notification_match[2]."-".$notification_match[1];
- preg_match("/(\d\d).(\d\d).(\d\d\d\d)", $deadline[1], $deadline_match);
+ }
+ preg_match("/(\d\d).(\d\d).(\d\d\d\d)/s", $deadline[1], $deadline_match);
+ if (count($deadline_match) > 3)
+ {
$deadline[1] = $deadline_match[3]."-".$deadline_match[2]."-".$deadline_match[1];
- preg_match("/(\d\d).(\d\d).(\d\d\d\d)", $publication_date, $publication_date_match);
+ }
+ preg_match("/(\d\d).(\d\d).(\d\d\d\d)/s", $publication_date, $publication_date_match);
+ if (count($publication_date_match) > 3)
+ {
$publication_date = $publication_date_match[3]."-".$publication_date_match[2]."-".$publication_date_match[1];
$q = 0;
- foreach ($decision_date as $d_date)
+ }
+ foreach ($decision_date[1] as $d_date)
{
- preg_match("/(\d\d).(\d\d).(\d\d\d\d)", $d_date, $d_date_match);
- $decision_date[$q] = $d_date_match[3]."-".$d_date_match[2]."-".$d_date_match[1];
+ preg_match("/(\d\d).(\d\d).(\d\d\d\d)/s", $d_date, $d_date_match);
+ if (count($d_date_match) > 3)
+ {
+ $decision_date[1][$q] = $d_date_match[3]."-".$d_date_match[2]."-".$d_date_match[1];
+ }
$q++;
}
+ $r = 0;
+ foreach ($journal_links as $journal_mournal)
+ {
+ preg_match("/(\d\d).(\d\d).(\d\d\d\d)/s", $journal_mournal[3], $journal_match);
+ if (count($journal_match) > 3)
+ {
+ $journal_links[$r][3] = $journal_match[3]."-".$journal_match[2]."-".$journal_match[1];
+ }
+ $r++;
+ }
+
// write into DB
mysql_connect('localhost',$username,$password) or die("Unable to connect to database");
mysql_select_db($database) or die("Unable to select database");
@@ -162,10 +196,11 @@
echo mysql_errno() . ": " . mysql_error()."in Merger_Company:".$case_number_clean." ".$company_id."\n";
}
$n = 0;
- foreach ($decision_date as $date_decision)
- {
- $query_6 = "INSERT INTO decision(date, description, document_link, journal_link, article) VALUES
- ('".$date_decision."','".$decision_text[$n][1]."','".$decision_document_link[$n][1][0]."','".$decision_journal_link[$n][1][0]."','".$decision_art."')";
+ foreach ($decision_date[1] as $date_decision)
+ // Ab hier weiter
+ {
+ $query_6 = "INSERT INTO decision(date, document_link, document_description, article) VALUES
+ ('".$date_decision."','".$decision_links[$n][1]."','".$decision_links[$n][2]."','".$decision_article[$n][1]."')";
mysql_query($query_6);
$decision_id = mysql_insert_id();
echo mysql_errno() . ": " . mysql_error()."in Decision:".$decision_ID."\n";
@@ -199,15 +234,33 @@
}
$p++;
}
+ foreach ($journal_links as $journal_link)
+ {
+ if (count($journal_link) > 3)
+ {
$query_12 = "INSERT INTO publication (date, link, text) VALUES
- ('".$publication_date."','".$publication_link[1][0]."','".$publication_link_text[1]."')";
+ ('".$journal_link[3]."','".$journal_link[1]."','".$journal_link[2]."')";
mysql_query($query_12);
echo mysql_errno() . ": " . mysql_error()."in publication:".$publication_link[1][0]."\n";
$publication_ID = mysql_insert_id();
$query_13 = "INSERT INTO merger_publication VALUES ('".$case_number_clean."','".$publication_ID."')";
mysql_query($query_13);
echo mysql_errno() . ": " . mysql_error()."in merger_publication:".$publication_ID."\n";
-
+ }
+ }
+ foreach ($press_releases as $press_release)
+ {
+ if (count($press_release)>0)
+ {
+ $query_14 = "INSERT INTO press_release (link,text) VALUES
+ ('".$press_release[1]."','".$press_release[2]."')";
+ mysql_query($query_14);
+ $press_release_id = mysql_insert_id();
+ $query_15 = "INSERT INTO merger_press_release VALUES
+ ('".$case_number_clean."','".$press_release_id."')";
+ mysql_query($query_15);
+ }
+ }
}
if(strpos($url,"proc_code=1")!==false)
{
@@ -221,8 +274,16 @@
preg_match_all ("/eventsTdDate\">([^<]*)/s",$events[1],$event_dates);
preg_match_all ("/eventsTdDocType\">([^<]*)/s",$events[1],$event_doctype);
preg_match_all ("/eventsTdDoc\">\s*([^<]*)/s",$events[1],$event_description);
- preg_match_all ("/<a\shref=\"([^\"]*)/s",$events[1],$events_url);
+ preg_match_all ("/<a\shref=\"([^\"]*)[^>]*>([^<]*)/s",$events[1],$events_url);
+ $m = 0;
+ foreach ($events_url as $event_url)
+ {
+ $events_url[2][$m] = trim($events_url[2][$m]);
+ $m++;
+ }
preg_match("/Companies:<\/td>\s*<[^>]*>(.*)<\/td>/isU",$website, $companies );
+ if (count($companies) > 0)
+ {
$companies_split = preg_split("/\s\/\s/", $companies[1]);
$j=0;
foreach ($companies_split as $company)
@@ -233,6 +294,19 @@
$company_match_array[$j] = $match_company;
$j++;
}
+ }
+ $l = 0;
+ //format dates in xsd
+ foreach ($event_dates[1] as $event_date)
+ {
+ preg_match("/(\d\d).(\d\d).(\d\d\d\d)/s", $event_date, $event_date_match);
+ if (count($event_date_match) > 3)
+ {
+ $event_dates[1][$l] = $event_date_match[3]."-".$event_date_match[2]."-".$event_date_match[1];
+ }
+ $l++;
+ }
+
// write into DB
mysql_connect('localhost',$username,$password) or die("Unable to connect to database");
mysql_select_db($database) or die("Unable to select database");
@@ -282,13 +356,28 @@
$k = 0;
foreach($event_doctype[1] as $event)
{
- $query_8 = "INSERT INTO event(date,document_type,document_link,description) VALUES ('".$event_dates[1][$k]."','".$event."','".$events_url[1][$k]."','".$event_description[1][$k]."')";
+ if ($event == "Press Release")
+ {
+ $query_10 = "INSERT INTO press_release(date,link,text) VALUES
+ ('".$event_dates[1][$k]."','".$events_url[1][$k]."','".$event_description[1][$k]."')";
+ mysql_query($query_10);
+ $press_release_id = mysql_insert_id();
+ echo mysql_errno() . ": " . mysql_error()."in press release: ".$event_description." from ".$case_number[1]."\n";
+ $query_11 = "INSERT INTO cartel_press_release VALUES
+ ('".$case_number[1]."','".$press_release_id."')";
+ mysql_query($query_11);
+ $k++;
+ }
+ else
+ {
+ $query_8 = "INSERT INTO decision(date,description,document_link,document_description) VALUES ('".$event_dates[1][$k]."','".$event_description[1][$k]."','".$events_url[1][$k]."','".$events_url[2][$k]."')";
mysql_query($query_8);
$event_id = mysql_insert_id();
echo mysql_errno() . ": " . mysql_error()."in event: ".$event_id." from ".$case_number[1]."\n";
- $query_9 = "INSERT INTO cartel_event VALUES('".$case_number[1]."','".$event_id."')";
+ $query_9 = "INSERT INTO cartel_decision VALUES('".$case_number[1]."','".$event_id."')";
mysql_query($query_9);
$k++;
+ }
}
}
if(strpos($url,"proc_code=3")!==false)
@@ -357,23 +446,53 @@
$p++;
}
}
- $check_decision = preg_match("/Decision\son\s(\d\d.\d\d.\d\d\d\d):\s*<[^>]*>\s*<[^>]*>(.*)<\/td>/isU", $website, $decision);
- preg_match_all("/([^<]*)<br>/s",$decision[2],$decision_date_text_array);
- $q = 0;
- foreach ($decision_date_text_array[1] as $decision_date_text)
+ $check_decision = preg_match_all("/Decision\son\s(\d\d.\d\d.\d\d\d\d):\s*<[^>]*>\s*<[^>]*>(.*)<\/td>/isU", $website, $decisions);
+ $r = 0;
+ foreach ($decisions[0] as $decision)
{
- $decision_date_text_array[1][$q] = trim($decision_date_text);
- $q++;
+ preg_match_all("/(Art[^<]*)</s",$decisions[2][$r],$decision_article_array[$r]);
+ preg_match_all("/Decision Text:\s<[^>]*>\s*<[^>]*>\s*([^<]*)<[^>]*>(.*)<\/td>/isU", $website, $decision_text[$r]);
+ $decision_text[$r][1] = trim($decision_text[$r][1][0]);
+ preg_match("/<a\shref=\"([^\"]*)[^>]*>([^<]*)/s", $decision_text[$r][2][0], $decision_text_link_language[$r]);
+ $r++;
}
- preg_match("/Decision Text:\s<[^>]*>\s*<[^>]*>\s*([^<]*)<[^>]*>(.*)<\/td>/isU", $website, $decision_text);
- $decision_text[1] = trim($decision_text[1]);
- preg_match("/<a\shref=\"([^\"]*)[^>]*>([^<]*)/s", $decision_text[2], $decision_text_link_language);
- preg_match("/Press release:<[^>]*>\s*<[^>]*>\s*<a\shref\s=\"([^\"]*)\"[^>]*>([^<]*)/s", $website, $press_release);
+ $check_press_release = preg_match("/Press release:<[^>]*>\s*<[^>]*>\s*<a\shref\s=\"([^\"]*)\"[^>]*>([^<]*)/s", $website, $press_release);
preg_match("/Publication\s*on\s(\d\d.\d\d.\d\d\d\d):\s*<[^>]*>\s*<[^>]*>\s*[^<]*<a\shref=\"([^\"]*)[^>]*>\s*([^\<]*)/s", $website, $publication);
$publication[3] = trim($publication[3]);
$check_summary = preg_match("/Summary\sInfo\sForm:<[^>]*>\s*<[^>]*>\s*<[^>]*>\s*<a\shref=\"([^\"]*)/s", $website, $summary);
$check_objective = preg_match("/Objective\(s\):<[^>]*>\s*<[^>]*>\s*([^<]*)/s", $website, $objective);
- // write into DB
+ // rewrite dates to xsd
+ preg_match("/(\d\d).(\d\d).(\d\d\d\d)/s", $beginning, $beginning_match);
+ if (count($beginning_match) > 3)
+ {
+ $beginning = $beginning_match[3]."-".$beginning_match[2]."-".$beginning_match[1];
+ }
+ preg_match("/(\d\d).(\d\d).(\d\d\d\d)/s", $end, $end_match);
+ if (count($end_match) > 3)
+ {
+ $end = $end_match[3]."-".$end_match[2]."-".$end_match[1];
+ }
+ preg_match("/(\d\d).(\d\d).(\d\d\d\d)/s", $notification_date[1], $notification_date_match);
+ if (count($notification_date_match) >3)
+ {
+ $notification_date[1] = $notification_date_match[3]."-".$notification_date_match[2]."-".$notification_date_match[1];
+ }
+ $q=0;
+ foreach ($decisions[1] as $decision_mission)
+ {
+ preg_match("/(\d\d).(\d\d).(\d\d\d\d)/s", $decision_mission, $decision_date_match);
+ if (count($decision_date_match) >3)
+ {
+ $decisions[1][$q] = $decision_date_match[3]."-".$decision_date_match[2]."-".$decision_date_match[1];
+ }
+ $q++;
+ }
+ preg_match("/(\d\d).(\d\d).(\d\d\d\d)/s", $publication[1], $publication_match);
+ if (count($publication_match) >3)
+ {
+ $publication[1] = $publication_match[3]."-".$publication_match[2]."-".$publication_match[1];
+ }
+ // write into DB
mysql_connect('localhost',$username,$password) or die("Unable to connect to database");
mysql_select_db($database) or die("Unable to select database");
$title = mysql_escape_string($title);
@@ -400,8 +519,8 @@
mysql_query($query_3);
echo mysql_errno() . ": " . mysql_error()."in economic_activity:".$nace_code." from ".$case_number[1]."\n";
}
- $query_4 = "INSERT INTO state_aid (ID,title,country_ID,primary_objective,sector,aid_instrument,case_type,beginning,end,notification_date,dg_responsible,press_release_text,press_release_link,publication_date,publication_link,publication_text,original_url) VALUES
- ('".$case_number_clean."','".$title."','".$country_id."','".$primary_objective[1]."','".$nace_code."','".$aid_instrument."','".$case_type[1]."','".$beginning."','".$end."','".$notification_date[1]."','".$responsible[1]."','".$press_release[2]."','".$press_release[1]."','".$publication[1]."','".$publication[2]."','".$publication[3]."','".$url."')";
+ $query_4 = "INSERT INTO state_aid (ID,title,country_ID,primary_objective,sector,aid_instrument,case_type,beginning,end,notification_date,dg_responsible,original_url) VALUES
+ ('".$case_number_clean."','".$title."','".$country_id."','".$primary_objective[1]."','".$nace_code."','".$aid_instrument."','".$case_type[1]."','".$beginning."','".$end."','".$notification_date[1]."','".$responsible[1]."','".$url."')";
mysql_query($query_4);
echo mysql_errno() . ": " . mysql_error()."in state_aid:".$case_number_clean."\n";
foreach ($case_array_alternative as $case_my)
@@ -410,11 +529,13 @@
mysql_query($query_5);
echo mysql_errno() . ": " . mysql_error()."in state_aid_relation:".$case_number_clean." ".$case_my."\n";
}
+ // Ab hier weiter
if ($check_decision != FALSE)
{
- foreach ($decision_date_text_array[1] as $decision_my)
+ $s=0;
+ foreach ($decisions[0] as $decision_my)
{
- $query_6 = "INSERT INTO decision(date,description) VALUES ('".$decision[1]."','".$decision_my."')";
+ $query_6 = "INSERT INTO decision(date,description,document_link,document_description,article) VALUES ('".$decisions[1][$s]."','".$decision_text[$s][1]."','".$decision_text_link_language[$s][1]."','".$decision_text_link_language[$s][2]."','".$decision_article_array[$s][1][0]."')";
mysql_query($query_6);
$decision_ID = mysql_insert_id();
echo mysql_errno() . ": " . mysql_error()."in decision:".$decision_my."\n";
@@ -422,6 +543,7 @@
$query_7 = "INSERT INTO state_aid_decision VALUES ('".$case_number_clean."','".$decision_ID."')";
mysql_query($query_7);
echo mysql_errno() . ": " . mysql_error()."in state_aid_decision:".$case_number_clean." ".$decision_ID."\n";
+ $s++;
}
foreach ($legal_basis_primary[1] as $legal_basis_primary_my)
{
@@ -464,14 +586,40 @@
$query_14 = "UPDATE state_aid SET summary = '".$summary[1]."' WHERE ID = '".$case_number_clean."'";
mysql_query($query_14);
}
+ $query_15 = "INSERT INTO publication (date,link,text) VALUES
+ ('".$publication[1]."','".$publication[2]."','".$publication[3]."')";
+ mysql_query($query_15);
+ $publication_id = mysql_insert_id();
+ $query_16 = "INSERT INTO state_aid_publication VALUES
+ ('".$case_number_clean."','".$publication_id."')";
+ mysql_query($query_16);
+ $query_17 = "INSERT INTO press_release(link,text) VALUES
+ ('".$press_release[1]."','".$press_release[2]."')";
+ mysql_query($query_17);
+ if ($check_press_release != FALSE)
+ {
+ $press_release_id = mysql_insert_id();
+ $query_18 = "INSERT INTO state_aid_press_release VALUES
+ ('".$case_number_clean."','".$press_release_id."')";
+ mysql_query($query_18);
+ }
}
unset ($aid_instrument);
+ unset ($beginning);
+ unset ($beginning_match);
unset ($case_array);
unset ($case_match);
unset ($case_number);
unset ($case_number_clean);
unset ($ch);
+ unset ($check);
+ unset ($check_decision);
+ unset ($check_objective);
+ unset ($check_press_release);
+ unset ($check_region);
+ unset ($check_summary);
+ unset ($check_until);
unset ($companies);
unset ($companies_split);
unset ($company);
@@ -479,16 +627,22 @@
unset ($company_match_array);
unset ($company_trim);
unset ($company_value);
+ unset ($country_id);
unset ($date_decision);
unset ($deadline);
unset ($deadline_text);
+ unset ($decision);
unset ($decision_ID);
unset ($decision_art);
+ unset ($decision_article_array);
unset ($decision_date);
+ unset ($decision_date_match);
unset ($decision_date_text);
unset ($decision_document_link);
unset ($decision_id);
unset ($decision_journal_link);
+ unset ($decision_mission);
+ unset ($decision_my);
unset ($decision_text);
unset ($decision_text_link_language);
unset ($decisions);
@@ -496,6 +650,8 @@
unset ($decisions_art);
unset ($duration_from_to);
unset ($duration_until);
+ unset ($end);
+ unset ($end_match);
unset ($event_dates);
unset ($event_description);
unset ($event_doctype);
@@ -509,6 +665,7 @@
unset ($legal_basis_primary_match);
unset ($legal_basis_secondary);
unset ($legal_basis_secondary_match);
+ unset ($legal_basis_secondary_my);
unset ($m);
unset ($match);
unset ($matching_company);
@@ -517,15 +674,20 @@
unset ($nace_code);
unset ($nace_text);
unset ($notification);
+ unset ($notification_date);
+ unset ($notification_date_match);
unset ($o);
unset ($objective);
+ unset ($p);
unset ($press_release);
+ unset ($primary_objective);
unset ($publication);
unset ($publication_ID);
unset ($publication_date);
unset ($publication_link);
unset ($publication_link_text);
unset ($publication_split);
+ unset ($q);
unset ($query_0);
unset ($query_1);
unset ($query_2);
@@ -540,11 +702,22 @@
unset ($query_11);
unset ($query_12);
unset ($query_13);
+ unset ($query_14);
+ unset ($query_15);
+ unset ($query_16);
+ unset ($query_17);
+ unset ($r);
+ unset ($regions);
+ unset ($regions_match);
+ unset ($regions_cases);
+ unset ($regions_cases_alternative);
unset ($regulation);
unset ($related);
unset ($related_cases);
unset ($related_links);
unset ($related_text);
+ unset ($responsible);
+ unset ($s);
unset ($select_ID);
unset ($select_ID_a);
unset ($select_company);
View
5 business/competition/import_script/nbproject/private/private.properties
@@ -0,0 +1,5 @@
+copy.src.files=false
+copy.src.target=E:\\xampp\\htdocs\\PhpProject1
+index.file=index.php
+run.as=SCRIPT
+url=http://localhost/import_script/
View
4 business/competition/import_script/nbproject/private/private.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project-private xmlns="http://www.netbeans.org/ns/project-private/1">
+ <editor-bookmarks xmlns="http://www.netbeans.org/ns/editor-bookmarks/1"/>
+</project-private>
View
7 business/competition/import_script/nbproject/project.properties
@@ -0,0 +1,7 @@
+include.path=${php.global.include.path}
+php.version=PHP_53
+source.encoding=UTF-8
+src.dir=.
+tags.asp=false
+tags.short=true
+web.root=.
View
9 business/competition/import_script/nbproject/project.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://www.netbeans.org/ns/project/1">
+ <type>org.netbeans.modules.php.project</type>
+ <configuration>
+ <data xmlns="http://www.netbeans.org/ns/php-project/1">
+ <name>PhpProject1</name>
+ </data>
+ </configuration>
+</project>
View
160 business/competition/import_script/update.php
@@ -0,0 +1,160 @@
+<?php
+$username="root";
+$password="";
+$database="competition";
+$cartel_decisions = array();
+$a = 0;
+mysql_connect('localhost',$username,$password) or die("Unable to connect to database");
+ mysql_select_db($database) or die("Unable to select database");
+// decisions
+
+$query_0 = "SELECT * FROM cartel_decision";
+$select_IDs = mysql_query($query_0);
+while ($row = mysql_fetch_array($select_IDs))
+{
+ $cartel_decisions[$a] = array($row[0],$row[1]);
+ $a++;
+}
+
+foreach ($cartel_decisions as $cartel_decision)
+{
+ $query_1 = "UPDATE decision SET ID = '".$cartel_decision[0]."_".$cartel_decision[1]."'
+ WHERE ID = '".$cartel_decision[1]."'";
+ mysql_query($query_1);
+ $query_11 = "UPDATE cartel_decision SET decision_ID = '".$cartel_decision[0]."_".$cartel_decision[1]."'
+ WHERE decision_ID = '".$cartel_decision[1]."'";
+ mysql_query($query_11);
+}
+
+$query_2 = "SELECT * FROM merger_decision";
+$select_IDs = mysql_query($query_2);
+while ($row = mysql_fetch_array($select_IDs))
+{
+ $merger_decisions[$a] = array($row[0],$row[1]);
+ $a++;
+}
+
+foreach ($merger_decisions as $merger_decision)
+{
+ $query_3 = "UPDATE decision SET ID = '".$merger_decision[0]."_".$merger_decision[1]."'
+ WHERE ID = '".$merger_decision[1]."'";
+ mysql_query($query_3);
+ $query_31 = "UPDATE merger_decision SET decision_ID = '".$merger_decision[0]."_".$merger_decision[1]."'
+ WHERE decision_ID = '".$merger_decision[1]."'";
+ mysql_query($query_31);
+}
+
+$query_4 = "SELECT * FROM state_aid_decision";
+$select_IDs = mysql_query($query_4);
+while ($row = mysql_fetch_array($select_IDs))
+{
+ $merger_state_aids[$a] = array($row[0],$row[1]);
+ $a++;
+}
+
+foreach ($merger_state_aids as $merger_state_aid)
+{
+ $query_5 = "UPDATE decision SET ID = '".$merger_state_aid[0]."_".$merger_state_aid[1]."'
+ WHERE ID = '".$merger_state_aid[1]."'";
+ mysql_query($query_5);
+ $query_5 = "UPDATE state_aid_decision SET decision_ID = '".$merger_state_aid[0]."_".$merger_state_aid[1]."'
+ WHERE decision_ID = '".$merger_state_aid[1]."'";
+ mysql_query($query_5);
+}
+
+// press_releases
+
+$query_0 = "SELECT * FROM cartel_press_release";
+$select_IDs = mysql_query($query_0);
+while ($row = mysql_fetch_array($select_IDs))
+{
+ $cartel_press_releases[$a] = array($row[0],$row[1]);
+ $a++;
+}
+
+foreach ($cartel_press_releases as $cartel_press_release)
+{
+ $query_1 = "UPDATE press_release SET ID = '".$cartel_press_release[0]."_".$cartel_press_release[1]."'
+ WHERE ID = '".$cartel_press_release[1]."'";
+ mysql_query($query_1);
+ $query_11 = "UPDATE cartel_press_release SET press_release_ID = '".$cartel_press_release[0]."_".$cartel_press_release[1]."'
+ WHERE press_release_ID = '".$cartel_press_release[1]."'";
+ mysql_query($query_11);
+}
+
+$query_2 = "SELECT * FROM merger_press_release";
+$select_IDs = mysql_query($query_2);
+while ($row = mysql_fetch_array($select_IDs))
+{
+ $merger_press_releases[$a] = array($row[0],$row[1]);
+ $a++;
+}
+
+foreach ($merger_press_releases as $merger_press_release)
+{
+ $query_3 = "UPDATE press_release SET ID = '".$merger_press_release[0]."_".$merger_press_release[1]."'
+ WHERE ID = '".$merger_press_release[1]."'";
+ mysql_query($query_3);
+ $query_31 = "UPDATE merger_press_release SET press_release_ID = '".$merger_press_release[0]."_".$merger_press_release[1]."'
+ WHERE press_release_ID = '".$merger_press_release[1]."'";
+ mysql_query($query_31);
+}
+
+$query_4 = "SELECT * FROM state_aid_press_release";
+$select_IDs = mysql_query($query_4);
+while ($row = mysql_fetch_array($select_IDs))
+{
+ $merger_state_aids[$a] = array($row[0],$row[1]);
+ $a++;
+}
+
+foreach ($merger_state_aids as $merger_state_aid)
+{
+ $query_5 = "UPDATE press_release SET ID = '".$merger_state_aid[0]."_".$merger_state_aid[1]."'
+ WHERE ID = '".$merger_state_aid[1]."'";
+ mysql_query($query_5);
+ $query_5 = "UPDATE state_aid_press_release SET press_release_ID = '".$merger_state_aid[0]."_".$merger_state_aid[1]."'
+ WHERE press_release_ID = '".$merger_state_aid[1]."'";
+ mysql_query($query_5);
+}
+
+// publications
+
+
+$query_2 = "SELECT * FROM merger_publication";
+$select_IDs = mysql_query($query_2);
+while ($row = mysql_fetch_array($select_IDs))
+{
+ $merger_publications[$a] = array($row[0],$row[1]);
+ $a++;
+}
+
+foreach ($merger_publications as $merger_publication)
+{
+ $query_3 = "UPDATE publication SET ID = '".$merger_publication[0]."_".$merger_publication[1]."'
+ WHERE ID = '".$merger_publication[1]."'";
+ mysql_query($query_3);
+ $query_31 = "UPDATE merger_publication SET publication_ID = '".$merger_publication[0]."_".$merger_publication[1]."'
+ WHERE publication_ID = '".$merger_publication[1]."'";
+ mysql_query($query_31);
+}
+
+$query_4 = "SELECT * FROM state_aid_publication";
+$select_IDs = mysql_query($query_4);
+while ($row = mysql_fetch_array($select_IDs))
+{
+ $merger_state_aids[$a] = array($row[0],$row[1]);
+ $a++;
+}
+
+foreach ($merger_state_aids as $merger_state_aid)
+{
+ $query_5 = "UPDATE publication SET ID = '".$merger_state_aid[0]."_".$merger_state_aid[1]."'
+ WHERE ID = '".$merger_state_aid[1]."'";
+ mysql_query($query_5);
+ $query_5 = "UPDATE state_aid_publication SET publication_ID = '".$merger_state_aid[0]."_".$merger_state_aid[1]."'
+ WHERE publication_ID = '".$merger_state_aid[1]."'";
+ mysql_query($query_5);
+}
+
+?>
View
88 business/euraxess/root_page.vm
@@ -0,0 +1,88 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+ <head>
+ <title>
+ Start Page | $server_name
+ </title>
+ <link rel="stylesheet" type="text/css" href="${home_link}snorql/style.css" />
+ <link rel="alternate" type="application/rdf+xml" href="$rdf_link?output=rdfxml" title="This page in RDF (XML)" />
+ <link rel="alternate" type="text/rdf+n3" href="$rdf_link?output=n3" title="This page in RDF (N3)" />
+ </head>
+ <body>
+ <div id="rdficon"><a href="$rdf_link" title="RDF data"><img src="${home_link}snorql/rdf_flyer.24.gif" alt="[RDF data]" /></a></div>
+ <div class="browser">
+ <div id="header">
+ <h1 id="title">
+ $server_name
+ </h1>
+ <div class="subtitle">Running at $home_link</div>
+ </div>
+
+ <div class="section">
+ <strong>Home</strong>
+#if (!$classmap_links.isEmpty())
+ |
+#if ($truncated_results)
+ Example data:
+#end
+#foreach ($aClassMap in $classmap_links.keySet())
+ <strong><a href="$classmap_links.get($aClassMap)">$aClassMap</a></strong>
+#end
+#end
+ </div>
+ <div class="section">
+ <p>This is a database published with D2R Server. It can be accessed using</p>
+ <ol><li>your plain old web browser</li>
+ <li>Semantic Web browsers</li>
+ <li>SPARQL clients.</li></ol>
+ </div>
+ <div class="section">
+ <h2>1. HTML View</h2>
+ <p>You can use the navigation links at the top of this page to explore the database.</p>
+ </div>
+ <div class="section">
+ <h2>2. RDF View</h2>
+ <p>You can also explore this database with <strong>Semantic Web browsers</strong>
+ like <a href="http://dig.csail.mit.edu/2005/ajar/ajaw/tab">Tabulator</a> or
+ <a href="http://www4.wiwiss.fu-berlin.de/rdf_browser/">Disco</a>. To start browsing,
+ open this entry point URL in your Semantic Web browser:</p>
+ <p style="text-align: center"><strong>${home_link}all</strong></p>
+ </div>
+ </div>
+
+ <div class="snorql">
+ <div class="section">
+ <h2>3. SPARQL Endpoint</h2>
+ <p>SPARQL clients can query the database at this SPARQL endpoint:</p>
+ <p style="text-align: center"><strong>${home_link}sparql</strong></p>
+ <p>The database can also be explored using <a href="snorql/">this AJAX-based SPARQL Explorer</a>.</p>
+ </div>
+ <div class="section">
+ <h2>Current Status</h2>
+ <p>Number of triples: 2,110,003<br/>
+ Number of jobs: 2,183 <br/>
+ </p>
+ </div>
+ </div>
+
+ <div class="snorql">
+ <div style="text-align: center; vertical-align: middle;">
+ <a style="margin-right: 20px;" title="LATC" href="http://latc-project.eu">
+ <img src="logo-latc.png"/>
+ </a>
+
+ <a href="http://www.wiwiss.fu-berlin.de/en/institute/pwo/bizer/" title="FU Berlin, Web-based Systems Group" style="margin-right: 20px;">
+ <img src="fu_logo.gif" alt="FU Berlin, Web-based Systems Group"/>
+ </a>
+
+ <a href="http://esw.w3.org/topic/SweoIG/TaskForces/CommunityProjects/LinkingOpenData" title="Linking Open Data Community Project">
+ <img src="lod.png" alt="Linking Open Data Community Project"/>
+ </a>
+ </div>
+ </div>
+
+
+ <div id="footer">Generated by <a href="http://www4.wiwiss.fu-berlin.de/bizer/d2r-server/">D2R Server</a></div>
+ </body>
+</html>

No commit comments for this range

Something went wrong with that request. Please try again.