All pastes #510277 Raw Edit

Someone

public text v1 · immutable
·published 2007-05-25 20:41 UTC
rendered paste body
<?php
session_start();
// Coded by Starholdest/Elliott Gervais Copyright © 2006-2007
require("../sources/connect.php");
$user = $_SESSION['user'];
$title = mysql_real_escape_string($_POST['title']);
$author = mysql_real_escape_string($_POST['author']);
$bookid = mysql_real_escape_string($_POST['bookid']);

$titlestripped = stripslashes(($title));
?>

<head><title>Add books - Admin CP</title><link rel="stylesheet" type="text/css" href="../sources/style.css"></head>
<div id="bigbox">
<div id="maintext">
<title>Add a book</title>

<?php
$result = mysql_query("SELECT * FROM `users` WHERE `username`='$user'");
$row = mysql_fetch_array($result);
if(!isset($user) OR $row['groupid'] == 2) die("You're not logged in!<br /><a href=\"./index.php\">Login here</a>");
?>




<h1>Add books</h1>
<form method="POST" action="">
Title: <input type="text" name="title" size="50" maxlength="100"><br/>
Author: <input type="text" name="author" size="50" maxlength="100"><br/>
Book ID: <input type="text" name="bookid" size="5" maxlength="32"><br/><br/>
<input type="submit" value="Add book"></form>
<br/><br/><a href="./adminmain.php">Back to the Admin Control Panel</a><br/><a href="./adminbooks.php">View booklist / delete books</a>