summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--index.php29
-rw-r--r--pics/stable0.pngbin0 -> 4592 bytes
-rw-r--r--pics/stable1.pngbin0 -> 4743 bytes
-rw-r--r--pics/stable2.pngbin0 -> 4573 bytes
-rw-r--r--pics/stable3.pngbin0 -> 4772 bytes
-rw-r--r--pics/table.svg156
-rw-r--r--pics/table0.pngbin0 -> 10127 bytes
-rw-r--r--pics/table1.pngbin0 -> 10525 bytes
-rw-r--r--pics/table2.pngbin0 -> 10146 bytes
-rw-r--r--pics/table3.pngbin0 -> 10561 bytes
-rw-r--r--standard.css148
11 files changed, 312 insertions, 21 deletions
diff --git a/index.php b/index.php
index 4e890fa..3a7ecad 100644
--- a/index.php
+++ b/index.php
@@ -314,18 +314,18 @@ function card_value($card)
function display_card($card)
{
if( $card/2 - (int)($card/2) == 0.5)
- echo "<img src=\"cards/".$card.".png\" height=\"100\" alt=\"".card_to_name($card)."\" />\n";
+ echo "<img src=\"cards/".$card.".png\" alt=\"".card_to_name($card)."\" />\n";
else
- echo "<img src=\"cards/".($card-1).".png\" height=\"100\" alt=\"".card_to_name($card-1)."\" />\n";
+ echo "<img src=\"cards/".($card-1).".png\" alt=\"".card_to_name($card-1)."\" />\n";
return;
}
function display_link_card($card,$me)
{
if( $card/2 - (int)($card/2) == 0.5)
- echo "<a href=\"index.php?me=$me&amp;card=$card\"><img src=\"cards/".$card.".png\" height=\"100\" alt=\"".card_to_name($card)."\" /></a>\n";
+ echo "<a href=\"index.php?me=$me&amp;card=$card\"><img src=\"cards/".$card.".png\" alt=\"".card_to_name($card)."\" /></a>\n";
else
- echo "<a href=\"index.php?me=$me&amp;card=$card\"><img src=\"cards/".($card-1).".png\" height=\"100\" alt=\"".card_to_name($card-1)."\" /></a>\n";
+ echo "<a href=\"index.php?me=$me&amp;card=$card\"><img src=\"cards/".($card-1).".png\" alt=\"".card_to_name($card-1)."\" /></a>\n";
return;
}
@@ -810,13 +810,14 @@ if(sizeof($lines)<2)
/* show history */
foreach($history as $play)
{
- echo "<br />\n";
-
$trick = explode(":",$play);
$last=-2;
/* found old trick, display it */
- echo "<div class=\"trick\">\n";
+ if(sizeof($trick)==5)
+ echo "<div class=\"oldtrick background".$play[0]."\"><div class=\"table\">\n";
+ else
+ echo "<div class=\"trick back".$play[0]."\"><div class=\"table\">\n";
for($i=0;$i<sizeof($trick)-1;$i++)
{
$card = $trick[$i];
@@ -825,10 +826,10 @@ if(sizeof($lines)<2)
$tmp = explode("->",$card);
if(strlen($tmp[2])>0)
- echo "<div class=\"card comment\">";
+ echo "<div class=\"card".$tmp[0]." comment\">";
else
- echo "<div class=\"card\">";
- echo $player[$hash[$tmp[0]]]["name"]." played <br />";
+ echo "<div class=\"card".$tmp[0]."\">";
+ echo $player[$hash[$tmp[0]]]["name"]." <br />";
display_card($tmp[1]);
/* check for comment */
if(strlen($tmp[2])>0)
@@ -837,7 +838,7 @@ if(sizeof($lines)<2)
echo "</div>\n";
}
}
- echo "</div>\n";
+ echo "</div></div>\n";
}
/* figure out who needs to play next */
@@ -888,7 +889,7 @@ if(sizeof($lines)<2)
save_status();
echo "<div class=\"card\">";
- echo " you played <br />";
+ echo " you played <br />";
display_card($card);
echo "</div>\n";
@@ -1005,7 +1006,7 @@ who won?
echo "<br />\n";
} /* end check for winner */
- echo "<br clear=\"both\">";
+ echo "<br clear=\"both\" />";
/* do we still have cards? display them */
if(strlen(trim($player[$me]["cards"]))>0 )
{
@@ -1016,7 +1017,7 @@ who won?
echo "<p class=\"mycards\">\n";
/* is it our turn? */
- if($hash[$next]==$me && !isset($_REQUEST["card"]))
+ if($hash[$next]==$me && !isset($_REQUEST["card"]) && !isset($_REQUEST["win"]))
{
echo "ITS YOUR TURN <br />\n";
echo "your cards are: <br />\n";
diff --git a/pics/stable0.png b/pics/stable0.png
new file mode 100644
index 0000000..c18a662
--- /dev/null
+++ b/pics/stable0.png
Binary files differ
diff --git a/pics/stable1.png b/pics/stable1.png
new file mode 100644
index 0000000..78e5ed6
--- /dev/null
+++ b/pics/stable1.png
Binary files differ
diff --git a/pics/stable2.png b/pics/stable2.png
new file mode 100644
index 0000000..ce8698a
--- /dev/null
+++ b/pics/stable2.png
Binary files differ
diff --git a/pics/stable3.png b/pics/stable3.png
new file mode 100644
index 0000000..e27fdc8
--- /dev/null
+++ b/pics/stable3.png
Binary files differ
diff --git a/pics/table.svg b/pics/table.svg
new file mode 100644
index 0000000..ce11853
--- /dev/null
+++ b/pics/table.svg
@@ -0,0 +1,156 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://web.resource.org/cc/"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="744.09448819"
+ height="1052.3622047"
+ id="svg2"
+ sodipodi:version="0.32"
+ inkscape:version="0.44+devel"
+ sodipodi:modified="true">
+ <defs
+ id="defs4">
+ <marker
+ inkscape:stockid="Tail"
+ orient="auto"
+ refY="0.0"
+ refX="0.0"
+ id="Tail"
+ style="overflow:visible">
+ <g
+ id="g5217"
+ transform="scale(-1.2)">
+ <path
+ id="path5219"
+ d="M -3.8048674,-3.9585227 L 0.54352094,0"
+ style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:0.8;marker-start:none;marker-end:none;stroke-linecap:round" />
+ <path
+ id="path5221"
+ d="M -1.2866832,-3.9585227 L 3.0617053,0"
+ style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:0.8;marker-start:none;marker-end:none;stroke-linecap:round" />
+ <path
+ id="path5223"
+ d="M 1.3053582,-3.9585227 L 5.6537466,0"
+ style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:0.8;marker-start:none;marker-end:none;stroke-linecap:round" />
+ <path
+ id="path5225"
+ d="M -3.8048674,4.1775838 L 0.54352094,0.21974226"
+ style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:0.8;marker-start:none;marker-end:none;stroke-linecap:round" />
+ <path
+ id="path5227"
+ d="M -1.2866832,4.1775838 L 3.0617053,0.21974226"
+ style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:0.8;marker-start:none;marker-end:none;stroke-linecap:round" />
+ <path
+ id="path5229"
+ d="M 1.3053582,4.1775838 L 5.6537466,0.21974226"
+ style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:0.8;marker-start:none;marker-end:none;stroke-linecap:round" />
+ </g>
+ </marker>
+ <marker
+ inkscape:stockid="Arrow2Mend"
+ orient="auto"
+ refY="0.0"
+ refX="0.0"
+ id="Arrow2Mend"
+ style="overflow:visible;">
+ <path
+ id="path5238"
+ style="font-size:12.0;fill-rule:evenodd;stroke-width:0.62500000;stroke-linejoin:round;"
+ d="M 8.7185878,4.0337352 L -2.2072895,0.016013256 L 8.7185884,-4.0017078 C 6.9730900,-1.6296469 6.9831476,1.6157441 8.7185878,4.0337352 z "
+ transform="scale(0.6) rotate(180) translate(0,0)" />
+ </marker>
+ <marker
+ inkscape:stockid="Arrow2Lend"
+ orient="auto"
+ refY="0.0"
+ refX="0.0"
+ id="Arrow2Lend"
+ style="overflow:visible;">
+ <path
+ id="path5244"
+ style="font-size:12.0;fill-rule:evenodd;stroke-width:0.62500000;stroke-linejoin:round;"
+ d="M 8.7185878,4.0337352 L -2.2072895,0.016013256 L 8.7185884,-4.0017078 C 6.9730900,-1.6296469 6.9831476,1.6157441 8.7185878,4.0337352 z "
+ transform="scale(1.1) rotate(180) translate(1,0)" />
+ </marker>
+ </defs>
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ gridtolerance="10000"
+ guidetolerance="10"
+ objecttolerance="10"
+ inkscape:pageopacity="0.0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="1"
+ inkscape:cx="332.85714"
+ inkscape:cy="654.28571"
+ inkscape:document-units="px"
+ inkscape:current-layer="layer1"
+ inkscape:window-width="698"
+ inkscape:window-height="613"
+ inkscape:window-x="20"
+ inkscape:window-y="42" />
+ <metadata
+ id="metadata7">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ inkscape:label="Layer 1"
+ inkscape:groupmode="layer"
+ id="layer1">
+ <rect
+ style="opacity:1;color:#000000;fill:#803300;fill-opacity:0.53333297;fill-rule:evenodd;stroke:#bb9277;stroke-width:4;stroke-linecap:butt;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
+ id="rect2160"
+ width="300"
+ height="300"
+ x="175.42859"
+ y="282.79074" />
+ <g
+ id="g5288"
+ transform="translate(7.5726509,1.8100686)">
+ <path
+ sodipodi:open="true"
+ sodipodi:end="4.712389"
+ sodipodi:start="0"
+ transform="matrix(0.722236,0,0,1.0131366,12.570853,75.189873)"
+ d="M 549.40768,351.17752 A 126.6899,90.313591 0 1 1 422.71778,260.86393"
+ sodipodi:ry="90.313591"
+ sodipodi:rx="126.6899"
+ sodipodi:cy="351.17752"
+ sodipodi:cx="422.71777"
+ id="path2164"
+ style="opacity:1;color:#000000;fill:none;fill-opacity:0.53333285;fill-rule:evenodd;stroke:#19921b;stroke-width:4.67612886;stroke-linecap:butt;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
+ sodipodi:type="arc" />
+ <path
+ sodipodi:nodetypes="ccccc"
+ id="path5282"
+ d="M 268.25853,353.61097 C 272.05376,361.37784 250.17489,377.96774 252.10244,390.63535 L 245.70731,374.81584 L 224.83902,376.66706 C 224.83902,376.66706 240.65853,354.62073 268.25853,353.61097 z "
+ style="fill:#37a039;fill-opacity:1;fill-rule:evenodd;stroke:#19921b;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
+ <path
+ style="fill:#37a039;fill-opacity:1;fill-rule:evenodd;stroke:#19921b;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+ d="M 235.33138,473.42527 C 243.09825,469.63004 259.68815,491.50891 272.35576,489.58136 L 256.53625,495.97649 L 258.38747,516.84478 C 258.38747,516.84478 236.34114,501.02527 235.33138,473.42527 z "
+ id="path5284"
+ sodipodi:nodetypes="ccccc" />
+ <path
+ sodipodi:nodetypes="ccccc"
+ id="path5286"
+ d="M 362.68474,511.51151 C 358.88951,503.74464 380.76838,487.15474 378.84083,474.48713 L 385.23596,490.30664 L 406.10425,488.45542 C 406.10425,488.45542 390.28474,510.50175 362.68474,511.51151 z "
+ style="fill:#37a039;fill-opacity:1;fill-rule:evenodd;stroke:#19921b;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
+ </g>
+ </g>
+</svg>
diff --git a/pics/table0.png b/pics/table0.png
new file mode 100644
index 0000000..aa91bd8
--- /dev/null
+++ b/pics/table0.png
Binary files differ
diff --git a/pics/table1.png b/pics/table1.png
new file mode 100644
index 0000000..7ea8684
--- /dev/null
+++ b/pics/table1.png
Binary files differ
diff --git a/pics/table2.png b/pics/table2.png
new file mode 100644
index 0000000..383f49d
--- /dev/null
+++ b/pics/table2.png
Binary files differ
diff --git a/pics/table3.png b/pics/table3.png
new file mode 100644
index 0000000..76f3cdf
--- /dev/null
+++ b/pics/table3.png
Binary files differ
diff --git a/standard.css b/standard.css
index ff055c8..bb1117a 100644
--- a/standard.css
+++ b/standard.css
@@ -1,10 +1,109 @@
-.trick
+
+
+.trick
+{
+ position:relative;
+// border: 1px solid green;
+ height:500px;
+ width:500px;
+ clear:both;
+}
+
+img
{
- //border: 1px solid green;
- clear:both;
+ height:80px;
}
-.trick div div
+.oldtrick
+{
+ position:relative;
+// border: 1px solid green;
+ height:280px;
+ width: 280px;
+ float:left;
+}
+
+.oldtrick img
+{
+ height:50px;
+}
+
+.oldtrick div.table
+{
+ position:absolute;
+ height:180px;;
+ width:180px;
+ left:50px;
+ top:50px;
+ // border:1px solid black;
+}
+.trick div.table
+{
+ position:absolute;
+
+ height:340px;;
+ width:340px;
+ left:80px;
+ top:80px;
+ // border:1px solid black;
+}
+
+div.card0
+{
+ position:absolute;
+ top:50px;
+ left: 0px;
+}
+div.card1
+{
+ position:absolute;
+ top:0px;
+ left:70px
+}
+div.card2
+{
+ position:absolute;
+ top:50px;
+ right:0px;
+ text-align:right;
+}
+div.card3
+{
+ position:absolute;
+
+ bottom:0px;
+ left:70px;
+}
+
+.trick div.card0
+{
+ position:absolute;
+ top:110px;
+ left: 0px;
+}
+.trick div.card1
+{
+ position:absolute;
+ top:0px;
+ left:140px
+}
+.trick div.card2
+{
+ position:absolute;
+ top:110px;
+ right:0px;
+ text-align:right;
+}
+.trick div.card3
+{
+ position:absolute;
+
+ bottom:0px;
+ left:140px;
+}
+
+
+.table div div
{
position: absolute;
width: 65px;
@@ -12,13 +111,13 @@
display: none;
}
-.trick div
+.table div
{
float:left;
margin-bottom:10px;
}
-.trick div:hover div
+.table div:hover div
{
display:block;
}
@@ -26,4 +125,39 @@
.comment
{
background-color:green;
-} \ No newline at end of file
+}
+
+.background0
+{
+ background:url(pics/stable0.png) no-repeat 60px 60px;
+}
+.background1
+{
+ background:url(pics/stable1.png) no-repeat 60px 60px;
+}
+.background2
+{
+ background:url(pics/stable2.png) no-repeat 60px 60px;
+}
+.background3
+{
+ background:url(pics/stable3.png) no-repeat 60px 60px;
+}
+div.back0
+{
+ background:url(pics/table0.png) no-repeat 100px 100px;
+}
+div.back1
+{
+ background:url(pics/table1.png) no-repeat 100px 100px;
+}
+div.back2
+{
+ background:url(pics/table2.png) no-repeat 100px 100px;
+}
+div.back3
+{
+ background:url(pics/table3.png) no-repeat 100px 100px;
+}
+
+