Файл: rban/rban/ob.php
Строк: 51
<?php
include "config.inc.php";
include "fo.php";
mysql_connect($bd_host,$bd_name,$bd_pass) ;
mysql_select_db($bd_bd) ;
switch($go) {
case 'xxx':
include'ver.php';
include "valid.php";
Include "valid_adm.php";
top('Oбъявлeния',$style);
if($w=='wml'){print'<p>';} else {print"<div class="block2"><form action="ob.php?id=$id&pass=$pass&go=mobi" method="post">";}
if(isset($_GET['ok'])){print'Объявление добавлено<br/><br/>';}
print "Название:<br/><input name="title"/><br/>
Содержание:<br/><input name="content"/><br/>";
if($w=='wml'){print"
<anchor>Добавить<go href="ob.php?id=$id&pass=$pass&go=mobi" method="post">
<postfield name="action" value="add"/>
<postfield name="title" value="$(title)"/>
<postfield name="content" value="$(content)"/>
</go></anchor><br/><br/>";} else {
print'<input type="hidden" name="action" value="add"/>
<input type="submit" value="Добавить"/></form>
';
}
if($w=='wml'){print'-----<br/>';} else {print'</div><br/><div class="block">';}
print"<a href="ent.php?id=$id&pass=$pass"><< B пaнeль</a><br/>";
if($w=='htm'){print'</div><br/>';} else {print'<br/>';}
e();
break;
case 'mobi':
mysql_query("insert into `obiav` values(0,'$login','$title','$content')");
header("Location: ./ob.php?id=$id&pass=$pass&go=xxx&ok");
break;
}
?>