当前位置: 首页>>代码示例>>PHP>>正文


PHP GetVar函数代码示例

本文整理汇总了PHP中GetVar函数的典型用法代码示例。如果您正苦于以下问题:PHP GetVar函数的具体用法?PHP GetVar怎么用?PHP GetVar使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了GetVar函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: enviar

 public function enviar()
 {
     try {
         $Sql = new Sql();
         $Sql->inicio();
         $agendaDAO = new AgendaDAO();
         $agenda = $agendaDAO->consultaCodigo(toNumero(GetVar('agenda')));
         $empregadosDAO = new EmpregadosDAO();
         $destinatarios = $empregadosDAO->listarSelecao(GetVar('destinatarios'));
         $emailController = new EmailController();
         $listaEmail = array();
         foreach ($destinatarios as $key => $empregado) {
             if ($empregado['email_emp'] != "") {
                 $listaEmail[] = array("email" => $empregado['email_emp'], "nome" => $empregado['nome_emp']);
             }
             $agendaEnviadoEmpreg = new AgendaEnviadoEmpreg();
             $agendaEnviadoEmpreg->setAgendaAee(toNumero(GetVar('agenda')));
             $agendaEnviadoEmpreg->setEmpregadoAee(toNumero($empregado['codigo_emp']));
             $agendaDAO->cadastrar($agendaEnviadoEmpreg, $codigo_aee, $Sql);
         }
         $emailController->setAssunto("Agendamento de Entrevista");
         $emailController->setConteudo($this->montaAgendamento($agenda[0]));
         $emailController->setListaEmail($listaEmail);
         $return = $emailController->enviarEmail();
         if (is_string($return)) {
             throw new Exception($return);
         }
         $Sql->commit($return);
         $result = $return ? 'Comunicado de Agendamento enviado com sucesso.' : 'Erro ao enviar Comunicado de Agendamento.';
         echo json_encode(array("success" => is_string($return) ? false : $return, "msg" => is_string($return) ? $return : $result));
     } catch (Exception $e) {
         echo json_encode(array("success" => false, "msg" => $e->getMessage()));
     }
 }
开发者ID:jhonleandres,项目名称:estagio,代码行数:34,代码来源:AgendaController.php

示例2: excluir

 public function excluir()
 {
     $usuario = new Usuarios();
     $usuario->setCodigoUsr(toNumero(GetVar('codigo_usr')));
     $usuariosDAO = new UsuariosDAO();
     $return = $usuariosDAO->excluir($usuario);
     $result = $return ? 'Registro Excluido com sucesso.' : 'Erro ao Excluir Registro.';
     echo json_encode(array("success" => is_string($return) ? false : $return, "msg" => is_string($return) ? $return : $result));
 }
开发者ID:jhonleandres,项目名称:estagio,代码行数:9,代码来源:UsuariosController.php

示例3: excluir

 public function excluir()
 {
     $empregado = new Empregado();
     $empregado->setCodigoEmp(toNumero(GetVar('codigo_emp')));
     $empregadosDAO = new EmpregadosDAO();
     $return = $empregadosDAO->excluir($empregado);
     $result = $return ? 'Registro Excluido com sucesso.' : 'Erro ao Excluir Registro.';
     echo json_encode(array("success" => is_string($return) ? false : $return, "msg" => is_string($return) ? $return : $result));
 }
开发者ID:jhonleandres,项目名称:estagio,代码行数:9,代码来源:EmpregadosController.php

示例4: logar

 public function logar()
 {
     $login = new Login();
     $login->setLoginUsr(toTexto(GetVar('login_usr')));
     $login->setSenhaUsr(toTexto(sha1(GetVar('senha_usr'))));
     $loginDAO = new LoginDAO();
     $return = $loginDAO->logar($login);
     $result = $return ? 'Login efetuado com sucesso. Aguarde...' : 'Usuario ou Senha incorretos.';
     echo json_encode(array("success" => is_string($return) ? false : $return, "msg" => is_string($return) ? $return : $result));
 }
开发者ID:jhonleandres,项目名称:estagio,代码行数:10,代码来源:LoginController.php

