From adfd5fea57d97767ab738dddd0808306416d501e Mon Sep 17 00:00:00 2001 From: Steve Sutton Date: Mon, 15 Feb 2010 16:26:43 +0000 Subject: [PATCH] updating code only --- admin/Photos/edit_photo_category.phtml | 4 +- admin/Photos/export-images-is0.php | 3 -- admin/Photos/list_photo.phtml | 51 ++++++++++++-------------- admin/Photos/list_photo_category.phtml | 5 +-- 4 files changed, 26 insertions(+), 37 deletions(-) diff --git a/admin/Photos/edit_photo_category.phtml b/admin/Photos/edit_photo_category.phtml index 8092102..6283ab7 100755 --- a/admin/Photos/edit_photo_category.phtml +++ b/admin/Photos/edit_photo_category.phtml @@ -1,6 +1,6 @@ getMessage()); } -//$db->beginTransaction(); $IServer = new Toolkit_Image_Server(); if (is_array($data)) { $prep2 = " @@ -52,6 +51,4 @@ if (is_array($data)) { } } } -//$db->commit(); -//$db->rollBack(); ?> diff --git a/admin/Photos/list_photo.phtml b/admin/Photos/list_photo.phtml index 4b9d14a..b295116 100755 --- a/admin/Photos/list_photo.phtml +++ b/admin/Photos/list_photo.phtml @@ -3,10 +3,10 @@ require_once "../../setup.phtml"; require_once "photo-setup.inc"; GLM_TOOLBOX::top("Photo Albums (List Photos)", HELP_BASE."photo.phtml?key=list"); $lnav = array( - "Add A New Photo" => "edit_photo.phtml?catid=$catid", - "List Photos" => "list_photo.phtml?catid=$catid", - "List Albums" => "list_photo_category.phtml" - ); + "Add A New Photo" => "edit_photo.phtml?catid=$catid", + "List Photos" => "list_photo.phtml?catid=$catid", + "List Albums" => "list_photo_category.phtml" +); GLM_TOOLBOX::html_nav_table($lnav, 5); $query = "select * from photo_category_bus;"; if ($res2 = $DB->db_exec($query)) { @@ -14,10 +14,11 @@ if ($res2 = $DB->db_exec($query)) { $data2[$row2['photocat_id']] = $row2['buscat_id']; } } -$qs2 = "SELECT id,title,pos - FROM photo - WHERE catid = $catid - ORDER BY pos"; +$qs2 = " + SELECT id,title,pos + FROM photo + WHERE catid = $catid +ORDER BY pos"; $res = $DB->db_exec($qs2); if (!$res) { GLM_TOOLBOX::html_error(DB_ERROR_MSG, 1); @@ -32,29 +33,25 @@ echo '
Function Title -db_numrows($res); $i++) -{ - $row = $DB->db_fetch_array($res,$i, PGSQL_ASSOC); - if(!$row[id]) - { - GLM_TOOLBOX::html_error(DB_ERROR_MSG,1); +db_numrows($res); $i++) { + $row = $DB->db_fetch_array($res, $i, PGSQL_ASSOC); + if (!$row['id']) { + GLM_TOOLBOX::html_error(DB_ERROR_MSG, 1); } - if(!$row[id]) - { - GLM_TOOLBOX::html_error(DB_ERROR_MSG,1); + if (!$row['id']) { + GLM_TOOLBOX::html_error(DB_ERROR_MSG, 1); } ?> - [Edit/Delete] - &catid=">[Edit/Delete] + db_exec($qs)) - { + if (!$maxresult = $DB->db_exec($qs)) { GLM_TOOLBOX::html_error(DB_ERROR_MSG.$qs,0); } $max_data = $DB->db_fetch_array($maxresult,0,PGSQL_ASSOC); @@ -62,12 +59,10 @@ for($i = 0; $i < $DB->db_numrows($res); $i++) $pos = "