<?php
/*
=====================================================
 Модуль создал: REZER (http://rezer.net)
=====================================================
 Файл: post_edit.php
=====================================================
 Данный код защищен авторскими правами
=====================================================
 Назначение: Редактирование объявления
=====================================================
*/

if( !defined( "DATALIFEENGINE" ) ) die( "Hacking attempt!" );

$id = intval( $_REQUEST['id'] );
if( $id )
	{
		$result = $db->query( "SELECT * FROM ".PREFIX."_board_post WHERE id='{$id}'" );
		if( $db->num_rows( $result ) > 0 )
			{
				$row = $db->get_row( $result );
				$date = $row['date'];
				$end_date = $row['end_date'];
				$title = htmlspecialchars( stripslashes( $row['title'] ) );
				$alt_name = htmlspecialchars( stripslashes( $row['alt_name'] ) );
				$price = intval( $row['price'] );
				$currency = intval( $row['currency'] );
				$board_type = intval( $row['board_type'] );
				$country = intval( $row['country'] );
				$city = intval( $row['city'] );
				$category = intval( $row['category'] );
				$approve = intval( $row['approve'] );
				$fio = htmlspecialchars( stripslashes( $row['fio'] ) );
				$phone = htmlspecialchars( stripslashes( $row['phone'] ) );
				$email = htmlspecialchars( stripslashes( $row['email'] ) );
				$http = htmlspecialchars( stripslashes( $row['http'] ) );
				$allow_comm = intval( $row['allow_comm'] );
				$comm_num = intval( $row['comm_num'] );
				$noDel = intval( $row['no_del'] );
				$vip_date = intval( $row['vip_date'] );
				$super_vip_date = intval( $row['super_vip_date'] );
				$color = htmlspecialchars( stripslashes( $row['color'] ) );
				$color_date = intval( $row['color_date'] );
				
				require_once( ENGINE_DIR."/classes/parse.class.php" );
				$parse = new ParseFilter( array(), array(), 1, 1 );
				$text = $parse->decodeBBCodes( $row['text'], false );
				
				$vip_date = $vip_date > 0 ? date( "Y-m-d H:i:s", ( $vip_date + ( $config['date_adjust'] * 60 ) ) ) : "";
				$super_vip_date = $super_vip_date > 0 ? date( "Y-m-d H:i:s", ( $super_vip_date + ( $config['date_adjust'] * 60 ) ) ) : "";
				$color_date = $color_date > 0 ? date( "Y-m-d H:i:s", ( $color_date + ( $config['date_adjust'] * 60 ) ) ) : "";
				
				$Board->LoadListCity( $country );
				$SelectCurrency = $Board->ReturnSelectCurrency( $currency );
				$SelectCountry = $Board->ReturnSelectCountry( $country );
				$SelectCity = $Board->ReturnSelectCity( $country, $city );
				$SelectCategory = $Board->SelectCategory( $category );
				$SelectApprove = SelectList( array( 0 => "Не промодерирован", 1 => "Промодерирован" ), $approve );
				$JSBoardType = $Board->JSType();
				
				if( isset( $_POST['submit'] ) )
					{
						$EditError = "";
						$LastCategory = $category;
						$title = $db->safesql( htmlspecialchars( stripslashes( $_POST['title'] ) ) );
						$alt_name = $_POST['alt_name'] != "" ? totranslit( $_POST['alt_name'] ) : totranslit( $title );
						$text = $db->safesql( $parse->BB_Parse( $parse->process( strip_tags( $_POST['text'] ) ), false ) );
						$fio = $db->safesql( htmlspecialchars( stripslashes( $_POST['fio'] ) ) );
						$email = $db->safesql( htmlspecialchars( stripslashes( $_POST['email'] ) ) );
						$http = $db->safesql( htmlspecialchars( stripslashes( $_POST['http'] ) ) );
						$date = $db->safesql( htmlspecialchars( stripslashes( $_POST['date'] ) ) );
						$end_date = $db->safesql( htmlspecialchars( stripslashes( $_POST['end_date'] ) ) );
						$category = intval( $_POST['category'] );
						$board_type = intval( $_POST['board_type'] );
						$currency = intval( $_POST['currency'] );
						$price = intval( $_POST['price'] );
						$country = intval( $_POST['country'] );
						$city = intval( $_POST['city'] );
						$approve = intval( $_POST['approve'] );
						$noDel = $_POST['no_del'] == 1 ? 1 : 0;
						
						$vip_date = $_POST['vip_date'] != "" ? $db->safesql( strtotime( $_POST['vip_date'] ) ) : "";
						$super_vip_date = $_POST['super_vip_date'] != "" ? $db->safesql( strtotime( $_POST['super_vip_date'] ) ) : "";
						$color = $db->safesql( stripslashes( $_POST['color'] ) );
						$color_date = $_POST['color_date'] != "" ? $db->safesql( strtotime( $_POST['color_date'] ) ) : "";
						$phone = preg_replace( "/[^(0-9))(-\s]/i", "", $_REQUEST['phone'] );
						
						if( !$title ) $EditError .= "<li>Введите название объявления.</li>";
						if( !$fio && $Board->Config['add_post_fio'] == "yes" ) $EditError .= "<li>Введите ваше имя.</li>";
						
						if( $Board->Config['add_post_email'] == "yes" && empty( $email ) ) $AddError .= "<li>Email адрес введён не верно.</li>";
						if( !preg_match('/^([a-z0-9])(([-a-z0-9._])*([a-z0-9]))*\@([a-z0-9])'.'(([a-z0-9-])*([a-z0-9]))+' . '(\.([a-z0-9])([-a-z0-9_-])?([a-z0-9])+)+$/i', $email ) && !empty( $email ) ) $EditError .= "<li>Email адрес введён не верно.</li>";
						if( !preg_match( "/^http:\/\/([-.a-z0-9]*)\.([a-z]{2,4})(\/?)*$/", $http ) ) $http = "";
						if( !$text ) $EditError .= "<li>Введите текст объявления.</li>";
						if( !$board_type && $Board->notTypeForCat( $category ) !== true ) $EditError .= "<li>Выберите тип объявления.</li>";
						if( $board_type && $Board->AllowTypeInCats( $board_type, $category ) !== true ) $EditError .= "<li>Выберите тип объявления.</li>";
						if( !$currency && $Board->Config['add_post_price'] == "yes" ) $EditError .= "<li>Выберите валюту стоимости.</li>";
						if( !$price && $Board->Config['add_post_price'] == "yes" ) $EditError .= "<li>Введите стоимость.</li>";
						if( !$country && $Board->Config['region_on'] == "on" ) $EditError .= "<li>Выберите вашу страну.</li>";
						if( !$category ) $EditError .= "<li>Выберите категорию для объявления.</li>";
						
						if( count( $phone ) < 1 && $Board->Config['add_post_phone'] == "yes" ) $AddError .= "<li>Укажите телефон.</li>";
						
						if( $Board->Field !== false && empty( $EditError ) )
							{
								$xfields = $db->safesql( $Board->Field->SaveField( "edit", $row['xfields'], $category ) );
								if( $Board->Field->ErrorSave ) $EditError .= $Board->Field->ErrorSave;
							}
							
						if( empty( $EditError ) )
							{
								if( $LastCategory != $category )
									{
										$Board->AddPostCategory( $category );
										$Board->DelPostCategory( $LastCategory );
									}
									
								$phone = $db->safesql( implode( ",", $phone ) );
								$LinkPost = $Board->ReturnLinkPost( $id, $alt_name, $category );
								$db->query( "UPDATE ".PREFIX."_board_post SET `title`='{$title}', `alt_name`='{$alt_name}', `category`='{$category}', `board_type`='{$board_type}', `price`='{$price}', `currency`='{$currency}', `country`='{$country}', `city`='{$city}', `text`='{$text}', `fio`='{$fio}', `phone`='{$phone}', `email`='{$email}', `http`='{$http}', `date`='{$date}', `end_date`='{$end_date}', `approve`='{$approve}', `xfields`='{$xfields}', `no_del`='{$noDel}', `vip_date`='{$vip_date}', `super_vip_date`='{$super_vip_date}', `color`='{$color}', `color_date`='{$color_date}' WHERE id='{$id}'" );
								
								miniloader( "Редактирование объявления" );
								opentable();
								tableheader( "Редактирование объявления" );
								
								echo "<div style=\"padding: 5px;\">Объявление успешно отредактировано</div><div class=\"hr_line\"></div><div style=\"padding: 5px;\"><a href=\"$PHP_SELF?mod=board&action=post_edit&id={$id}\">[Вернуться назад]</a> <a href=\"{$LinkPost}\" target=\"_blank\">[Посмотреть на сайте]<a/> <a href=\"javascript:void(0);\" onclick=\"window.close(); return false;\">[Закрыть окно]</a></div>";
								
								closetable();
								minifooter();							
							}
								else
							{
								miniloader( "Редактирование объявления" );
								opentable();
								tableheader( "Редактирование объявления" );
								
								echo "<div style=\"padding: 5px;\"><ol style=\"color: #F00; padding: 0px 0px 0px 20px; margin: 0px;\">{$EditError}</ol></div><div class=\"hr_line\"></div><div style=\"padding: 5px;\"><a href=\"$PHP_SELF?mod=board&action=post_edit&id={$id}\">Вернуться назад</a></div>";
								
								closetable();
								minifooter();
							}
					}
						else
					{
						miniloader( "Редактирование объявления" );
						opentable();
						tableheader( "Редактирование объявления" );
						include_once( ENGINE_DIR."/modules/board/editor/bb_news.php" );
						$bb_code = str_replace( "{THEME}", "templates/{$config['skin']}", $bb_code );
						
						$PhotoMainTemplate = <<<HTML
						<div class="BoardImages">
							<div class="List" id="BoardImages">{photos}</div>
							<div>
								<input type="button" id="BoardUploadPhotos" value="Загрузить фото" class="edit" />
								<span id="StatusBoardUploadPhotos">&nbsp;</span>
							</div>
						</div>	
HTML;

						$PhotoListTemplate = <<<HTML
						{photo}
						[del]<img src="engine/inc/board/style/images/delete.png" class="del" alt="Удалить" />[/del]
HTML;
						
						$Photos = $Board->BoardNewsImages( $row, $PhotoListTemplate, $PhotoMainTemplate, true, true );
						$noDelChecked = $noDel == 1 ? "checked=\"checked\"" : "";
		
echo <<<HTML
<form method="post" action="" name="BoardPost" enctype="multipart/form-data">
	<div id="opt_panel">
		<div class="dle_aTab" style="padding: 5px;">
			<table width="100%" border="0">
				<tr>
					<td colspan="10" background="engine/skins/images/mline.gif" height="1"></td>
				</tr>
				<tr>
					<td colspan="10"><div class="hr_line"></div></td>
				</tr>
				<tr>
					<td colspan="10" background="engine/skins/images/mline.gif" height="1"></td>
				</tr>
				<tr height="30px">
					<td width="150px" style="padding: 0px 0px 0px 5px;">Название: *</td>
					<td>
						<input type="text" name="title" value="{$title}" class="edit" style="width: 300px;" />
					</td>
				</tr>
				<tr>
					<td colspan="10" background="engine/skins/images/mline.gif" height="1"></td>
				</tr>
				<tr height="30px">
					<td width="150px" style="padding: 0px 0px 0px 5px;">Альт. имя: *</td>
					<td>
						<input type="text" name="alt_name" value="{$alt_name}" class="edit" style="width: 300px;" />
					</td>
				</tr>
				<tr>
					<td colspan="10" background="engine/skins/images/mline.gif" height="1"></td>
				</tr>
				<tr>
					<td colspan="10"><div class="hr_line"></div></td>
				</tr>
				<tr>
					<td colspan="10" background="engine/skins/images/mline.gif" height="1"></td>
				</tr>
				<tr height="30px">
					<td width="150px" style="padding: 0px 0px 0px 5px;">Категория: *</td>
					<td>
						<select name="category" id="BoardSelectCategory" onkeyup="CategorySelect();" onkeydown="CategorySelect();" onchange="CategorySelect();">{$SelectCategory}</select>
					</td>
				</tr>
				<tr>
					<td colspan="10" background="engine/skins/images/mline.gif" height="1"></td>
				</tr>
				<tr>
					<td colspan="10"><div class="hr_line"></div></td>
				</tr>
				<tr>
					<td colspan="10" background="engine/skins/images/mline.gif" height="1"></td>
				</tr>
				<tr height="30px">
					<td width="150px" style="padding: 0px 0px 0px 5px;">Тип объявления: *</td>
					<td>
						<span id="boardType"><select name="board_type" id="BoardTypeSelect"><option value="{$board_type}" selected="selected">---</option></select></span>
					</td>
				</tr>
				<tr>
					<td colspan="10" background="engine/skins/images/mline.gif" height="1"></td>
				</tr>
				<tr height="30px">
					<td width="150px" style="padding: 0px 0px 0px 5px;">Стоимость: *</td>
					<td>
						<input type="text" name="price" value="{$price}" class="edit" style="width: 90px; text-align: center;" />
						<select name="currency">{$SelectCurrency}</select>
					</td>
				</tr>
				<tr>
					<td colspan="10" background="engine/skins/images/mline.gif" height="1"></td>
				</tr>
HTML;
				
						if( $Board->Config['region_on'] == "on" ) echo <<<HTML
				<tr height="30px">
					<td width="150px" style="padding: 0px 0px 0px 5px;">Регион: *</td>
					<td>
						<select name="country" id="SelectListCountry" onkeyup="SelectCountry();" onkeydown="SelectCountry();" onchange="SelectCountry();">
							<option value="">- Без разницы -</option>
							{$SelectCountry}
						</select>
						<span id="FormSelectCity">
							<select name="city" id="SelectCity">
								<option value="">- Без разницы -</option>
								{$SelectCity}
							</select>
							<span id="FormSelectCityStatus"></span>
						</span>
					</td>
				</tr>
				<tr>
					<td colspan="10" background="engine/skins/images/mline.gif" height="1"></td>
				</tr>
HTML;
echo <<<HTML
				<tr>
					<td colspan="10"><div class="hr_line"></div></td>
				</tr>
				<tr>
					<td colspan="10" background="engine/skins/images/mline.gif" height="1"></td>
				</tr>
				<tr height="130px">
					<td width="150px" style="padding: 0px 0px 0px 5px;">Текст объявления: *</td>
					<td>
						{$bb_code}
						<textarea name="text" id="BoardStory" style="width: 497px; height: 120px;">{$text}</textarea>
					</td>
				</tr>
				
				<tr>
					<td colspan="10" background="engine/skins/images/mline.gif" height="1"></td>
				</tr>
				<tr>
					<td colspan="10"><div class="hr_line"></div></td>
				</tr>
				<tr>
					<td colspan="10" background="engine/skins/images/mline.gif" height="1"></td>
				</tr>
				<tr>
					<td colspan="2" style="padding: 0px 10px 0px 10px;">
						$Photos[list]
					</td>
				</tr>
				
				<tr>
					<td colspan="10" background="engine/skins/images/mline.gif" height="1"></td>
				</tr>
				<tr>
					<td colspan="10"><div class="hr_line"></div></td>
				</tr>
				<tr>
					<td colspan="10" background="engine/skins/images/mline.gif" height="1"></td>
				</tr>				
			</table>
		</div>
		<div class="dle_aTab">
			<table width="100%" border="0">
				<tr>
					<td colspan="10" background="engine/skins/images/mline.gif" height="1"></td>
				</tr>
				<tr>
					<td colspan="10"><div class="hr_line"></div></td>
				</tr>
				<tr>
					<td colspan="10" background="engine/skins/images/mline.gif" height="1"></td>
				</tr>
				<tr height="30px">
					<td width="150px" style="padding: 0px 0px 0px 5px;">Ф.И.О:</td>
					<td>
						<input type="text" name="fio" value="{$fio}" class="edit" style="width: 300px;" />
					</td>
				</tr>
				<tr>
					<td colspan="10" background="engine/skins/images/mline.gif" height="1"></td>
				</tr>
				
				<tr height="30px">
					<td width="150px" style="padding: 0px 0px 0px 5px;">Email адрес:</td>
					<td>
						<input type="text" name="email" value="{$email}" class="edit" style="width: 300px;" />
					</td>
				</tr>
				<tr>
					<td colspan="10" background="engine/skins/images/mline.gif" height="1"></td>
				</tr>
				<tr height="30px">
					<td width="150px" style="padding: 0px 0px 0px 5px;">Сайт:</td>
					<td>
						<input type="text" name="http" value="{$http}" class="edit" style="width: 300px;" />
					</td>
				</tr>
				<tr>
					<td colspan="10" background="engine/skins/images/mline.gif" height="1"></td>
				</tr>
				<tr height="30px">
					<td width="150px" style="padding: 0px 0px 0px 5px;">Контактный телефон:</td>
					<td id="BoardPhoneList" style="padding: 2px 0px 2px 0px;">
						<input name="phone" value="{$phone}" class="edit" style="width: 300px;" type="text" />
					</td>
				</tr>
				<tr>
					<td colspan="10" background="engine/skins/images/mline.gif" height="1"></td>
				</tr>
				<tr>
					<td colspan="10"><div class="hr_line"></div></td>
				</tr>
				<tr>
					<td colspan="10" background="engine/skins/images/mline.gif" height="1"></td>
				</tr>
				<tr height="30px">
					<td width="150px" style="padding: 0px 0px 0px 5px;">Дата добавления:</td>
					<td>
						<input type="text" class="edit" name="date" value="{$date}" style="width: 150px; text-align: center;" id="date" />
						<img src="engine/inc/board/style/images/calendar.gif" border="0" style="cursor: pointer;" id="date_calendar" align="absmiddle" />
					</td>
				</tr>
				<tr>
					<td colspan="10" background="engine/skins/images/mline.gif" height="1"></td>
				</tr>
				<tr height="30px">
					<td width="150px" style="padding: 0px 0px 0px 5px;">Дата удаления:</td>
					<td>
						<input type="text" class="edit" name="end_date" value="{$end_date}" style="width: 150px; text-align: center;" id="end_date" />
						<img src="engine/inc/board/style/images/calendar.gif" border="0" style="cursor: pointer;" id="end_date_calendar" align="absmiddle" />
					</td>
				</tr>
				<tr height="30px">
					<td width="150px" style="padding: 0px 0px 0px 5px;">&nbsp;</td>
					<td>
						<input type="checkbox" name="no_del" value="1" id="no_del" {$noDelChecked} />
						<label for="no_del">Не удалять объявление</label>
					</td>
				</tr>
				<tr>
					<td colspan="10" background="engine/skins/images/mline.gif" height="1"></td>
				</tr>
				
				
				<tr>
					<td colspan="10"><div class="hr_line"></div></td>
				</tr>
				<tr>
					<td colspan="10" background="engine/skins/images/mline.gif" height="1"></td>
				</tr>				
				<tr height="30px">
					<td width="150px" style="padding: 0px 0px 0px 5px;">VIP объявление до:</td>
					<td>
						<input type="text" class="edit" name="vip_date" value="{$vip_date}" style="width: 150px; text-align: center;" id="vip_date" />
						<img src="engine/inc/board/style/images/calendar.gif" border="0" style="cursor: pointer;" id="vip_date_calendar" align="absmiddle" />
						<span style="color: #666;">(оставьте поле пустым, если это не VIP объявление)</span>
					</td>
				</tr>
				<tr>
					<td colspan="10" background="engine/skins/images/mline.gif" height="1"></td>
				</tr>
				<tr height="30px">
					<td width="150px" style="padding: 0px 0px 0px 5px;">Super VIP до:</td>
					<td>
						<input type="text" class="edit" name="super_vip_date" value="{$super_vip_date}" style="width: 150px; text-align: center;" id="super_vip_date" />
						<img src="engine/inc/board/style/images/calendar.gif" border="0" style="cursor: pointer;" id="super_vip_date_calendar" align="absmiddle" />
						<span style="color: #666;">(оставьте поле пустым, если это не Super VIP объявление)</span>
					</td>
				</tr>
				<tr>
					<td colspan="10" background="engine/skins/images/mline.gif" height="1"></td>
				</tr>
				<tr>
					<td colspan="10"><div class="hr_line"></div></td>
				</tr>
				<tr>
					<td colspan="10" background="engine/skins/images/mline.gif" height="1"></td>
				</tr>
				<tr height="30px">
					<td width="150px" style="padding: 0px 0px 0px 5px;">Цвет:</td>
					<td>
						<input type="text" name="color" value="{$color}" style="width: 150px;" class="edit" id="background" />
						<img src="engine/inc/board/js/color/color_picker.png" align="absmiddle" border="0" id="colorSelector6" title="Запустить конструктор цвета" alt="Запустить конструктор цвета" style="cursor: pointer;" align="absmiddle" />
						<span style="color: #666;">(оставьте поле пустым, если объявление не нужно выделять цветом)</span>
					</td>
				</tr>
				<tr>
					<td colspan="10" background="engine/skins/images/mline.gif" height="1"></td>
				</tr>
				<tr height="30px">
					<td width="150px" style="padding: 0px 0px 0px 5px;">Оставить цвет до:</td>
					<td>
						<input type="text" class="edit" name="color_date" value="{$color_date}" style="width: 150px; text-align: center;" id="color_date" />
						<img src="engine/inc/board/style/images/calendar.gif" border="0" style="cursor: pointer;" id="color_date_calendar" align="absmiddle" />
					</td>
				</tr>
				<tr>
					<td colspan="10" background="engine/skins/images/mline.gif" height="1"></td>
				</tr>
				
				
				<tr>
					<td colspan="10"><div class="hr_line"></div></td>
				</tr>
				<tr>
					<td colspan="10" background="engine/skins/images/mline.gif" height="1"></td>
				</tr>
				<tr height="30px">
					<td width="150px" style="padding: 0px 0px 0px 5px;">Модерация: *</td>
					<td>
						<select name="approve">{$SelectApprove}</select>
					</td>
				</tr>
				<tr>
					<td colspan="10" background="engine/skins/images/mline.gif" height="1"></td>
				</tr>
				<tr>
					<td colspan="10"><div class="hr_line"></div></td>
				</tr>
				<tr>
					<td colspan="10" background="engine/skins/images/mline.gif" height="1"></td>
				</tr>
			</table>
		</div>
		<div class="dle_aTab">
HTML;

$XfieldsTemplate = <<<HTML
<tr class="BoardFieldsTr" {id}>
	<td width="150px" style="padding: 0px 0px 0px 5px;">{title}:[required] *[/required]</td>
	<td>{form} <span style="font-size: 9px; color: #666; padding: 0px 0px 0px 5px;">{about}</span></td>
</tr>
HTML;
						if( $Board->Field !== false )
							{
								$Xfields = $Board->Field->ShowForm( "edit", $XfieldsTemplate, $row['xfields'] );
								$CategoryJS = $Board->Field->ReturnCategoryJS();
								if( $Xfields )
									{
										$Xfields = "<tr><td colspan=\"10\" background=\"engine/skins/images/mline.gif\" height=\"1\"></td></tr><tr><td colspan=\"10\"><div class=\"hr_line\"></div></td></tr><tr><td colspan=\"10\" background=\"engine/skins/images/mline.gif\" height=\"1\"></td></tr>{$Xfields}<tr><td colspan=\"10\"><div class=\"hr_line\"></div></td></tr><tr><td colspan=\"10\" background=\"engine/skins/images/mline.gif\" height=\"1\"></td></tr>";	
									}
										else
									{
										$Xfields = "<tr><td style=\"padding: 10px;\">Дополнительных полей не обнаружено.</td></tr>";
									}
							}
								else
							{
								$Xfields = "<tr><td style=\"padding: 10px;\">Дополнительные поля в настоящий момент отключены.</td></tr>";
							}
			
						echo EchoAJAX( true );
						echo EchoJSColor();
						echo CalendarSetup();
						echo CalendarPostEdit();

echo <<<HTML
	
			<table width="100%" border="0" id="BoardFields">
				{$Xfields}
			</table>
		</div>
	</div>
	<div style="padding: 8px 0px 3px 0px;">
		<input type="submit" name="submit" value="Сохранить" class="edit" />
		<input type="reset" value="Сбросить" class="edit" />
		<input type="button" value="Отменить" class="edit" onclick="window.close();" />
	</div>
</form>
<script type="text/javascript" src="engine/classes/js/bbcodes.js"></script>
<script type="text/javascript" src="/engine/classes/js/dle_js.js"></script>
<script type="text/javascript" src="engine/skins/tabs.js"></script>
<script type="text/javascript">
	initTabs( 'opt_panel', Array( 'Основной контент', 'Опции объявления', 'Доп. поля' ), 0, '100%' );
	{$CategoryJS}
	BoardFieldsSetCategory();
	var dle_info       = 'Информация';
	var dle_confirm    = 'Подтверждение';
	var dle_prompt     = 'Ввод информации';
	var dle_req_field  = 'Заполните все необходимые поля';
	var dle_del_agree  = 'Вы действительно хотите удалить? Данное действие невозможно будет отменить';
	var dle_complaint  = 'Укажите текст вашей жалобы для администрации:';
	var dle_big_text   = 'Выделен слишком большой участок текста.';
	var dle_orfo_title = 'Укажите комментарий для администрации к найденной грамматической ошибке';
	var dle_p_send     = 'Отправить';
	var dle_p_send_ok  = 'Уведомление успешно отправлено';
	var dle_save_ok    = 'Изменения успешно сохранены.';
	var dle_del_news   = 'Удалить статью';
	var dle_notice     = 'Уведомление автору';
	var dle_p_text     = 'Введите текст уведомления автору статьи, которое он получит персональным сообщением:';
	var dle_del_msg    = 'Да, и отправить уведомление';
	var dle_act_lang   = ["Да", "Нет", "Ввод", "Отмена", "Сохранить"];
</script>
HTML;

						echo $Photos['js'];
						echo $JSBoardType;
						closetable();
						minifooter();
					}
			}
				else
			{
				minimsg( "Редактирование объявления", "Указанное объявление не найдено, возможно оно было удалено ранее." );	
			}
	}
		else
	{
		minimsg( "Редактирование объявления", "Вы не указали идентификатор объявления." );	
	}

?>