示例5: cadastrar

 public function cadastrar()
 {
     try {
         $Sql = new Sql();
         $Sql->inicio();
         $elogiosDAO = new ElogiosDAO();
         $elogio = $elogiosDAO->listarElogio(toNumero(GetVar('elogio')));
         $elogioEnvio = new ElogioEnvio();
         $elogioEnvio->setElogioEen(toNumero(GetVar('elogio')));
         $elogioEnvio->setDataEen(toDateTime());
         $elogioEnvio->setDescricaoEen(toTexto(GetVar('descricao')));
         $elogioEnvio->setResponsavelEen(toTexto(GetVar('responsavel')));
         $codigo_een = "";
         $elogiosDAO->cadastrar($elogioEnvio, $codigo_een, $Sql);
         $elogios = array();
         $empregadosDAO = new EmpregadosDAO();
         $elogiados = $empregadosDAO->listarSelecao(GetVar('elogiados'));
         foreach ($elogiados as $key => $empregado) {
             $empregado['descricao_een'] = GetVar('descricao');
             $empregado['responsavel_een'] = GetVar('responsavel');
             $empregado['data_een'] = date("d/m/Y");
             $elogios[]["caminhoArquivo"] = $this->criaElogio($empregado, $elogio[0]['template_elo']);
             $elogioEnviadoEmpreg = new ElogioEnviadoEmpreg();
             $elogioEnviadoEmpreg->setElogioenvioEee(toNumero($codigo_een));
             $elogioEnviadoEmpreg->setEmpregadoEee(toNumero($empregado['codigo_emp']));
             $elogiosDAO->cadastrar($elogioEnviadoEmpreg, $codigo_eee, $Sql);
         }
         $emailController = new EmailController();
         $destinatarios = $empregadosDAO->listarSelecao(GetVar('destinatarios'));
         $listaEmail = array();
         foreach ($destinatarios as $key => $empregado) {
             if ($empregado['email_emp'] != "") {
                 $listaEmail[] = array("email" => $empregado['email_emp'], "nome" => $empregado['nome_emp']);
             }
         }
         $emailController->setAssunto("Elogios");
         $emailController->setConteudo("Elogios");
         $emailController->setListaAnexos($elogios);
         $emailController->setListaEmail($listaEmail);
         $return = $emailController->enviarEmail();
         if (is_string($return)) {
             throw new Exception($return);
         }
         $Sql->commit($return);
         $result = $return ? 'Elogio feito com sucesso.' : 'Erro ao fazer o Elogio.';
         echo json_encode(array("success" => is_string($return) ? false : $return, "msg" => is_string($return) ? $return : $result));
     } catch (Exception $e) {
         echo json_encode(array("success" => false, "msg" => $e->getMessage()));
     }
 }
开发者ID:jhonleandres,项目名称:estagio,代码行数:50,代码来源:ElogiosController.php

示例6: GetVar

function GetVar($name)
{
    if (is_array($name)) {
        foreach ($name as $var) {
            GetVar($var);
        }
    } else {
        if (!isset($_REQUEST[$name])) {
            return false;
        }
        if (get_magic_quotes_gpc()) {
            $_REQUEST[$name] = ssr($_REQUEST[$name]);
        }
        $GLOBALS[$name] = $_REQUEST[$name];
        return $GLOBALS[$name];
    }
}
开发者ID:HDVinnie,项目名称:BtiTracker-1.5.0,代码行数:17,代码来源:functions.php

示例7: getImage

 /**
  * @get Image(Button) on Ajax Listing
  * @$ID
  * @return	$img
  */
 public function getImage($ID)
 {
     global $gdbobj;
     global $generalobj;
     switch ($_GET['tabfile']) {
         //echo GetVar('iStateId');
         case "state":
             $img = "<a href='index.php?file=ge-city&view=index&AX=Yes&parent=ge-state&iStateId=" . $ID . "' class='top-nav-active'>View Cities</a>";
             break;
         case "city":
             $img = "<a href='index.php?file=ge-city&view=edit&AX=Yes&parent=ge-state&iCityId=" . $ID . "&iStateId=" . GetVar('iStateId') . "&addtype=zip' class='top-nav-active'>Add</a>";
             break;
         case "newsletter":
             $img = "<a href='index.php?file=ge-sendnewsletter&view=edit&AX=Yes&parent=ge-newsletter&iNformatId=" . $ID . "'><img src='images/btn-send-list.gif'  align='absmiddle' border='0' alt='Send Mail' style='cursor:pointer'></a>";
             break;
     }
     return $img;
 }
