aboutsummaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorjhunkeler <jhunkeler@c5b2fb0a-d05d-0410-98c8-828840a80ff6>2009-12-21 01:16:41 -0500
committerjhunkeler <jhunkeler@c5b2fb0a-d05d-0410-98c8-828840a80ff6>2009-12-21 01:16:41 -0500
commit84fc0b30493e9b8081898ec48451cec06a2cf2bc (patch)
tree29a27be22a366024971749726f4064263879b509 /modules
parent4565a86946464f124110db11e3ba7331018d8664 (diff)
downloadbayonetcms-84fc0b30493e9b8081898ec48451cec06a2cf2bc.tar.gz
Used the 'file' function to work around an 'include' limitation.
Regular expressions extract the IP/Port and display them separately. Some horizontal alignment code needs to be added. git-svn-id: http://svn.3rd-infantry-division.org/testing/branches/Bayonet CMS v2@387 c5b2fb0a-d05d-0410-98c8-828840a80ff6
Diffstat (limited to 'modules')
-rw-r--r--modules/tsviewer/index.php18
1 files changed, 10 insertions, 8 deletions
diff --git a/modules/tsviewer/index.php b/modules/tsviewer/index.php
index afbc83f..d243fba 100644
--- a/modules/tsviewer/index.php
+++ b/modules/tsviewer/index.php
@@ -23,22 +23,24 @@ if(!defined("MODULE_FILE"))
return;
}
+$ts = implode('',file("http://www.tsviewer.com/ts_viewer_pur.php?ID=902437&bg=&type=8f8f8f&type_size=11&type_family=5&info=1&channels=1&users=1&type_s_color=000000&type_s_weight=bold&type_s_style=normal&type_s_variant=normal&type_s_decoration=none&type_s_color_h=525284&type_s_weight_h=bold&type_s_style_h=normal&type_s_variant_h=normal&type_s_decoration_h=underline&type_i_color=000000&type_i_weight=normal&type_i_style=normal&type_i_variant=normal&type_i_decoration=none&type_i_color_h=525284&type_i_weight_h=normal&type_i_style_h=normal&type_i_variant_h=normal&type_i_decoration_h=underline&type_c_color=000000&type_c_weight=normal&type_c_style=normal&type_c_variant=normal&type_c_decoration=none&type_c_color_h=525284&type_c_weight_h=normal&type_c_style_h=normal&type_c_variant_h=normal&type_c_decoration_h=underline&type_u_color=000000&type_u_weight=normal&type_u_style=normal&type_u_variant=normal&type_u_decoration=none&type_u_color_h=525284&type_u_weight_h=normal&type_u_style_h=normal&type_u_variant_h=normal&type_u_decoration_h=none"));
+
+$tmp = $ts;
+$tmp = strip_tags($tmp);
+preg_match("/(\d+).(\d+).(\d+).(\d+):(\d+)/", $tmp, $ip);
+
OpenTable();
-echo "<div class=\"contentHeader\">How to Connect</div><div class=\"content\"><p>IP: 64.214.185.50:9004</p><p>Password: Garand</p></div>";
+echo "<div class=\"contentHeading\">How to Connect</div>
+<div class=\"content\"><p><b>IP:</b> $ip[0]</p><p><b>Password:</b> Garand</p></div>";
CloseTable();
-
OpenTable();
-echo "<div class=\"contentHeader\">Teamspeak Server</div>";
+echo "<div class=\"contentHeading\">Teamspeak Server</div>";
/*echo "<div style=\"vertical-align:middle; margin-left:40%; margin-right:auto;\">\n";*/
//echo "<div style=\"width: 30%; margin-left: auto; margin-right: auto;\">\n";
-echo "<div style=\"display:block; margin-left:40%;margin-right:auto;\">";
-
-$ts = implode('',file("http://www.tsviewer.com/ts_viewer_pur.php?ID=902437&bg=&type=8f8f8f&type_size=11&type_family=5&info=1&channels=1&users=1&type_s_color=000000&type_s_weight=bold&type_s_style=normal&type_s_variant=normal&type_s_decoration=none&type_s_color_h=525284&type_s_weight_h=bold&type_s_style_h=normal&type_s_variant_h=normal&type_s_decoration_h=underline&type_i_color=000000&type_i_weight=normal&type_i_style=normal&type_i_variant=normal&type_i_decoration=none&type_i_color_h=525284&type_i_weight_h=normal&type_i_style_h=normal&type_i_variant_h=normal&type_i_decoration_h=underline&type_c_color=000000&type_c_weight=normal&type_c_style=normal&type_c_variant=normal&type_c_decoration=none&type_c_color_h=525284&type_c_weight_h=normal&type_c_style_h=normal&type_c_variant_h=normal&type_c_decoration_h=underline&type_u_color=000000&type_u_weight=normal&type_u_style=normal&type_u_variant=normal&type_u_decoration=none&type_u_color_h=525284&type_u_weight_h=normal&type_u_style_h=normal&type_u_variant_h=normal&type_u_decoration_h=none"));
+echo "<div style=\"margin:50px;\">";
echo $ts;
-
echo "</div>\n";
CloseTable();
-
?>