%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /home1/dimen328/libertysa.com.br/admin/modules/dados/
Upload File :
Create Path :
Current File : //home1/dimen328/libertysa.com.br/admin/modules/dados/CTRL.php

<?php
// error_reporting(E_ALL);
// ini_set('display_errors', 'on');		
include_once("DAO.php");

$oper = $_POST['oper'];

switch ($oper){
 
	case 1:
    
		$objDAO = new DAO();

		echo json_encode($objDAO->inserir(utf8_decode($_POST['txtrazao_social']),utf8_decode($_POST['txtunidade']),$_POST['txtcep'],utf8_decode($_POST['txtendereco']),$_POST['txtnumero'],utf8_decode($_POST['cmbestado']),utf8_decode($_POST['txtbairro']),utf8_decode($_POST['txtcidade']),utf8_decode($_POST['txtcomplemento']),$_POST['cmbstatus'],utf8_decode($_POST['cmbtipo'])) , true);
		//$_POST['txttelefone'],$_POST['txtcelular'],utf8_decode($_POST['txtemail'])
	
	break;
	
	case 2:
    
		$objDAO = new DAO();

		echo json_encode($objDAO->listar($_POST['filtro']) , true);
		
	
	break;
	
	case 3:
    
		$objDAO = new DAO();

		echo json_encode($objDAO->preencher($_POST['id']) , true);
		
	
	break;
	
	case 4:
    
		$objDAO = new DAO();

		echo json_encode($objDAO->atualizar($_POST['txtid'],utf8_decode($_POST['txtrazao_social']),utf8_decode($_POST['txtunidade']),$_POST['txtcep'],utf8_decode($_POST['txtendereco']),$_POST['txtnumero'],utf8_decode($_POST['cmbestado']),utf8_decode($_POST['txtbairro']),utf8_decode($_POST['txtcidade']),utf8_decode($_POST['txtcomplemento']),$_POST['cmbstatus']) , true);
		//,$_POST['txttelefone'],$_POST['txtcelular'],utf8_decode($_POST['txtemail'])
	
	break;
	
	case 5:
    
		$objDAO = new DAO();

		echo json_encode($objDAO->excluir($_POST['id']) , true);
		
	
	break;
	
	case 6:
		$objDAO = new DAO();
		echo json_encode($objDAO->preencheTipo() , true);
	break;
	
	case 7:
		$objDAO = new DAO();
		echo json_encode($objDAO->inserirDadosEmpresa($_POST['empresa'],$_POST['tipo'],utf8_decode($_POST['descricao']),$_POST['status']) , true);
	break;
	
	case 8:
		$objDAO = new DAO();

		echo json_encode($objDAO->preencheDados($_POST['id']) , true);
		
	break;
	
	case 9:
		$objDAO = new DAO();

		echo json_encode($objDAO->excluirDados($_POST['id']) , true);
	break;
		
	case 10:
		$objDAO = new DAO();

		echo json_encode($objDAO->atualizarDados($_POST['id'],utf8_decode($_POST['descricao'])) , true);
	break;
	
	case 11:
		$objDAO = new DAO();
		echo json_encode($objDAO->verificaTipoPrincipal(utf8_decode($_POST['cmbtipo'])) , true);
	break;
	
	case 12: 
		$objDAO = new DAO();
		echo json_encode($objDAO->gravaGaleria($_POST['id'],$_POST['id_galeria']),true);
	break;
	case 13:
		$objDAO = new DAO();
		echo json_encode($objDAO->exibeGaleria($_POST['id']),true);
	break;
	default:
	break;
}

?> 

Zerion Mini Shell 1.0