Skip to content
Snippets Groups Projects
Commit 646c4771 authored by Giovannoni Laurent's avatar Giovannoni Laurent
Browse files

add: licence texts

parent 3f8192f4
No related branches found
No related tags found
No related merge requests found
......@@ -8,22 +8,22 @@ class Merge
//merge the js
$this->mergeJs();
}
private function mergeCss()
{
if ($this->needToMergeCss()) {
$dirStyle = 'css/';
$styleDirectory = opendir($dirStyle);
$mergedCss = '@charset "UTF-8";'."\n\n";
//atProperty first
//atProperty first
$cssLines = file(realpath($dirStyle.'atProperty.css'));
$mergedCss .= '/* atProperty.css */'."\n";
for ($i=0; $i<count($cssLines); $i++) {
$mergedCss .= $cssLines[$i];
}
$mergedCss .= "\n\n";
while($styleFile = @readdir($styleDirectory)) {
if ( substr($styleFile, 0, 1) != '.'
&& substr($styleFile, -4) == '.css'
......@@ -39,23 +39,23 @@ class Merge
}
}
closedir($styleDirectory);
/*
$interdit = array(
"\n",
"\r",
"\t"
);
$autorise = array('',
'',
''
);
$mergedCss = str_replace(
$interdit,
$autorise,
$mergedCss
);
*/
/*
$interdit = array(
"\n",
"\r",
"\t"
);
$autorise = array('',
'',
''
);
$mergedCss = str_replace(
$interdit,
$autorise,
$mergedCss
);
*/
if (file_exists($dirStyle.'merged_css.css')) {
unlink($dirStyle.'merged_css.css');
}
......@@ -64,15 +64,15 @@ class Merge
fclose ($merged_style);
}
}
private function mergeJs()
{
if ($this->needToMergeJs()) {
$dirJavascript = 'js/';
$javascriptDirectory = opendir($dirJavascript);
$mergedJavascript = '// JavaScript Document'."\n\n";
//jquery first
$javascriptLines = file(realpath($dirJavascript.'0_jQuery.js'));
$mergedJavascript .= '/* 0_jQuery.js */'."\n";
......@@ -104,7 +104,7 @@ class Merge
fclose ($merged_javascript);
}
}
private function needToMergeCss()
{
$write = false;
......@@ -129,7 +129,7 @@ class Merge
return $write;
}
private function needToMergeJs()
{
$write = false;
......
......@@ -5,5 +5,17 @@
$shortTitle = _LICENCE;
$longTitle = _LICENCE;
//LICENCE FILE
$pathToLicenceTxt = 'view/text/licence_'.$Class_Install->getActualLang().'.txt';
if (!file_exists($pathToLicenceTxt)) {
$pathToLicenceTxt = 'view/text/licence_en.txt';
}
$fileLicence = file($pathToLicenceTxt);
$txtLicence = '';
for ($i=0;$i<count($fileLicence);$i++) {
$txtLicence .= str_replace(array('<', '>'), array('&lt;', '&gt;'),$fileLicence[$i]).'<br />';
}
//VIEW
$view = 'licence';
......@@ -8,21 +8,9 @@
<div class="contentBlock" id="licence">
<p>
<div align="center">
ICI LA LICENCE GPL V3<br />
ICI LA LICENCE GPL V3<br />
ICI LA LICENCE GPL V3<br />
ICI LA LICENCE GPL V3<br />
ICI LA LICENCE GPL V3<br />
ICI LA LICENCE GPL V3<br />
ICI LA LICENCE GPL V3<br />
ICI LA LICENCE GPL V3<br />
ICI LA LICENCE GPL V3<br />
ICI LA LICENCE GPL V3<br />
ICI LA LICENCE GPL V3<br />
ICI LA LICENCE GPL V3<br />
ICI LA LICENCE GPL V3<br />
ICI LA LICENCE GPL V3<br />
ICI LA LICENCE GPL V3<br />
<div>
<?php echo $txtLicence; ?>
</div>
<br />
<input type="checkbox" id="checkboxLicence" onChange="checkLicence();"/>
<label for="checkboxLicence">
......
This diff is collapsed.
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment