fbpx

Animal Photos

[insert_php] $last_modified = filemtime(“/home/vbspcac/public_html/uploads/data/AllPets.csv”);

print “Last updated ” . date(“l, dS F, Y @ h:ia”, $last_modified) . “

“;

define(‘DBNAME’, ‘vbspcac_dvbspca’);
define(‘DBUSER’, ‘vbspcac_VBadmin’);
define(‘DBPASS’, ’11vb$pc@’);

$dq = new PDO(‘mysql:host=localhost;dbname=’ . DBNAME . ‘;charset=utf8’,DBUSER,DBPASS);
$dq->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
$dq->setAttribute(PDO::ATTR_EMULATE_PREPARES,TRUE);

$query = $dq->query(‘SELECT * FROM AllPets’);
$results = $query->fetchAll(PDO::FETCH_ASSOC);

foreach($results as $row) {
$pic = $row[‘contract’];
$url = ‘/home/vbspcac/public_html/photos/thumbs/’;
$pic1 = $pic.’.jpg’;
if (file_exists(‘/home/vbspcac/public_html/photos/thumbs/’.$pic1)){
echo ”;
}
else {
echo ”.$row[‘contract’] .’ – ‘. $row[‘type’] .’ – ‘. $row[‘name’] .’ – ‘. $row[‘breed’] .’ – ‘.$row[‘location’].’
‘;
}
}
echo ‘

Note: When taking photos at Petsmart do not forget to wear a nametag or t-shirt identifying yourself as a VBSPCA volunteer and introduce yourself to the manager or supervisor on duty before taking photos. ‘;
[/insert_php]