[imp] IMP and MOTD.html
Rich Lafferty
rich@horde.org
Thu, 12 Oct 2000 12:51:36 -0400
On Thu, Oct 12, 2000 at 10:36:17AM -0400, Chuck Hagenbuch (chuck@horde.org) wrote:
> Quoting Ari Heikkinen <aheikin@phaser-atm.pspt.fi>:
>
> > Does this mean I have to learn PHP ? :) (so far I've gotten along with C,
> > C++ and UNIX shell tools)
>
> Yes. It's not very hard - if you know c, you know how to write an if statement,
> which is pretty much all you need - and quite frankly, this is something that no
> one else has asked for.
I didn't ask, I just did it. :-) For the php-challenged, either of
------8<----- cut here ------8<-----
<?php if ($language == "fr") { ?>
Ceci n'est pas un MOTD.
<?php } elseif ($language == "de") { ?>
Dieses ist nicht ein MOTD.
<?php } elseif ($language == "it") { ?>
Ciò non è un MOTD.
<?php } else { # default case ?>
This is the MOTD.
<?php } ?>
------8<----- cut here ------8<-----
or
------8<----- cut here ------8<-----
<?php
if ($language == "fr") { echo "Ceci n'est pas un MOTD."; }
elseif ($language == "de") { echo "Dieses ist nicht ein MOTD."; }
elseif ($language == "it") { echo "Ciò non è un MOTD."; }
else { echo "This is the MOTD."; }
?>
------8<----- cut here ------8<-----
should do the trick. (The second one's cleaner, IMO, but the first one
is easier to stick big chunks o' html into.)
-Rich
--
------------------------------ Rich Lafferty ---------------------------
Sysadmin/Programmer, Instructional and Information Technology Services
Concordia University, Montreal, QC (514) 848-7625
------------------------- rich@alcor.concordia.ca ----------------------