I thought leave it you can all have this for free.
But while i'm at it if you use it please give me +1 force. :)
This is My mod! (just saying that because people will try to resell it, not specificly you but someone out there...)
These codes are long :P bare in mind. They have been tested and confirmed.
Create file ann.php
<?php
/******************************************
------ __ __ __ ___ _____
/ /\ \ \ \/ / | | | _ \ | __|
| | | | \ / | | | | | | | |__
\ \/ / / /\ \ | | | | | | | __|
------ / / \ \ |_| |___/ | |__
|_____|
This modification was made by oxidati0n. This modification is licensed
and is a LEGAL copy, This mod/script is illegal when not purchased/recieved from oxidati0n.
the email must be [email]
[email protected][/email]
If you didn't do this, Your illegally using this script.
If you are the owner of prodjstyles.com - You cannot use this! IF YOU DO I will sue!
I've already contacted my solicitor for warnings, No warnings given!
This is proberly my first time selling codes to a new community, But i'm careful on what i do!
Thanks, Nick.
******************************************/
session_start();
require "global_func.php";
if($_SESSION['loggedin']==0)
{
header("Location: login.php");
exit;
}
$userid=$_SESSION['userid'];
require "header.php";
$h = new headers;
$h->startheaders();
include "mysql.php";
global $c;
$is=mysql_query("SELECT u.*,us.* FROM users u LEFT JOIN userstats us ON u.userid=us.userid WHERE u.userid=$userid",$c) or die(mysql_error());
$ir=mysql_fetch_array($is);
check_level();
$fm=money_formatter($ir['money']);
$cm=money_formatter($ir['crystals'],'');
$lv=date('F j, Y, g:i a',$ir['laston']);
$h->userdata($ir,$lv,$fm,$cm);
$h->menuarea();
if($ir['user_level'] == 2 and $_GET['ID'])
{
$select_Q=mysql_query("SELECT * FROM `annoucements` WHERE `id` = '$_GET[iD]'");
if(mysql_num_rows($select_Q)== 0)
{
die("I'm sorry but the database cannot find an annoucement with that ID!
[url='ann.php']Back[/url]
");
}
$_R=mysql_fetch_array($select_Q);
if($_GET['action'] == "delete")
{
if($_GET['coNf'] == "Y")
{
mysql_query("DELETE FROM `annoucements` WHERE `id` = '$_GET[iD]'");
mysql_query("DELETE FROM `annoucement_discussions` WHERE `annoucement` = '$_GET[iD]'");
print "Annoucement Deleted!
[url='ann.php']Back[/url]";
exit();
} else {
print "Confirmation
Are you 100% sure you want to remove this annoucement?
You cannot retrieve it afterwards
[url='ann.php?action=delete&ID=$_GET[iD]&coNf=Y']Yes, delete it now![/url]
[url='ann.php']No, don't delete it[/url]
";
exit;
}
} else if($_GET['action'] == "modify")
{
if($_POST['annoucement'] and $_POST['from'])
{
if($_POST['discussions'] == 1) { $dis=1; } else { $dis=0; }
mysql_query("UPDATE `annoucements` SET `annoucement` = '$_POST[annoucement]', `from` = '$_POST[from]', `discussion` = '$dis' WHERE `id` = '$_GET[iD]'");
print "Annoucement Updated!
[url='ann.php']Back[/url]
";
exit();
} else {
if($r['discussion'] == 1) { $diss="checked"; } else { $diss=""; }
print "Modify Annoucement
[b]Annoucement[/b] : $_R[annoucement]
[b]From[/b] : $ir[username]
Discussions Allowed :
";
exit();
}
}
}
$st=$_GET['st'];
if($st)
{
$st=(int)($_GET['st']);
} else {
$st=0;
}
$q=mysql_query("SELECT * FROM `annoucements` ORDER BY `time` DESC LIMIT $st,5");
if(mysql_num_rows($q) >= 6)
{
if($_GET['st'])
{
$next=$st+5;
} else {
$next=10;
}
$netext="[size="1"][url='ann.php?st=$next']Next[/url][/size]";
$ne=1;
}
if($_GET['st'] > 5)
{
$previous=$st-5;
$prtext="[size="1"][url='ann.php?st=$previous']Previous[/url][/size]";
$pr=1;
}
print "Announcements
";
if($ir['user_level'] == 2)
{
print "[size="1"][url='post_new_ann.php']Post New Annoucement[/url][/size]
";
}
print "[b]Announcements are posted here and can be discussed by the fellow members[/b]
";
if($ne)
{
print_r($netext);
}
if($pr)
{
print_r($prtext);
}
if($pr and $ne)
{
print("
");
}
print "DetailsTopicAnnouncementDiscussionsDeleteThere are currently no annoucements posted.[b]Posted By[/b] : [url='viewuser.php?u=$r[from]']$get_Username[/url]
";
if($r['discussion'] == 1)
{
print "[b]Discussions Posted[/b] : ".number_format($get_Discussions)."
";
}
print "[b]Views[/b] : ".number_format($r['views'])."
[b]Date Posted[/b] : ".date("F j, Y",$r['time'])."
$r[topic]".str_replace('<', '', $r['annoucement'])."";
if($r['discussion'])
{
print "[url='viewdiscussions.php?d_ID=$r[id]']View Discussions[/url]
[url='viewdiscussions.php?do=publish&d_ID=$r[id]']Publish Discussion[/url]
";
} else {
print "[b]Discussion's are not enabled for this annoucement[/b]
";
}
print "[url='ann.php?action=delete&ID=$r[id]']Delete[/url]
[url='ann.php?action=modify&ID=$r[id]']Modify[/url]
";
mysql_query("UPDATE `users` SET `new_annoucement` = '0' WHERE `userid` = '$userid'");
$h->endpage();
?>
next create a file called viewdiscussions.php
<?php
/******************************************
------ __ __ __ ___ _____
/ /\ \ \ \/ / | | | _ \ | __|
| | | | \ / | | | | | | | |__
\ \/ / / /\ \ | | | | | | | __|
------ / / \ \ |_| |___/ | |__
|_____|
This modification was made by oxidati0n. This modification is licensed
and is a LEGAL copy, This mod/script is illegal when not purchased/recieved from oxidati0n.
the email must be [email]
[email protected][/email]
If you didn't do this, Your illegally using this script.
If you are the owner of prodjstyles.com - You cannot use this! IF YOU DO I will sue!
I've already contacted my solicitor for warnings, No warnings given!
This is proberly my first time selling codes to a new community, But i'm careful on what i do!
Thanks, Nick.
******************************************/
session_start();
require "global_func.php";
if($_SESSION['loggedin']==0)
{
header("Location: login.php");
exit;
}
$userid=$_SESSION['userid'];
require "header.php";
$h = new headers;
$h->startheaders();
include "mysql.php";
global $c;
$is=mysql_query("SELECT u.*,us.* FROM users u LEFT JOIN userstats us ON u.userid=us.userid WHERE u.userid=$userid",$c) or die(mysql_error());
$ir=mysql_fetch_array($is);
check_level();
$fm=money_formatter($ir['money']);
$cm=money_formatter($ir['crystals'],'');
$lv=date('F j, Y, g:i a',$ir['laston']);
$h->userdata($ir,$lv,$fm,$cm);
$h->menuarea();
if($_GET['do'] == "publish" and $_GET['d_ID'])
{
if($_POST['message'])
{
$_POST['message']=str_replace('"', '\"', $_POST['message']);
$time=time();
mysql_query("INSERT INTO `annoucement_discussions` (`id`, `from`, `annoucement`, `time`, `message`) VALUES ('', '$ir[userid]', '$_GET[d_ID]', '$time', '$_POST[message]');");
print "Discussion Reply Posted!
[url='viewdiscussions.php?d_ID=$_GET[d_ID]']Back[/url]
";
exit();
} else {
print "Post New Discussion
</pre>
<table width="80%" border="0">[b]Message[/b]</table>";<br> exit();<br> }<br>}<br>if($ir['user_level'] == 2 and $_GET['ID_delete'])<br>{<br> mysql_query("DELETE FROM `annoucement_discussions` WHERE `id` = '$_GET[iD_delete]'");<br> print "You have deleted the discussion!<br>[url='viewdiscussions.php?d_ID=$_GET[d_ID]']Back[/url]<br>";<br> exit();<br>}<br>if(!$_GET['d_ID'])<br>{<br> die("I'm sorry, You need to collect the d_ID data before visiting here!<br>[url='ann.php']Back[/url]<br>");<br>}<br>$q=mysql_query("SELECT * FROM `annoucements` WHERE `id` = '$_GET[d_ID]'");<br>if(mysql_num_rows($q) == 0)<br>{<br> die("I'm sorry theres no annoucement with that ID!<br>[url='ann.php']Back[/url]<br>");<br>}<br>$r=mysql_fetch_array($q);<br>$st=0;<br>print "<h3>Discussions</h3>";<br>if($r['discussion'] == 0)<br>{<br> die("Discussions have not been enabled for this annoucement.");<br>}<br>$get_DQ=mysql_query("SELECT * FROM annoucement_discussions WHERE annoucement = $_GET[d_ID] ORDER BY time DESC LIMIT 70;");<br>if(mysql_num_rows($get_DQ)== 0)<br>{<br> die("There are no discussions posted<br><br>[url='viewdiscussions.php?do=publish&d_ID=$_GET[d_ID]']Post a Reply[/url]<br><br>[url='ann.php']Back[/url]<br>");<br>}<br> print "[b]Showing last 70 discussions ordered by time in descending.[/b]<br>";<br><br> print "<table width="90%" border="1">DetailsMessage</table>
<font>{$u_R['username']}</font>";$d="[img=donator.gif]"; }<br><br>print "[b]From:[/b] <font color="#FF0000">$u_R[username]</font> $d";<br><br>print "<br>[b]Posted On[/b] : ".date("F j, Y",$get_R['time'])."<br>";<br>if($u_R['laston'] >= time()-15*60)<br>{<br> print "[b]Status[/b] : <font color="#008000">Online</font><br>";<br>} else {<br> print "[b]Status[/b] : <font color="#FF0000">Offline</font><br>";<br>}<br>if($ir['user_level'] == 2)<br>{<br> print "[b]Delete[/b] : [url='viewdiscussions.php?d_ID=$_GET[d_ID]&ID_delete=$get_R[id]']Delete[/url]<br>";<br>}<br> print "$get_R[message]";<br>}<br>print "";<br> $h->endpage();<br>?><b
next create a file called post_new_ann.php
<?php
session_start();
require "global_func.php";
if($_SESSION['loggedin']==0)
{
header("Location: login.php");
exit;
}
$userid=$_SESSION['userid'];
require "header.php";
$h = new headers;
$h->startheaders();
include "mysql.php";
global $c;
$is=mysql_query("SELECT u.*,us.* FROM users u LEFT JOIN userstats us ON u.userid=us.userid WHERE u.userid=$userid",$c) or die(mysql_error());
$ir=mysql_fetch_array($is);
check_level();
$fm=money_formatter($ir['money']);
$cm=money_formatter($ir['crystals'],'');
$lv=date('F j, Y, g:i a',$ir['laston']);
$h->userdata($ir,$lv,$fm,$cm);
$h->menuarea();
print "Post New Annoucement
";
if($ir['user_level'] != 2)
{
die("You are not a/an admin, Please go away!
[url='ann.php']Back[/url]");
}
//-- topic, annoucement,discussion
if($_POST['topic'] and $_POST['annoucement'] and $_POST['discussion'])
{
if($_POST['discussion'] == "Y")
{
$diss_on=1;
} else {
$diss_on=0;
}
$time=time();
mysql_query("INSERT INTO `annoucements` (`id`, `topic`, `annoucement`, `from`, `time`, `views`, `discussion`) VALUES ('NULL', '$_POST[topic]', '$_POST[annoucement]', '$ir[userid]', '$time', '0', '$diss_on');");
mysql_query("UPDATE `users` SET `new_annoucement` = `new_annoucement` + '1' WHERE `userid` = '$ir[userid]'");
print "Annoucement Posted!
[url='ann.php']Back[/url]";
} else {
print "</pre>
<table width="80%" border="1">TopicAnnoucementAllow Discussions
[size="1"]If a discussion board should be opened.[/size]YesNo</table>";<br>}<br>$h->endpage();<br>?&g
Finally run the SQL query
CREATE TABLE `annoucements` (
`id` INT( 11 ) NOT NULL auto_increment,
`topic` VARCHAR( 255 ) NOT NULL,
`annoucement` LONGTEXT NOT NULL,
`from` INT( 11 ) NOT NULL,
`time` VARCHAR( 255 ) NOT NULL,
`views` BIGINT( 40 ) NOT NULL,
`discussion` INT( 11 ) NOT NULL,
PRIMARY KEY (`id`)
) TYPE=MYISAM ;
CREATE TABLE `annoucement_discussions` (
`id` INT( 11 ) NOT NULL auto_increment,
`from` INT( 11 ) NOT NULL,
`annoucement` INT( 11 ) NOT NULL,
`time` VARCHAR( 255 ) NOT NULL,
`message` LONGTEXT NOT NULL,
PRIMARY KEY (`id`)
) TYPE=MYISAM ;
ALTER TABLE `users` ADD `new_annoucement` INT( 11 ) NOT NULL ;
Fhew..Thats a long mod..Thanks...Nick!
also for those who want screenshots...