Home arrow Forum trying to make a module using backend.txt and got an error...
  Welcome, Guest. Please login or register.
Did you miss your activation email?
November 21, 2008, 09:21:56 PM
Home New Posts Search Calendar


Login with username, password and session length
+  Joomla Forum
|-+  Joomla Addon Discussion
| |-+  Joomla Modules
| | |-+  trying to make a module using backend.txt and got an error...
0 Members and 1 Guest are viewing this topic. « previous next »
Pages: [1] Go Down Print
Author Topic: trying to make a module using backend.txt and got an error...  (Read 632 times)
jamie
Joomla Newbie
*

Karma: +0/-0
Offline Offline

Posts: 1


View Profile
trying to make a module using backend.txt and got an error...
« on: December 17, 2006, 03:36:06 AM »

ive managed to get most of it working im just having a few issues with the title bar its not going to full width..

http://www.the-darklight.co.uk/site
this is the site im running it on u should see the server status module on the left panal

This is the code i am using.
Code:
<?php
function doTestDown($line){
    if(
stristr($line'down')==TRUE){
        
$x "<span class='down'>" $line '</span>';
        return 
$x;
    }else{
        
$x "<span class='up'>" $line '</span>';
        return 
$x;
    }
}
// Let's get the data as an array
$lines file('http://www.glop.org/lineage2/backend.txt');
for(
$i=0$i<count($lines); $i+=2)
{
    
$servers[] = array('name' => $lines[$i], 'connection' => doTestDown($lines[$i+1]));
}



echo
"<span class='yellow'>";
echo 
$servers[1]['name'];
echo
"<td class='left'>";
echo 
$servers[1]['connection'];
echo
"</span> ms</td></tr>";


echo
"<td class='left' nowrap>";
echo
"<span class='yellow'>";
echo 
$servers[2]['name'];
echo
"</span></td><td class='left'>";
echo 
$servers[2]['connection'];
echo
"</span> ms</td></tr>";


echo
"<td class='left' nowrap>";
echo
"<span class='yellow'>";
echo 
$servers[3]['name'];
echo
"</span></td><td class='left'>";
echo 
$servers[3]['connection'];
echo
"</span> ms</td></tr>";


echo
"<td class='left' nowrap>";
echo
"<span class='yellow'>";
echo 
$servers[4]['name'];
echo
"</span></td><td class='left'>";
echo 
$servers[4]['connection'];
echo
"</span> ms</td></tr>";


echo
"<td class='left' nowrap>";
echo
"<span class='yellow'>";
echo 
$servers[5]['name'];
echo
"</span></td><td class='left'>";
echo 
$servers[5]['connection'];
echo
"</span> ms</td></tr>";


echo
"<td class='left' nowrap>";
echo
"<span class='yellow'>";
echo 
$servers[6]['name'];
echo
"</span></td><td class='left'>";
echo 
$servers[6]['connection'];
echo
"</span> ms</td></tr>";


echo
"<td class='left' nowrap>";
echo
"<span class='yellow'>";
echo 
$servers[7]['name'];
echo
"</span></td><td class='left'>";
echo 
$servers[7]['connection'];
echo
"</span> ms</td></tr>";


echo
"<td class='left' nowrap>";
echo
"<span class='yellow'>";
echo 
$servers[8]['name'];
echo
"</span></td><td class='left'>";
echo 
$servers[8]['connection'];
echo
"</span> ms</td></tr>";


echo
"<td class='left' nowrap>";
echo
"<span class='yellow'>";
echo 
$servers[9]['name'];
echo
"</span></td><td class='left'>";
echo 
$servers[9]['connection'];
echo
"</span> ms</td></tr>";


echo
"<td class='left' nowrap>";
echo
"<span class='yellow'>";
echo 
$servers[10]['name'];
echo
"</span></td><td class='left'>";
echo 
$servers[10]['connection'];
echo
"</span> ms</td></tr>";

?>






any help is appreciated Smiley
Logged
Pages: [1] Go Up Print 
« previous next »
Jump to:  



Login with username, password and session length

Powered by MySQL Powered by PHP Joomla Forum | Powered by SMF 1.1 RC1.
© 2001-2005, Lewis Media. All Rights Reserved.
Joomla Bridge by JoomlaHacks.com
Valid XHTML 1.0! Valid CSS!

Joomla Hacks is a Joomla Components, Joomla Modules, Joomla Templates, & Joomla Mambots resource portal. None of the text or images in this public website may be copied without the expressed written consent of the authors. Copyright 2005 by JoomlaHacks.com. Powered by Joomla. All rights reserved.
Terms of Use
Joomla Hacks



Joomla Hacks
German Lang French Lang Italian Lang Spanish Lang Japanese Lang Chinese Lang
Search Contact About Advertise Blogs Topsites Submit News Register Login