header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
header("Cache-Control: no-cache, must-revalidate");
header("Pragma: no-cache");
extract($_POST); extract($_GET); extract($_COOKIE);
if (!$what){$what=1;}
$title[4]="Semestrální projekty - Semestral Projects";
$title[3]="Semestrální práce - Semestral Theses";
$title[2]="Bakalářské práce - Bachelor Theses";
$title[1]="Diplomové práce - Diploma Theses";
$where[1]=" MOD(Typ,2) ";
$where[2]=" FLOOR(((MOD(MOD(Typ,8),4))) / 2) ";
$where[3]=" FLOOR(MOD(Typ,8) / 4) ";
$where[4]=" FLOOR(Typ / 8) ";
?>
Semestral Projects, Bachelor and Diploma Theses at CMP
echo $title[$what] ?>
$sqlserver = "cyber.felk.cvut.cz";
$dbname="elf94ek";
$sqluser = "k333_user";
$sqlpassword = "2435";
$sql = mysql_connect($sqlserver,$sqluser,$sqlpassword);
mysql_select_db($dbname);
mysql_query("SET CHAR SET latin2");
$select="SELECT ID_temata,Tema, Popis, Pokyny , Vedouci, Skupina,Datum_vypsani, Oponent, Literatura, Realizace,Deaktivovat,Typ,v1.first_name AS f1,v1.last_name AS l1,v1.title1 AS t11,v1.title2 AS t12,v2.first_name AS f2,v2.last_name AS l2,v2.title1 AS t21,v2.title2 AS t22 FROM Prace AS p LEFT JOIN sk5et9ci AS v1 ON (p.Vedouci1=v1.id) LEFT JOIN sk5et9ci AS v2 ON (p.Vedouci2=v2.id) WHERE Skupina='CMP' AND ".$where[$what]." ORDER BY Vedouci1,Tema";
#print $select;
$result=mysql_query($select);
$rows = mysql_num_rows($result);
if ($rows) {
while ($row=mysql_fetch_array($result)) {
$popis=ereg_replace("\n","
",$row[Popis]);
$pokyny=ereg_replace("\n","
",$row[Pokyny]);
if ($row[l1]){$vedouci="$row[t11] $row[f1] $row[l1] $row[t12]"; if ($row[l2]) $vedouci.=",$row[t21] $row[f2] $row[l2] $row[t22]";}else {$vedouci=$row[Vedouci];}
print "\n";
print "
\n\n";
print "Název: | $row[Tema] | \n";
print "
---|
|
Obor: | Kybernetika a měření | \n";
print "
---|
Katedra: | Katedra kybernetiky | \n";
print "
---|
Vedoucí: | $vedouci | \n";
if ($what>3) { print "
---|
Oponent: | $row[Oponent] | \n";}
print "
---|
Popis: | $popis | \n";
if ($what>3) {print "
---|
Pokyny k vypracování: | $pokyny | \n";
print "
---|
Doporučená literatura: | $row[Literatura] | \n";
print "
---|
Forma realizace: | $row[Realizace] | \n";
}
print "
---|
Datum vypsání: | $row[Datum_vypsani] | \n";
print "
---|
\n";
}
print "\n";
} else {
print "Database is empty\n";
}
mysql_free_result($result);
mysql_close($sql);
?>