本文整理汇总了PHP中troca函数的典型用法代码示例。如果您正苦于以下问题:PHP troca函数的具体用法?PHP troca怎么用?PHP troca使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了troca函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: xss_security_post
function xss_security_post($s)
{
$s = troca($s, '<', '<');
$s = troca($s, '>', '>');
$s = troca($s, '"', '"');
//$s = troca($s,'/',''');
$s = troca($s, "'", '/');
return $s;
}
示例2: xml
function xml($cep)
{
$title = htmlspecialchars($cep->line['cep_titulo']);
$titlep = htmlspecialchars($cep->line['cep_titulo_public']);
/* data */
$data = $cep->line['cep_data'];
$data = substr($data, 0, 4) . '-' . substr($data, 4, 2) . '-' . substr($data, 6, 2) . 'T00:00:00';
//print_r($cep);
$xml = "\n<trials>\n\t<trial>\n\t\t<main>\n\t\t\t<trial_id></trial_id> \n\t\t\t<utrn /> \n\t\t\t<reg_name>RPEC</reg_name> \n\t\t\t<date_registration>**DATA**</date_registration> \n\t\t\t<primary_sponsor>**AUTOR**</primary_sponsor> \n \t\t\t<public_title>{$titlep}</public_title>\n\t\t\t<acronym /> \n \t\t\t<scientific_title>{$title}</scientific_title> \n \t\t\t<scientific_acronym>{$acronym}</scientific_acronym> \n \t\t\t<date_enrolment>{$data}</date_enrolment> \n \t\t\t<type_enrolment /> \n \t\t\t<target_size>**tabg**</target_size> \n \t\t\t<recruitment_status /> \n \t\t\t<url>SITE</url> \n \t\t\t<study_type /> \n \t\t\t<study_design>**Desenho**</study_design> \n \t\t\t<phase>**FASE**</phase> \n \t\t\t<hc_freetext>**</hc_freetext> \n \t\t\t<i_freetext>**FREE TEXT**</i_freetext> \n\t\t</main>\n\t\t<contacts>\n\t\t\t<contact>\n \t\t\t\t<tipo>public</tipo> \n \t\t\t\t<firstname>***</firstname> \n \t\t\t\t<middlename>**</middlename> \n \t\t\t\t<lastname>***</lastname> \n \t\t\t\t<address>****</address> \n \t\t\t\t<city>***</city> \n \t\t\t\t<country1>***</country1> \n \t\t\t\t<zip /> \n \t\t\t\t<telephone>*****</telephone> \n \t\t\t\t<email>*****</email> \n \t\t\t\t<affiliation>****</affiliation> \n \t\t\t</contact>\n\t\t\t<contact>\n \t\t\t\t<tipo>public</tipo> \n \t\t\t\t<nombres>**</nombres> \n \t\t\t\t<apell_mat>****</apell_mat> \n \t\t\t\t<apell_pat>****</apell_pat> \n \t\t\t\t<direccion>****</direccion> \n \t\t\t\t<distrito>*****</distrito> \n \t\t\t\t<provincia>****</provincia> \n \t\t\t\t<departamento>*****</departamento> \n \t\t\t\t<ruc>*****</ruc> \n \t\t\t \t<mail>****</mail> \n \t\t\t\t<ejecutor>*****</ejecutor> \n \t\t\t</contact>\n \t\t</contacts>\n\t\t<country>\n \t\t\t<country2>***</country2> \n \t\t\t<country2>****</country2> \n \t\t\t<country2>****</country2> \n \t\t</country>\n\t\t<criteria>\n \t\t\t<inclusion_criteria>***</inclusion_criteria> \n \t\t\t<agemin>18</agemin> \n \t\t\t<agemax>99</agemax> \n \t\t\t<gender>-</gender> \n \t\t\t<exclusion_criteria>\n \t\t\t****\n \t\t\t</exclusion_criteria> \n \t\t</criteria>\n\t\t\t<hc_keyword>\n \t\t\t\t<hc_code /> \n \t\t\t</hc_keyword>\n\t\t<health_condition_keyword>\n \t\t\t<hc_code /> \n \t\t</health_condition_keyword>\n\t\t<i_keyword>\n \t\t\t<i_code /> \n \t\t</i_keyword>\n\t\t<intervention_keyword>\n \t\t\t<hc_code /> \n \t\t</intervention_keyword>\n\t\t<primary_outcome>\n \t\t\t<prim_outcome>â¢Overall survival [ Time Frame: approximately 8 years ] [ Designated as safety issue: No ] NAME OF THE RESULT: Overall survival USED MEASURING METHOD :The Kaplan-Meier method will be used to calculate the median OS for each treatment arm. The log-rank test bilateral, stratified by measurable disease versus non-measurable / evaluable, geographic region (U.S. vs. outside the U.S.) and creatinine clearance (45-59 mL / min vs> 60 mL / min), will be used to compare OS between the two treatment arms of trastuzumab. Also provide the result of the Log-Rank test unstratified. The stratified Cox regression (with proportional hazards) will also be used to estimate hazard ratios and to calculate confidence intervals 95% (95% CI) of risk indices. PERIOD OF TIME WHERE THE MEASUREMENT WILL BE CONDUCTED AND WHICH WILL ALLOW OBTAINING THE PRIMARY RESULT: 8 years</prim_outcome> \n \t\t</primary_outcome>\n\t\t<secondary_outcome>\n \t\t\t<sec_outcome>Progression Free Survival NAME OF THE RESULT: Progression Free Survival USED MEASURING METHOD :The Kaplan-Meier method The log-rank test bilateral PERIOD OF TIME WHERE THE MEASUREMENT WILL BE CONDUCTED AND WHICH WILL ALLOW OBTAINING THE SECONDARY RESULT: 6 months</sec_outcome> \n \t\t</secondary_outcome>\n\t\t<secondary_ids>\n\t\t\t<secondary_id>\n\t \t\t\t<sec_id>BO27798</sec_id> \n \t\t\t\t<issuing_authority /> \n \t\t\t</secondary_id>\n \t\t</secondary_ids>\n\t\t<secondary_sponsor>\n \t\t\t<sponsor_name /> \n \t\t</secondary_sponsor>\n\t\t<source_support>\n \t\t\t<source_name>F. HOFFMANN-LA ROCHE LTD.</source_name> \n \t\t</source_support>\n \t</trial>\n</trials>";
$xml = troca($xml, '&', '[XXX]');
//$xml = troca($xml,'<','<');
//$xml = troca($xml,'>','>');
$xml = troca($xml, '&', '&');
$xml = troca($xml, '[XXX]', '&');
return $xml;
}
示例3: login
function login($login, $pass)
{
global $messa;
$login = uppercase($login);
if (strlen($login) == 0 or strlen($pass) == 0) {
$this->user_erro = -3;
$this->user_msg = 'login_required';
return -3;
} else {
$login = troca($login, "'", "´");
$pass = troca($pass, "'", "´");
$sql = "select * from " . $this->usuario_tabela;
$sql .= " where " . $this->usuario_tabela_email . " = '" . LowerCase($login) . "' ";
$resrlt = db_query($sql);
if ($result = db_read($resrlt)) {
$user_senha = trim($result[$this->usuario_tabela_pass]);
if ($result['senha_md5'] == 1) {
$pass = md5($pass);
}
if ($user_senha == $pass) {
$this->user_erro = 1;
$this->user_msg = '';
$this->user_login = trim($result[$this->usuario_tabela_login]);
$this->user_nome = trim($result[$this->usuario_tabela_nome]);
$this->user_nivel = trim($result[$this->usuario_tabela_nivel]);
$this->user_id = trim($result[$this->usuario_tabela_id]);
$this->user_codigo = trim($result['us_codigo']);
$this->user_perfil = trim($result['us_perfil']);
$this->LiberarUsuario();
} else {
$this->user_erro = -2;
$this->user_msg = 'password_incorrect';
}
} else {
$this->user_erro = -1;
$this->user_msg = 'login_invalid';
}
}
if ($this->user_erro == 1) {
$this->LiberarUsuario();
return True;
} else {
return False;
}
}
示例4: confirm_submission_by_email
function confirm_submission_by_email()
{
global $LANG;
/**** ENVIO DE E-MAIL *****/
$ic = new ic();
$ic = $ic->ic('email_confirm_subm');
$title = utf8_decode($this->doc_1_titulo);
$texto = mst(utf8_decode($ic['text']));
$subject = $ic['title'];
$emails = $this->email_autores();
$texto = troca($texto, '$TITLE', $title);
$texto = troca($texto, '$CAAE', $protocolo);
$texto = troca($texto, '$TITLE', $title);
echo '<h3>' . $subjec . '</h3>';
for ($r = 0; $r < count($emails); $r++) {
echo 'sending to ' . $emails[$r];
enviaremail($emails[$r], '', '#2' . $subject, $texto);
enviaremail($emails[$r], '', '#1' . $subject, $texto);
}
exit;
}
示例5: process
function process($cp)
{
global $dd, $acao, $ged, $http;
/* Caixa Alta */
$i = UpperCaseSql(substr($cp[0], 1, 5));
if (strpos($i, ' ') > 0) {
$i = substr($i, 0, strpos($i, ' '));
}
/* Transfere parametros */
$this->required = $cp[3];
$this->caption = $cp[2];
$this->caption_original = $cp[2];
$placeholder = troca($cp[2], '"', '');
if (strpos($placeholder, '<') > 0) {
$placeholder = substr($placeholder, 0, strpos($placeholder, '<'));
}
$this->caption_placeholder = $placeholder;
$this->fieldset = $cp[1];
$size = sonumero($cp[0]);
$this->maxlength = $size;
$this->caption = $cp[2];
$ro = UpperCaseSql($cp[4]);
/* Read Only */
if ($ro == 'FALSE' or $ro == '0' or strlen($ro) == '0') {
$this->readonly = ' READONLY ';
} else {
$this->readonly = '';
}
if (strlen(trim($acao)) > 0 and $this->required == 1 and strlen(trim($this->value)) == 0) {
$this->caption = '<font color="red">' . $this->caption . '</font>';
}
if ($size > 80) {
$size = 80;
}
$this->size = $size;
$i = troca($i, '&', '');
$i = troca($i, ':', '');
$sn = sonumero($i);
$i = troca($i, $sn, '');
//echo '['.$i.']';
if (substr($i, 0, 1) == 'T' and $i != 'TOKEN') {
$i = 'T';
}
if (substr($i, 0, 1) == '[') {
$i = '[';
}
if (empty($sx)) {
$sx = '';
}
$sx .= chr(13) . '<TR valign="top">';
$sh = '<TD align="right" width="10%">' . $this->caption . '<TD>';
if (strlen(trim($this->caption_original)) == 0) {
$sh = '<TD colspan=2 align="left">';
}
if (substr($i, 0, 1) == 'T') {
//$sh = '<TD colspan=2 align="right">';
$sh .= $this->caption;
}
switch ($i) {
/* Field Sets */
case '{':
$sx .= $this->type_open_field();
break;
case '}':
$sx .= $this->type_close_field();
break;
/* Sequencial */
/* Sequencial */
case '[':
$this->par = substr($cp[0], 2, strlen($cp[0]));
$sx .= $sh . $this->type_seq();
break;
case 'AJAX':
$sx .= '<TR><TD colspan=2>' . $this->type_ajax();
break;
case 'AUTOR':
$sx .= '<TR><TD colspan=2>' . $this->type_Autor();
break;
/* Caption */
/* Caption */
case 'A':
$sx .= '<TR><TD colspan=2>' . $this->type_A();
break;
/* Alert */
/* Alert */
case 'ALERT':
$sx .= '<TR><TD><TD colspan=1>' . $this->type_ALERT();
break;
/* Button */
/* Button */
case 'B':
$sx .= '<TD colspan=2 >' . $this->type_B();
break;
/* City, State, Country */
/* City, State, Country */
case 'CITY':
$sx .= $sh . $this->type_City();
break;
/* Declaracao */
/* Declaracao */
//.........这里部分代码省略.........
示例6: form_field
//.........这里部分代码省略.........
$ntype = trim(substr($type, 2, strlen($type)));
$n1 = substr($ntype, 0, strpos($ntype, '-'));
$n2 = sonumero(substr($ntype, strpos($ntype, '-'), strlen($ntype)));
$n3 = substr($ntype, strlen($ntype) - 1, 1);
$options = array('' => '::select an option::');
if ($n3 != 'D') {
/* Crescente */
for ($r = $n1; $r <= $n2; $r++) {
$options[$r] = $r;
}
} else {
/* Descrecente */
for ($r = $n2; $r >= $n1; $r--) {
$options[$r] = $r;
}
}
/* recupera dados */
$dados = array('name' => $dn, 'id' => $dn, 'size' => 1, 'class' => 'form_select');
$tela .= $tr;
/* label */
if (strlen($label) > 0) {
$tela .= $tdl . $label . ' ';
}
if ($required == 1) {
$tela .= ' <font color="red">*</font> ';
}
$tela .= '<TD>';
$tela .= form_dropdown($dados, $options, $vlr);
break;
/* Select Box - Autocomplete*/
/* Select Box - Autocomplete*/
case 'AA':
$ntype = trim(substr($type, 2, strlen($type)));
$ntype = troca($ntype, ':', ';') . ';';
$param = splitx(';', $ntype);
/* TR da tabela */
$tela .= $tr;
/* label */
if (strlen($label) > 0) {
$tela .= $tdl . $label . ' ';
}
if ($required == 1) {
$tela .= ' <font color="red">*</font> ';
}
/* **/
$dados = array('name' => $dn . 'a', 'id' => $dn . 'a', 'value' => $vlr, 'maxlenght' => $max, 'size' => $size, 'placeholder' => $label, 'class' => 'form_string', 'autocomplete' => 'on');
$tela .= $td . form_input($dados);
$dados = array('name' => $dn, 'id' => $dn, 'value' => $vlr, 'maxlenght' => $max, 'size' => 10, 'placeholder' => $label, 'class' => 'form_string', 'autocomplete' => 'on');
if ($readonly == false) {
$dados['readonly'] = 'readonly';
}
$tela .= form_input($dados);
$tela .= $tdn . $trn;
$tela .= '
<script>
$(function(){
var $sfield = $("#' . $dn . 'a").autocomplete({
source: function(request, response){
var url = "' . base_url("index.php/instituicao/autocomplete?term=") . '" + $("#' . $dn . 'a").val();
$.get(url, {},
function(data)
{
response($.map(data, function(rlt)
{
return { label: rlt.nome, value: rlt.id };
}));
示例7: checkpost
$valid = $hd->site . 'login_user_valid.php?dd1=' . $dd[5] . '&dd90=' . checkpost($dd[5]);
} else {
$valid = $hd->site . '/login_user_valid.php?dd1=' . $dd[5] . '&dd90=' . checkpost($dd[5]);
}
$link = '<A HREF="' . $valid . '">';
$ic_cod = "email_confirm_email";
$tx = $ic->ic($ic_cod);
/* Cambia texto */
$texto = mst($tx['text']);
$subtitle = $tx['title'];
$texto = troca($texto, '$name', $name);
$texto = troca($texto, '$NAME', $name);
$texto = troca($texto, '$email', $email);
$texto = troca($texto, '$EMAIL', $email);
$texto = troca($texto, '$link', $link . $valid . '</a>');
$texto = troca($texto, '$LINK', $link . $valid . '</a>');
$texto .= '<BR><BR><font size=-2>' . $ic_cod . '</font>';
/* Envia e-mail da validação */
$sql = "select * from usuario where us_email = '" . $email . "' ";
$rlt = db_query($sql);
if ($line = db_read($rlt)) {
$email = trim($line['us_email']);
enviaremail($email, '', $subtitle, $texto);
echo '<BR><BR>Send mail to ' . $email;
}
echo '</div>';
} else {
echo $tela;
echo '</div>';
}
echo '</div>';
示例8: redirecina
require "cab.php";
require '_class/_class_cep.php';
/* Admin Common */
$ok = ($perfil->valid('#ADM') or $perfil->valid('#SCR') or $perfil->valid('#COO'));
if ($ok == 0) {
redirecina('main.php');
}
$tp = new message();
//$tp->language_set('pt_BR');
global $acao, $dd, $cp, $tabela;
require $include . 'sisdoc_colunas.php';
require $include . 'sisdoc_debug.php';
$clx = new cep();
$tabela = $clx->tabela;
$label = msg("protocols");
$http_edit = troca(page(), '.php', '_ed.php');
$http_ver = 'protocol_detalhe.php';
$http = page();
$editar = True;
$http_redirect = page();
//$http_ver = 'cliente_ver.php';
$clx->row();
$busca = true;
$offset = 20;
//$pre_where = " e_mailing = '".$cl->mail_codigo."' ";
echo '<h1>' . msg('cep_protocol') . '</h1>';
echo '<fieldset><legend>' . msg('protocol') . '</legend>';
echo '<TABLE width="100%" align="center"><TR><TD>';
require $include . 'sisdoc_row.php';
echo '</table>';
echo '</fieldset>';
示例9: csf
<?php
require '../_class/_class_csf.php';
$csf = new csf();
$total = $csf->total_bolsistas();
echo '<div id="content">';
echo '<div style="text-align: justify">';
$txt = troca($txt, ' 50 ', ' ' . $total . ' ');
echo $txt;
echo '</div>';
echo $csf->world_onde_curso_universidade();
//echo $csf->estudantes_curso_instituicao();
echo '</div>';
示例10: language_page_create
/**
* Exportacao - criar arquivo com mensagens das paginas
*/
function language_page_create()
{
$cr = chr(13) . chr(10);
$domtree = new DOMDocument('1.0', 'UTF-8');
/* create the root element of the xml tree */
$xmlRoot = $domtree->createElement("xml");
/* append it to the document created */
$xmlRoot = $domtree->appendChild($xmlRoot);
$pags = array();
$sql = "select msg_language from " . $this->tabela . " group by msg_language";
$rlt = db_query($sql);
while ($line = db_read($rlt)) {
array_push($pags, $line['msg_language']);
}
/* Constroi as paginas */
for ($ro = 0; $ro < count($pags); $ro++) {
$sql = "select * from " . $this->tabela . " where (msg_ativo = 1) ";
$sql .= " and (msg_language = '" . $pags[$ro] . "') ";
$sql .= " order by msg_language, msg_field ";
$rlt = db_query($sql);
$sx = '';
/* Construi arquivo */
$sv = '';
/* validacoes de traduca */
$sv .= '$messav = array(' . $cr;
$sx = '<?php
// This file is part of the ProEthos Software.
//
// Copyright 2013, PAHO. All rights reserved. You can redistribute it and/or modify
// ProEthos under the terms of the ProEthos License as published by PAHO, which
// restricts commercial use of the Software.
//
// ProEthos is distributed in the hope that it will be useful, but WITHOUT ANY
// WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
// PARTICULAR PURPOSE. See the ProEthos License for more details.
//
// You should have received a copy of the ProEthos License along with the ProEthos
// Software. If not, see
// https://raw.githubusercontent.com/bireme/proethos/master/LICENSE.txt
' . $cr;
$sx .= '/* Arquivo de Mensagens das paginas */' . $cr;
$sx .= '$messa = array(' . $cr;
$idio = "xxx";
$it = 0;
echo '<table width="100%" class="border01">';
echo '<tr><td>';
echo 'Language: ' . $pags[$ro] . '<BR>';
/* Create XML */
while ($xline = db_read($rlt)) {
$xlan = trim($xline['msg_language']);
$xfile = trim($xline['msg_field']);
$xpage = trim($xline['msg_content']);
$xfile = troca($xfile, '&', '[e]');
$xpage = troca($xpage, '&', '[e]');
if (strlen($xfile) > 0) {
if ($xfile != $xpage) {
$currentReg = $domtree->createElement("reg");
$xmlRoot->appendChild($currentReg);
$currentReg->appendChild($domtree->createElement('msg_language', $xlan));
$currentReg->appendChild($domtree->createElement('msg_field', $xfile));
$currentReg->appendChild($domtree->createElement('msg_content', $xpage));
}
}
if ($xlan != $idio) {
if ($it > 0) {
$sx .= $cr . ') ,';
}
if ($it > 0) {
$sv .= $cr . ') ,';
}
/* mensagens */
/* validacao */
$sv .= $cr;
$sv .= '/* New Language ' . $xline['msg_language'] . ' */';
$sv .= $cr;
$sv .= "'" . $xline['msg_language'] . "'=>";
$sv .= " array(" . $cr;
/* mensagens */
$sx .= $cr;
$sx .= '/* New Language ' . $xline['msg_language'] . ' */';
$sx .= $cr;
$sx .= "'" . $xline['msg_language'] . "'=>";
$sx .= " array(" . $cr;
$it = 0;
$idio = $xlan;
}
if ($it > 0) {
$sx .= ',' . $cr;
}
if ($it > 0) {
$sv .= ',' . $cr;
}
$page_banco = $line['msg_pag'];
if (!strlen(trim($page_banco)) == 0) {
$page_banco = unserialize($page_banco);
} else {
//.........这里部分代码省略.........
示例11: upload_file_save
function upload_file_save()
{
global $dd, $messa, $acao, $tipo;
$page = page() . '?';
$page .= 'dd0=' . $dd[0] . '&dd5=' . $dd[5] . '&dd2=' . $dd[2] . '&dd1=' . $dd[1] . '&dd90=' . $dd[90];
$saved = 0;
if (strlen($acao) > 0) {
$tipo = $dd[2];
$nome = lowercasesql($_FILES['arquivo']['name']);
$temp = $_FILES['arquivo']['tmp_name'];
$size = $_FILES['arquivo']['size'];
$path = $this->upload_path;
$extensoes = $this->upload_format;
/* valida extensao */
$ext = strtolower($nome);
while (strpos(' ' . $ext, '.') > 0) {
$ext = substr($ext, strpos($ext, '.') + 1, strlen($ext));
}
$ext = '.' . $ext;
/* diretorio */
$nome = substr($nome, 0, strlen($nome) - 4);
$nome = lowercasesql(troca($nome, ' ', '_'));
$nome .= $ext;
$this->dir($path);
if ($this->up_month_control == 1) {
$path .= date("Y") . '/';
$this->dir($path);
$path .= date("m") . '/';
$this->dir($path);
}
/* caso nao apresente erro */
if (strlen($erro) == 0) {
$compl = $dd[1] . '-' . substr(md5($nome . date("His")), 0, 5) . '-';
$compl = troca($compl, '/', '-');
$this->filename = $path . $compl . $nome;
if (move_uploaded_file($temp, $path . $compl . $nome)) {
return 1;
} else {
$sx = 'Erro de salvamento';
return 0;
}
} else {
echo '<center>' . msg($erro) . '</center>';
}
return 0;
}
}
示例12: form_field
function form_field($cp, $vlr)
{
global $dd, $ddi;
/* Zera tela */
$tela = '';
$table = 1;
if (!isset($dd)) {
$dd = array();
$ddi = 0;
}
$type = $cp[0];
$label = $cp[2];
$required = $cp[3];
$placeholder = $label;
$readonly = $cp[4];
$tt = substr($type, 1, 1);
/* exessoes */
if (substr($type, 0, 4) == '$MES') {
$tt = 'MES';
}
/* form */
$max = 100;
$size = 100;
$dados = array();
$dn = 'dd' . $ddi;
if ($table == 1) {
$td = '<td>';
$tdl = '<td align="right">';
$tdn = '</td>';
$tr = '<tr valign="top">';
$trn = '</tr>';
} else {
$td = '';
$tdl = '';
$tdn = '';
$tr = '';
$trn = '';
}
//$dados = array('name'=>'dd'.$ddi, 'id'=>'dd'.$ddi,'value='.$dd[$ddi],'maxlenght'=>$max,'size'=>$size,$class=>'');
switch ($tt) {
/* Button */
case 'B':
$tela .= $tr . $tdl . $td;
$dados = array('name' => 'acao', 'id' => 'acao', 'value' => $label);
$tela .= form_submit($dados);
$tela .= $tdn . $trn;
break;
/* Oculto */
/* Oculto */
case 'H':
$dados = array($dn => $vlr);
$tela .= form_hidden($dados);
break;
/* Select Box - Mes */
/* Select Box - Mes */
case 'MES':
$options = array('' => '::select an option::');
/* recupera dados */
for ($r = date("Y") + 4; $r > 1990; $r--) {
$vlra = $r;
$options[$vlra] = '===' . $r . '===';
//array_push($options,array('2019'));
$ar = array();
for ($y = 12; $y > 0; $y--) {
$vlrs = $r . strzero($y, 2) . '01';
$cpt = $r . '/' . msg('mes_' . strzero($y, 2));
$op = array($vlr => $cpt);
$ar[$vlrs] = $cpt;
//array_push($options,$op);
}
$options[$vlra] = $ar;
}
$dados = array('name' => $dn, 'id' => $dn, 'size' => 1, 'class' => 'form_select');
$tela .= $tr;
/* label */
if (strlen($label) > 0) {
$tela .= $tdl . $label . ' ';
}
if ($required == 1) {
$tela .= ' <font color="red">*</font> ';
}
if (strlen($vlr) == 0) {
$vlr = date("Ym") . '01';
}
$tela .= '<TD>';
$tela .= form_dropdown($dados, $options, $vlr);
break;
/* Select Box */
/* Select Box */
case 'Q':
$ntype = trim(substr($type, 2, strlen($type)));
$ntype = troca($ntype, ':', ';') . ';';
$param = splitx(';', $ntype);
$options = array('' => '::select an option::');
/* recupera dados */
$sql = "select * from (" . $param[2] . ") as tabela ";
$CI =& get_instance();
$query = $CI->db->query($sql);
foreach ($query->result_array() as $row) {
/* recupera ID */
//.........这里部分代码省略.........
示例13: utf8_decode
////////////////////////////// Variaveis iniciais
$pdf->SetFont('Arial', 'B', 14);
$pdf->MultiCell(0, 6, utf8_decode(msg('dictamen_number')) . ' ' . $nrp, 1, 'C');
$pdf->Ln(6);
$pdf->SetFont('Arial', 'B', 16);
$decision = msg('pm_' . trim($line['pr_situacao']));
$pdf->MultiCell(0, 6, utf8_decode(msg('decision_oficial')) . ': ' . $decision, 0, 'C');
$pdf->Ln(6);
/* titulo do projeto */
$pdf->SetFont('Arial', '', 8);
$pdf->Cell(35, 6, utf8_decode(msg('dictamen_project_title')), T, T, 'R');
$pdf->SetFont('Arial', 'B', 11);
$titulo = trim($line['cep_titulo']);
$titulo = troca($titulo, chr(13), ' ');
$titulo = troca($titulo, chr(10), ' ');
$titulo = troca($titulo, ' ', ' ');
$pdf->MultiCell(0, 5, utf8_decode($titulo), LT, 'L');
/* Inverstigador */
$pdf->SetFont('Arial', '', 8);
$pdf->Cell(35, 6, utf8_decode(msg('dictamen_investigador')), T, T, 'R');
$pdf->SetFont('Arial', 'B', 11);
$nome = trim($line['us_nome']) . chr(13) . chr(10);
$nome .= trim($line['us_instituition']);
$pdf->MultiCell(0, 6, utf8_decode($nome), TL, 'L');
/* Pais do Estudo */
$pdf->SetFont('Arial', '', 8);
$pdf->Cell(35, 6, utf8_decode(msg('dictamen_country')), T, T, 'R');
$pdf->SetFont('Arial', 'B', 11);
$nome = trim($line['pais_nome']);
$pdf->MultiCell(0, 6, utf8_decode($nome), TL, 'L');
/* Tipo do Estudo */
示例14: sql_convert
function sql_convert($sql)
{
if (strpos($sql, 'serial NOT NULL') > 0) {
$posi = strpos($sql, '(');
$posf = strpos($sql, 'serial NOT NULL');
$key = trim(substr($sql, $posi + 1, $posf - $posi - 1));
$sql = troca($sql, 'serial NOT NULL', ' int PRIMARY KEY IDENTITY ');
// $sql = substr($sql,0,strlen($sql)-2);
// $sql .= ", PRIMARY KEY($key) );";
$sql = troca($sql, 'int(1)', 'int');
$sql = troca($sql, 'int(4)', 'int');
$sql = troca($sql, 'int(8)', 'int');
$sql = troca($sql, 'int(16)', 'int');
$sql = troca($sql, 'int(11)', 'int');
}
return $sql;
}
示例15: array_push
array_push($cp, array('$H8', 'doc_type', '', False, True));
array_push($cp, array('$H8', 'doc_xml', '', False, True));
array_push($cp, array('$H8', 'doc_caae', '', False, True));
$tela = $form->editar($cp, $tabela);
if ($form->saved > 0) {
if (round($protocolo) == 0) {
$proj->updatex();
$sql = "select * from " . $proj->tabela . " where doc_autor_principal = '" . trim($ss->user_codigo) . "' \n\t\t\t\t\tand doc_status = '@' order by id_doc desc ";
$rlt = db_query($sql);
if ($line = db_read($rlt)) {
$_SESSION['proj_id'] = $line['id_doc'];
$_SESSION['proj_page'] = 1;
$pt = strzero($_SESSION['proj_id'], 7);
$at = $line['doc_autor_principal'];
} else {
echo msg('ERRO-SAVE_NEW_PROJET');
exit;
}
/* Incluir o pesquisador principal */
$proj->inserir_pesquisador_autor($pt, $at);
}
$_SESSION['proj_page'] = 2;
redirecina('submit.php?time' . date("dmYhis"));
} else {
echo $tela;
}
$dd5 = troca(msg('title_main_inf'), chr(13), '');
$dd5 = troca($dd5, chr(10), '');
$dd7 = troca(msg('title_public_inf'), chr(13), '');
$dd7 = troca($dd7, chr(10), '');