2022-08-25 11:23:36 +00:00
< ? php
if ( ! defined ( 'GAME' )) {
die ();
2022-06-06 21:30:34 +00:00
}
2022-08-25 11:23:36 +00:00
$dialog = new Dialog ;
2022-06-06 21:30:34 +00:00
$dialog -> start ( $_GET [ 'talk' ]);
?>
< style >
2022-08-25 11:23:36 +00:00
body {
2023-03-31 18:30:14 +00:00
background - image : url ( //img.new-combats.tech/i/misc/showitems/dungeon.jpg);
2022-08-25 11:23:36 +00:00
background - repeat : no - repeat ;
background - position : top right ;
}
2022-06-06 21:30:34 +00:00
</ style >
< table width = " 100% " border = " 0 " cellpadding = " 0 " cellspacing = " 0 " >
2022-08-25 11:23:36 +00:00
< tr >
< td width = " 300 " valign = " top " >
2023-03-31 16:54:33 +00:00
< div align = " left " >< ? = $dialog -> youInfo ; ?> </div>
2022-08-25 11:23:36 +00:00
</ td >
< td valign = " top " >
2023-03-31 16:54:33 +00:00
< div align = " center " >< H3 >< ? = $dialog -> title ; ?> </H3></div>
2023-03-31 18:42:06 +00:00
< p >< ? php
2022-08-25 11:23:36 +00:00
if ( $u -> info [ 'admin' ] > 0 ) {
$dpages = '' ;
if ( isset ( $_GET [ 'add_new_page' ])) {
$dsp = mysql_fetch_array ( mysql_query ( 'SELECT * FROM `dungeon_dlg` WHERE `id_dg` = "' . mysql_real_escape_string (( int ) $_GET [ 'talk' ]) . '" AND `qid` = "0" ORDER BY `page` DESC LIMIT 1' ));
$dsp = ( $dsp [ 'page' ] + 1 );
mysql_query ( 'INSERT INTO `dungeon_dlg` (`id_dg`,`page`,`qid`,`type`) VALUES ("' . mysql_real_escape_string (( int ) $_GET [ 'talk' ]) . '","' . mysql_real_escape_string (( int ) $dsp ) . '","0","1")' );
die ( '<script>location.href="main.php?talk=' . (( int ) $_GET [ 'talk' ]) . '&act=' . (( int ) $_GET [ 'act' ]) . '"</script>' );
}
$dsp = mysql_query ( 'SELECT * FROM `dungeon_dlg` WHERE `id_dg` = "' . mysql_real_escape_string (( int ) $_GET [ 'talk' ]) . '" AND `qid` = "0"' );
while ( $dpl = mysql_fetch_array ( $dsp )) {
$dact = mysql_fetch_array ( mysql_query ( 'SELECT `id` FROM `dungeon_dlg` WHERE `id_dg` = "' . mysql_real_escape_string (( int ) $_GET [ 'talk' ]) . '" AND `qid` > "0" AND `action` LIKE "%go|' . $dpl [ 'page' ] . '%" LIMIT 1' ));
if ( $dact [ 'id' ] == $_GET [ 'act' ]) {
$dpages .= '[' ;
}
$dpages .= '<a href="main.php?talk=' . (( int ) $_GET [ 'talk' ]) . '&act=' . $dact [ 'id' ] . '">' . $dpl [ 'page' ] . '</a>' ;
if ( $dact [ 'id' ] == $_GET [ 'act' ]) {
$dpages .= ']' ;
}
$dpages .= ' ' ;
}
2023-01-10 16:29:32 +00:00
$dpages .= ' <a href="main.php?talk=' . (( int ) $_GET [ 'talk' ]) . '&act=' . (( int ) $_GET [ 'act' ]) . '&add_new_page=1" title="Добавить новую страницу"><small>[+]</small></a>' ;
2023-03-31 18:30:14 +00:00
echo '<small style="float:right;border-bottom:1px solid black;padding-bottom:2px;"><a href="javascript:window.open(\'/quest_dlg_edit.php?pid=' . (( int ) $dialog -> pg ) . '\',\'winEdi1\',\'width=850,height=400,top=400,left=500,resizable=no,scrollbars=yes,status=no\');" target="_blank">Редактировать текст</a> | Страницы: ' . $dpages . '</small><br><br>' ;
2022-08-25 11:23:36 +00:00
}
echo $dialog -> dText ; ?> </p>
2023-03-31 16:54:33 +00:00
< p >< ? = $dialog -> aText ; ?> </p></td>
2022-08-25 11:23:36 +00:00
< td width = " 300 " valign = " top " >
2023-03-31 16:54:33 +00:00
< div align = " right " >< ? = $dialog -> botInfo ; ?> </div>
2022-08-25 11:23:36 +00:00
</ td >
</ tr >
2022-06-06 21:30:34 +00:00
</ table >