require_once("../admin/include/define.php");
require_once("../admin/include/function.php");
require_once("../admin/include/defines.php");
require_once("../admin/class/mysql.php");
if($_GET['acao'] == 'LOGOUT'):
@session_unset();
@session_destroy();
endif;
$page = str_replace("\'","", $_GET['page'] );
$id = $_GET['id'];
$set = $_GET['set'];
$titulo = $_GET['titulo'];
$nome = $_GET['nome'];
$lyt = $_GET['lyt'];
$cpf = NULL;
$email = NULL;
session_start();
$_SESSION['set'] = $_GET['set'];
session_write_close();
$id = 0;
$cv0_6 = 'off';
$cv1_6 = 'off';
$cv2_6 = 'off';
$cv3_6 = 'off';
$cv4_6 = 'off';
$cv5_6 = 'off';
//print("id ".$sid); exit;
//@session_destroy();
// abrir sessao
// manilpular as variaveis da sessao
$id = ($_POST['id'] == 0) ? $_POST['id'] : $_SESSION['sid'];
$cpf = empty($_POST['cpf']) ? $_POST['cpf'] : $_SESSION['scpf'];
$email = empty($_POST['email']) ? $_POST['email'] : $_SESSION['semail'];
$id_cv = $_SESSION['sid_cv'];
$data_inclusao = $sdata_inclusao;
$data_alteracao = $sdata_alteracao;
$cv0_6 = !empty($scv0_6) ? $scv0_6 : $cv0_6;
$cv1_6 = !empty($scv1_6) ? $scv1_6 : $cv1_6;
$cv2_6 = !empty($scv2_6) ? $scv2_6 : $cv2_6;
$cv3_6 = !empty($scv3_6) ? $scv3_6 : $cv3_6;
$cv4_6 = !empty($scv4_6) ? $scv4_6 : $cv4_6;
$cv5_6 = !empty($scv5_6) ? $scv5_6 : $cv5_6;
$strProcesso = (!empty($sprocesso)) ? $sprocesso : $_POST['strProcessoOriginal'];
// salvar as sessoe se fechar
session_write_close();
if($_GET['set']=='EMKT'):
$cpf = $_GET['cpf'];
$email = $_GET['email'];
// print('
entrei.');
endif;
$email_recolocar = $_GET['email_recolocar'];
if( $email_recolocar <> ''):
$email = $email_recolocar;
endif;
$bd = new MySql;
if ($id>0):
$sql = "SELECT ID_CANDIDATO, EMAIL, CPF FROM ".TCANDIDATO." WHERE ID_CANDIDATO = ".$id." LIMIT 1";
$bd->query($sql);
$ok = ($bd->row("ID_CANDIDATO")>0) ? true : false;
if($ok):
$cpf = $bd->row("CPF");
$email = $bd->row("EMAIL");
endif;
endif;
$bd->close();
unset($bd);
if(!isset($erro)) $erro = array();
?>