View file iblog/admin/controller/setting_ajax.php

File size: 1.92Kb
<?php
include "../../lib/functions_class.php";

$footer = $_POST['footer'];
$maintenance = $_POST['maintenance'];
$slider = $_POST['slider'];
$blog = $_POST['blog'];
$center_email = $_POST['center_email'];
$post_limit = $_POST['post_limit'];
$face_book = $_POST['face_book'];
$twi_tter = $_POST['twi_tter'];
$g_plus = $_POST['g_plus'];
$pin_terest = $_POST['pin_terest'];
$link_edin = $_POST['link_edin'];

//Home Setting
$sidebar = $_POST['sidebar'];
$footer_post = $_POST['footer_post'];
$content_top1 = $_POST['content_top1'];
$content_top2 = $_POST['content_top2'];
$content_top3 = $_POST['content_top3'];
$content_middle = $_POST['content_middle'];
$meta_title = $_POST['meta_title'];
$meta_description = $_POST['meta_description'];
$meta_keywords = $_POST['meta_keywords'];

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

	$DB->make_blog($blog);
	
	$DB->update_setting($footer,'footer');
	
	$DB->update_setting($maintenance,'maintenance');
	
	$DB->update_setting($slider,'slider');
	
	$DB->update_setting($blog,'blog');
	
	$DB->update_setting($center_email,'center_email');
	
	$DB->update_setting($post_limit,'topic_limit');
	
	$DB->update_setting($face_book,'facebook');
	
	$DB->update_setting($twi_tter,'twitter');
	
	$DB->update_setting($g_plus,'gplus');
	
	$DB->update_setting($pin_terest,'pinterest');
	
	$DB->update_setting($link_edin,'linkedin');
	
	$DB->update_setting($content_top1,'content_top1');
	
	$DB->update_setting($content_top2,'content_top2');
	
	$DB->update_setting($content_top3,'content_top3');
	
	echo "Setting Saved Sucessfully.";
}

//Setting Home
if(isset($_POST['settinghome'])){

	$DB->update_setting($sidebar,'home_sidebar');
	
	$DB->update_setting($footer_post,'footer_post');
	
	$DB->update_setting($content_middle,'content_middle');
	
	$DB->update_setting($meta_title,'meta_title');
	
	$DB->update_setting($meta_description,'meta_description');
	
	$DB->update_setting($meta_keywords,'meta_keywords');
	
	echo "Home Setting Saved Sucessfully.";
}
?>