[go: up one dir, main page]

Menu

[r1]: / libs / accordeon1.php  Maximize  Restore  History

Download this file

155 lines (128 with data), 4.4 kB

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script type="text/javascript" src="mootools.js"></script>
<script type="text/javascript">
var accordion;
var accordionTogglers;
var accordionContents;
window. {
accordionTogglers = document.getElementsByClassName('accordion-toggler');
accordionTogglers.each(function(toggler){
//remember the original color
toggler.origColor = toggler.getStyle('background-color');
//set the effect
toggler.fx = new Fx.Color(toggler, 'background-color');
});
accordionContents = document.getElementsByClassName('accordion-content');
accordion = new Fx.Accordion(accordionTogglers, accordionContents,{
//when an element is opened change the background color to blue
onActive: function(toggler){
toggler.fx.toColor('#6899CE');
},
onBackground: function(toggler){
//change the background color to the original (green)
//color when another toggler is pressed
toggler.setStyle('background-color', toggler.origColor);
}
});
}
</script>
<style type="text/css">
*{padding:0px; margin:0px;}
body{font-size:11px; font-family:"Lucida Grande", Arial, sans-serif; color:#6d6d6d;}
a{
font-size:13px;
margin: 3px auto;
padding: 3px;
}
.accordion-toggler{
margin: 3px auto;
padding: 3px;
width: 400px;
background: #acc95f;
color: #f4f4f4;
border: 1px solid #fff;
cursor: pointer;
}
.accordion-content{
margin: 0px auto;
width: 400px;
}
</style>
<title>MadCollector Issue Test</title>
</head>
<body>
<?php
//session_start(); // on démarre la session
$apub=$_GET['apub'];
if ($apub==""){$apub="a";}
if($_SESSION['apub']=="") {$_SESSION['apub']="A";}
if($_GET['apub']!=""){$_SESSION['apub']=$_GET['apub'];}
?>
<h1 style="text-align: center;">
MadCollector Test for issue accordeon style.
</h1>
<p style="margin: 10px auto; width: 400px;">
A mootools scprit for enchance comic view. Choose a letter !
<?php
$AlphaTab= array(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,09);
foreach ($AlphaTab as $alpha){
echo "<a href='?apub=".$alpha."'>".$alpha."</a>";
}
?>
</p>
<?php
$myHost = "localhost";
$myUser = "mcollector";
$myPass = "mcollector";
$myBase = "newmadcollector";
require 'classes/mysql.php';
$myDB=new MYSQL();
if (!$link = $myDB -> connect($myHost, $myUser, $myPass, $myBase)){
echo "Connexion en rade...";
die();
}
$Query="SELECT * FROM mc_publishers WHERE publisher like '$apub%'";
?>
<p style="background-color: rgb(104, 153, 206);" class="accordion-toggler">
<?php echo "Review: ".$apub; ?>
</p>
<p style="overflow: hidden; height: 112px; visibility: visible; opacity: 1;" class="accordion-content">
<?php
$Bdd = $myDB->send_query($Query);
while($Object = $myDB -> get_object($Bdd)) {
$publisher= $Object -> publisher;
$idpublisher=$Object -> id_publisher;
echo "<a href='?publisher=".$publisher."&idpublisher=".$idpublisher."&apub=".$apub."'>".$publisher."</a>";
}
?>
</p>
<?php if ($publisher==""){$publisher="Please choose a publisher.";} ?>
<p style="background-color: rgb(172, 201, 95);" class="accordion-toggler">
<?php
$publisher=$_GET['publisher'];
echo "Labels for ".$publisher;
?>
</p>
<p style="overflow: hidden; height: 0px; visibility: hidden; opacity: 0;" class="accordion-content">
<?php
$idpublisher=$_GET['idpublisher'];
$LQuery="SELECT * FROM mc_labels WHERE id_publisher ='$idpublisher'";
$LBdd = $myDB->send_query($LQuery);
while($Object = $myDB -> get_object($LBdd)) {
$labels=$Object -> label;
echo "<a href='?publisher=".$publisher."&idpublisher=".$idpublisher."&apub=".$apub."'>".$labels."</a>";
}
?>
<p style="background-color: rgb(172, 201, 95);" class="accordion-toggler">Javascript used in this example</p>
<p style="overflow: hidden; height: 0px; visibility: hidden; opacity: 0;" class="accordion-content">
fqsdfqsdfqsdf
</p>
<p style="background-color: rgb(172, 201, 95);" class="accordion-toggler">CSS used in this example</p>
<p style="overflow: hidden; height: 0px; visibility: hidden; opacity: 0;" class="accordion-content">
fqdsfqdsfqsdf
<p style="margin: 10px auto; width: 400px; text-align: center;">
&copy;madcollector team
</p>
</body></html>