开发者ID:nstungxd,项目名称:F2CA5,代码行数:23,代码来源:class.admincommon.php

示例8: salvar

 public function salvar()
 {
     $config = "<?php\n";
     $config .= "//===============================================================================================\n";
     $config .= "// Banco de Dados\n";
     $config .= "//===============================================================================================\n";
     $config .= sprintf("define('MYSQL_USUARIO', '%s'); // USUARIO DO SQL\n", GetVar('usuario'));
     $config .= sprintf("define('MYSQL_SENHA', '%s'); // SENHA DO SQL\n", GetVar('senha'));
     $config .= sprintf("define('MYSQL_IP', '%s'); // IP LOCAL PADRAO ( 127.0.0.1 )\n", GetVar('host'));
     $config .= sprintf("define('MYSQL_DATABASE', '%s'); // DATABASE DO SQL\n", GetVar('base'));
     $config .= "//===============================================================================================\n";
     $config .= "?>";
     file_put_contents("../admin/include/Banco.php", "");
     if (file_put_contents("../admin/include/Banco.php", $config)) {
         echo json_encode(array("success" => true, "msg" => "Configuracao salva com sucesso."));
     } else {
         echo json_encode(array("success" => false, "msg" => "Ocorreu um erro ao salvar configuracao."));
     }
 }
开发者ID:jhonleandres,项目名称:estagio,代码行数:19,代码来源:configuracao.php

示例9: enviar

 public function enviar()
 {
     try {
         $Sql = new Sql();
         $Sql->inicio();
         $comunicadosDAO = new ComunicadosDAO();
         $comunicado = $comunicadosDAO->consultaCodigo(toNumero(GetVar('comunicado')));
         $empregadosDAO = new EmpregadosDAO();
         $destinatarios = $empregadosDAO->listarSelecao(GetVar('destinatarios'));
         $emailController = new EmailController();
         $listaEmail = array();
         foreach ($destinatarios as $key => $empregado) {
             if ($empregado['email_emp'] != "") {
                 $listaEmail[] = array("email" => $empregado['email_emp'], "nome" => $empregado['nome_emp']);
             }
             $comunicadoEmpreg = new ComunicadoEmpreg();
             $comunicadoEmpreg->setComunicadoCoe(toNumero(GetVar('comunicado')));
             $comunicadoEmpreg->setEmpregadoCoe(toNumero($empregado['codigo_emp']));
             $comunicadosDAO->cadastrar($comunicadoEmpreg, $codigo_coe, $Sql);
         }
         $emailController->setAssunto($comunicado[0]['titulo_com']);
         $emailController->setConteudo($comunicado[0]['comunicado_com']);
         $emailController->setListaEmail($listaEmail);
         $return = $emailController->enviarEmail();
         if (is_string($return)) {
             throw new Exception($return);
         }
         $comunicado = new Comunicado();
         $comunicado->setCodigoCom(toNumero(GetVar('comunicado')));
         $comunicado->setAlteracaoCom(toDateTime());
         $comunicadosDAO->alterar($comunicado, null, $Sql);
         $Sql->commit($return);
         $result = $return ? 'Comunicado enviado com sucesso.' : 'Erro ao enviar Comunicado.';
         echo json_encode(array("success" => is_string($return) ? false : $return, "msg" => is_string($return) ? $return : $result));
     } catch (Exception $e) {
         echo json_encode(array("success" => false, "msg" => $e->getMessage()));
     }
 }
开发者ID:jhonleandres,项目名称:estagio,代码行数:38,代码来源:ComunicadosController.php

示例10: __construct

 function __construct()
 {
     if (method_exists($this, GetVar('action'))) {
         call_user_func(array($this, GetVar('action')));
     }
 }
开发者ID:jhonleandres,项目名称:estagio,代码行数:6,代码来源:Controller.php

示例11: UnitOfMeasure

<?php

