Exemple #1
0
    public function detail($int)
    {
        global $user;
        $cfg = new config();
        $main = new main();
        $main->LoadZones();
        $all = $main->SelectMessage($int);
        $opt = $main->SelectOptions($int);
        $this->blocknot($this->viewall($all));
        $this->blocknot($this->progress($all));
        $chars = $main->LoadChar($user['id']);
        if (isset($_GET['delcomm']) && $user['gmlevel'] >= $cfg->get("mingm")) {
            if (!$main->DeleteComment($_GET['delcomm'])) {
                echo '<script>alert("Ошибка! Комментарий не удалён!");</script>';
            }
        }
        $area3 = '';
        if ($all['text_3']) {
            $area3 = '<div class="pad">Пояснение:</div><textarea class="textarea" id="area3" READONLY>' . $all['text_3'] . '</textarea>';
        }
        if ($main->HasScreen($all['id'])) {
            $scr = '
			<table border="0" cellpadding="0" cellspacing="0" align="center" width="100%">
			 <tr style="height:10px;"><td></td></tr>
			 <tr style="height:1px;background-color: #000;"><td></td></tr>
			 <tr style="height:5px;"><td></td></tr>
			</table>
			<div class="pad">Изображения (скриншоты):</div><br><div id="result">' . $main->LoadScreensById($all['id']) . '</div>';
        } else {
            $scr = '';
        }
        echo '<script>detail_view=true;</script>';
        $text = '
		<table height="100%" border="0" cellpadding="0" cellspacing="0" align="left">
		 <tr>
		  <td width="365px" valign="top"><div class="pad">Сейчас так:</div>
		   <textarea class="textarea" style="height:80px;" READONLY>' . $all['text_1'] . '</textarea><div class="pad">А должно быть так:</div>
		   <textarea class="textarea" style="height:80px;" READONLY>' . $all['text_2'] . '</textarea>' . $area3 . '
		  </td>
		  <td width="1px" style="background-color: #000;"></td>
		  <td width="236px" valign="top">
		   <table class="t2" border="0" cellpadding="0" cellspacing="0" align="center">
		    <tr>
		     <td class="block2">Персонаж:</td>
		     <td class="block3" align="right">' . $main->GetNameByGUID($all['sender']) . '</td>
		    </tr>
		    <tr>
		     <td class="block2">Тип:</td>
		     <td class="block3" align="right">' . $main->GetSectionById($all['type']) . '</td>
		    </tr>
			<tr>
			 <td class="block2">Подтип:</td>
			 <td class="block3" align="right">' . $main->GetSubType($all['subtype']) . '</td>
			</tr>
		    <tr>
		     <td class="block2">Местность:</td>
		     <td class="block3" align="right">' . $main->GetMap($all['map']) . '</td>
		    </tr>
		    <tr>
		     <td class="block2" valign="top">Зона: </td>
		     <td class="block3" align="right">' . $main->GetZone($all['zone']) . '</td>
		    </tr>
		   </table>
		   <table border="0" cellpadding="0" cellspacing="0" align="center" width="100%">
			<tr style="height:10px;"><td></td></tr>
			<tr style="height:1px;background-color: #000;"><td></td></tr>
			<tr style="height:5px;"><td></td></tr>
		   </table>
		   <div class="pad">Ссылки:<div align="right">' . $main->LoadView($opt) . '</div></div>' . $scr . '
		  </td>
		  <td width="1px" style="background-color: #000;"></td>
		  <td valign="top" width="365px">
		   <div class="pad">Ответ администрации:</div>
		   <div class="textarea2" id="textarea3" style="display:block;height:160px;">' . $main->GetAdminReply($all['id']) . '</div>
		   <div id="adminlayer" style="display:none;">
		    <textarea class="textarea" id="admin_reply" style="height:119px;"></textarea>
			<div align="right"><select class="input" id="comm_admin"><option DISABLED SELECTED value="0">Отправитель</option>' . $chars . '</select></div>
			<div align="right"><div class="butt" onClick="addcomment(' . $all['id'] . ',1)">Отправить</div></div>
		   </div>
		   <div class="pad">Комментарии пользователей:</div>
		   <div class="textarea2" id="textarea2">' . $main->LoadComment($all['id']) . '</div>
		   <div class="pad"><a href="#" onClick=\'showhide0("commentlayer")\'>Добавить комментарий</a></div>
		   <div id="commentlayer" style="display:none;">
		    <textarea class="textarea" style="height:80px;" id="comm_text"></textarea>
		    <div align="right"><select class="input" id="comm_player"><option DISABLED SELECTED value="0">Отправитель</option>' . $chars . '</select></div>	  
		    <div align="right"><div class="butt" onClick="addcomment(' . $all['id'] . ',0)">Отправить</div></div>
		   </div>
		  </td>
		 </tr>
		</table><span id="userid" style="display:none;">' . $user['id'] . '</span>';
        $this->blocknot($text);
    }