if ((!is_numeric($_GET["proj"])) AND ($_GET["proj"] != "")) die("");
if (!is_numeric($_GET["group"])) die("");
include("header.php");
if ($_GET["lang"] == "cz") {
?>
if ($_GET["proj"]) {
$result=mysqli_query($conection,"SELECT projekty . * ,
agentury.agentura AS agentura_nazev
FROM projekty
LEFT JOIN agentury ON ( agentury.id = projekty.agentura )
WHERE projekty.id = $_GET[proj]") or die(mysqli_error());
while ($row=mysqli_fetch_array($result))
{
?>
:
Číslo projektu:
Agentura:
Doba řešení:
$result2=mysqli_query($conection,"SELECT * FROM publikace WHERE projekt = $row[id] OR projekt2 = $row[id] OR projekt3 = $row[id] ORDER BY autor1") or die(mysqli_error());
if (mysqli_num_rows($result2) != 0) {?>
Publikace:
}
while ($row2=mysqli_fetch_array($result2))
{
?>
}?>
}
}
else {
$time = Time();
$result=mysqli_query($conection,"SELECT projekty . * ,
agentury.agentura AS agentura_nazev
FROM projekty
LEFT JOIN agentury ON ( agentury.id = projekty.agentura )
WHERE konec > $time AND skupina LIKE '%*$_GET[group]*%' ORDER BY zacatek DESC") or die(mysqli_error());
if (mysqli_num_rows($result) != 0) {?>
Řešené projekty
}
while ($row=mysqli_fetch_array($result))
{
?>
}
$result=mysqli_query($conection,"SELECT projekty . * ,
agentury.agentura AS agentura_nazev
FROM projekty
LEFT JOIN agentury ON ( agentury.id = projekty.agentura )
WHERE konec < $time AND skupina LIKE '%*$_GET[group]*%' ORDER BY zacatek DESC") or die(mysqli_error());
if (mysqli_num_rows($result) != 0) {?>
Ukončené projekty
}
while ($row=mysqli_fetch_array($result))
{
?>
}
}?>
}
else {
?>
if ($_GET["proj"]) {
$result=mysqli_query($conection,"SELECT projekty . * ,
agentury.agentura_en AS agentura_nazev
FROM projekty
LEFT JOIN agentury ON ( agentury.id = projekty.agentura )
WHERE projekty.id = $_GET[proj]") or die(mysqli_error());
while ($row=mysqli_fetch_array($result))
{
?>
:
Number of Project:
Agency:
Duration:
$result2=mysqli_query($conection,"SELECT * FROM publikace WHERE projekt = $row[id] OR projekt2 = $row[id] OR projekt3 = $row[id] ORDER BY autor1") or die(mysqli_error());
if (mysqli_num_rows($result2) != 0) {?>
Publications:
}
while ($row2=mysqli_fetch_array($result2))
{
?>
}?>
}
}
else {
$time = Time();
$result=mysqli_query($conection,"SELECT projekty . * ,
agentury.agentura AS agentura_nazev
FROM projekty
LEFT JOIN agentury ON ( agentury.id = projekty.agentura )
WHERE konec > $time AND skupina LIKE '%*$_GET[group]*%' ORDER BY zacatek DESC") or die(mysqli_error());
if (mysqli_num_rows($result) != 0) {?>
Running projects
}
while ($row=mysqli_fetch_array($result))
{
?>
}
$result=mysqli_query($conection,"SELECT projekty . * ,
agentury.agentura AS agentura_nazev
FROM projekty
LEFT JOIN agentury ON ( agentury.id = projekty.agentura )
WHERE konec < $time AND skupina LIKE '%*$_GET[group]*%' ORDER BY zacatek DESC") or die(mysqli_error());
if (mysqli_num_rows($result) != 0) {?>
Finished projects
}
while ($row=mysqli_fetch_array($result))
{
?>
}
}?>
}
include("footer.php");
?>