All pastes #974588 Raw Edit

Larry

public text v1 · immutable
·published 2008-04-06 21:37 UTC
rendered paste body
extract($HTTP_GET_VARS);^
extract($HTTP_POST_VARS);^
^
include("../config.php");^
^
if (isset($_POST['name']))^
        {^
        mysql_query("INSERT INTO `Banners`  ( `id`, `idon`, `name`,  `regtime`,         `text`,  `texton`,  `image`,  `imageon`,  `link`,  `linkon`)
                                     VALUES ('$id','$idon','$name', CURRENT_TIMESTAMP, '$text', '$texton', '$image', '$imageon', '$link', '$linkon')");^
        $info= "$name sikeresen hozzaadva az adatbazishoz!";^
        }^
^
?>^
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">^
<html xmlns="http://www.w3.org/1999/xhtml">^
<head>^
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-2" />^
  <link rel="stylesheet" href="../style.css" type="text/css" />^
  <title>Banner admin - hozzaadas</title>^
</head>^
<body>^
^
<center>^
^
<table width="300" border="0" align="center" cellpadding="10">^
  <tr>^
    <td width="150" align="center"><a href="add_banner.php"><strong>Banner hozzaadas</strong></a></td>^
        <td width="150" align="center"><a href="banner_lista.php"><strong>Banner lista</strong></a></td>^
  </tr>^
</table>^
^
<font color=white><h2>Uj Banner hozzaadasa</h2></font>^
<font color="red"><h4><?php if (isset($info)) print $info;?></h4></font>^
</center>^
^
<?
$res=mysql_query(" SELECT `id` FROM `Banners` ORDER BY `id` DESC LIMIT 1");
$rows=mysql_result($res,0,0);
$id=$rows+1;
?>
<form name="add_banner" method="post">^
<table width="500" border="0" align="center" cellpadding="10">^
  <tr>
    <td><strong>ID:</td><td><? print $id; ?></td>
    <td>
        <select name="idon" id="idon" >
        <option value="1">BE</option>
        <option value="0">KI</option>
        </select>
    </td>
  </tr>
  <tr>^
    <td><strong>Nev:</strong></td>^
    <td><input name="name" type="text" size="63" /></td>^
    <td>
    </td>
  </tr>^
  <tr>^
    <td><strong>Kep URL</strong>:</td>^
    <td><input name="image" type="text" size="63" /></td>^
    <td>
        <select name="imageon" id="imageon" >
        <option value="1">BE</option>
        <option value="0">KI</option>
        </select>
    </td>
  </tr>^
  <tr>^
    <td valign="top"><strong>Cimszoveg:</strong></td>^
    <td><textarea name="text" cols="60" rows="1"></textarea></td>^
    <td>
        <select name="texton" id="texton" >
        <option value="1">BE</option>
        <option value="0">KI</option>
        </select>
    </td>
  </tr>^
  <tr>^
    <td valign="top"><strong>link:</strong></td>^
    <td><textarea name="link" cols="60" rows="3"></textarea></td>^
    <td>
        <select name="linkon" id="linkon" >
        <option value="1">BE</option>
        <option value="0">KI</option>
        </select>
   </td>
  </tr>^
  <tr>^
    <td valign="top" colspan="2" align="center"><input type="submit" value="uj banner hozzaadasa" /></td>^
  </tr>^
</table>^
</form>^
^
</body>^
</html>^