Update of /cvsroot/phpwebapp/top10/templates/confirm
In directory sc8-pr-cvs1:/tmp/cvs-serv28405/templates/confirm
Modified Files:
confirm.php confirm.db
Log Message:
Deletting a comment.
Index: confirm.php
===================================================================
RCS file: /cvsroot/phpwebapp/top10/templates/confirm/confirm.php,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** confirm.php 25 Dec 2003 15:35:46 -0000 1.3
--- confirm.php 29 Dec 2003 14:14:17 -0000 1.4
***************
*** 117,120 ****
--- 117,126 ----
break;
+ case 'delete_comment':
+ $username = $request["username"];
+ list($proj_id, $comment_id) = explode('/', $request["data"]);
+ $this->delete_comment($username, $proj_id, $comment_id);
+ break;
+
case 'save_pref_list':
$username = $request["username"];
***************
*** 139,142 ****
--- 145,159 ----
WebApp::setSVar("edit_project->proj_id", $proj_id);
$this->setSVar("file", "{{TPL_PATH}}edit_project/edit_project.html");
+ }
+
+ function delete_comment($username, $proj_id, $comment_id)
+ {
+ //delete the comment
+ WebApp::execDBCmd("delete_comment", compact("comment_id"));
+
+ //display the 'proj_details' module
+ WebApp::setSVar("username", $username);
+ $this->setSVar("file", "{{TPL_PATH}}proj_details/proj_details.html");
+ WebApp::setSVar("proj_details->proj_id", $proj_id);
}
Index: confirm.db
===================================================================
RCS file: /cvsroot/phpwebapp/top10/templates/confirm/confirm.db,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** confirm.db 23 Sep 2003 14:04:14 -0000 1.1.1.1
--- confirm.db 29 Dec 2003 14:14:17 -0000 1.2
***************
*** 65,66 ****
--- 65,76 ----
</Query>
</dbCommand>
+
+ <!--# +++++++++++++++++++++++++++++++++++++ #-->
+
+ <dbCommand ID="delete_comment">
+ <Query>
+ DELETE FROM comments
+ WHERE comment_id = '{{comment_id}}'
+ </Query>
+ </dbCommand>
+
|