portfolio
if ($_GET['cmd'] == "detail") {
// een detail ding
// variabelen ophalen uit
$portfolio_id = $_GET['portfolio_id'];
// query voor het ophalen van de portfolio gegevens
$query = "SELECT * FROM portfolio WHERE portfolio_id = $portfolio_id;";
$result = mysql_query ($query);
// variabelen ophalen uit de resultset
$titel = mysql_result ($result, 0, "titel");
$text1 = mysql_result ($result, 0, "text1");
$text2 = mysql_result ($result, 0, "text2");
$foto1 = mysql_result ($result, 0, "foto1");
$foto2 = mysql_result ($result, 0, "foto2");
$foto3 = mysql_result ($result, 0, "foto3");
$foto4 = mysql_result ($result, 0, "foto4");
// manipuleren van de data
$text1 = stripslashes ($text1);
$text2 = stripslashes ($text2);
?>
|
|
|
if ($foto1 != "") { list ($width, $height) = GetImageSize ("portfolio/large/$foto1");
$width += 40;
$height += 40;
echo ' '; } ?> |
|
if ($foto2 != "") { list ($width, $height) = GetImageSize ("portfolio/large/$foto2");
$width += 40;
$height += 40;
echo ' '; } ?> |
|
if ($foto3 != "") { list ($width, $height) = GetImageSize ("portfolio/large/$foto3");
$width += 40;
$height += 40;
echo ' '; } ?> |
|
if ($foto4 != "") { list ($width, $height) = GetImageSize ("portfolio/large/$foto4");
$width += 40;
$height += 40;
echo ' '; } ?> |
|
|
|
< terug |
} else {
// het overzicht :D
// query voor het ophalen van de portfolio gegevens
$query = "SELECT * FROM portfolio ORDER BY portfolio_id DESC;";
$result = mysql_query ($query);
?>
for ($t = 0; $t < mysql_num_rows ($result); $t++) {
// voor elk record
// variabelen ophalen uit de resultset
$portfolio_id = mysql_result ($result, $t, "portfolio_id");
$titel = mysql_result ($result, $t, "titel");
$thumbnail = mysql_result ($result, $t, "thumbnail");
$text1 = mysql_result ($result, $t, "text1");
// variabelen manipuleren
$text1 = stripslashes ($text1);
$text1 = truncateString ($text1, 80);
echo "\n\n";
echo " ";
if ($thumbnail != "") { echo ' '; }
echo "$titel $text1... ";
echo 'lees meer > ';
echo " | \n
\n";
echo "\n | \n
\n";
}
?>
}
?>