Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $m=array();
- $m[0]=array("Menu", 1,2,3,6,7);
- $m[1]=array("Login", 4);
- $m[2]=array("Register", 5);
- $m[3]=array("Logout");
- $m[4]=array("Login_Dialog",13);
- $m[5]=array("Register_Dialog");
- $m[6]=array("About");
- $m[7]=array("Contact");
- $m[8]=array("m8",10,11);
- $m[9]=array("m9",12,13);
- $m[10]=array("m10");
- $m[11]=array("m11");
- $m[12]=array("m12");
- $m[13]=array("x",14);
- $m[14]=array("x");
- $wb=100;
- $ac=0;
- $xstring="";
- $bstring="";
- $bstring.= "<div class='dropdown'>\n";
- $bstring.= "<button class='dropbtn'>".$m[0][0]."</button>\n\n";
- for ($a=1;$a<count($m[0]);$a++){
- $mx1=$m[$m[0][$a]][0];
- $ax=$m[0][$a];
- // echo "A=".$ax;
- $axx=$wb*$a;
- $top=$wb*($a);
- $left=0;
- $xstring.="
- .mx1{b: $b; a: $a;}
- .$mx1 {
- top: $top;
- left: $left;
- display: none;
- position: absolute;
- background-color: #333333;
- width: $wb;
- height: $wb;
- }
- .$mx1:hover {background-color: #3e8e41}
- .dropdown:hover .$mx1 { display: block;}
- .$mx1 a {
- color: red;
- text-decoration: none;
- display: block;
- }
- ";
- $bstring.= "\t<div class='$mx1'><ax href='#'>$mx1</a>\n";
- for ($b=1;$b<count($m[$ax]);$b++){
- $bx=$m[$ax][$b];
- // echo "B=".$bx;
- $mx2=$m[$bx][0];
- $top=0;
- $left=$wb*($b);
- $xstring.="
- .mx2{b: $b; a: $a;}
- .$mx2 {
- top: ".($top).";
- left: ".($left).";
- display: none;
- position: absolute;
- background-color: #333333;
- width: $wb;
- height: $wb;
- }
- .$mx2:hover {background-color: #3e8e41}
- .$mx1:hover .$mx2 { display: block;}
- .$mx2 a {
- color: red;
- text-decoration: none;
- display: block;
- }
- ";
- $bstring.= "\t\t<div class='$mx2'><xa href='#'>$mx2 </a>\n";
- for ($c=1;$c<count($m[$bx]);$c++){
- $cx=$m[$bx][$c];
- // echo "C=".$cx;
- $mx3=$m[$cx][0];
- $top=$wb*($a);
- $left=0;
- $bstring.= "\t\t\t<div class='$mx3'><xa href='#'>$mx3 </a> ";
- $bstring.= " </div>\n";
- $xstring.="
- .mx3{b: $b; a: $a;}
- .$mx3 {
- top: ".($top).";
- left: ".($left).";
- display: none;
- position: absolute;
- background-color: #333333;
- width: $wb;
- height: $wb;
- }
- .$mx3:hover {background-color: #3e8e41}
- .$mx3 a {
- color: red;
- text-decoration: none;
- display: block;
- }
- .$mx2:hover .$mx3 { display: block;}
- ";
- }
- $bstring.= "\t\t</div>\n";
- }
- $bstring.= "\t</div>\n\n";
- }
- $bstring.= " </div>\n";
- echo "<html><head><style>";
- echo "
- .dropdown {
- position: relative;
- display: inline-block;
- }
- .dropbtn {
- background-color: #222222;
- color: gray;
- padding: 16px;
- font-size: 16px;
- border: none;
- cursor: pointer;
- width: $wb;
- height: $wb;
- }";
- echo $xstring;
- echo "</style></head><body>";
- echo $bstring;
- echo "</body></html>";
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement