Просмотр файла admin/settings.php

Размер файла: 30.75Kb
<?php require_once('header.php'); ?>

<?php
if(isset($_POST['form1'])) {
	$valid = 1;

	$path = $_FILES['photo_logo']['name'];
    $path_tmp = $_FILES['photo_logo']['tmp_name'];

    if($path == '') {
    	$valid = 0;
        $error_message .= 'Вы должны выбрать фото<br />';
    } else {
        $ext = pathinfo( $path, PATHINFO_EXTENSION );
        $file_name = basename( $path, '.' . $ext );
        if( $ext!='jpg' && $ext!='png' && $ext!='jpeg' && $ext!='gif' ) {
            $valid = 0;
            $error_message .= 'Вы должны загрузить файл jpg, jpeg, gif или png.<br />';
        }
    }

    if($valid == 1) {
    	// removing the existing photo
    	$statement = $pdo->prepare("SELECT * FROM nrd_settings WHERE id=1");
    	$statement->execute();
    	$result = $statement->fetchAll(PDO::FETCH_ASSOC);							
    	foreach ($result as $row) {
    		$logo = $row['logo'];
    		unlink('../assets/uploads/'.$logo);
    	}

    	// updating the data
    	$final_name = 'logo'.'.'.$ext;
        move_uploaded_file( $path_tmp, '../assets/uploads/'.$final_name );

        // updating the database
		$statement = $pdo->prepare("UPDATE nrd_settings SET logo=? WHERE id=1");
		$statement->execute(array($final_name));

        $success_message = 'Логотип успешно обновлен.';
    	
    }
}

if(isset($_POST['form2'])) {
	$valid = 1;

	$path = $_FILES['photo_favicon']['name'];
    $path_tmp = $_FILES['photo_favicon']['tmp_name'];

    if($path == '') {
    	$valid = 0;
        $error_message .= 'Вы должны выбрать фото<br />';
    } else {
        $ext = pathinfo( $path, PATHINFO_EXTENSION );
        $file_name = basename( $path, '.' . $ext );
        if( $ext!='jpg' && $ext!='png' && $ext!='jpeg' && $ext!='gif' ) {
            $valid = 0;
            $error_message .= 'Вы должны загрузить файл jpg, jpeg, gif или png.<br />';
        }
    }

    if($valid == 1) {
    	// removing the existing photo
    	$statement = $pdo->prepare("SELECT * FROM nrd_settings WHERE id=1");
    	$statement->execute();
    	$result = $statement->fetchAll(PDO::FETCH_ASSOC);							
    	foreach ($result as $row) {
    		$favicon = $row['favicon'];
    		unlink('../assets/uploads/'.$favicon);
    	}

    	// updating the data
    	$final_name = 'favicon'.'.'.$ext;
        move_uploaded_file( $path_tmp, '../assets/uploads/'.$final_name );

        // updating the database
		$statement = $pdo->prepare("UPDATE nrd_settings SET favicon=? WHERE id=1");
		$statement->execute(array($final_name));

        $success_message = 'Фавикон успешно обновлен.';
    	
    }
}

if(isset($_POST['form3'])) {
	
	// updating the database
	$statement = $pdo->prepare("UPDATE nrd_settings SET footer_about=?, footer_copyright=?, contact_address=?, contact_email=?, contact_phone=?, contact_fax=?, contact_map_iframe=? WHERE id=1");
	$statement->execute(array($_POST['footer_about'],$_POST['footer_copyright'],$_POST['contact_address'],$_POST['contact_email'],$_POST['contact_phone'],$_POST['contact_fax'],$_POST['contact_map_iframe']));

	$success_message = 'Общие настройки содержимого успешно обновлены.';
    
}

if(isset($_POST['form4'])) {
	// updating the database
	$statement = $pdo->prepare("UPDATE nrd_settings SET receive_email=?, receive_email_subject=?,receive_email_thank_you_message=? WHERE id=1");
	$statement->execute(array($_POST['receive_email'],$_POST['receive_email_subject'],$_POST['receive_email_thank_you_message']));

	$success_message = 'Информация о настройках контактной формы успешно обновлена.';
}


if(isset($_POST['form5'])) {
	// updating the database
	$statement = $pdo->prepare("UPDATE nrd_settings SET total_recent_news_footer=?, total_popular_news_footer=?, total_recent_news_sidebar=?, total_popular_news_sidebar=?, total_recent_news_home_page=? WHERE id=1");
	$statement->execute(array($_POST['total_recent_news_footer'],$_POST['total_popular_news_footer'],$_POST['total_recent_news_sidebar'],$_POST['total_popular_news_sidebar'],$_POST['total_recent_news_home_page']));

	$success_message = 'Настройки боковой панели успешно обновлены.';
}

if(isset($_POST['form6'])) {
	// updating the database
	$statement = $pdo->prepare("UPDATE nrd_settings SET meta_title_home=?, meta_keyword_home=?, meta_description_home=? WHERE id=1");
	$statement->execute(array($_POST['meta_title_home'],$_POST['meta_keyword_home'],$_POST['meta_description_home']));

	$success_message = 'Мета-данные успешно обновлены.';
}

if(isset($_POST['form7'])) {

	if(isset($_POST['home_status_service'])) {
		$home_status_service = 1;
	} else {
		$home_status_service = 0;
	}

	if(isset($_POST['home_status_team_member'])) {
		$home_status_team_member = 1;
	} else {
		$home_status_team_member = 0;
	}


	if(isset($_POST['home_status_testimonial'])) {
		$home_status_testimonial = 1;
	} else {
		$home_status_testimonial = 0;
	}

	if(isset($_POST['home_status_news'])) {
		$home_status_news = 1;
	} else {
		$home_status_news = 0;
	}

	if(isset($_POST['home_status_partner'])) {
		$home_status_partner = 1;
	} else {
		$home_status_partner = 0;
	}


	// updating the database
	$statement = $pdo->prepare("UPDATE 
	                           
	                           nrd_settings 
	                           
	                           SET 
	                           home_title_service=?, 
	                           home_subtitle_service=?,
	                           home_status_service=?, 
	                           home_title_team_member=?,
	                           home_subtitle_team_member=?,
	                           home_status_team_member=?, 
	                           home_title_testimonial=?,
	                           home_subtitle_testimonial=?,
	                           home_status_testimonial=?, 
	                           home_title_news=?,
	                           home_subtitle_news=?,
	                           home_status_news=?, 
	                           home_title_partner=?,
	                           home_subtitle_partner=?,
	                           home_status_partner=?

	                           WHERE id=1");
	$statement->execute(array(
	                          $_POST['home_title_service'],
	                          $_POST['home_subtitle_service'],
	                          $home_status_service,
	                          $_POST['home_title_team_member'],
	                          $_POST['home_subtitle_team_member'],
	                          $home_status_team_member,
	                          $_POST['home_title_testimonial'],
	                          $_POST['home_subtitle_testimonial'],
	                          $home_status_testimonial,
	                          $_POST['home_title_news'],
	                          $_POST['home_subtitle_news'],
	                          $home_status_news,
	                          $_POST['home_title_partner'],
	                          $_POST['home_subtitle_partner'],
	                          $home_status_partner,
	                    ));

	$success_message = 'Заголовок и подзаголовок главной страницы успешно обновлены.';
}
if(isset($_POST['form8'])) {
	// updating the database
	$statement = $pdo->prepare("UPDATE nrd_settings SET mod_rewrite=? WHERE id=1");
	$statement->execute(array($_POST['mod_rewrite']));

	$success_message = 'Настройки Mod Rewrite успешно обновлены.';
}
?>

<section class="content-header">
	<div class="content-header-left">
		<h1>Настройки</h1>
	</div>
</section>

<?php
$statement = $pdo->prepare("SELECT * FROM nrd_settings WHERE id=1");
$statement->execute();
$result = $statement->fetchAll(PDO::FETCH_ASSOC);							
foreach ($result as $row) {
	$logo                            = $row['logo'];
	$favicon                         = $row['favicon'];
	$footer_about                    = $row['footer_about'];
	$footer_copyright                = $row['footer_copyright'];
	$contact_address                 = $row['contact_address'];
	$contact_email                   = $row['contact_email'];
	$contact_phone                   = $row['contact_phone'];
	$contact_fax                     = $row['contact_fax'];
	$contact_map_iframe              = $row['contact_map_iframe'];
	$receive_email                   = $row['receive_email'];
	$receive_email_subject           = $row['receive_email_subject'];
	$receive_email_thank_you_message = $row['receive_email_thank_you_message'];
	$total_recent_news_footer        = $row['total_recent_news_footer'];
	$total_popular_news_footer       = $row['total_popular_news_footer'];
	$total_recent_news_sidebar       = $row['total_recent_news_sidebar'];
	$total_popular_news_sidebar      = $row['total_popular_news_sidebar'];
	$total_recent_news_home_page     = $row['total_recent_news_home_page'];
	$meta_title_home                 = $row['meta_title_home'];
	$meta_keyword_home               = $row['meta_keyword_home'];
	$meta_description_home           = $row['meta_description_home'];
	$home_title_service              = $row['home_title_service'];
	$home_subtitle_service           = $row['home_subtitle_service'];
	$home_status_service             = $row['home_status_service'];
	$home_title_team_member          = $row['home_title_team_member'];
	$home_subtitle_team_member       = $row['home_subtitle_team_member'];
	$home_status_team_member         = $row['home_status_team_member'];
	$home_title_testimonial          = $row['home_title_testimonial'];
	$home_subtitle_testimonial       = $row['home_subtitle_testimonial'];
	$home_status_testimonial         = $row['home_status_testimonial'];
	$home_title_news                 = $row['home_title_news'];
	$home_subtitle_news              = $row['home_subtitle_news'];
	$home_status_news                = $row['home_status_news'];
	$home_title_partner              = $row['home_title_partner'];
	$home_subtitle_partner           = $row['home_subtitle_partner'];
	$home_status_partner             = $row['home_status_partner'];
	$mod_rewrite                     = $row['mod_rewrite'];
}
?>


<section class="content" style="min-height:auto;margin-bottom: -30px;">
	<div class="row">
		<div class="col-md-12">
			<?php if($error_message): ?>
			<div class="callout callout-danger">
			
			<p>
			<?php echo $error_message; ?>
			</p>
			</div>
			<?php endif; ?>

			<?php if($success_message): ?>
			<div class="callout callout-success">
			
			<p><?php echo $success_message; ?></p>
			</div>
			<?php endif; ?>
		</div>
	</div>
</section>

<section class="content">

	<div class="row">
		<div class="col-md-12">
							
				<div class="nav-tabs-custom">
					<ul class="nav nav-tabs">
						<li class="active"><a href="#tab_1" data-toggle="tab">Логотип</a></li>
						<li><a href="#tab_2" data-toggle="tab">Фавикон</a></li>
						<li><a href="#tab_3" data-toggle="tab">Общее содержание</a></li>
						<li><a href="#tab_4" data-toggle="tab">Email Settings</a></li>
						<li><a href="#tab_5" data-toggle="tab">Новости</a></li>
						<li><a href="#tab_6" data-toggle="tab">Мета-данные</a></li>
						<li><a href="#tab_7" data-toggle="tab">Главная страница</a></li>
						<li><a href="#tab_8" data-toggle="tab">Mod Rewrite</a></li>
					</ul>
					<div class="tab-content">
          				<div class="tab-pane active" id="tab_1">


          					<form class="form-horizontal" action="" method="post" enctype="multipart/form-data">
          					<div class="box box-info">
								<div class="box-body">
									<div class="form-group">
							            <label for="" class="col-sm-2 control-label">Логотип</label>
							            <div class="col-sm-6" style="padding-top:6px;">
							                <img src="../assets/uploads/<?php echo $logo; ?>" class="existing-photo" style="height:80px;">
							            </div>
							        </div>
									<div class="form-group">
							            <label for="" class="col-sm-2 control-label">Новый логотип</label>
							            <div class="col-sm-6" style="padding-top:6px;">
							                <input type="file" name="photo_logo">
							            </div>
							        </div>
							        <div class="form-group">
										<label for="" class="col-sm-2 control-label"></label>
										<div class="col-sm-6">
											<button type="submit" class="btn btn-success pull-left" name="form1">Обновить</button>
										</div>
									</div>
								</div>
							</div>
							</form>

							


          				</div>
          				<div class="tab-pane" id="tab_2">

          					<form class="form-horizontal" action="" method="post" enctype="multipart/form-data">
							<div class="box box-info">
								<div class="box-body">
									<div class="form-group">
							            <label for="" class="col-sm-2 control-label">Фавикон</label>
							            <div class="col-sm-6" style="padding-top:6px;">
							                <img src="../assets/uploads/<?php echo $favicon; ?>" class="existing-photo" style="height:40px;">
							            </div>
							        </div>
									<div class="form-group">
							            <label for="" class="col-sm-2 control-label">Новый</label>
							            <div class="col-sm-6" style="padding-top:6px;">
							                <input type="file" name="photo_favicon">
							            </div>
							        </div>
							        <div class="form-group">
										<label for="" class="col-sm-2 control-label"></label>
										<div class="col-sm-6">
											<button type="submit" class="btn btn-success pull-left" name="form2">Обновить</button>
										</div>
									</div>
								</div>
							</div>
							</form>


          				</div>
          				<div class="tab-pane" id="tab_3">

							<form class="form-horizontal" action="" method="post">
							<div class="box box-info">
								<div class="box-body">
									<div class="form-group">
										<label for="" class="col-sm-2 control-label">Про нас (низ)</label>
										<div class="col-sm-9">
											<textarea class="form-control" name="footer_about" id="editor1"><?php echo $footer_about; ?></textarea>
										</div>
									</div>
									<div class="form-group">
										<label for="" class="col-sm-2 control-label">Copyright (низ) </label>
										<div class="col-sm-9">
											<input class="form-control" type="text" name="footer_copyright" value="<?php echo $footer_copyright; ?>">
										</div>
									</div>								
									<div class="form-group">
										<label for="" class="col-sm-2 control-label">Контакты (адрес) </label>
										<div class="col-sm-6">
											<textarea class="form-control" name="contact_address" style="height:140px;"><?php echo $contact_address; ?></textarea>
										</div>
									</div>
									<div class="form-group">
										<label for="" class="col-sm-2 control-label">Контакты (Email) </label>
										<div class="col-sm-6">
											<input type="text" class="form-control" name="contact_email" value="<?php echo $contact_email; ?>">
										</div>
									</div>
									<div class="form-group">
										<label for="" class="col-sm-2 control-label">Контакты (телефон)</label>
										<div class="col-sm-6">
											<input type="text" class="form-control" name="contact_phone" value="<?php echo $contact_phone; ?>">
										</div>
									</div>
									<div class="form-group">
										<label for="" class="col-sm-2 control-label">Контакты (факс)</label>
										<div class="col-sm-6">
											<input type="text" class="form-control" name="contact_fax" value="<?php echo $contact_fax; ?>">
										</div>
									</div>
									<div class="form-group">
										<label for="" class="col-sm-2 control-label">Map iFrame </label>
										<div class="col-sm-9">
											<textarea class="form-control" name="contact_map_iframe" style="height:200px;"><?php echo $contact_map_iframe; ?></textarea>
										</div>
									</div>
									<div class="form-group">
										<label for="" class="col-sm-2 control-label"></label>
										<div class="col-sm-6">
											<button type="submit" class="btn btn-success pull-left" name="form3">Обновить</button>
										</div>
									</div>
								</div>
							</div>
							</form>


          				</div>

          				<div class="tab-pane" id="tab_4">

          					<form class="form-horizontal" action="" method="post">
							<div class="box box-info">
								<div class="box-body">
									<div class="form-group">
										<label for="" class="col-sm-2 control-label">Email  <span>*</span></label>
										<div class="col-sm-4">
											<input type="text" class="form-control" name="receive_email" value="<?php echo $receive_email; ?>">
										</div>
									</div>									
									<div class="form-group">
										<label for="" class="col-sm-2 control-label">Тема письма <span>*</span></label>
										<div class="col-sm-9">
											<input type="text" class="form-control" name="receive_email_subject" value="<?php echo $receive_email_subject; ?>">
										</div>
									</div>
									<div class="form-group">
										<label for="" class="col-sm-2 control-label">Thank you message <span>*</span></label>
										<div class="col-sm-9">
											<textarea class="form-control" name="receive_email_thank_you_message"><?php echo $receive_email_thank_you_message; ?></textarea>
										</div>
									</div>
									<div class="form-group">
										<label for="" class="col-sm-2 control-label"></label>
										<div class="col-sm-6">
											<button type="submit" class="btn btn-success pull-left" name="form4">Обновить</button>
										</div>
									</div>
								</div>
							</div>
							</form>


          				</div>

          				<div class="tab-pane" id="tab_5">

          					<form class="form-horizontal" action="" method="post">
							<div class="box box-info">
								<div class="box-body">
									<div class="form-group">
										<label for="" class="col-sm-4 control-label">Низ (Сколько последних новостей?)<span>*</span></label>
										<div class="col-sm-2">
											<input type="text" class="form-control" name="total_recent_news_footer" value="<?php echo $total_recent_news_footer; ?>">
										</div>
									</div>		
									<div class="form-group">
										<label for="" class="col-sm-4 control-label">Низ (Сколько популярных новостей?)<span>*</span></label>
										<div class="col-sm-2">
											<input type="text" class="form-control" name="total_popular_news_footer" value="<?php echo $total_popular_news_footer; ?>">
										</div>
									</div>
									<div class="form-group">
										<label for="" class="col-sm-4 control-label">Боковая панель (Сколько последних новостей?)<span>*</span></label>
										<div class="col-sm-2">
											<input type="text" class="form-control" name="total_recent_news_sidebar" value="<?php echo $total_recent_news_sidebar; ?>">
										</div>
									</div>		
									<div class="form-group">
										<label for="" class="col-sm-4 control-label">Боковая панели (Сколько популярных новостей?)<span>*</span></label>
										<div class="col-sm-2">
											<input type="text" class="form-control" name="total_popular_news_sidebar" value="<?php echo $total_popular_news_sidebar; ?>">
										</div>
									</div>
									<div class="form-group">
										<label for="" class="col-sm-4 control-label">Главная (Сколько последних новостей?)<span>*</span></label>
										<div class="col-sm-2">
											<input type="text" class="form-control" name="total_recent_news_home_page" value="<?php echo $total_recent_news_home_page; ?>">
										</div>
									</div>
									<div class="form-group">
										<label for="" class="col-sm-4 control-label"></label>
										<div class="col-sm-6">
											<button type="submit" class="btn btn-success pull-left" name="form5">Обновить</button>
										</div>
									</div>
								</div>
							</div>
							</form>


          				</div>


          				<div class="tab-pane" id="tab_6">

          					<form class="form-horizontal" action="" method="post">
							<div class="box box-info">
								<div class="box-body">
									<div class="form-group">
										<label for="" class="col-sm-2 control-label">Заголовок Title </label>
										<div class="col-sm-9">
											<input type="text" name="meta_title_home" class="form-control" value="<?php echo $meta_title_home ?>">
										</div>
									</div>		
									<div class="form-group">
										<label for="" class="col-sm-2 control-label">Ключевые слова Keywords </label>
										<div class="col-sm-9">
											<textarea class="form-control" name="meta_keyword_home" style="height:100px;"><?php echo $meta_keyword_home ?></textarea>
										</div>
									</div>	
									<div class="form-group">
										<label for="" class="col-sm-2 control-label">Описание Description </label>
										<div class="col-sm-9">
											<textarea class="form-control" name="meta_description_home" style="height:200px;"><?php echo $meta_description_home ?></textarea>
										</div>
									</div>	
									<div class="form-group">
										<label for="" class="col-sm-2 control-label"></label>
										<div class="col-sm-6">
											<button type="submit" class="btn btn-success pull-left" name="form6">Обновить</button>
										</div>
									</div>
								</div>
							</div>
							</form>


          				</div>



          				<div class="tab-pane" id="tab_7">

          					<form class="form-horizontal" action="" method="post">
							
									
									
							<div class="box-group" id="accordion">
								
								<!-- Service Section -->
								<div class="panel box box-primary">
									<div class="box-header">
										<h4 class="box-title">
											<a data-toggle="collapse" data-parent="#accordion" href="#collapse1">
												Наши услуги
											</a>
										</h4>
									</div>
									<div id="collapse1" class="panel-collapse collapse">
										<div class="box-body">
											<div class="form-group">
												<label for="" class="col-sm-2 control-label">Заголовок </label>
												<div class="col-sm-9">
													<input type="text" name="home_title_service" class="form-control" value="<?php echo $home_title_service; ?>">
												</div>
											</div>
											<div class="form-group">
												<label for="" class="col-sm-2 control-label">ПодЗаголовок </label>
												<div class="col-sm-9">
													<input type="text" name="home_subtitle_service" class="form-control" value="<?php echo $home_subtitle_service; ?>">
												</div>
											</div>
											<div class="form-group">
												<label for="" class="col-sm-2 control-label">Показывать на главной? </label>
												<div class="col-sm-9" style="padding-top:7px;">
													<input type="checkbox" name="home_status_service" value="<?php echo $home_status_service; ?>" <?php if($home_status_service == 1) {echo 'checked';} ?>>
												</div>
											</div>											
										</div>
									</div>
								</div>
								<!-- // Service Section -->



								<!-- Team Member Section -->
								<div class="panel box box-primary">
									<div class="box-header">
										<h4 class="box-title">
											<a data-toggle="collapse" data-parent="#accordion" href="#collapse3">
												Наша команда
											</a>
										</h4>
									</div>
									<div id="collapse3" class="panel-collapse collapse">
										<div class="box-body">
											<div class="form-group">
												<label for="" class="col-sm-2 control-label">Заголовок </label>
												<div class="col-sm-9">
													<input type="text" name="home_title_team_member" class="form-control" value="<?php echo $home_title_team_member; ?>">
												</div>
											</div>
											<div class="form-group">
												<label for="" class="col-sm-2 control-label">ПодЗаголовок </label>
												<div class="col-sm-9">
													<input type="text" name="home_subtitle_team_member" class="form-control" value="<?php echo $home_subtitle_team_member; ?>">
												</div>
											</div>
											<div class="form-group">
												<label for="" class="col-sm-2 control-label">Показывать на главной? </label>
												<div class="col-sm-9" style="padding-top:7px;">
													<input type="checkbox" name="home_status_team_member" value="<?php echo $home_status_team_member; ?>" <?php if($home_status_team_member == 1) {echo 'checked';} ?>>
												</div>
											</div>
										</div>
									</div>
								</div>
								<!-- // Team Member Section -->




								<!-- Testimonial Section -->
								<div class="panel box box-primary">
									<div class="box-header">
										<h4 class="box-title">
											<a data-toggle="collapse" data-parent="#accordion" href="#collapse5">
												Отзывы о нас
											</a>
										</h4>
									</div>
									<div id="collapse5" class="panel-collapse collapse">
										<div class="box-body">
											<div class="form-group">
												<label for="" class="col-sm-2 control-label">Заголовок </label>
												<div class="col-sm-9">
													<input type="text" name="home_title_testimonial" class="form-control" value="<?php echo $home_title_testimonial; ?>">
												</div>
											</div>
											<div class="form-group">
												<label for="" class="col-sm-2 control-label">ПодЗаголовок </label>
												<div class="col-sm-9">
													<input type="text" name="home_subtitle_testimonial" class="form-control" value="<?php echo $home_subtitle_testimonial; ?>">
												</div>
											</div>
											<div class="form-group">
												<label for="" class="col-sm-2 control-label">Показывать на главной? </label>
												<div class="col-sm-9" style="padding-top:7px;">
													<input type="checkbox" name="home_status_testimonial" value="<?php echo $home_status_testimonial; ?>" <?php if($home_status_testimonial == 1) {echo 'checked';} ?>>
												</div>
											</div>
										</div>
									</div>
								</div>
								<!-- // Testimonial Section -->



								<!-- Latest News Section -->
								<div class="panel box box-primary">
									<div class="box-header">
										<h4 class="box-title">
											<a data-toggle="collapse" data-parent="#accordion" href="#collapse6">
												Последние новости
											</a>
										</h4>
									</div>
									<div id="collapse6" class="panel-collapse collapse">
										<div class="box-body">
											<div class="form-group">
												<label for="" class="col-sm-2 control-label">Заголовок </label>
												<div class="col-sm-9">
													<input type="text" name="home_title_news" class="form-control" value="<?php echo $home_title_news; ?>">
												</div>
											</div>
											<div class="form-group">
												<label for="" class="col-sm-2 control-label">ПодЗаголовок </label>
												<div class="col-sm-9">
													<input type="text" name="home_subtitle_news" class="form-control" value="<?php echo $home_subtitle_news; ?>">
												</div>
											</div>
											<div class="form-group">
												<label for="" class="col-sm-2 control-label">Показывать на главной? </label>
												<div class="col-sm-9" style="padding-top:7px;">
													<input type="checkbox" name="home_status_news" value="<?php echo $home_status_news; ?>" <?php if($home_status_news == 1) {echo 'checked';} ?>>
												</div>
											</div>
										</div>
									</div>
								</div>
								<!-- // Latest News Section -->



								<!-- Partner Section -->
								<div class="panel box box-primary">
									<div class="box-header">
										<h4 class="box-title">
											<a data-toggle="collapse" data-parent="#accordion" href="#collapse7">
												Наши партнёры
											</a>
										</h4>
									</div>
									<div id="collapse7" class="panel-collapse collapse">
										<div class="box-body">
											<div class="form-group">
												<label for="" class="col-sm-2 control-label">Заголовок </label>
												<div class="col-sm-9">
													<input type="text" name="home_title_partner" class="form-control" value="<?php echo $home_title_partner; ?>">
												</div>
											</div>
											<div class="form-group">
												<label for="" class="col-sm-2 control-label">ПодЗаголовок </label>
												<div class="col-sm-9">
													<input type="text" name="home_subtitle_partner" class="form-control" value="<?php echo $home_subtitle_partner; ?>">
												</div>
											</div>
											<div class="form-group">
												<label for="" class="col-sm-2 control-label">Показывать на главной? </label>
												<div class="col-sm-9" style="padding-top:7px;">
													<input type="checkbox" name="home_status_partner" value="<?php echo $home_status_partner; ?>" <?php if($home_status_partner == 1) {echo 'checked';} ?>>
												</div>
											</div>
										</div>
									</div>
								</div>
								<!-- // Partner Section -->

								
							</div>


							<div class="form-group">
								<div class="col-sm-6">
									<button type="submit" class="btn btn-success pull-left" name="form7">Обновить</button>
								</div>
							</div>
							

							</form>


          				</div>



          				<div class="tab-pane" id="tab_8">

          					<form class="form-horizontal" action="" method="post">
							<div class="box box-info">
								<div class="box-body">
									<div class="form-group">
										<label for="" class="col-sm-2 control-label">Mode Rewrite </label>
										<div class="col-sm-4">
											<select name="mod_rewrite" class="form-control" style="width:auto;">
												<option value="Off" <?php if($mod_rewrite == 'Off'){echo 'selected';} ?>>Откл</option>
												<option value="On" <?php if($mod_rewrite == 'On'){echo 'selected';} ?>>Вкл</option>
											</select>
										</div>
									</div>
									<div class="form-group">
										<label for="" class="col-sm-2 control-label"></label>
										<div class="col-sm-6">
											<button type="submit" class="btn btn-success pull-left" name="form8">Обновить</button>
										</div>
									</div>
								</div>
							</div>
							</form>


          				</div>






          			</div>
				</div>

				

			</form>
		</div>
	</div>

</section>

<?php require_once('footer.php'); ?>