[insert_php] if(isset($_GET[‘Bouwnr’]))
{
$servername = “localhost”;
$username = “barkm76_wp1”;
$password = “H&ChVqM2I9*oiO7r6K,11^^7”;
$dbname = “barkm76_wp1”;

// Create connection
$conn = new mysqli($servername, $username, $password, $dbname);

// Check connection
if ($conn->connect_error)
{
die(“Connection failed: ” . $conn->connect_error);
}

$sql = “SELECT * FROM ShipsTable WHERE Bouwnr = “.$_GET[‘Bouwnr’].”;”;
//echo $sql;

$result = $conn->query($sql);

if ($result->num_rows > 0)
{
while($row = $result->fetch_assoc())
{
$Bouwnr = $row[“Bouwnr”];
$Naam= $row[“Naam”];
$Omschrijving = $row[“Omschrijving”];
$Start= $row[“Start”];
$TWL = $row[“TWL”];
$Oplev= $row[“Oplev”];
$Afmetingen = $row[“Afmetingen”];
$Tonnage = $row[“Tonnage”];
$Propulsion = $row[“Propulsion”];
$Opdrachtgever = $row[“Opdrachtgever”];
$Year = $row[“Year”];
$Type = $row[“Type”];
$Subtype = $row[“Subtype”];
$Deadweight = $row[“Deadweight”];
$Deadweight = $row[“Deadweight”];
$Ship_specifics = $row[“Ship_specifics”];
$Speed = $row[“Speed”];
$Status = $row[“Status”];
$Nationality = $row[“Nationality”];
$IMO = $row[“IMO”];
}
}
else
{
echo “0 results”;
}
$conn->close();
}
[/insert_php]

[insert_php]
//if(file_exists(“/var/www/vhosts/virtek.nl/barkmeijer.virtek.nl/ShipImages/”.$Bouwnr.”-1.jpg”))
if(file_exists(“/home/barkm76/domains/barkmeijer.com/public_html/ShipImages/”.$Bouwnr.”-1.jpg”))
{
echo ‘‘;
echo ‘ship1‘;
echo “
“;
}
else
{
echo ‘ship1‘;
}
[/insert_php]

[insert_php] echo $Naam;[/insert_php] (Bouwnr: [insert_php] echo $Bouwnr;[/insert_php])

Technical Data

Omschrijving: [insert_php] echo $Omschrijving;[/insert_php]
Start: [insert_php] echo $Start;[/insert_php]
TWL: [insert_php] echo $TWL;[/insert_php]
Oplev: [insert_php] echo $Oplev;[/insert_php]
Afmetingen: [insert_php] echo $Afmetingen;[/insert_php]
Tonnage: [insert_php] echo $Tonnage;[/insert_php]
Propulsion: [insert_php] echo $Propulsion;[/insert_php]
Year: [insert_php] echo $Year;[/insert_php]
Type: [insert_php] echo $Type;[/insert_php]
Subtype: [insert_php] echo $Subtype;[/insert_php]
Deadweight: [insert_php] echo $Deadweight;[/insert_php]
Ship specifics: [insert_php] echo $Ship_specifics;[/insert_php]
Speed: [insert_php] echo $Speed;[/insert_php]
Status: [insert_php] echo $Status;[/insert_php]
Nationality: [insert_php] echo $Nationality;[/insert_php]
IMO: [insert_php] echo $IMO;[/insert_php]
[insert_php]

$i = 2;
$exist = true;
while ($exist)
{
echo ‘

‘;
for($j = 0; $j < 3; $j++) { if(file_exists("/var/www/vhosts/virtek.nl/barkmeijer.virtek.nl/ShipImages/".$Bouwnr."-".$i.".jpg")) { echo '[vc_column width="1/3" css=".vc_custom_1445437565069{margin: 0px !important;border-width: 0px !important;padding: 0px !important;}"]'; echo '[vc_column_text css=".vc_custom_1445437556173{margin: 0px !important;border-width: 0px !important;padding: 0px !important;}"]'; echo '‘;
echo ‘ ‘;
echo ‘
‘;
echo ‘[/vc_column_text]‘;
echo ‘[/vc_column]‘;
}
else
{
$exist = false;
}
$i++;
}
echo ‘
‘;
}
[/insert_php]