• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Windows Help unban system!

mokerosan

New Member
Joined
Jan 23, 2009
Messages
70
Reaction score
3
how to fix this error?

A PHP Error was encountered

Severity: Notice

Message: Undefined index: custom

Filename: pages/unban.php

Line Number: 20


unban.php
Code:
Query principal
SELECT `id` FROM `accounts` WHERE `name` = $custom LIMIT 1

Opcion A
DELETE FROM `bans` WHERE `value` = $customid;

Opcion B

DELETE FROM `bans` WHERE `value` = $custom;
UPDATE `accounts` SET `warnings` = warnings -1 WHERE name = $custom;


<?php
require ("config.php");
$ots = POT::getInstance();
$ots->connect(POT::DB_MYSQL, connection());
$SQL = $ots->getDBHandle();

// Definitions
[COLOR="#0000FF"]$custom = stripslashes(ucwords(strtolower(trim($_REQUEST['custom']))));[/COLOR]  <---- line 20

if(isset($_REQUEST['amount']) && isset($custom)) {
	// Query should go here

	if(!$ok) {
		$title = "Error";
		$content = "You do not have enough points!";
	} else {
		$title = "Congratulations, your account was unbanned!";
		$content = "Don't get banned again!";
	}
	echo '
		<div class="message"><div class="title">'.$title.'</div><div class="content">'.$content.'</div></div>
	';
} else {
?>
<div class='message'>
	<div class='title'>Unban Account</div>
	<div class='content'>
		<table border="0" cellspacing="1" cellpadding="5" width="100%" class="cellspadding">
 			<tr class="tableheader">
  				<td><strong>Offer Description</strong></td>
  				<td width="15%" align="center"><strong>Points</strong></td>
 			</tr>
			<tr class="tablerow">
  				<td><b>A:</b> Unban one account</td>
  				<td align="center"><strong>20 Points</strong></td>
 			</tr>
			<tr class="tablerow">
  				<td><b>B:</b> Unban one account and all warnings</td>
  				<td align="center"><strong>28 Points</strong></td>
 			</tr>
		</table>
		<div align="center" style="color:green;">
			<i>*Remember that every time you get banned.. one ban-warning gets added to your account.. after 3 ban-warnings your account will be deleted!</i>
        </div>
        <div align="center">
			<form action="p/v/unban" method="post">
				<br />
				<b>Account number:</b> <input type="text"  name="custom" value="">
				<br />
				<font color="red"><i>*Put your account number here!</i></font><br />
				<b>Package type:</b>
				<select name="amount">
  					<option value="20">Unban A</option>
  					<option value="28">Unban B</option>
				</select>
				<br />
				<input value="Buy package!" type="submit"> 
			</form>
		</div>
	</div>
</div>
<?php
}
?>
 
Last edited:
Back
Top