/**
 * Add/Update File For Security Manager
 * @package		addsecuritymanager.inc.php
 * @Section		security_manager
 */
if (!isset($unitofmeasureObj)) {
    include_once SITE_CLASS_APPLICATION . 'class.UnitOfMeasure.php';
    $unitofmeasureObj = new UnitOfMeasure();
}
$gdbobj->getRequestVars();
$view = GetVar("view");
$iUnitId = GetVar("iUnitId");
$file = GetVar("file");
$arr = array();
if (count($_POST) > 0) {
    $arr[0] = $_POST;
} else {
    if ($view == 'edit') {
        $arr = $unitofmeasureObj->select($iUnitId);
        // prints($arr); exit;
    } else {
        $view = "add";
    }
}
$arr[0]['eStatus'] = isset($arr[0]['eStatus']) ? $arr[0]['eStatus'] : 'Active';
?>
<form name="frmadd" id="frmadd" action="index.php?file=<?php 
echo $file;
?>
开发者ID:nstungxd,项目名称:F2CA5,代码行数:31,代码来源:addunitofmeasure.inc.php

示例12: getModuleInfo

 public function getModuleInfo()
 {
     global $dbobj;
     $url = str_replace(SITE_FOLDER . ADMIN_FOLDER_CONST . "/", "", $_SERVER['REQUEST_URI']);
     $url = @explode("&", $url);
     $parenturl = @explode("=", $url[3]);
     if ($parenturl[0] != "") {
         $this->parenturl = $parenturl[0];
     } else {
         $this->parenturl = "";
     }
     if (isset($url[3]) && $url[3] != '' && $parenturl[0] == 'parent') {
         $moduleurl = "index.php?file=" . $parenturl[1];
     } else {
         $moduleurl = $url[0];
     }
     $label = array("ge-home", "ge-settings", "ge-backup", "ge-source", "ge-fullbkup", "ge-restore", "ge-help", "ge-document", "ge-access", "ge-inbox", "ge-comessage", "ge-sentmails", "ge-msgdetail", "ge-noaccess", "ge-sitemap");
     if (isset($_GET['file']) && in_array($_GET['file'], $label)) {
         if ($_GET['file'] == 'ge-source' || $_GET['file'] == 'ge-fullbkup' || $_GET['file'] == 'ge-restore') {
             $moduleurl = 'index.php?file=ge-backup';
         }
         if ($_GET['file'] == "ge-inbox" || $_GET['file'] == "ge-comessage" || $_GET['file'] == "ge-sentmails" || $_GET['file'] == "ge-msgdetail" || $_GET['file'] == "ge-noaccess") {
             $url = $moduleurl . "&view=add&AX=Yes";
             $view = "add";
         } else {
             $url = $moduleurl . "&view=edit&AX=Yes";
             $view = "edit";
         }
     } else {
         $url = $moduleurl . "&view=index&AX=Yes";
         $view = GetVar('view');
     }
     //Prints($view);
     if ($this->parenturl != "") {
         $this->dispview = $view;
     } else {
         $this->dispview = GetVar('view');
     }
     $sql_menu = "SELECT iParentId,iModuleId\r\n\t\t\t\t\t FROM " . PRJ_DB_PREFIX . "_modules\r\n\t\t\t\t\t WHERE vLink='" . $url . "'\r\n\t\t\t\t\t AND eStatus = 'Active'\r\n\t\t\t\t\t AND iParentId <> '0'\r\n\t\t\t\t\t order by iDisporder ASC";
     $db_menu_rs = $dbobj->MySQLSelect($sql_menu);
     return $db_menu_rs;
 }
开发者ID:nstungxd,项目名称:F2CA5,代码行数:42,代码来源:class.accessrights.php

示例13: GetVar

<?php

