English   German
  #1  
Old 06-03-2003, 10:02
[GR] Cool K [GR] Cool K is offline
-= TeamSpeak Lover =-
 
Join Date: Jan 2003
Location: Denmark
Posts: 47
[GR] Cool K is on a distinguished road
Send a message via ICQ to [GR] Cool K
Unhappy Undefined variables.. -and more

At last - after months of "try-and-error" I got help from this forum and now my webpost works (almost).

When trying to join a channel from the webpost interface I get the following error in the join window:

Notice: Undefined variable: action in c:\xxx\xxx\login.php on line 20

Also, when trying to set up the ticker (by using the following hyperlink: http://wargamer.adsl.dk/ts2/ticker.php?showname=[GR] )the following errors occur:

Notice: Undefined variable: group in c:\xxx\xxx\ticker.php on line 26

Notice: Undefined variable: name in c:\xxx\xxx\ticker.php on line 30

Notice: Undefined variable: show in c:\xxx\xxx\ticker.php on line 35


And in the scrolling text the following error occurs (I still get to see the servers though):

Notice: Undefined variable: show in c:\xxx\xxx\ticker.php on line 57

Any suggestions (Please...)
Reply With Quote
  #2  
Old 10-03-2003, 13:05
[GR] Cool K [GR] Cool K is offline
-= TeamSpeak Lover =-
 
Join Date: Jan 2003
Location: Denmark
Posts: 47
[GR] Cool K is on a distinguished road
Send a message via ICQ to [GR] Cool K
hmmm - I'm still stuck
Reply With Quote
  #3  
Old 10-03-2003, 14:45
maletin's Avatar
maletin maletin is offline
-= TeamSpeak Lover =-
 
Join Date: Aug 2002
Location: Germany
Posts: 79
maletin is on a distinguished road
Send a message via ICQ to maletin Send a message via Skype™ to maletin
where can i see the source code?
watch all variables on line 26 of ticker.php
Reply With Quote
  #4  
Old 10-03-2003, 14:55
[GR] Cool K [GR] Cool K is offline
-= TeamSpeak Lover =-
 
Join Date: Jan 2003
Location: Denmark
Posts: 47
[GR] Cool K is on a distinguished road
Send a message via ICQ to [GR] Cool K
This is the source code of ticker.php
I've marked line 26 with bold
Thx for your support...:

<?
/*
************************************************** ******************************
************************************************** ******************************
* *
* ************************************************** ************ *
* * Webpost2 for TeamSpeak 2 by Ryan Snook * *
* * www.thzclan.com/snooknet * *
* * * *
* * (c) Copyright TeamCom Team, Ralf Ludwig, Niels Werensteijn * *
* * All rights are reserved. * *
* * Copying or other reproduction of this * *
* * program except for archival purposes is prohibited without * *
* * the prior written consent of TC-Team. * *
* ************************************************** ************ *
* *
************************************************** ******************************
************************************************** ******************************
*/
include("db_inc.php");
clearinactive();

$tickermarg = 'topmargin="0" leftmargin="0" marginwidth="0" marginheight="0"';
$tickerrefresh = '<meta http-equiv="Refresh" content="30">';

if ($group) {
$show = "WHERE server_ispname='$group'";
$link = "&showgroup=$group";
}
if ($name) {
$show = "WHERE server_name='$name'";
$link = "&showgroup=";
}

$sql = query("SELECT * FROM $dbtable $show ORDER BY clients_current DESC LIMIT 1");

while ($data = mysql_fetch_row($sql)) {
if ($data[17] != '0') {
$online = 'on';
} else {
$online = 'off';
}
}

include("tpl_style.php");
?>

<table border="0" cellpadding="0" cellspacing="0" width="191" height="20">
<tr>
<td align="center" width="15"><a href="listing.php<?= $link ?>" target="_blank"><img src="images/<?= $online ?>.gif" alt="<?= $online ?>"></a></td>
<td valign="top">
<marquee direction="up" scrollAmount="1" style="width:170px; height:18px; border:0px solid white; padding:1px" onMouseover="this.scrollAmount=0" onMouseout="this.scrollAmount=1">
<table border="0" cellpadding="0" cellspacing="1" width="100%" bgcolor="<?= $bordercolor ?>" class="listfont">
<tr>
<td align="center" bgcolor="<?= $catrowcolor1 ?>" colspan="2" class="catagory" valign="middle"><b><a href="listing.php<?= $link ?>" target="spf_latest">TeamSpeak Servers</a></b></td>
</tr><?
$sql2 = query("SELECT * FROM $dbtable $show ORDER BY clients_current DESC");
while ($data2 = mysql_fetch_row($sql2)) {
if ($rowcolor == $rowcolor2) {
$rowcolor = $rowcolor1;
} else {
$rowcolor = $rowcolor2;
}

echo '
<tr>
<td align="center" bgcolor="'.$rowcolor.'" class="listing" nowrap><a href="listing.php?detail='.$data2[0].'" target="spf_latest">'.$data2[10].':'.$data2[11].'</a></td>
<td align="center" bgcolor="'.$rowcolor.'" class="listing">'.$data2[17].'</td>
</tr>';
}
?>

</table>
</marquee>
</td>
</tr>
</table>

</body>
</html>
Reply With Quote
  #5  
Old 10-03-2003, 15:46
maletin's Avatar
maletin maletin is offline
-= TeamSpeak Lover =-
 
Join Date: Aug 2002
Location: Germany
Posts: 79
maletin is on a distinguished road
Send a message via ICQ to maletin Send a message via Skype™ to maletin
Quote:
Originally posted by [GR] Cool K
if ($group) {
$show = "WHERE server_ispname='$group'";
$link = "&showgroup=$group";
}
if ($name) {
$show = "WHERE server_name='$name'";
$link = "&showgroup=";
}

$sql = query("SELECT * FROM $dbtable $show ORDER BY clients_current DESC LIMIT 1");
To avoid the warnings you can try
if( isset( $group ) ) {
...
if( isset( $name ) ) {

and maybe you need
$sql = mysql_query( "SELECT...
Reply With Quote
  #6  
Old 10-03-2003, 17:05
[GR] Cool K [GR] Cool K is offline
-= TeamSpeak Lover =-
 
Join Date: Jan 2003
Location: Denmark
Posts: 47
[GR] Cool K is on a distinguished road
Send a message via ICQ to [GR] Cool K
DANG - It works...

Thx a Zillion


Had to change the: & to ? in:

if ($group) {
$show = "WHERE server_ispname='$group'";
$link = "&showgroup=$group";
}
if ($name) {
$show = "WHERE server_name='$name'";
$link = "&showgroup=";
}

for the link to work... Is there a diff. (obvious there is) between & and ? - and when should they be used?

Thx again
Reply With Quote
  #7  
Old 10-03-2003, 22:43
maletin's Avatar
maletin maletin is offline
-= TeamSpeak Lover =-
 
Join Date: Aug 2002
Location: Germany
Posts: 79
maletin is on a distinguished road
Send a message via ICQ to maletin Send a message via Skype™ to maletin
Quote:
Originally posted by [GR] Cool K
Had to change the: & to ? in:
for the link to work... Is there a diff. (obvious there is) between & and ? - and when should they be used?
a normal url has one ? after the filename, and the parameters are splitted by &.
teamspeak seems to parse the url in an easier manner. every parameter starts with ?.
there is a very old thread about this behavior.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 18:52.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Add to Bookmarks   |   Printview   |   Contact Us   |   Legal Notices