From d090033a0aab7197af9dc7f3e2cf21ebdf042b21 Mon Sep 17 00:00:00 2001 From: Mike Macgirvin Date: Wed, 4 Aug 2010 20:03:38 -0700 Subject: more photo progress --- include/Photo.php | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) (limited to 'include/Photo.php') diff --git a/include/Photo.php b/include/Photo.php index 95ccccc88..b8557e7ec 100644 --- a/include/Photo.php +++ b/include/Photo.php @@ -167,5 +167,32 @@ class Photo { } + + public function store($uid, $cid, $rid, $filename, $album, $scale, $profile = 0) { + + $r = q("INSERT INTO `photo` + ( `uid`, `contact-id`, `resource-id`, `created`, `edited`, `filename`, `album`, `height`, `width`, `data`, `scale`, `profile` ) + VALUES ( %d, %d, '%s', '%s', '%s', '%s', '%s', %d, %d, '%s', %d, %d )", + intval($uid), + intval($cid), + dbesc($rid), + dbesc(datetime_convert()), + dbesc(datetime_convert()), + dbesc(basename($filename)), + dbesc($album), + intval($this->height), + intval($this->width), + dbesc($this->imageString()), + intval($scale), + intval($profile) + ); + return $r; + } + + + + + }} + -- cgit v1.2.3