View Single Post
Old 07-29-2011, 05:00 PM   #4 (permalink)
shonir
Shonir IT Solutions
 
shonir's Avatar
 
Join Date: Jul 2011
Location: Sialkot, Pakistan
Posts: 10
Thanks: 0
shonir is on a distinguished road
Default

im working a online php software for domain management system.

now below is all information for exactly what i can do

1) table
tbl_expiration_notice

all domains stores in this table with expiration date.

-------fields
id = 5
title = sarking.com
type = 3
expirytime = 1315797147
_________________

2) table

{tbl}noticetype

all domain notification type mean some domains only register with us and some domain have hosting also with us and some domains only hosted

1)hosting
2)domain
3)domain+hosting

-------fields
id = 3
title = domain+hosting
_______________________

3)table
{tbl}mailtemp

all notice type have multi templates like one domain is going expire client will received 3 email.

-------fields
id = 1
parentid = 3
days = 60
subject = domain expire notice
message = your domain will be expire soon
________________________

4)table

{tbl}noticelogs

in this table we will store all sent mail notice so next time we will not repeat email.

-------fields
id = 10
noticeid = 5
mailid = 1
___________________________

my code


$shonirresult = $sm->shonirqueryfnc("select en.*, nt.*, mt.*, nl.*, en.id as en_id, en.title as en_title, mt.id as mt_id from {tbl}expiration_notice en, {tbl}noticetype nt, {tbl}mailtemp mt, {tbl}noticelogs nl where en.type=nt.id and nt.id=mt.parentid and en.expirytime<($shonirvartime+(".(60*60*24)."*mt.d ays)) and (nl.noticeid<>en.id and nl.mailid<>mt.id ) ", 'Get Expiration Notice Result');
$shonirrows = $sm->shonirrowsfnc($shonirresult, 'Get Expiration Notice Rows');
if($shonirrows>0){
$shonirrecords = $sm->shonirrecordsfnc($shonirresult, 'Get Expiration Notice Records');

echo date("m/d/Y", ($shonirvartime)).'<br/>' ;

echo $shonirrecords['en_title'].'<br/>';

$sm->shonirqueryfnc("insert into {tbl}noticelogs (noticeid, mailid, addtime) value({$shonirrecords['en_id']}, {$shonirrecords['mt_id']}, $shonirvartime) ", 'Insert Notice Log Record');

}
Send a message via MSN to shonir Send a message via Yahoo to shonir Send a message via Skype™ to shonir
shonir is offline  
Reply With Quote