Closed Thread Icon

Topic awaiting preservation: It's time's like these when you can tell im not a proggramer (Page 1 of 1) Pages that link to <a href="http://ozoneasylum.com/backlink?for=12478" title="Pages that link to Topic awaiting preservation: It&amp;#039;s time&amp;#039;s like these when you can tell im not a proggramer (Page 1 of 1)" rel="nofollow" >Topic awaiting preservation: It&#039;s time&#039;s like these when you can tell im not a proggramer <span class="small">(Page 1 of 1)</span>\

 
Trigger
Paranoid (IV) Inmate

From:
Insane since: Jun 2002

posted posted 10-18-2002 23:16

http://extine.net/~trig/badcode.txt

Thats the Url to the full source

now this is a script .. part of a group of them.. made for a chatroom
if you look at
http://www.thedigital-edge.co.uk/cgi-bin/skool/spycam.pl?test
you will see where it says, "condtion Green.. Yellow.. Red..etc".. a Lime green table around it
now he file.. chat.pls the main "hub" of the script
now it worked fine until i tryed to implment the feature where you change the "condtion" to say Red and then the table turned to Red
i did this by editing

quote:
if (@status[0] eq "Green")
{
$alert2 = "Green" & $color1 = "#00ff00";
}
elsif (@status[0] eq "Yellow")
{
$alert2 = "Yellow" & $color1 = "yellow";
}
elsif (@status[0] eq "Red")
{
$alert2 = "Red" & $color1 = "red";
}
elsif (@status[0] eq "Blue")
{
$alert2 = "Blue" & $color1 = "blue" ;
}
elsif (@status[0] eq "Destruct")
{
$alert2 = "Destruct";
}
else
{
$alert2 = "Green";
}



and then i edited.. the part of the html that shows the table.. changing the colour of the table with the $color1 variable

[quote]
print qq~</b></font></td>
<td align="right" bgcolor="#000000"><font face="$fontface" size="$fontsize" color="$colour1"><b>Users: <a href=users.pl><font color ="#00ff00">$total</A></font></b></font></td>
</tr>
<tr>
<td align="center" colspan="2" bgcolor="#000000"><a href="$cgiurl/updates.pl"><img src="$alert/@status.gif" border="0"></a></td>
</tr>
<tr>
<td align="center" colspan="2" bgcolor="#000000"><font face="$fontface" size="$fontsize" color="$color1"><font color = #00ff00>[</font><font color="#00ff00">$subject2</font><font color = "$color1">]</font></font></td>
</tr>
<tr>
<td align="center" colspan="2" bgcolor="#000000"><font face="$colour1" size="$fontsize" color=""$colour1""><font color = $colour1>[</font><font color="#00ff00">Chatting As $formdata{'logon'}</font><font color = #00ff00>]</font></font></td>
</tr>

</table>
</center><P>
[/qoute]


now, anyone got any idea as to why that wont work?.. and how to fix it. so it will work?
any help would be really appreciated

Thanks
.Trigger

mr.maX
Maniac (V) Mad Scientist

From: Belgrade, Serbia
Insane since: Sep 2000

posted posted 10-18-2002 23:33

For a start you are mixing British and American spelling of the word "color"... If you take a closer look at your code you'll notice that you have "$color1" and "$colour1" variables and only "$color1" variable is defined.

Also, in your if statements, you should remove "&" sign between variables.

This:

$alert2 = "Green" & $color1 = "#00ff00";

Should be:

$alert2 = "Green";
$color1 = "#00ff00";

And you have errors in your HTML code, for example:

color=""$colour1""

Notice the double quotation marks...


Trigger
Paranoid (IV) Inmate

From:
Insane since: Jun 2002

posted posted 10-19-2002 16:05

Thanks Max, that sorted it all out

Thanks
Trigger

« BackwardsOnwards »

Show Forum Drop Down Menu