<?php
/* Module example.<br>
  A module is a function that outputs the data;
Function, depending on the time ($ p2) parameter and displays a greeting in Russian $ p1 = 'r' or English $ p1 = 'e'
*/ 
function f1($p1,$p2)   // main function
{
if ($p1=='r')   // 
{
echo "<b>Sechas ".$p2." chas.</b>";
if ($p2>6 and $p2<12)
{echo "<h2>Dobroe utro !</h2>";}
else if ($p2>=12 and $p2<18)
{echo "<h2>Dobryi den !</h2>";}
else if ($p2>=18 and $p2<=24)
{echo "<h2>Dobryi vecher !</h2>";}
else if ($p2>1 and $p2<6)
{echo "<h2>Spokoynoy nochi !</h2>";}
}
else if ($p1=='e')  // 
{
echo "<b>Now ". $p2. ":00.</b>";
if ($p2>6 and $p2<12)
{echo "<h2> Good morning! </h2>";}
else if ($p2>=12 and $p2<18)
{echo "<h2> Good day! </h2>";}
else if ($p2>=18 and $p2<=24)
{echo "<h2> Good evening! </h2>";}
else if ($p2>1 and $p2<6)
{echo "<h2> Goodnight! </h2>";}
}
else
{echo "<h4 style='color:red'>ERROR Parameter Module</h4>"; }
}
?>