Mini Shell

Direktori : /home2/aravindar/public_html/admin/ajax/
Upload File :
Current File : /home2/aravindar/public_html/admin/ajax/flashnews_action.php

<?php
include("../config.php");
$conn = dbconnect();
error_reporting(0);
date_default_timezone_set('Asia/Kolkata');
session_start();
$admin_id = $_SESSION['admin_id'];
$today = date('Y-m-d H:i:s');
$type = $_POST['type'];

if ($type == 'active') {

    $sql = "UPDATE  tb1_flashnews SET status=1,crm_id='$admin_id',updated_log='$today' WHERE flash_id=1";
    $content_res = mysqli_query($conn, $sql);
    $code = 'done';
} else if ($type == 'inactive') {
    $sql = "UPDATE  tb1_flashnews SET status=0,crm_id='$admin_id',updated_log='$today' WHERE flash_id=1";
    $content_res = mysqli_query($conn, $sql);
    $code = 'done';
} else if ($type == 'update') {
    $flash_news = mysqli_real_escape_string($conn, $_POST['flash_news']);

    $sql = "UPDATE  tb1_flashnews SET flash_news='$flash_news',status='1',crm_id='$admin_id',update_flag=1,updated_log='$today' WHERE flash_id=1";
    $content_res = mysqli_query($conn, $sql);
    $code = 'done';
}
echo $data = json_encode($code);

Zerion Mini Shell 1.0