Commit 96f3c73b authored by Romain Loth's avatar Romain Loth

move all legacy js, css and img into static for faster serving (todo same with...

move all legacy js, css and img into static for faster serving (todo same with tinawebJS subtree and explorerlibs)
parent 2903f3fc
...@@ -6,8 +6,8 @@ ...@@ -6,8 +6,8 @@
echo ' echo '
<body>'; <body>';
include ("analytics.php"); include ("analytics.php");
echo ' <script type="text/javascript" src="js/jquery/jquery-1.7.min.js"></script> echo ' <script type="text/javascript" src="static/js/jquery/jquery-3.1.1.min.js"></script>
<script type="text/javascript" src="js/whoswho.js"></script> <script type="text/javascript" src="static/js/whoswho.js"></script>
<div class="container"> <div class="container">
<!-- Main hero unit for a primary marketing message or call to action --> <!-- Main hero unit for a primary marketing message or call to action -->
...@@ -88,7 +88,7 @@ foreach ($scholars as $scholar) { ...@@ -88,7 +88,7 @@ foreach ($scholars as $scholar) {
else { else {
if (count($scholars) < 2000) { if (count($scholars) < 2000) {
$im_id = floor(rand(0, 11)); $im_id = floor(rand(0, 11));
$content .= '<img style="margin: 7px 10px 10px 0px" src="img/' . $im_id . '.png" width="' . $imsize . 'px" align="left">'; $content .= '<img style="margin: 7px 10px 10px 0px" src="static/img/' . $im_id . '.png" width="' . $imsize . 'px" align="left">';
} }
} }
...@@ -206,7 +206,7 @@ $content .= '</div>'; ...@@ -206,7 +206,7 @@ $content .= '</div>';
$content .= '</div>'; $content .= '</div>';
$content .= ' $content .= '
<center><img src="img/bar.png"></center>'; <center><img src="static/img/bar.png"></center>';
$content .= '<br/>'; $content .= '<br/>';
$content .= '<br/>'; $content .= '<br/>';
// fin du profil // fin du profil
......
...@@ -5,59 +5,52 @@ ...@@ -5,59 +5,52 @@
<title>Complex Systems Community Explorer</title> <title>Complex Systems Community Explorer</title>
<meta name="description" content=""> <meta name="description" content="">
<meta name="author" content=""> <meta name="author" content="">
<!-- Le HTML5 shim, for IE6-8 support of HTML elements -->
<!--[if lt IE 9]> <!-- Les styles -->
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script> <link type="text/css" href="http://fonts.googleapis.com/css?family=Ubuntu" rel="stylesheet">
<![endif]--> <link type="text/css" href="static/css/bootstrap.css" rel="stylesheet">
<!-- Le styles --> <link type="text/css" href="static/css/bootstrap_index.css" rel="stylesheet">
<link href="css/bootstrap.css" rel="stylesheet"> <link type="text/css" href="static/css/brownian-motion/jquery-ui-1.8.16.custom.css" rel="stylesheet">
<link type="text/css" href="css/brownian-motion/jquery-ui-1.8.16.custom.css"> <link type="text/css" href="static/css/whoswho.css" rel="stylesheet">
<!-- <link rel="stylesheet/less" type="text/css" href="less/bootstrap.less">
<script src="js/less-1.1.5.min.js" type="text/javascript"></script>
-->
<link href="css/bootstrap_index.css" rel="stylesheet">
<link href='http://fonts.googleapis.com/css?family=Ubuntu' rel='stylesheet' type='text/css'>
<!-- TODO test if each is really needed --> <!-- TODO test if each is really needed -->
<!-- TODO group under a static dir for serving --> <!-- TODO upgrade versions as per comments -->
<!-- TODO in the future update versions --> <script type="text/javascript" src="static/js/jquery/jquery-1.7.min.js"></script>
<script type="text/javascript" src="js/jquery/jquery-1.7.min.js"></script> <script type="text/javascript" src="static/js/jquery-ui-1.8.16.custom.min.js"></script>
<script type="text/javascript" src="js/jquery-ui/jquery-ui-1.8.16.custom.min.js"></script> <!-- upgraded available files
<script type="text/javascript" src="js/bootstrap/bootstrap-dropdown-fade.js"></script> <script type="text/javascript" src="static/js/jquery/jquery-3.1.1.min.js"></script>
<script type="text/javascript" src="js/misc/underscore.min.js"></script> <script type="text/javascript" src="static/js/jquery-ui-1.12.1/jquery-ui.min.js"></script>
<script type="text/javascript" src="js/jquery/jquery.highlight-3.js"></script> -->
<script type="text/javascript" src="js/jquery.vticker-min.js"></script> <script type="text/javascript" src="static/js/bootstrap/bootstrap-dropdown-fade.js"></script>
<script type="text/javascript" src="js/misc/json2.js"></script> <script type="text/javascript" src="static/js/misc/underscore.min.js"></script>
<script type="text/javascript" src="js/utils.js"></script> <script type="text/javascript" src="static/js/jquery/jquery.highlight-3.js"></script>
<link href="css/whoswho.css" rel="stylesheet" type="text/css"> <script type="text/javascript" src="static/js/jquery.vticker-min.js"></script>
<!-- Le fav and touch icons --> <script type="text/javascript" src="static/js/misc/json2.js"></script>
<link rel="shortcut icon" href="images/favicon.ico"> <script type="text/javascript" src="static/js/utils.js"></script>
<link rel="apple-touch-icon" href="images/apple-touch-icon.png">
<link rel="apple-touch-icon" sizes="72x72" href="images/apple-touch-icon-72x72.png"> <script type="text/javascript">
<link rel="apple-touch-icon" sizes="114x114" href="images/apple-touch-icon-114x114.png"> $(function(){
<script type="text/javascript"> $('#news-container').vTicker({
$(function(){ speed: 700,
$('#news-container').vTicker({ pause: 6000,
speed: 700, animation: 'fade',
pause: 6000, mousePause: false,
animation: 'fade', showItems: 1
mousePause: false, });
showItems: 1 });
});
});
var _gaq = _gaq || []; var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-30062222-1']); _gaq.push(['_setAccount', 'UA-30062222-1']);
_gaq.push(['_setDomainName', 'csregistry.org']); _gaq.push(['_setDomainName', 'csregistry.org']);
_gaq.push(['_trackPageview']); _gaq.push(['_trackPageview']);
(function() { (function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})(); })();
</script> </script>
</head> </head>
<body> <body>
<script> <script>
...@@ -84,7 +77,7 @@ $(function(){ ...@@ -84,7 +77,7 @@ $(function(){
fjs.parentNode.insertBefore(js, fjs); fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk')); }(document, 'script', 'facebook-jssdk'));
</script> </script>
<script type="text/javascript" src="js/whoswho.js"/></script> <script type="text/javascript" src="static/js/whoswho.js"/></script>
<div class="topbar"> <div class="topbar">
<div class="topbar-inner"> <div class="topbar-inner">
<div class="container-fluid"> <div class="container-fluid">
...@@ -179,7 +172,7 @@ $(function(){ ...@@ -179,7 +172,7 @@ $(function(){
<!-- Main hero unit for a primary marketing message or call to action --> <!-- Main hero unit for a primary marketing message or call to action -->
<div class="hero-unit"> <div class="hero-unit">
<div id="loading" style="padding-left:-175px; margin-left: 27%;"> <div id="loading" style="padding-left:-175px; margin-left: 27%;">
<img src="css/loading.gif" style="border: 0px; opacity: 0.05; " /> <img src="static/css/loading.gif" style="border: 0px; opacity: 0.05; " />
</div> </div>
<div id="welcome"> <div id="welcome">
<h2>Welcome to the complex systems community explorer</h2> <h2>Welcome to the complex systems community explorer</h2>
...@@ -196,7 +189,7 @@ $(function(){ ...@@ -196,7 +189,7 @@ $(function(){
<!--<form>--> <!--<form>-->
<input type="text" id="searchname" class="large name" placeholder="Your last name" /> <input type="text" id="searchname" class="large name" placeholder="Your last name" />
<input type="hidden" id="searchlogin" value=""/> <input type="hidden" id="searchlogin" value=""/>
<img src="css/branding/big_arrow.png" alt="" style="border: none; margin-bottom : -19px;" title="" /> <img src="static/css/branding/big_arrow.png" alt="" style="border: none; margin-bottom : -19px;" title="" />
<button id="print2" class="btn btn-small btn-primary"> <button id="print2" class="btn btn-small btn-primary">
DIRECTORY DIRECTORY
</button> </button>
...@@ -249,11 +242,7 @@ integration :</a> announce new jobs and find people looking for a job</li> ...@@ -249,11 +242,7 @@ integration :</a> announce new jobs and find people looking for a job</li>
<br/><center> <br/><center>
<iframe src="http://player.vimeo.com/video/38383946" width="300" height="170" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe></center> <iframe src="http://player.vimeo.com/video/38383946" width="300" height="170" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe></center>
<br/> <br/><br/>
<br/>
</div> </div>
</div> </div>
...@@ -268,10 +257,10 @@ integration :</a> announce new jobs and find people looking for a job</li> ...@@ -268,10 +257,10 @@ integration :</a> announce new jobs and find people looking for a job</li>
<br/> <br/>
Directory maintained by the <a href="http://cssociety.org" target="blank">Complex Systems Society</a> and the <a href="http://iscpif.fr" target="blank">Complex Systems Institute of Paris Ile-de-France</a>. Directory maintained by the <a href="http://cssociety.org" target="blank">Complex Systems Society</a> and the <a href="http://iscpif.fr" target="blank">Complex Systems Institute of Paris Ile-de-France</a>.
<br/> <br/>
<a href="http://cssociety.org" target="_BLANK"><img src="img/css.png" alt="http://cssociety.org" style="border: none; margin-bottom : -6px;" title="isc-pif" height="25px" /></a><a href="http://iscpif.fr"><img src="css/branding/iscpif_short.png" alt="iscpif.fr" style="border: none; margin-bottom : -6px;" title="isc-pif" /></a> <a href="http://cssociety.org" target="_BLANK"><img src="static/img/css.png" alt="http://cssociety.org" style="border: none; margin-bottom : -6px;" title="isc-pif" height="25px" /></a><a href="http://iscpif.fr"><img src="static/css/branding/iscpif_short.png" alt="iscpif.fr" style="border: none; margin-bottom : -6px;" title="isc-pif" /></a>
<a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/3.0/" target="blank"><img alt="Creative Commons License" style="border: none; margin-bottom : -6px;" src="img/cc.png" height="20px"/></a> - <a href="http://moma.csregistry.org" target="_BLANK"> MOMA</a> - <a href="http://iscpif.fr" target="_BLANK">ISC-PIF</a> - <a href="http://www.cnrs.fr/fr/recherche/index.htm" target="_BLANK">CNRS</a>. <a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/3.0/" target="blank"><img alt="Creative Commons License" style="border: none; margin-bottom : -6px;" src="static/img/cc.png" height="20px"/></a> - <a href="http://moma.csregistry.org" target="_BLANK"> MOMA</a> - <a href="http://iscpif.fr" target="_BLANK">ISC-PIF</a> - <a href="http://www.cnrs.fr/fr/recherche/index.htm" target="_BLANK">CNRS</a>.
</center> </center>
</footer> </footer>
</div> </div>
</body> </body>
</html> </html>
This diff is collapsed.
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
echo ' echo '
<body>'; <body>';
include ("analytics.php"); include ("analytics.php");
echo ' <script type="text/javascript" src="js/whoswho.js"></script> echo ' <script type="text/javascript" src="static/js/whoswho.js"></script>
<div class="container-fluid"> <div class="container-fluid">
<!-- Main hero unit for a primary marketing message or call to action --> <!-- Main hero unit for a primary marketing message or call to action -->
...@@ -136,7 +136,7 @@ $content .= '</div>'; ...@@ -136,7 +136,7 @@ $content .= '</div>';
$content .= '</div>'; $content .= '</div>';
$content .= ' $content .= '
<center><img src="img/bar.png"></center>'; <center><img src="static/img/bar.png"></center>';
$content .= '<br/>'; $content .= '<br/>';
$content .= '<br/>'; $content .= '<br/>';
// fin du profil // fin du profil
......
...@@ -113,7 +113,7 @@ $content .= '</div>'; ...@@ -113,7 +113,7 @@ $content .= '</div>';
$content .= '</div>'; $content .= '</div>';
$content .= ' $content .= '
<center><img src="img/bar.png"></center>'; <center><img src="static/img/bar.png"></center>';
$content .= '<br/>'; $content .= '<br/>';
$content .= '<br/>'; $content .= '<br/>';
// fin du profil // fin du profil
......
This diff is collapsed.
...@@ -47,25 +47,25 @@ function normalize_country($value) { ...@@ -47,25 +47,25 @@ function normalize_country($value) {
} }
function sanitize_input($value) { function sanitize_input($value) {
//$value = mysql_real_escape_string($value); //$value = mysql_real_escape_string($value);
//the use of addslashes() for string escaping in MySQL queries can lead to SQL injection //the use of addslashes() for string escaping in MySQL queries can lead to SQL injection
//through the abuse of multibyte character sets. In his example he relies on addslashes() //through the abuse of multibyte character sets. In his example he relies on addslashes()
//to convert an invalid multibyte sequence into a valid one, which also has an embedded ' that //to convert an invalid multibyte sequence into a valid one, which also has an embedded ' that
//is not escaped. And in an ironic twist, the function intended to protect against SQL injection //is not escaped. And in an ironic twist, the function intended to protect against SQL injection
// is used to actually trigger it. // is used to actually trigger it.
// lame security // lame security
$value=str_replace('drop','', $value); $value=str_replace('drop','', $value);
$value=str_replace('select','', $value); $value=str_replace('select','', $value);
$value=str_replace('update','', $value); $value=str_replace('update','', $value);
$value=str_replace('delete','', $value); $value=str_replace('delete','', $value);
$value = addcslashes($value, '%_'); $value = addcslashes($value, '%_');
$value = trim($value); $value = trim($value);
$value = htmlspecialchars($value); $value = htmlspecialchars($value);
return $value; return $value;
} }
?> ?>
...@@ -101,7 +101,7 @@ foreach ($organiz as $orga) { ...@@ -101,7 +101,7 @@ foreach ($organiz as $orga) {
$content .= '</div>'; $content .= '</div>';
$content .= ' $content .= '
<center><img src="img/bar.png"></center>'; <center><img src="static/img/bar.png"></center>';
$content .= '<br/>'; $content .= '<br/>';
$content .= '<br/>'; $content .= '<br/>';
// fin du profil // fin du profil
......
This diff is collapsed.
This diff is collapsed.
...@@ -11,32 +11,37 @@ $meta = '<!DOCTYPE html> ...@@ -11,32 +11,37 @@ $meta = '<!DOCTYPE html>
<title>Complex Systems Scholars</title> <title>Complex Systems Scholars</title>
<meta name="description" content=""> <meta name="description" content="">
<meta name="author" content=""> <meta name="author" content="">
<!-- Le HTML5 shim, for IE6-8 support of HTML elements -->
<!--[if lt IE 9]>
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<!-- Le styles --> <!-- Le styles -->
<link href="css/bootstrap_directory.css" rel="stylesheet"> <link type="text/css" href="http://fonts.googleapis.com/css?family=Ubuntu" rel="stylesheet">
<link type="text/css" href="css/brownian-motion/jquery-ui-1.8.16.custom.css"> <link type="text/css" href="static/css/bootstrap_directory.css" rel="stylesheet">
<link href="http://fonts.googleapis.com/css?family=Ubuntu" rel="stylesheet" type="text/css"> <link type="text/css" href="static/css/brownian-motion/jquery-ui-1.8.16.custom.css" rel="stylesheet">
<script type="text/javascript" src="js/jquery/jquery-1.7.min.js"></script> <link type="text/css" href="static/css/whoswho.css" rel="stylesheet">
<script type="text/javascript" src="js/jquery-ui/jquery-ui-1.8.16.custom.min.js"></script>
<script type="text/javascript" src="js/bootstrap/bootstrap-dropdown-fade.js"></script> <!-- TODO test if each is really needed -->
<script type="text/javascript" src="js/misc/underscore.min.js"></script> <!-- TODO upgrade versions as per comments -->
<script type="text/javascript" src="js/jquery/jquery.highlight-3.js"></script> <script type="text/javascript" src="static/js/jquery/jquery-1.7.min.js"></script>
<script type="text/javascript" src="js/misc/json2.js"></script> <script type="text/javascript" src="static/js/jquery-ui-1.8.16.custom.min.js"></script>
<script type="text/javascript" src="js/utils.js"></script> <!-- upgraded available files
<script type="text/javascript" src="Highcharts-2.2.0/js/highcharts.js"></script> <script type="text/javascript" src="static/js/jquery/jquery-3.1.1.min.js"></script>
<script type="text/javascript" src="Highcharts-2.2.0/js/modules/exporting.js"></script> <script type="text/javascript" src="static/js/jquery-ui-1.12.1/jquery-ui.min.js"></script>
-->
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script> <script type="text/javascript" src="static/js/jquery-ui-1.8.16.custom.min.js"></script>
<script type="text/javascript" src="static/js/bootstrap/bootstrap-dropdown-fade.js"></script>
<link href="css/whoswho.css" rel="stylesheet" type="text/css"> <script type="text/javascript" src="static/js/misc/underscore.min.js"></script>
<script type="text/javascript" src="static/js/jquery/jquery.highlight-3.js"></script>
<script type="text/javascript" src="static/js/misc/json2.js"></script>
<script type="text/javascript" src="static/js/utils.js"></script>
<script type="text/javascript" src="static/js/highcharts-2.2/js/highcharts.js"></script>
<script type="text/javascript" src="static/js/highcharts-2.2/modules/exporting.js"></script>
<link rel="shortcut icon" href="images/favicon.ico"> <link rel="shortcut icon" href="images/favicon.ico">
<link rel="apple-touch-icon" href="images/apple-touch-icon.png"> <link rel="apple-touch-icon" href="images/apple-touch-icon.png">
<link rel="apple-touch-icon" sizes="72x72" href="images/apple-touch-icon-72x72.png"> <link rel="apple-touch-icon" sizes="72x72" href="images/apple-touch-icon-72x72.png">
<link rel="apple-touch-icon" sizes="114x114" href="images/apple-touch-icon-114x114.png"> <link rel="apple-touch-icon" sizes="114x114" href="images/apple-touch-icon-114x114.png">
<script type="text/javascript">
<script type="text/javascript">
var _gaq = _gaq || []; var _gaq = _gaq || [];
_gaq.push([\'_setAccount\', \'UA-30062222-1\']); _gaq.push([\'_setAccount\', \'UA-30062222-1\']);
_gaq.push([\'_setDomainName\', \'communityexplorer.org\']); _gaq.push([\'_setDomainName\', \'communityexplorer.org\']);
...@@ -194,7 +199,7 @@ include ("directory_content.php"); ...@@ -194,7 +199,7 @@ include ("directory_content.php");
$content .= '</div>'; $content .= '</div>';
$content .= '</div> $content .= '</div>
<footer> <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="static/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> </footer>
</div> </div>
</body> </body>
...@@ -203,7 +208,7 @@ $content .= '</div> ...@@ -203,7 +208,7 @@ $content .= '</div>
//////// Header //////// Header
$header = '<div class="row" id="welcome"> $header = '<div class="row" id="welcome">
<div class="span12" align="justify"> <div class="span12" align="justify">
<img src="img/RegistryBanner.png" align="center"> <img src="static/img/RegistryBanner.png" align="center">
<br/><br/> <br/><br/>
<h1>Complex Systems Scholars</h1> <h1>Complex Systems Scholars</h1>
<br/> <br/>
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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