From: Steve Sutton Date: Fri, 5 Feb 2010 21:44:45 +0000 (+0000) Subject: update image server import files X-Git-Tag: v1.0.0~122 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/?a=commitdiff_plain;h=ebda6cb13ee49bf7b1694ef1a36a1491fa3c523a;p=web%2FTroutCreek.git update image server import files --- diff --git a/admin/Photos/export-images-is0.php b/admin/Photos/export-images-is0.php index faa8623..cae3c46 100755 --- a/admin/Photos/export-images-is0.php +++ b/admin/Photos/export-images-is0.php @@ -2,7 +2,7 @@ require_once '../../setup.phtml'; require_once BASE.'Toolkit/Image/Server.php'; $db = new PDO('pgsql:'.CONN_STR); -define('OLDORG', 'http://www.migcsa.org/testphoto/'); +define('OLDORG', 'http://www.troutcreek.com/images/photo-large/'); $db->setAttribute(PDO::ATTR_ERRMODE,PDO::ERRMODE_EXCEPTION); $sql = " SELECT id,image @@ -32,19 +32,23 @@ if (is_array($data)) { $row['image'] = trim($row['image']); var_dump(OLDORG.$row['image']); if (!ereg("^is", $row['image'])) { - $image_URL = OLDORG.$row['image']; - $image = $IServer->imageUpload($image_URL); - if ($image) { - try { - $stmt3->bindParam(":image", $image, PDO::PARAM_STR); - $stmt3->bindParam(":id", $row['id'], PDO::PARAM_INT); - $stmt3->execute(); - } catch(PDOException $e) { - die($e->getMessage()); + try { + $image_URL = OLDORG.$row['image']; + $image = $IServer->imageUpload($image_URL); + if ($image) { + try { + $stmt3->bindParam(":image", $image, PDO::PARAM_STR); + $stmt3->bindParam(":id", $row['id'], PDO::PARAM_INT); + $stmt3->execute(); + } catch(PDOException $e) { + die($e->getMessage()); + } } + echo '
Image Name Returned: '; + var_dump($image); + } catch(PDOException $e) { + die($e->getMessage()); } - echo '
Image Name Returned: '; - var_dump($image); } } }