Commit 12226ffa authored by Romain Loth's avatar Romain Loth

split() was deprecated in php 7 http://php.net/manual/fr/function.split.php

parent f55f436a
......@@ -53,7 +53,7 @@ $meta = '<!DOCTYPE html>
define('_is_utf8_split', 5000);
function is_utf8($string) {
// From http://w3.org/International/questions/qa-forms-utf-8.html
return preg_match('%^(?:
[\x09\x0A\x0D\x20-\x7E] # ASCII
......@@ -65,7 +65,7 @@ function is_utf8($string) {
| [\xF1-\xF3][\x80-\xBF]{3} # planes 4-15
| \xF4[\x80-\x8F][\x80-\xBF]{2} # plane 16
)*$%xs', $string);
}
//phpinfo();
//echo $_GET['query']."<br/>";
......@@ -77,13 +77,13 @@ $base = new PDO("sqlite:" . $dbname);
if ($login) {
if (sizeof($login) > 0) {
// liste des chercheurs
$sql = "SELECT keywords_ids,last_name,first_name FROM scholars where unique_id='" . $login . "'";
$sql = "SELECT keywords_ids,last_name,first_name FROM scholars where unique_id='" . $login . "'";
foreach ($base->query($sql) as $row) {
$keywords_ids = split(',', $row['keywords_ids']);
$keywords_ids = explode(',', $row['keywords_ids']);
$scholar_array = array();
$target_name=$row['first_name'].' '.$row['last_name'];
foreach ($keywords_ids as $keywords_id) {
$sql2 = "SELECT * FROM scholars2terms where term_id=" . trim($keywords_id);
#pt($sql2);
foreach ($base->query($sql2) as $row) {
......@@ -92,17 +92,17 @@ if ($login) {
}else{
$scholar_array[$row['scholar']] = 1;
}
}
}
}
}
}
}
}
// les scholars sont affichés par ordre de pertinence
arsort($scholar_array);
arsort($scholar_array);
$scholar_id_array=array_keys($scholar_array);
// liste des chercheurs
$scholars = array();
......@@ -143,7 +143,7 @@ foreach ($base->query($sql) as $row) {
$info['affiliation_acronym'] = $row['affiliation_acronym'];
$scholars[$row['unique_id']] = $info;
}
}
include ('stat-prep_from_array.php');///
......@@ -156,7 +156,7 @@ include ("directory_content.php");
$content .= '</div>';
$content .= '</div>
<footer>
GENERATED BY <a href="http://iscpif.fr"><img src="css/branding/logo-iscpif_medium.png" alt="iscpif.fr" style="border: none; margin-bottom : -6px;" title="isc-pif" /></a>- <a href="http://sciencemapping.com" target="_BLANK">MOMA</a> - <a href="http://www.crea.polytechnique.fr/LeCREA/" target="_BLANK">CREA</a> - <a href="http://www.cnrs.fr/fr/recherche/index.htm" target="_BLANK">CNRS</a>
GENERATED BY <a href="http://iscpif.fr"><img src="css/branding/logo-iscpif_medium.png" alt="iscpif.fr" style="border: none; margin-bottom : -6px;" title="isc-pif" /></a>- <a href="http://sciencemapping.com" target="_BLANK">MOMA</a> - <a href="http://www.crea.polytechnique.fr/LeCREA/" target="_BLANK">CREA</a> - <a href="http://www.cnrs.fr/fr/recherche/index.htm" target="_BLANK">CNRS</a>
</footer>
</div>
</body>
......@@ -171,12 +171,12 @@ $header = '<div class="row" id="welcome">
<br/>
<br/>
<p>
This directory presents scholars from the complex systems community who share interest with
This directory presents scholars from the complex systems community who share interest with
'.$target_name.': <a href="#scholars">'. count($scholars).' scholars</a> affiliated to <a href="#labs">'
. count($labs).' labs</a> and <a href="#orga">'.$orga_count.' organizations</a>.
Scholars have been selected from the complex systems directory when sharing common keywords with '.$target_name.'.
Scholars have been selected from the complex systems directory when sharing common keywords with '.$target_name.'.
</p>
<h4>About the complex systems directory</h4>
<p><ul>
......@@ -185,10 +185,10 @@ provided it is related to Complex Systems science and Complexity science. Person
voluntary basis and people are responsible for the validity and integrity of their data.
<li><i><b>This directory is browsable online</b> on the website of the complex systems society :</i> http://csbrowser.cssociety.org
<li>This directory is edited by the Complex Systems Registry. This initiative is supported by the <i>Complex Systems
Society</i> (<a href="http://cssociety.org">http://cssociety.org</a>).
Society</i> (<a href="http://cssociety.org">http://cssociety.org</a>).
Contributions and ideas are welcome to improve this directory.
<a href="http://css.csregistry.org/whoswho+feedback">Please feedback</a></p>
</ul>
</ul>
</p>
<br/>
......@@ -211,11 +211,11 @@ Contributions and ideas are welcome to improve this directory.
echo $meta.' '.$stats.'</head>';
if (count($scholars)==0){
echo '<h2>Sorry, '.$target_name.' did not mentioned any keywords ... we cannot process it\'s network.</h2><br/>
If you are '.$target_name.', you can <a href="http://main.csregistry.org/Whoswhodata" target="_BLANK">modify your profile</a> and see your
If you are '.$target_name.', you can <a href="http://main.csregistry.org/Whoswhodata" target="_BLANK">modify your profile</a> and see your
network in few minutes.';
}else{
echo $header;
echo $content;
}
?>
\ No newline at end of file
?>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment