XFileSharing Pro - Include fileID in cron_delete_email.pl -little PERL help pls

Powerfull XFileSharing version

Moderator: admin

Message
Author
venture89
Posts: 95
Joined: Aug 30, 2011 12:11 am
Location: Planet Z

Include fileID in cron_delete_email.pl -little PERL help pls

#1 Postby venture89 » Oct 16, 2012 4:12 am

Hello, How can I change code below to include the "File_code" for each file? At the moment it is only including the file name.

Code: Select all

my $files = $db->SelectARef("SELECT file_name FROM FilesDeleted
                                WHERE usr_id=?
                                AND deleted>NOW()-INTERVAL 25 HOUR
                                ORDER BY file_name",$u->{usr_id});
   next if $#$files==-1;

   my $user = $db->SelectRow("SELECT * FROM Users WHERE usr_id=?",$u->{usr_id});

   next unless $user;
   my $text="These files were expired or deleted by administrator from your account:\n\n";
   $text.=join("\n", map{$_->{file_name}}@$files );
   $ses->SendMail( $user->{usr_email}, $c->{email_from}, "$c->{site_name}: deleted files list", $text );

afdah
Posts: 147
Joined: Jan 27, 2012 2:23 pm

#2 Postby afdah » Oct 16, 2012 4:53 am

why you need to include the file code?

venture89
Posts: 95
Joined: Aug 30, 2011 12:11 am
Location: Planet Z

#3 Postby venture89 » Oct 16, 2012 4:55 am

because I get some error logs in nginx and some times users complain with a link. So to confirm i could just check using the code.

I get a copy of deleted emails logs so it will be convenient to have the file code for each file. I am sure it is not that hard but don't know any perl.

Thanks.


Return to “XFileSharing Pro”

Who is online

Users browsing this forum: No registered users and 0 guests