feature 440: send mail to admin when comment is entered

git-svn-id: http://piwigo.org/svn/trunk@1617 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
rvelices
2006-11-22 04:41:25 +00:00
parent f3db3ef388
commit 5de8aeafad
9 changed files with 190 additions and 46 deletions
+15 -13
View File
@@ -155,28 +155,30 @@ else
// +-----------------------------------------------------------------------+
// | comments management |
// +-----------------------------------------------------------------------+
if (is_admin() and !is_adviser() )
{
if (isset($_GET['delete']) and is_numeric($_GET['delete']) )
{// comments deletion
$query = '
if (isset($_GET['delete']) and is_numeric($_GET['delete'])
and !is_adviser() )
{// comments deletion
check_status(ACCESS_ADMINISTRATOR);
$query = '
DELETE FROM '.COMMENTS_TABLE.'
WHERE id='.$_GET['delete'].'
;';
pwg_query($query);
}
pwg_query($query);
}
if (isset($_GET['validate']) and is_numeric($_GET['validate']) )
{ // comments validation
$query = '
if (isset($_GET['validate']) and is_numeric($_GET['validate'])
and !is_adviser() )
{ // comments validation
check_status(ACCESS_ADMINISTRATOR);
$query = '
UPDATE '.COMMENTS_TABLE.'
SET validated = \'true\'
, validation_date = NOW()
, validation_date = NOW()
WHERE id='.$_GET['validate'].'
;';
pwg_query($query);
}
pwg_query($query);
}
// +-----------------------------------------------------------------------+
// | page header and options |
// +-----------------------------------------------------------------------+