Pages vues depuis 25/05/2001 : 108 378 823
Index du forum »» Questions »» Blocs flottants.
#flottant1 { /* Liste des pages */
position:fixed;
top: 146px;
right: 15px;
}
#flottant2 { /* Drapeau */
position:fixed;
top: 98px;
right: 40px;
}
$menlang ='<a id="flottant2" ...
$textpage="<div class=\"rightbloc\"><div id=\"flottant1\">...
//*************************** Ajouts ******************************
// calcul de la hauteur de la fenêtre avec !javascript!. S.J.
echo "
<script type=\"text/!javascript!\">
<!--
function getWindowHeight() {
var windowHeight = 0;
if (typeof(window.innerHeight) == 'number') {
windowHeight = window.innerHeight;
}
else {
if (document.documentElement && document.documentElement.clientHeight) {
windowHeight = document.documentElement.clientHeight;
}
else {
if (document.body && document.body.clientHeight) {
windowHeight = document.body.clientHeight;
}
}
}
return windowHeight;
}
function setContent() {
if (document.getElementById) {
var windowHeight = getWindowHeight();
if (windowHeight > 0) {
var contentElement = document.getElementById('RB_2');
var contentHeight = contentElement.offsetHeight;
contentElement.style.height = (windowHeight * 0.67) + 'px';
}
}
}
window.!onload! = function() {
setContent();
}
window.onresize = function() {
setContent();
}
//-->
</script>
";
/********* Modifié J.S. *************/
#en-cours {
text-decoration: none;
background-color: #EEE;
font-weight: bold;
color: #277dd4;
}
#flottant2 { /* Drapeau */
position:fixed;
top: 98px;
right: 40px;
}
#RB_2 {
position:fixed;
right: 7px;
top: 153px;
width: 118px;
overflow-y: auto;
}
function Indexpages() {
global $numpage;
$numeropage= substr(substr($numpage,5),0,-1);
If ($numeropage!="") {
$textpage="<div class=\"rightbloc\"><div><h3 style=\"text-align:center\">Wakonai</h3><div class=\"bloc\"><ul>";
// $textpage="<div class=\"rightbloc\"><h3>Wakonai</h3><div class=\"bloc\"><ul>";
if ($numeropage==0) {
$textpage.="<li><a href=\"sections.php?op=viewarticle&artid=3&page=[page0]\" id=\"en-cours\">Introduction</a></li>";
} else {
$textpage.="<li><a href=\"sections.php?op=viewarticle&artid=3&page=[page0]\">Introduction</a></li>";
}
for ($i = 1; $i <= 55; $i++) {
if ($numeropage==$i) {
$textpage.="<li><a href=\"sections.php?op=viewarticle&artid=3&page=[page";
$textpage.="$i]\" id=\"en-cours\">Page $i</a></li>";
} else {
$textpage.="<li><a href=\"sections.php?op=viewarticle&artid=3&page=[page";
$textpage.="$i]\">Page $i</a></li>";
}
}
$textpage.="</ul></div></div></div>";
echo "$textpage";
}
}
...
global $numpage, $ndepages;
$numpage=$page;
$ndepages= "0";
...
if ($page!="") {
// Ajout *****************************************************
$ndepages=substr_count($Xcontent,'[page');
...
...
global $numpage, $ndepages;
...
for ($i = 1; $i <= ($ndepages - 1); $i++) {
...