Jump to content

moogle1979

Members
  • Posts

    10
  • Joined

  • Last visited

    Never

About moogle1979

  • Birthday 09/16/1979

Contact Methods

  • MSN
    moogle1979@hotmail.com
  • Yahoo
    lunarslover1979@yahoo.com

Profile Information

  • Gender
    Male
  • Location
    Washington

moogle1979's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. I fixed it, I set in a hidden value and called the hidden value to determine which one it was and it worked
  2. I did this $user = $_POST['uname']; $update = "UPDATE mod_box SET claimed = 'yes' WHERE report_user = '" . $user . "'"; $query = mysql_query($update) or die ("Database Error"); echo $query; and it echoed back a 1 which I assume means true, however it did not update it
  3. I set in the code and I know there is no errors however when I test out the code, it is not updating the database at all. Here is the code <?php require('includes/required.php'); if($_SESSION['login'] != "yessir") { header("Location: ".$SITE_ROOT."includes/msg.php?code=11"); exit(); } if (isset($_POST['submit'])){ $user = $_POST['uname']; $update = mysql_query("UPDATE mod_box SET claimed = 'yes' WHERE report_user = '" . $uname . "'") or die(mysql_error()); } ?> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>Rigganmore - Moderator Panel</title> <script type="text/javascript" src="general.js"></script> <link href="general.css" type="text/css" rel="stylesheet" /> </head> <body> <table width="800" border="0" align="center" cellpadding="0" cellspacing="0" class="logo"> <!--DWLayoutTable--> <tr> <td width="106" height="52"> </td> <td width="320"> </td> <td width="99"> </td> <td width="246"> </td> <td width="29"> </td> </tr> <tr> <td height="99"> </td> <td> </td> <td> </td> <td rowspan="2" align="center" valign="middle" class="loginform"> <!-- Login Form php statement--> <?php if($_SESSION['login'] == "yessir"){ ?> <!-- Start of players Stats --> <div align="center" style="font-weight:bold;font-size:16px;">Your Stats</div> <a href="display.php"> <img src="./images/avatars/<? echo $_SESSION['dp']; ?>" alt="<? echo $_SESSION['name']; ?>'s Avatar" name="dp" width="100" height="100" align="left" style="border: solid #006699 1px;" /> </a> <div align="center"> <img src="<? echo $_SESSION['access_img']; ?>" alt="<? echo $_SESSION['status']; ?>" /> </div> <table align="center" width="25%" border="0" style="font-size:14px;"> <tr> <td width="8%"><div align="right"><b>Money:</b></div></td> <td width="92%"><? echo $_SESSION['money']; ?></td> </tr> <tr> <td><div align="right"><b>Bank:</b></div></td> <td><? echo $_SESSION['bank']; ?></td> </tr> <tr> <td><div align="right"><b>Lvl:</b></div></td> <td><? echo $_SESSION['lvl']; ?></td> </tr> <tr> <td><div align="right"><b>HP:</b></div></td> <td><? echo $_SESSION['hp']; ?></td> </tr> <tr> <td><div align="right"><b>Exp:</b></div></td> <td><? echo $_SESSION['exp']; ?></td> </tr> </table> <!-- End of players Stats --> <?php } else { ?> <!-- Login Form --> <form action="login.php" method="post" name="login" id="login"> <p align="center" class="style1 style9"><strong>Login</strong></p> <table width="80%" border="0" align="center"> <tr> <td>Username:</td> <td><input type="text" name="user" id="user" class="textbox" /></td> </tr> <tr> <td>Password:</td> <td><input type="password" name="pass" id="pass" class="textbox" /></td> </tr> <tr> <td><input type="hidden" name="date" id="date" value="<?php echo date("m/d/y @ g:i a"); ?>" /></td> <td> <label> <input type="submit" name="btnLogin" id="btnLogin" value="" class="login" /> </label> </td> </tr> </table> <a href="forgot.php">Forgotten Password</a> </form> <?php } ?> </td> <td></td> </tr> <tr> <td height="20"> </td> <td align="center" valign="middle" class="stats"> <strong> <?php if($_SESSION['login'] != "yessir"){ echo "Please <a href='signin.php'>Login</a> to View your Stats"; } else { echo "<font color='#d9e1bc'>Welcome, ".$_SESSION['name']."! (".$_SESSION['userid'].")</font><br>"; echo "<a href='logout.php'>Logout</a>"; } ?> </strong> </td> <td> </td> <td></td> </tr> <tr> <td height="15"></td> <td></td> <td></td> <td></td> <td></td> </tr> </table> <table width="800" border="0" align="center" cellpadding="0" cellspacing="0"> <!--DWLayoutTable--> <tr> <!-- Main Nav links --> <td width="800" height="25" align="center" valign="middle" bgcolor="#003366" style="border:solid;border-color:#136A93;border-width:thin;"> <a href="estate.php"><img src="images/gifs/home.gif" alt="Home" width="60" height="25" border="0"></a> <img src="images/gifs/asterisk.gif" alt="" width="25" height="25"> <a href="about.php"><img src="images/gifs/aboutus.gif" alt="About Us" width="91" height="25" border="0"></a> <img src="images/gifs/asterisk.gif" alt="" width="25" height="25"> <a href="faq.php"><img src="images/gifs/faqs.gif" alt="FAQ's" width="61" height="25" border="0"></a> <img src="images/gifs/asterisk.gif" alt="" width="25" height="25"> <a href="contact.php"><img src="images/gifs/ContactUs.gif" alt="Contact Us" width="108" height="25" border="0"></a> <img src="images/gifs/asterisk.gif" alt="" width="25" height="25"> <a href="./forums/"><img src="images/gifs/forums.gif" alt="Forums" width="75" height="25" border="0"></a> <img src="images/gifs/asterisk.gif" alt="" width="25" height="25"> <a href="links.php"><img src="images/gifs/links.gif" alt="Links" width="56" height="25" border="0"></a> <img src="images/gifs/asterisk.gif" alt="" width="25" height="25"> <a href="prereg/prereg.php"><img src="images/gifs/prereg.gif" alt="Pre-Register" width="120" height="25" border="0"></a> </td> </tr> </table> <table width="800" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#003366"> <!--DWLayoutTable--> <tr> <td width="630" height="2"></td> <td width="170"></td> </tr> <tr> <td height="498" valign="top" style="border:solid;border-color:#136A93;border-width:thin;border-right:none;"> <!-- Main Body --> <div class="apDiv1"> <table width="90%" border="0" align="center"> <tr> <td height="189" valign="top"> <p align="center"> <span class="style14"> <span class="style1">Moderator Panel</span><br /> </span> </p> <p align="center"> <span class="style14"> THIS PAGE IS INCOMPLETE!<br /> This page currently only contains a few links to various Moderation pages on the website. But shortly, there will be a full Moderator panel with membership information, editing, reports, tools and much more! </span> </p> <p align="center"> <a href="/mod">Content Management</a> </p> <p align="center"> </p> <p align="center"> </p> <p align="center"> <a href="mod/log.php">Logs</a> </p> <p align="center"> <?php $query = mysql_query("SELECT * FROM mod_box WHERE claimed='no' ORDER BY box_id"); while ($result = mysql_fetch_array($query)){ ?> <table style=text-align:center" style="border: 2px solid #006699"> <tr> <td style="text-align:center" colspan="2" style="border: 1px solid #006699"> Reports </td> </tr> <form action="mod.php" method="post"> <tr> <td style="border: 1px solid #006699"> <?php echo $result['report_type']; ?> </td> <td style="border: 1px solid #006699"> <?php echo $result['report_user']; ?> </td> </tr> <tr> <td colspan="2" style="border: 1px solid #006699"> <?php echo $result['report_type']; ?> </td> </tr> <tr> <td> <input type="text" name="uname id="uname" value="<?php echo $result['report_user']; ?>" /> <input type="submit" name="submit" value="Claim" /> </td> </tr> </form> </table> <?php } $query = mysql_query("SELECT * FROM mod_box WHERE claimed='yes' ORDER BY box_id"); while ($result = mysql_fetch_array($query)){ ?> <table style=text-align:center" style="border: 2px solid #006699"> <tr> <td style="text-align:center" colspan="2" style="border: 1px solid #006699"> Claimed Reports </td> </tr> <tr> <td style="border: 1px solid #006699"> <?php echo $result['report_type']; ?> </td> <td style="border: 1px solid #006699"> <?php echo $result['report_user']; ?> </td> </tr> <tr> <td colspan="2" style="border: 1px solid #006699"> <?php echo $result['report_type']; ?> </td> </tr> </table> <?php } ?> </p> </td> </tr> </table> </div> </td> <!-- Side links --> <td align="center" valign="top" style="border:solid;border-color:#136A93;border-width:thin;"> <p> <a href="box.php"><img src="images/gifs/nav2_boxes.gif" width="50" height="23" border="0" /></a><br /> <img src="images/gifs/asterisk.gif" width="25" height="25" /><br /> <a href="news.php"><img src="images/news.png" width="40" height="15" border="0" /></a><br /> <img src="images/gifs/asterisk.gif" alt="" width="25" height="25" /><br /> <a href="market.php"><img src="images/gifs/nav2_market.gif" width="123" height="23" border="0" /></a><br /> <img src="images/gifs/asterisk.gif" alt="" width="25" height="25" /><br /> <a href="prison.php"><img src="images/gifs/nav2_prison.gif" width="60" height="23" border="0" /></a><br /> <img src="images/gifs/asterisk.gif" alt="" width="25" height="25" /><br /> <a href="temple.php"><img src="images/gifs/nav2_temple.gif" width="60" height="23" border="0" /></a><br /> <img src="images/gifs/asterisk.gif" alt="" width="25" height="25" /><br /> <a href="help.php"><img src="images/gifs/nav2_tourists.gif" width="80" height="23" border="0" /></a><br /> <img src="images/gifs/asterisk.gif" alt="" width="25" height="25" /><br /> <a href="town.php"><img src="images/gifs/nav2_townmap.gif" width="80" height="23" border="0" /></a><br /> <img src="images/gifs/asterisk.gif" alt="" width="25" height="25" /><br /> <a href="wilderness.php"><img src="images/gifs/nav2_wild.gif" width="80" height="23" border="0" /></a><br /> <?php if ($_SESSION['login'] == "yessir"){ echo "<img src='images/gifs/asterisk.gif'><br>"; echo "<a href='members.php'><img src='images/gifs/members.gif' border='0'></a><br>"; } if ($_SESSION['access'] > 65){ echo "<img src='images/gifs/asterisk.gif'><br>"; echo "<a href='admin.php'><img src='images/gifs/admincp.gif' border='0'></a><br>"; } if ($_SESSION['access'] > 40 && $_SESSION['access'] < 60){ echo "<img src='images/gifs/asterisk.gif'><br>"; echo "<a href='mod.php'>Mod Panel Coming Soon</a><br>"; } ?> </p> </td> </tr> </table> <table width="800" border="0" align="center" cellpadding="2" cellspacing="0"> <!--DWLayoutTable--> <tr> <td width="800" height="37"> <div align="center" class="style2">Copyright 2008 © Rigganmore LLC. All Rights Reserved.<br /> Use of this site signifies your acceptance and agreement to our <a href="http://www.rigganmore.com/tos.php">Terms of Service</a>. </div> </td> </tr> </table> </body> </html> <? //End ?> Also while I am at it, how would I go about setting it up where when a report is claimed the one that sent the report receives an alert?
  4. I am trying to make it where records are only searched 90 days back here is the code I am using <?php $date = date('m/d/y'); $newdate = strtotime ("-6 months"); $query = mysql_query("SELECT * FROM log WHERE updated_user = '" . $result['user'] . "' AND date BETWEEN '$date' AND '$newdate' ORDER BY date") or die(mysql_error()); while($log = mysql_fetch_array($query)){ echo $log['username'] . " edited this account at " . $log['date'] . " for the following reason: " . $log['reason'] . "<br />"; } ?> Despite the code asking for items only 6 months back I seem to get all items Any suggestions on how I can only search for items within a certain time period?
  5. Thanks, I took and reapplied the information at the top with the code you had under an if statement checking to see if the post was set and then performing the delete. However I took your mysql_query variable and just made it a mysql_query and it worked perfectly after making the changes.
  6. I am trying to set it up where records are deleted from a log file in mysql by coding checkboxes next to the table however it is not deleting them, I am thinking it is because the id's are not 1,2,3,4,5,6,etc. but more like 12,34,56,67,etc. here is the code and any help would be appreciated <?php session_start(); $SITE_ROOT = "http://www.rigganmore.com/"; include('../includes/connect.php'); if($_SESSION['login'] != "yessir") { header("Location: ".$SITE_ROOT."signin.php"); exit(); } if($_SESSION['access'] < "70") { header("Location: ".$SITE_ROOT."includes/msg.php?code=9"); exit(); } //query log files $query = mysql_query("SELECT * FROM log ORDER BY id ASC") or die(mysql_error()); $count=mysql_num_rows($query); ?> <!-- Starts the log files in html --> <h2 align="center">Administration Logs</h2> <h3 align="center">(From Admins / Mods / Volunteer Mods)</h3> <h4 align="center">Please Note: If the value in the "New" section is not changed, this indicates the user did not update that field</h4> <form name="form1" method="post" action=""> <table width="90%" border="1" align="center" cellpadding="2" cellspacing="2"> <tr style="font-weight:bold;font-size:12px;"> <td style="text-align:center">#</td> <td>Log ID:</td> <td>Username:</td> <td>Status:</td> <td>Date:</td> <td>Time:</td> <td>Updated User:</td> <td>New Username:</td> <td>New E-Mail:</td> <td>New Status:</td> <td>New Money:</td> <td>New Bank:</td> <td>New EXP:</td> <td>New LVL:</td> <td>New HP:</td> <td>New HP Max:</td> <td>Reason:</td> </tr> <?php // create the table with php and information, if a file is unchanged it will be noted while ($info = mysql_fetch_array($query)) { ?> <tr> <!-- check boxes being created --> <td align="center" bgcolor="#FFFFFF"><input name="checkbox[]" type="checkbox" id="checkbox[]" value="<? echo $info['id']; ?>"></td> <td><?php echo $info['id']; ?></td> <td><?php echo $info['username']; ?></td> <td><?php echo $info['status']; ?></td> <td><?php echo $info['date']; ?></td> <td><?php echo $info['time']; ?></td> <td><?php echo $info['updated_user']; ?></td> <td> <?php echo $info['new_username']; if ($info['new_username'] == "") echo "Unchanged"; ?> </td> <td> <?php echo $info['new_email']; if ($info['new_email'] == "") echo "Unchanged"; ?> </td> <td> <?php echo $info['new_status']; if ($info['new_status'] == "") echo "Unchanged"; ?> </td> <td> <?php echo $info['new_money']; if ($info['new_money'] == "") echo "Unchanged"; ?> </td> <td> <?php echo $info['new_bank']; if ($info['new_bank'] == "") echo "Unchanged"; ?> </td> <td> <?php echo $info['new_exp']; if ($info['new_exp'] == "") echo "Unchanged"; ?> </td> <td> <?php echo $info['new_lvl']; if ($info['new_lvl'] == "") echo "Unchanged"; ?> </td> <td> <?php echo $info['new_hp']; if ($info['new_hp'] == "") echo "Unchanged"; ?> </td> <td> <?php echo $info['new_hpmax']; if ($info['new_hpmax'] == "") echo "Unchanged"; ?> </td> <td> <?php echo $info['reason']; if ($info['reason'] == "") echo "Unchanged"; ?> </td> </tr> <?php } ?> <tr> <!-- delete button being created --> <td colspan="17" align="center" bgcolor="#FFFFFF"> <input name="delete" type="submit" id="delete" value="Delete"> <a href="../admin.php">Back</a> </td> </tr> <?php // Check if delete button active, start this if($delete){ for($i=0;$i<$count;$i++){ $del_id = $checkbox[$i]; $sql = "DELETE FROM log WHERE id='" . $info'"; $result = mysql_query($sql); } // if successful redirect to delete_multiple.php if($result){ echo "<meta http-equiv=\"refresh\" content=\"0;URL=log.php\">"; } } // End ?> </table> </form>
  7. I cannot believe I missed that, thank you
  8. The error is Parse error: syntax error, unexpected T_STRING and it shows the error at the top on the opening css tag after the php has been closed
  9. I have been searching and searching and cannot find a single error, I know it has to be something small I missed. Here is the code <?php // Declare variables session_start(); include('../includes/connect.php'); // Define Site Root URL $SITE_ROOT = "http://www.rigganmore.com/"; // Check if User is Logged In if($_SESSION['login'] != "yessir") { // If not, redirect to login page header("Location: ".$SITE_ROOT."signin.php"); exit(); } // Check if the User has Admin access if($_SESSION['access'] < "65") { // If not, display "Access Denied" message header("Location: ".$SITE_ROOT."includes/msg.php?code=9"); exit(); } if(isset($_GET['id'])){ $user_id = $_GET['id']; $query = mysql_query("SELECT * FROM members WHERE userid= '" . $user_id . "' LIMIT 1") or die(mysql_error()); $result = mysql_fetch_array($query); } else { $uname = $_POST['uname']; $suspend = $_POST['suspend']; $date = date('m/d/y'); $time = date('H:i'); echo "The account with the username " . $uname . " will be suspended for the following reason: " . $suspend; $query = mysql_query("SELECT * FROM members WHERE user= '" . $uname . "' LIMIT 1") or die(mysql_error()); $result = mysql_fetch_array($query); switch ($result['account_notes']){ case 'first warning': $account_notes = "second warning"; $access = 20; break; case 'second warning': $account_notes = "third warning"; $access = 15; break; case 'third warning': $account_notes = "fourth warning"; $access = 10; break; case 'fourth warning': $account_notes = "frozen"; $access = 5; break; default: $account_notes = "first warning"; $access = 25; break; } $update = mysql_query("UPDATE members SET name = '{$result['name']}', status = 'suspended', access = '{$access}', account_notes = '{$account_notes}' WHERE user = '{$uname}'") or die(mysql_error()); $query = mysql_query("SELECT * FROM members WHERE user='{$uname}' LIMIT 1") or die(mysql_error()); $result = mysql_fetch_array($query); $log = mysql_query("INSERT INTO log (username, status, date, time, account_affected, updated_user, new_status, new_accountnotes) VALUES ('{$_SESSION['user']}', '{$_SESSION['access']}', '{$date}', '{$time}', '{$result['user']}', '{$result['name']}', '{$result['status']}', '{$suspend}'); mysql_query($log) or die(mysql_error(). '<br />'. $log); } ?> <html> <head> <style type="text/css"> body,td,th { font-family: Arial, Helvetica, sans-serif; } .style2 {font-size: 12px; color: #FF0000; } .style3 {color: #FF0000} </style> <title>Edit - <?php echo $result['user']; ?>, Suspend Page</title> </head> <body> <h1 align="center"><?php echo $result['user']; ?>'s Account Information</h1> <table name="userinfo" align="center" width="100%"> <tr> <td width="90%"> <table width="100%" border="0"> <tr> <td width="50%" valign="top"> <fieldset> <!-- Edit account Info --> <legend>Account Info</legend> <dl> <dt><label for="id"> <strong>Account ID:</strong></label> <?php echo $result['userid']; ?> </dt> <dt><label for="status"> <strong>Account Status:</strong></label> <?php echo $user_status; ?></dt> <dt> <label for="username"><strong>Username:</strong></label> <?php echo $result['user']; ?> </dt> <dt> <label for="email"><strong>E-Mail:</strong></label> <?php echo $result['email']; ?> </dt> <dt> <label for="regip"><strong>Registered IP:</strong></label> <?php echo $result['regip']; ?> </dt> <dt> <label for="lastlogin"><strong>Last Login:</strong></label> <?php echo $result['lastlogin']; ?> </dt> </dl> </fieldset> </td> <td width="50%" valign="top"> <fieldset> <!-- Edit Player Info --> <legend>Player Info</legend> <dl> <dt> <label for="lvl"><strong>Level:</strong></label> <?php echo $result['lvl']; ?> </dt> <dt> <label for="hp"><strong>HP:</strong></label> <?php echo $result['hp']; ?> </dt> <dt> <label for="hpmax"><strong>HP Max:</strong></label> <?php echo $result['hpmax']; ?> </dt> <dt> <label for="exp"><strong>Experience:</strong></label> <?php echo $result['exp']; ?> </dt> <dt> <label for="money"><strong>Money:</strong></label> <?php echo $result['money']; ?> </dt> <dt> <label for="bank"><strong>Bank:</strong></label> <?php echo $result['bank']; ?> </dt> </dl> </fieldset> </td> </tr> <form action="suspend.php" method="post"> <tr> <td style="text-align:center"> <fieldset> <!-- Account Notes --> <legend>Account Notes</legend> <dl> <dt> <?php if ($result['account_notes'] == "") echo "No notes to display"; else echo $result['account_notes']; ?> </dt> </dl> </fieldset> </td> </tr> <tr> <td colspan="3" style="text-align:center"> <fieldset style="text-align:center"> <!-- Actions available in Suspend mode --> <legend>Actions</legend> <?php if (isset($uname)){ ?> <dl> <dt style="text-align:center"> <div> You have now suspended an account, <a href="index.php">Click here</a> to return and Administer someone else. <br /> If you have noone else to administer then <a href="<?php $SITE_ROOT ?>admin.php">Click here</a> to return to the Admin Panel. </div> </dt> </dl> <?php } else { ?> <dl> <dt style="text-align:center"> <textarea cols="100" rows="10" name="suspend" class="style2"></textarea> <div style="color:red">Type a short reason</div> </dt> <dt style="text-align:center"> <label for="username"><strong>Retype Username:</strong></label> <input type="text" name="uname" value="" id="uname" /> </dt> <dt> <label for="suspend"> <input type="submit" name="submit" value="" style="background:url(../images/suspend.png); background-repeat:no-repeat; border:none; width:80px; height:18px;" onclick="javascript:return confirm('Are you sure you want to suspend <?php echo $result['user']; ?> ?')" /> </label> </dt> </dl> <dl> <dt> <label for="cancel"> <a href="members.php?id=<?php echo $result['userid']; ?>"><img src="<?php echo $SITE_ROOT; ?>images/cancel.png" alt="Cancel" border="0" /></a> </label> </dt> </dl> <?php } ?> </fieldset> </td> </tr> </form> <tr> <td colspan="2" valign="top"> <fieldset> <!-- Last Actions Taken --> <legend>Last Actions Taken</legend> <dl> <dt> <div align="center" class="style2"> <?php $date = date('m/d/y'); $newdate = strtotime ("-3 months"); $query = mysql_query("SELECT * FROM log WHERE account_affected = '" . $result['user'] . "' AND date BETWEEN '$date' AND '$newdate' ORDER BY date") or die(mysql_error()); while($log = mysql_fetch_array($query)){ echo $log['username'] . " edited this account at " . $log['date'] . " for the following reason: " . $log['new_accountnotes'] . "<br />"; } ?> </div> </dt> </dl> </fieldset> </td> </tr> </table> </td> </tr> </table> <div align="center" style="color:#0000FF;"><a href="members.php?id=<?php echo $result['userid']; ?>" class="style3">Back</a></div> Can someone help me?
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.