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);
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
Semestral Projects, Bachelor and Diploma Theses at CMP
$sqlserver = "cyber.felk.cvut.cz";
$dbname="elf94ek";
$sqluser = "k333_user";
$sqlpassword = "2435";
//$sqlserver = "cyber";
//$sqluser = "k333_writer";
//$sqlpassword = "lopuch";
//$dbname="diplomky";
$sql = mysql_connect($sqlserver,$sqluser,$sqlpassword);
mysql_select_db($dbname);
mysql_query("SET CHAR SET latin2");
for ($i=1;$i<5;$i++) {
$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 "$title[$i]
(print All)\n";
$result=mysql_query($select);
$rows = mysql_num_rows($result);
if ($rows) {
print "\n";
while ($row=mysql_fetch_array($result)) {
print "
- \n";
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 "$vedouci: $row[Tema]\n";
}
print "
";
} else {
print "Database is empty\n";
}
mysql_free_result($result);
}
mysql_close($sql);
?>
comments and suggestions to
Tomas Svoboda
Go to the CMP Home Page http://cmp.felk.cvut.cz