Jump to content
MakeWebGames

Recommended Posts

Posted

Edit - there's 3 things i need/want now:)

Chatroom

New good looking login page,w ith matching register.

Automated donations page, So they get what they want right away.

Add me on msn if you have/are willing to make these and we can discuss pricing:)

Also - some of my table names are different to GRPG table names.

[email protected]

  • 1 month later...
Posted
<?
include 'header.php';


if (isset($_POST['submit'])) {
$_POST['message'] = smilie($_POST['message']);
$error = ($_POST['message'] == "") ? "You need to have a message!" : $error;
if($user_class->shoutban == 1) {
echo '
<tr><td class="contenthead">Shoutban</td></tr>
<tr><td class="contentcontent">
<b style="font-size:12px"><center>You have been banned from chat<span style="color:#FF0000;">';
?>
</span>[/b]
<link href="style.css" rel="stylesheet" type="text/css" />



</center>
<?
die();
}
if($error == ""){
$time = time();
$chat = $user_class->chat + 1;

$result = mysql_query("UPDATE `grpgusers` SET `chat` = '".$chat."' WHERE `id` = '".$user_class->id."'");

?>
<?
$result= mysql_query("INSERT INTO `ads` VALUES('".$time."', '$user_class->id', '".$time."', '".$_POST['message']."')");
echo Message("You have posted a classified");
 } else {
 echo Message($error);
 }
}
if ($_GET['delete'] != ""){

 $deletemsg = $_GET['delete'];

 $result = mysql_query("DELETE FROM `ads` WHERE `when`='".$deletemsg."'");

 echo Message("Message Deleted!");

}
?>
<?
function smilie($string)
{
	global $dir;
	$smilie = array(":)) " => '[img=smileys/21.gif]',
					":-? " => '[img=smileys/39.gif]',
					":P " => '[img=smileys/10.gif]',
					":-> " => '[img=smileys/15.gif]',
					":D " => '[img=smileys/4.gif]',
					":f: " => '[img=smileys/23.gif]',
					"=)) " => '[img=smileys/24.gif]',
					":| " => '[img=smileys/22.gif]',
					":-J " => '[img=smileys/78.gif]',
					":-O " => '[img=smileys/13.gif]',
					":-$ " => '[img=smileys/32.gif]',
					"6543 " => '[img=smileys/65.gif]',
					":-: " => '[img=smileys/46.gif]',
					":__: " => '[img=smileys/6.gif]',
					":o0" => '[img=smileys/112.gif]',
					":12" => '[img=smileys/77.gif]',
					":65" => '[img=smileys/68.gif]',
					":((" => '[img=smileys/20.gif]',
					":ang" => '[img=smileys/14.gif]',
					":ang" => '[img=smileys/14.gif]',
					":657" => '[img=smileys/19.gif]',
					"xD" => '[img=smileys/]'
					);
	return strtr($string, $smilie);
}
function bbCode($string)
{
	$bb = array("[b]" => "[b]",
				"[/b]" => "[/b]",
				"[u]" => "<u>",
				"[/u]" => "</u>",
				"[s]" => "<s>",
				"[img]" => "[img]",
				"[/img]" => "[/img]",
				"[/s]" => "<s>",
				"[sup]" => "<sup>",
				"[/sup]" => "</sup>",
				"[sub]" => "<sub>",
				"[/sub]" => "</sub>",
				"[time]" => date('G:i (A)')
				);
	return strtr($string, $bb);
}
?>
<link href="style.css" rel="stylesheet" type="text/css" />

<tr><td class="contenthead">Warriors Chat</td></tr>
<tr><td class="contentcontent"></td></tr>
<tr>

<tr><td class="contentcontentnob">
<form method='post'><table width='100%' border="0" class="contentcontent">
<tr>
<td align="center">[b]Welcome to Mafia-warriors Chat <? echo $user_class->formattedname; ?> Any Spaming  u will Get chat Banned [/b]</td>
</tr>
<tr>
<td height="86" align="center"><textarea class='areatest' name='message' rows='6' id='message' style="width: 510px"></textarea></td>
</tr>
<tr>
 <td align="center">
[img=smileys/21.gif]
[img=smileys/39.gif]		
[img=smileys/10.gif]
[img=smileys/15.gif]')" />
[img=smileys/4.gif]
[img=smileys/23.gif]
[img=smileys/24.gif]
[img=smileys/22.gif]
[img=smileys/78.gif]
[img=smileys/13.gif]
[img=smileys/32.gif]
[img=smileys/65.gif]
[img=smileys/46.gif]
[img=smileys/6.gif]
[img=smileys/112.gif]
[img=smileys/20.gif]
[img=smileys/14.gif]
[img=smileys/19.gif]
[img=68.gif][b]
<?= ($user_class->admin == 1) ? '[[url="control.php?page=setplayerstatus"]chatban[/url]]
	  </div>
	 ' : "" ?>
[/b]</td>
</tr>

<tr>
<td width='25%' height="33" align="center">[[url="classifieds.php"]Refresh[/url]]
 <input class='buttong' type='submit' name='submit' value='Post'></td>
</tr></table>
</form></td></tr>

<?
$result = mysql_query("SELECT * from `ads` ORDER BY `when` DESC LIMIT 30");
while ($row = mysql_fetch_array($result, MYSQL_ASSOC)) {
$user_ads = New User($row['poster']);


?>
<tr>
 <td class="contentcontent">
<table width='100%' class="contentcontent">
<tr>
  <td colspan="2" valign="top"><?= $user_ads->formattedname ?>
	Posted <?php echo date(g.":".i.":".sa,$row['when']) ?>[b] [[url="classifieds.php?delete=<?= $row['when'] ?>"]Delete][/url][/b]</td>
  </tr>
<tr>
  <td width='7%' height="70" valign="top">

[img=<? echo $user_ads->avatar ?>]</p></td>
  <td width="93%" height="70" align="left" valign="bottom"><?= $row['message']  ?></td>
  </tr>
<tr>
  <td height="1" colspan="0" align="center" valign="middle" class="pos"></p></td>
  </tr>

</table>
</td></tr>
<?
}
?>


<?

include 'footer.php';
?>


chat box.bmp

just change it to the way you feel its a start :rolleyes:

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...