To start off...
I did not make this mod, this mod was made by Tonka. I only ironed out some errors.
Tonka has given me permission to post this.
What Will It Do?
This will allow you, if you are a gang president, to mail all other Gang Presidents and Vice Presidents.
Why?
This can be used to warn other gangs of wars, or possibly to warn other gang if you take so and so member into your gang, you will be warred.
In yourgang.php
Find:
case "massmailer":
gang_staff_massmailer();
break;
Add under:
case "outsidemailer":
gang_staff_pvmassmailer();
break;
Still in yourgang.php...
Find:
[url='yourgang.php?action=staff&act2=tag']Change Gang Tag[/url]
Add under:
[url='yourgang.php?action=staff&act2=outsidemailer']Mail Other Gang Leaders[/url]
Still in yourgang.php...
Find:
tag: <input type='text' name='vp' value='' />
<input type='submit' value='Change' /></form>";
}
}
}
Add under:
function gang_staff_pvmassmailer()
{
global $db,$ir,$c,$userid,$gangdata;
if($_POST['text'])
{
$subj='This is a mass mail from a fellow/rival gang leader';
$q=$db->query('SELECT gangPRESIDENT, gangVICEPRES FROM gangs');
while ($r=$db->fetch_row($q))
{
$db->query("INSERT INTO mail VALUES('', 0, $userid, {$r['gangPRESIDENT']}, unix_timestamp(),'$subj','".addslashes($_POST['text'])."')");
$db->query("INSERT INTO mail VALUES('', 0, $userid, {$r['gangVICEPRES']}, unix_timestamp(),'$subj','".addslashes($_POST['text'])."')");
}
print 'Mass mail sending complete!
[url="yourgang.php?action=staff"]> Back[/url]';
} else {
print "[b]Pres/Vice-pres Mass Mailer[/b]
<form action='yourgang.php?action=staff&act2=outsidemailer' method='post'> Text:
<textarea name='text' rows='7' cols='40'></textarea>
<input type='submit' value='Send' /></form>";
}
}
That should be it. Let me know of any problems. And, thanks again Tonka :)