- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
- 37
- 38
- 39
- 40
- 41
- 42
- 43
- 44
- 45
- 46
- 47
- 48
- 49
- 50
- 51
- 52
- 53
- 54
- 55
- 56
echo "<center><br><br><form method=\"POST\" action=\"\">
<select name=\"Data\">";
$query="SELECT dtDate FROM Energo ORDER BY dtDate Desc";
$res=mssql_query($query) or die("Ошибка запроса!");
while($row = mssql_fetch_array($res))
{
echo "
<option>".$row['dtDate']."</option>";
}
echo "</select>
<input value=\"OK\" type=\"submit\">
</form><center>";
if(!empty($Data))
{
echo "<br><br><center><span style=\"font-weight: bold;\">Справка</span><br style=\"font-weight: bold;\">
<span style=\"font-weight: bold;\">по ..... по состоянию на $Data г.<br><br>";
require_once ("tablebuh.lpd");
echo "<center><br><br>
Начальник %Отдел% <img style=\"width: 50%;\"
alt=\"\" src=\"podpis.gif\" align=\"middle\">
К***в Н.А.<br><br>
</center>";
}
else
{
echo "<form method=\"POST\" action=\"\">";
echo "<br><br><center><span style=\"font-weight: bold;\">Справка</span><br style=\"font-weight: bold;\">
<span style=\"font-weight: bold;\">по .... по состоянию на ";
$query="SELECT dtDate FROM Energo WHERE id='1'";
$res=mssql_query($query) or die("Ошибка запроса!");
while($row = mssql_fetch_array($res))
{
$Data=$row['dtDate'];
echo $row['dtDate']."<br><br>";
require_once ("tablebuh.lpd");
echo "</center>";
}
echo "<center><br>
Начальник %Отдел% <img style=\"width: 50%;\"
alt=\"\" src=\"podpis.gif\" align=\"middle\">
К***в Н.А.<br><br>
";
//А вот и сам tablebuh.php
<?php
if(empty($Data))
{
require_once ("t2.php");
}
else
{
require_once ("t1.php");
}