Previous Thread
Next Thread
Print Thread
Rate Thread
Joined: Feb 2001
Posts: 497
Enthusiast
Enthusiast
Offline
Joined: Feb 2001
Posts: 497
here i am again ... ok i do it.

inside ultimatebb near line 770:
Code

if ($ubb eq 'mail') {
&RequireCode("$vars_config{CGIPath}/ubb_birthday.cgi");
&mail;
exit(0);
}



-> and this is the new ubb_birthday.cgi:

Code

# UBB Public Forum BIRTHDAY MAIL : Perl Code
# by me ... robert zernisch

&RequireCode("$vars_config{CGIPath}/ubb_lib_posting.cgi");
&RequireCode("$vars_config{CGIPath}/ubb_lib_2.cgi");

sub birthday {

# set date/time
@LG_real_date = &GetDateTime;
my @LG_check_date = split(/\-/, $LG_real_date[13]);

# this is today in: day.month.
$the_checker = "$LG_check_date[1].$LG_check_date[0].";
$the_mail_ko = "$LG_check_date[1].$LG_check_date[0].$LG_check_date[2]";

#print $the_checker;
#print "<br><br><br>";


#LG grab member list
@LG_members_array = &OpenFileAsArray("$vars_config{MembersPath}/memberslist.cgi");

#LG set counters to zero
$LG_counter = 0;
$LG_total_mem = 0;

#LG look for the members
foreach (@LG_members_array) {
($LG_usertmp, $LG_usernumtmp) = split(/\|\!\!\|/, $_); chomp($LG_usernumtmp);
@LG_user_array = &OpenProfile($LG_usernumtmp);


#LG birthday inside? print ... name, birthday, mail
if ($LG_user_array[32] != ""){

my @LG_birthday = split(/\|/, $LG_user_array[32]);
my $LG_year = int($LG_birthday[0] / 10000);
my $LG_month = sprintf("%0.2d", int($LG_birthday[0] / 100) - $LG_year * 100);
my $LG_day = sprintf("%0.2d", $LG_birthday[0] - ($LG_year * 10000 + $LG_month * 100));
$LG_date = "$LG_day.$LG_month.";

### name day.month. mailadress
### $LG_user_array[15] $LG_date $LG_user_array[2];

my @LG_birthmail = split(/\@/, $LG_user_array[2]);
$LG_birthmail_all = $LG_birthmail[0] . "\@" . $LG_birthmail[1];


if ($LG_date eq $the_checker){
################################################################
my $subject = "Herzlichen Glückwunsch zum Geburtstag $LG_user_array[15]!";
my $send_from = "info\@dresden-web.de";
my $send_to = $LG_birthmail_all;

# mailcontent
my $content = "
Alles Gute zum Geburtstag ... $LG_user_array[15].\n
Die Community www.dresden-web.de wünscht dir einen schönen Geburtstag\n
und alles Gute heute am $the_mail_ko. Das ist dein Tag.\n\n\n
";


&RequireVars("$vars_config{VariablesPath}/vars_wordlets_email.cgi");
&RequireCode("$vars_config{CGIPath}/ubb_lib_mail.cgi");

&ubb_mail("$send_to", "$send_from", "$send_from", "$send_from", "$subject", "$content", "", "");
print "MAIL: $send_to | $send_from | $subject | $content <br><br>";
################################################################
}


}


$LG_total_mem++;
}
}



# DANGER: Do not remove the next line!
1;
# $Id: ubb_birthday.cgi,v 1.0 2006/11/04 16:00:00 cvscapps Exp $



-> start it ... ../cgi-bin/ultimatebb?ubb=mail
every day you start this ... u send a mail !!!

Last edited by melder; 11/04/2006 5:14 PM.
Sponsored Links
Entire Thread
Subject Posted By Posted
birthday - auto send mail melder 10/27/2006 8:55 PM
Re: birthday - auto send mail AllenAyres 10/31/2006 6:15 AM
Re: birthday - auto send mail melder 11/04/2006 5:19 PM
Re: birthday - auto send mail melder 11/04/2006 7:34 PM
Re: birthday - auto send mail AllenAyres 11/06/2006 6:53 PM
Re: birthday - auto send mail melder 11/10/2006 7:39 PM

Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
isaac
isaac
California
Posts: 1,157
Joined: July 2001
Forum Statistics
Forums63
Topics37,573
Posts293,925
Members13,849
Most Online5,166
Sep 15th, 2019
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,833
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2024 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20221218)