I Am a PHP Expert, I Can Give You a Code For a USer System, And Much Much More, How about Heres Something You Can USe For Your Site..
User System & DJ Says: [Remember To Code It Through MacroMedia] -
DJ Says: -
<?
ob_start();
include("config.php");
if ($logged['level'] == "3" || $logged['level'] == "5") { // level 3 is my dj level. level 5 is my admin level, change if you want to
echo("
<center><form action=\"?p=djcode.php\" method=\"post\" name=\"form1\" target=\"_self\"><br>
<label><br> DJ Message: <br> <textarea name=\"message\" cols=\"35\" id=\"message\"></textarea></label> </p>
<center><p> <label> <input type=\"submit\" name=\"Submit\" value=\"Update!\"> </label> </p> </form>
"); // the form for the message.
}else{
echo
("You are not a DJ so you cannot access this page!"); // if the person trieng to view this page,
and does not have teh authority, echos a warning
}
?>
[End of the DJ says php]
[New Start of DJ Says PHP]
<?
ob_start(); // starts cookies
include("config.php"); // inclues the config file
if ($logged['level'] == "3" || $logged['level'] == "5") { // level 3 and 5 can view
if (file_exists)"djmessage.txt"; // if djmessage.txt exists
$myFile = "djmessage.txt";
$fh = fopen($myFile, 'w') or die("can't open file");
$message = $_POST['message']; // posts the mesage from the form
$user = $logged[username];
$stringData = "DJ <b>".$user."</b> Says: ".$message;
fwrite($fh, $stringData); // updates the message
fclose($fh);
}else{
echo
("You are not a DJ so you cannot access this page!"); // display the "you are not" message
}
?>
Your DJ Message has been send successfully.
[End[]





Reply With Quote





