summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--admin/mail.php33
-rw-r--r--templates/show_flagged.inc.php2
-rw-r--r--templates/show_mail_users.inc.php14
3 files changed, 48 insertions, 1 deletions
diff --git a/admin/mail.php b/admin/mail.php
index cdab5c36..518fcc61 100644
--- a/admin/mail.php
+++ b/admin/mail.php
@@ -37,6 +37,7 @@ if (isset ($_POST['pop_songs'])){$pop_songs = scrub_in($_POST['pop_songs']);}
if (isset ($_POST['threshold'])){$threshold = scrub_in($_POST['threshold']);} else { $threshold = conf($stats_threshold); };
if (isset ($_POST['new_artists'])){$new_artists = scrub_in($_POST['new_artists']);}
if (isset ($_POST['new_albums'])){$new_albums = scrub_in($_POST['new_albums']);}
+if (isset ($_POST['flagged'])){$flagged = scrub_in($_POST['flagged']);}
$subject = stripslashes(scrub_in($_POST['subject']));
$message = stripslashes(scrub_in($_POST['message']));
@@ -209,6 +210,38 @@ switch ($action) {
}
+ if (isset ($flagged)){
+
+ $flag = new Flag();
+ $flagged = $flag->get_flagged();
+ $message .= "\n\nFlagged Songs\n\n";
+ $message .= "Name\t\t\t\tFlag\t\tFlagged by\tStatus\n";
+ foreach ($flagged as $data){
+
+ $flag = new Flag($data);
+ $flag->format_name();
+ $name = $flag->name;
+ $user = $flag->user;
+ $flag = $flag->flag;
+ if($flag->approved){ $status = "Approved"; } else { $status = "Pending"; }
+ $message .= "*) $name\t$flag\t\t$user\t\t$status\n";
+ }
+}
+
+ if (isset ($disabled)){
+
+ $catalog = new Catalog();
+ $songs = $catalog->get_disabled();
+ $message .= "\n\nDisabled Songs\n\n";
+
+ foreach ($songs as $song){
+
+ $name = "*) ". $song->title ." | ". $song->get_album_name($song->album) ." | ". $song->get_artist_name($song->album) ." | ". $song->file ;
+ $message .= "$name";
+ }
+}
+
+
// woohoo!!
mail ($from, $subject, $message,
"From: $from\r\n".
diff --git a/templates/show_flagged.inc.php b/templates/show_flagged.inc.php
index 2324afd2..5f875b04 100644
--- a/templates/show_flagged.inc.php
+++ b/templates/show_flagged.inc.php
@@ -28,6 +28,7 @@ $web_path = conf('web_path');
<th><?php echo _('Object'); ?></th>
<th><?php echo _('User'); ?></th>
<th><?php echo _('Flag'); ?></th>
+ <th><?php echo _('Flagged by'); ?></th>
<th><?php echo _('Status'); ?></th>
<th><?php echo _('Action'); ?></th>
</tr>
@@ -39,6 +40,7 @@ $web_path = conf('web_path');
<td><?php $flag->print_name(); ?></td>
<td><?php echo scrub_out($flag->user); ?></td>
<td><?php $flag->print_flag(); ?></td>
+ <td><?php echo $flag->user; ?></td>
<td><?php $flag->print_status(); ?></td>
<td align="center">
<?php if ($flag->approved) { ?>
diff --git a/templates/show_mail_users.inc.php b/templates/show_mail_users.inc.php
index a8157d21..ee33a90f 100644
--- a/templates/show_mail_users.inc.php
+++ b/templates/show_mail_users.inc.php
@@ -64,12 +64,24 @@
<td>
<input type="checkbox" name="new_albums" value="yes" />
</td>
- <td><?php echo _('Most Popular Songs'); ?>:</td>
+ <td><?php echo _('Most Popular Songs'); ?>:</td>
<td>
<input type="checkbox" name="pop_songs" value="yes" />
</td>
</tr>
<tr>
+ <td><?php echo _('Flagged Songs'); ?>:</td>
+ <td>
+ <input type="checkbox" name="flagged" value="yes" />
+ </td>
+ <td><?php echo _('Disabled Songs'); ?>:</td>
+ <td>
+ <input type="checkbox" name="disabled" value="yes" />
+ </td>
+
+ </tr>
+
+ <tr>
<td colspan = "2"><?php echo _('Most Popular Threshold in days'); ?>:</td>
<td>
<input type="text" name="threshold" value="<?php echo conf('popular_threshold'); ?>" />