/*Встраиваем в read.php, в р-оне строки №516*/
.....
<td nowrap class="forummessbutton"><a href="#message<?echo $ar_Message["ID"];?>" onclick="replace(<?echo $ar_Message["ID"];?>)" title="<?echo "Перенести"?>" class="forummessbuttontext"><?echo "Перенести"?></a></td>
<script language="JavaScript">
function replace(msg) {
myWin= open("", "displayWindow", "top=0, left=0, width=500,height=100,status=no,toolbar=no,menubar=no");
myWin.document.open();
myWin.document.write('<meta http-equiv="Content-Type" content="text/html;charset=koi8">');
myWin.document.write("<html><head><title>Replace");
myWin.document.write("</title></head><body><font>Перенести сообщение №"+msg+"</font>");
myWin.document.write("<form action=replace.php method=POST>");
myWin.document.write('<select name=topic lang="ru">');
<?if(mysql_connect("localhost", "логин", "пароль")){
mysql_select_db ("БД");
mysql_query("SET CHARACTER SET 'cp1251'");
$result=mysql_db_query("БД", "SELECT * FROM `b_forum_topic`;");
while($rows=mysql_fetch_object($result)) {
$title=$rows->TITLE;
$value=$rows->ID;
echo 'myWin.document.write("<option value=';
echo "$value";
echo '>");';
echo 'myWin.document.write(';
echo "title='$title'";
echo ');';
echo 'myWin.document.write("</option>");';
}
mysql_close;
}
else{echo mysql_error;}
?>
myWin.document.write("</select><br>");
myWin.document.write("<input type=Hidden name=msg_id value="+msg+">");
myWin.document.write("<input type=Submit value=Готово>");
myWin.document.write("</form>");
myWin.document.write("</body></html>");
myWin.document.close();
}
</script>
.....
|