include S_SECTIONS . "/member/memberaccess.php";
$iOrganizationID = GetVar('id');
if ($sess_usertype == 'orgadmin' && $orgid != $iOrganizationID) {
    header("Location: " . SITE_URL_DUM . "oadashboard");
    exit;
}
if (!isset($orgprefObj)) {
    include_once SITE_CLASS_APPLICATION . "organization/class.OrganizationPreference.php";
    $orgprefObj = new OrganizationPreference();
}
if (!isset($orgPrefVrfObj)) {
    include_once SITE_CLASS_APPLICATION . "organization/class.OrganizationPreferenceToverify.php";
    $orgPrefVrfObj = new OrganizationPreferenceToverify();
}
if (!isset($orgObj)) {
    require_once SITE_CLASS_APPLICATION . "organization/class.Organization.php";
    $orgObj = new Organization();
}
$orgdtls = $orgObj->select($iOrganizationID);
$orgprefhistory = $orgprefObj->getHistory($iOrganizationID);
// prints($orgprefhistory); exit;
$smarty->assign('orgdtls', $orgdtls);
$smarty->assign('orgprefhistory', $orgprefhistory);
开发者ID:nstungxd,项目名称:F2CA5,代码行数:25,代码来源:orgprefviewhistory.php

示例14: str_replace

$exist = 0;
$mode = str_replace("|repadn|", "?", GetVar('mode'));
$table = @explode(',', GetVar('table'));
$Field_val = str_replace("|repadn|", "?", GetVar('val'));
$comp_Field = str_replace("|repadn|", "?", GetVar('compid'));
$iPrimId = str_replace("|repadn|", "?", GetVar('primeid'));
$primeId_val = str_replace("|repadn|", "?", GetVar('primeval'));
$tableprimid = @explode(',', GetVar('tableprimid'));
$Thrtype = str_replace("|repadn|", "?", GetVar('Thrtype'));
$vEmail = str_replace("|repadn|", "?", GetVar('vEmail'));
$vUserName = str_replace("|repadn|", "?", GetVar('vUserName'));
$eType = str_replace("|repadn|", "?", GetVar('eType'));
$eSection = str_replace("|repadn|", "?", GetVar('eSection'));
$vQuestion = str_replace("|repadn|", "?", GetVar('vQuestion'));
$iUserId = str_replace("|repadn|", "?", GetVar('iUserId'));
$iPercentage = str_replace("|repadn|", "?", GetVar('iPercentage'));
$exist = 0;
$extra_query = "";
if ($vEmail != '' && $vUserName != '') {
    $sql = "select iMemberId,if((vEmail='" . $vEmail . "'),'vEmail','vUserName') as field from " . $table[0] . " where vEmail='" . $vEmail . "' or vUserName =  '" . $vUserName . "'";
    $db_exist = $dbobj->MySQLselect($sql);
    if (count($db_exist) > 0) {
        $exist = 1;
        $comp_Field = $db_exist[0][field];
    } else {
        $comp_Field = 'no';
    }
} else {
    if ($iUserId != '' && $iPercentage != '' && $mode == "add") {
        $sql = "select iUserId as field from " . $table[0] . " where iUserId='" . $iUserId . "' or iPercentage =  '" . $iPercentage . "'";
        $db_exist = $dbobj->MySQLselect($sql);
开发者ID:nstungxd,项目名称:F2CA5,代码行数:31,代码来源:chkDuplicate.inc.php

示例15: RFQ2Master

<?php

if (!isset($rfq2Obj)) {
    include_once SITE_CLASS_APPLICATION . "user/class.RFQ2Master.php";
    $rfq2Obj = new RFQ2Master();
}
$status = GetVar('id');
$msg = GetVar('msg');
$sts = "";
if ($msg == 'isu' || $msg == 'acpt') {
    $sts = $msg;
}
$rfq2type = $gdbobj->getEnumSelect("" . PRJ_DB_PREFIX . "_rfq2_master", "eAuctionType", "eAuctionType", "eAuctionType", "", "", "class='form-control' ", "Select RFQ2 Type", "---Select---");
$bidcriteria = $gdbobj->getEnumSelect("" . PRJ_DB_PREFIX . "_rfq2_master", "eBidCriteria", "eBidCriteria", "eBidCriteria", "", "", "class='form-control' ", "Select Bid Criteria", "---Select---");
$smarty->assign('sts', $sts);
$smarty->assign('status', $status);
$smarty->assign('rfq2type', $rfq2type);
$smarty->assign('bidcriteria', $bidcriteria);
开发者ID:nstungxd,项目名称:F2CA5,代码行数:18,代码来源:b2rfq2watchlist.php


注:本文中的GetVar函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。