Exemplo n.º 1
0
function xss_security_post($s)
{
    $s = troca($s, '<', '&lt;');
    $s = troca($s, '>', '&gt;');
    $s = troca($s, '"', '&quot;');
    //$s = troca($s,'/','&#x27;');
    $s = troca($s, "'", '&#x2F;');
    return $s;
}
Exemplo n.º 2
0
 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, '&amp;', '[XXX]');
     //$xml = troca($xml,'<','&lt;');
     //$xml = troca($xml,'>','&gt;');
     $xml = troca($xml, '&', '&amp;');
     $xml = troca($xml, '[XXX]', '&amp;');
     return $xml;
 }
Exemplo n.º 3
0
 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;
     }
 }
Exemplo n.º 4
0
 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;
 }
Exemplo n.º 5
0
    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 */
            case 'DECLA':
                $sx .= $this->type_DECLA();
                break;
                /* Checkbox */
            /* Checkbox */
            case 'C':
                $sx .= '<TR><TD colspan=2>' . $this->type_C() . $this->caption;
                break;
                /* Checkbox */
            /* Checkbox */
            case 'CAPTC':
                $sx .= '<TR><TD><TD colspan=1>' . $this->caption . '<BR>' . $this->type_captcha() . '<BR>';
                $sx .= '
									<input 
										type="text" name="' . $this->name . '" 
										value = ""
										maxlength="8" 
										class="' . $this->class_captcha . '" 
										id="' . $this->name . '"
										placeholder="' . $this->caption_placeholder . '"
										' . $this->readonly . ' ' . $style . '
					 					/>' . chr(13);
                $sx .= $this->requerido();
                break;
                /* Date */
            /* Date */
            case 'D':
                $sx .= $sh . $this->type_D();
                break;
                /* EAN13 */
            /* EAN13 */
            case 'EAN':
                $sx .= $sh . $this->type_EAN(0);
                break;
                /* EMAIL */
            /* EMAIL */
            case 'EMAIL':
                $sx .= $sh . $this->type_EMAIL(0);
                break;
            case 'EMAIL_UNIQUE':
                $sx .= $sh . $this->type_EMAIL(1);
                break;
                /* Funcoes adicionais */
            /* Funcoes adicionais */
            case 'FC':
                $this->par = substr($cp[0], 3, strlen($cp[0]));
                if ($this->par == '001') {
                    $sx .= function_001();
                }
                if ($this->par == '002') {
                    $sx .= function_002();
                }
                if ($this->par == '003') {
                    $sx .= function_003();
                }
                if ($this->par == '004') {
                    $sx .= function_004();
                }
                if ($this->par == '005') {
                    $sx .= function_005();
                }
                if ($this->par == '006') {
                    $sx .= function_006();
                }
                if ($this->par == '007') {
                    $sx .= function_007();
                }
                if ($this->par == '008') {
                    $sx .= function_008();
                }
                if ($this->par == '009') {
                    $sx .= function_009();
                }
                if ($this->par == '010') {
                    $sx .= function_010();
                }
                if ($this->par == '011') {
                    $sx .= function_011();
                }
                break;
                /* Files */
            /* Files */
            case 'FILES':
                $sx .= '<TD>';
                $sx .= $ged->file_list();
                $sx .= $ged->upload_botton_with_type($ged->protocolo, '', '');
                break;
                /* KeyWord */
            /* KeyWord */
            case 'KEYWO':
                $sx .= $sh . $this->type_KEYWORDS();
                break;
                /* Hidden */
            /* Hidden */
            case 'H':
                $sx .= $this->type_H();
                break;
                /* Hidden with value */
            /* Hidden with value */
            case 'HV':
                $sx .= $this->type_HV();
                break;
                /* Inteiro */
            /* Inteiro */
            case 'I':
                $sx .= $sh . $this->type_I();
                break;
                /* MEnsagens */
            /* MEnsagens */
            case 'M':
                $sx .= $this->type_M();
                break;
                /* Valor com dias casas */
            /* Valor com dias casas */
            case 'N':
                $sx .= $sh . $this->type_N();
                break;
                /* Options */
            /* Options */
            case 'O':
                $this->par = substr($cp[0], 2, strlen($cp[0]));
                $sx .= $sh . $this->type_O();
                break;
                /* String Simple */
            /* String Simple */
            case 'P':
                $sx .= $sh . $this->type_P();
                break;
                /* Query */
            /* Query */
            case 'Q':
                $this->par = splitx(':', substr($cp[0], 2, strlen($cp[0])));
                $sx .= $sh . $this->type_Q();
                break;
                /* Radio box */
            /* Radio box */
            case 'R':
                $this->par = substr($cp[0], 2, strlen($cp[0]));
                $sx .= '<TD colspan=2 >' . $this->caption . ': ' . $this->type_R();
                break;
                /* String Simple */
            /* String Simple */
            case 'S':
                $sx .= $sh . $this->type_S();
                break;
                /* Text area */
            /* Text area */
            case 'T':
                $this->cols = sonumero(substr($cp[0], 0, strpos($cp[0], ':')));
                $this->rows = sonumero(substr($cp[0], strpos($cp[0], ':'), 100));
                $sx .= '<TD align="right">' . $this->caption . '<TD>' . $this->type_T();
                break;
                /* String Simple */
            /* String Simple */
            case 'TOKEN':
                $sx .= $this->type_TOKEN();
                break;
                /* String Ajax */
            /* String Ajax */
            case 'SA':
                $sx .= $sh . $this->type_SA();
                break;
                /* Update */
            /* Update */
            case 'U':
                $sx .= $sh . $this->type_U();
                break;
                /* Estados */
            /* Estados */
            case 'UF':
                $sx .= $sh . $this->type_UF();
                break;
            case 'RT':
                /* Editor de texto rico (Rich Text) */
            /* Editor de texto rico (Rich Text) */
            case 'ARV':
                /* Arvore com checkboxes */
            /* Arvore com checkboxes */
            case 'ATAGS':
                /* Textarea com autocomplete de tags */
                $params = $this->_cp_get_params($cp);
                $sx .= $sh . call_user_func_array(array(&$this, 'type_' . $i), $params);
                break;
        }
        return $sx;
    }
Exemplo n.º 6
0
    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';
        }
        if (substr($type, 0, 3) == '$SW') {
            $tt = 'SW';
        }
        if (substr($type, 0, 3) == '$HV') {
            $tt = 'HV';
        }
        if (substr($type, 0, 5) == '$LINK') {
            $tt = 'LINK';
        }
        if (substr($type, 0, 3) == '$AA') {
            $tt = 'AA';
        }
        /* 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) {
            case '{':
                $tela .= $tr;
                $tela .= '<td colspan=2>';
                $tela .= '<fieldset class="border1"><legend class="lt3 bold">' . $label . '</legend>';
                $tela .= '<table width="100%" class="tabela00">';
                break;
            case '}':
                $tela .= '</table>';
                $tela .= '</fieldset>';
                $tela .= '</td></tr>';
                $tela .= '<table width="100%" id="row">';
                $tela .= '</td></tr>';
                break;
                /* Select Box */
            /* Select Box */
            case '[':
                $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 };
										}));
									}, "json");
								}, 
                        select: function( event, ui ) {
                            $( "#' . $dn . 'a" ).val( ui.item.label );
                            $( "#' . $dn . '" ).val( ui.item.value );
                            return false;
							} ,	minLength: 4, autofocus: true });
						});
				</script>
				';
                break;
                /* Button */
            /* Button */
            case 'B':
                $tela .= $tr . $tdl . $td;
                $dados = array('name' => 'acao', 'id' => 'acao', 'value' => $label, 'class' => 'form_submit');
                $tela .= form_submit($dados);
                $tela .= $tdn . $trn;
                break;
            case 'C':
                /* TR da tabela */
                $tela .= $tr;
                $dados = array('name' => $dn, 'id' => $dn, 'value' => '1', 'class' => 'onoffswitch-checkbox');
                if ($readonly == false) {
                    $dados['readonly'] = 'readonly';
                }
                $tela .= '<td align="right">' . form_checkbox($dados, 'accept', $vlr);
                /* label */
                if (strlen($label) > 0) {
                    $tela .= '<td>' . $label . ' ';
                }
                if ($required == 1) {
                    $tela .= ' <font color="red">*</font> ';
                }
                $tela .= $tdn . $trn;
                break;
                /* Oculto */
            /* Oculto */
            case 'H':
                $dados = array($dn => $vlr);
                $tela .= form_hidden($dados);
                break;
            case 'HV':
                $vlr = $cp[2];
                $dados = array($dn => $vlr);
                $tela .= '<input type="hidden" name="' . $dn . '" id="' . $dn . '" value="' . $vlr . '">' . cr();
                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';
                } else {
                    $vlr = sonumero($vlr);
                }
                $tela .= '<TD>';
                $tela .= form_dropdown($dados, $options, $vlr);
                break;
                /* Select Box */
            /* Select Box */
            case 'O':
                $ntype = trim(substr($type, 2, strlen($type)));
                $ntype = troca($ntype, '&', ';') . ';';
                $param = splitx(';', $ntype);
                $options = array('' => '::select an option::');
                for ($r = 0; $r < count($param); $r++) {
                    if (count(trim($param[$r])) > 0) {
                        $nterm = splitx(':', $param[$r] . ':');
                        $key = $nterm[0];
                        $valor = $nterm[1];
                        $options[$key] = $valor;
                    }
                }
                /* 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 */
            /* 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 order by " . $param[1];
                $CI =& get_instance();
                $query = $CI->db->query($sql);
                foreach ($query->result_array() as $row) {
                    /* recupera ID */
                    $flds = trim($param[0]);
                    $vlrs = trim($param[1]);
                    $flds = $row[$flds];
                    $vlrs = $row[$vlrs];
                    $options[$flds] = $vlrs;
                }
                $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;
                /* String */
            /* String */
            case 'R':
                $ntype = trim(substr($type, 2, strlen($type)));
                $ntype = troca($ntype, '&', ';') . ';';
                $param = splitx(';', $ntype);
                $form = '<table width="100%" border=0>';
                for ($r = 0; $r < count($param); $r++) {
                    if (count(trim($param[$r])) > 0) {
                        $nterm = splitx(':', $param[$r] . ':');
                        $key = $nterm[0];
                        $valor = $nterm[1];
                        $options[$key] = $valor;
                        $checked = false;
                        if ($key == $vlr) {
                            $checked = true;
                        }
                        $dados = array('name' => $dn, 'id' => $dn, 'value' => $key, 'class' => 'form_select', 'checked' => $checked);
                        $form .= '<tr valign="top"><td>' . form_radio($dados) . '</td>';
                        $form .= '<td class="form_radio">' . $valor . '</td>';
                        $form .= '</tr>';
                    }
                }
                $form .= '</table>';
                /* recupera dados */
                $tela .= $tr;
                /* label */
                if (strlen($label) > 0) {
                    $tela .= $tdl . $label . ' ';
                }
                if ($required == 1) {
                    $tela .= ' <font color="red">*</font> ';
                }
                $tela .= '<TD>';
                //$tela .= form_radio($dados, $options, $vlr);
                $tela .= $form;
                break;
                /* String */
            /* String */
            case 'D':
                /* 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, 'id' => $dn, 'value' => $vlr, 'maxlenght' => 12, 'size' => 12, 'placeholder' => $label, 'class' => 'form_string date');
                if ($readonly == false) {
                    $dados['readonly'] = 'readonly';
                }
                $tela .= $td . form_input($dados) . ' (dd/mm/yyyy)';
                $tela .= $tdn . $trn;
                $tela .= '
				  <script>
				  $(function() {
				    $( "#' . $dn . '" ).datepicker();
				  });
				  </script>
				';
                break;
                /* String */
            /* String */
            case 'LINK':
                /* 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, 'id' => $dn, 'value' => $vlr, 'maxlenght' => $max, 'size' => $size, 'placeholder' => $label, 'class' => 'form_string');
                if ($readonly == false) {
                    $dados['readonly'] = 'readonly';
                }
                $tela .= $td . form_input($dados);
                $tela .= $tdn . $trn;
                break;
            case 'M':
                /* TR da tabela */
                $tela .= $tr;
                /* label */
                $tela .= '<td colspan=2>' . '<span class="lt1">' . $label . '</span>';
                $tela .= $tdn . $trn;
                break;
                /* form_number */
            /* form_number */
            case 'N':
                /* 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, 'id' => $dn, 'value' => $vlr, 'maxlenght' => 15, 'size' => 15, 'placeholder' => $label, 'class' => 'form_string money');
                if ($readonly == false) {
                    $dados['readonly'] = 'readonly';
                }
                $tela .= $td . form_input($dados);
                $tela .= $tdn . $trn;
                break;
                /* String */
            /* String */
            case 'S':
                /* TR da tabela */
                $tela .= $tr;
                /* label */
                if (strlen($label) > 0) {
                    $tela .= $tdl . $label . ' ';
                }
                if ($required == 1) {
                    $tela .= ' <font color="red">*</font> ';
                }
                $size = sonumero($type);
                $dados = array('name' => $dn, 'id' => $dn, 'value' => $vlr, 'maxlenght' => $max, 'size' => $size, 'placeholder' => $label, 'class' => 'form_string');
                if ($readonly == false) {
                    $dados['readonly'] = 'readonly';
                }
                $tela .= $td . form_input($dados);
                $tela .= $tdn . $trn;
                break;
            case 'SW':
                /* TR da tabela */
                $tela .= $tr;
                $checked = False;
                /* label */
                $tela .= ' <td class="lt4" colspan=2>
						<table>
							<tr>
								<td>
								<div class="onoffswitch">
									';
                /* cehcked */
                if (trim($vlr) == '1') {
                    $checked = True;
                }
                /* Monta lista */
                $data = array('name' => $dn, 'checked' => $checked, 'class' => 'onoffswitch-checkbox', 'id' => $dn, 'value' => '1');
                $tela .= form_checkbox($data);
                $tela .= ' <label class="onoffswitch-label" for="' . $dn . '"> <span class="onoffswitch-inner"></span> <span class="onoffswitch-switch"></span> </label>
								</div></td><td class="lt2"> ' . $label . ' </td>
							</tr>
						</table></td></tr>';
                break;
                /* Update */
            /* Update */
            case 'U':
                if (round($vlr) == 0) {
                    $vlr = date("Y-m-d");
                }
                $dados = array($dn => $vlr);
                $tela .= form_hidden($dados);
                break;
                /* Textarea */
            /* Textarea */
            case 'T':
                $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> ';
                }
                $data = array('name' => $dn, 'id' => $dn, 'value' => $vlr, 'rows' => $param[1], 'cols' => $param[0], 'class' => 'form_textarea');
                $tela .= $td . form_textarea($data);
                $tela .= $tdn . $trn;
                break;
                /* Password */
            /* Password */
            case 'P':
                if (strlen($label) > 0) {
                    $tela .= $label . ' ';
                }
                $dados = array('name' => $dn, 'id' => $dn, 'value' => $vlr, 'maxlenght' => $max, 'size' => $size);
                $tela .= form_password($dados);
                break;
        }
        $ddi++;
        return $tela;
    }
Exemplo n.º 7
0
        $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>';
Exemplo n.º 8
0
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>';
Exemplo n.º 9
0
<?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>';
Exemplo n.º 10
0
    /**
     * 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 {
                    $page_banco = array();
                }
                $pages = ' array(';
                $i = 0;
                foreach ($page_banco as $key => $value) {
                    if ($i > 0) {
                        $pages .= ', ';
                    }
                    $pages .= "'{$key}' => '{$value}' ";
                    $i++;
                }
                $pages .= ')';
                $sx .= "             '" . trim($xline['msg_field']) . "'=>'" . trim($xline['msg_content']) . "' ";
                $sv .= "             '" . trim($xline['msg_field']) . "'=>" . $pages . " ";
                $it++;
                //echo '<BR>'.trim($xline['msg_field']);
                echo '. ';
            }
            echo '</table>';
            $sx .= $cr . ')';
            $sx .= '); ';
            $sx .= $cr;
            $sv .= $cr . ')';
            $sv .= '); ';
            $sv .= $cr;
            /* Salvar arquivo */
            $arq = 'messages/msg_' . trim($pags[$ro]);
            $fld = fopen($arq . '.php', 'w+');
            fwrite($fld, $sx);
            fwrite($fld, $sv);
            fwrite($fld, '?>');
            fclose($fld);
        }
        /* XML */
        $arq = 'messages/msg.xml';
        $domtree->save($arq);
    }
Exemplo n.º 11
0
 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;
     }
 }
Exemplo n.º 12
0
 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 */
                 $flds = trim($param[0]);
                 $vlrs = trim($param[1]);
                 $flds = $row[$flds];
                 $vlrs = $row[$vlrs];
                 $options[$flds] = $vlrs;
             }
             $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;
             /* String */
         /* String */
         case 'S':
             /* 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, 'id' => $dn, 'value' => $vlr, 'maxlenght' => $max, 'size' => $size, 'placeholder' => $label, 'class' => 'form_string');
             if ($readonly == false) {
                 $dados['readonly'] = 'readonly';
             }
             $tela .= $td . form_input($dados);
             $tela .= $tdn . $trn;
             break;
             /* Update */
         /* Update */
         case 'U':
             if (round($vlr) == 0) {
                 $vlr = date("Ymd");
             }
             $dados = array($dn => $vlr);
             $tela .= form_hidden($dados);
             break;
             /* Textarea */
         /* Textarea */
         case 'T':
             $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> ';
             }
             $data = array('name' => $dn, 'id' => $dn, 'value' => $vlr, 'rows' => $param[1], 'cols' => $param[0], 'class' => 'form_textarea');
             $tela .= $td . form_textarea($data);
             $tela .= $tdn . $trn;
             break;
             /* Password */
         /* Password */
         case 'P':
             if (strlen($label) > 0) {
                 $tela .= $label . ' ';
             }
             $dados = array('name' => $dn, 'id' => $dn, 'value' => $vlr, 'maxlenght' => $max, 'size' => $size);
             $tela .= form_password($dados);
             break;
     }
     $ddi++;
     return $tela;
 }
Exemplo n.º 13
0
////////////////////////////// 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 */
Exemplo n.º 14
0
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;
}
Exemplo n.º 15
0
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), '');
Exemplo n.º 16
0
		border: 1px solid Gray;
		padding: 1px 1px 1px 1px;
		text-align: left;
		text-decoration: none;
		font-family: Verdana, Geneva, Arial, Helvetica, sans-serif;
		font-size: 12px;
		font-weight: normal;
		letter-spacing: 0px;
	}
</style>
';
$page = page();
if (strlen($http_redirect) > 0) {
    global $dd, $base;
    $pg_cookie = $page;
    $pg_cookie = troca($pg_cookie, '.php', '');
    /******** Salva Session */
    /* Filtro ativado */
    if (strlen($dd[50]) > 0) {
        if (substr($dd[50], 0, 1) == 'c') {
            $_SESSION[$page . '_filtro'] = '';
            $_SESSION[$page . '_pos'] = '';
            $_SESSION[$page . '_ordem'] = '';
            $dd[1] = '';
            $dd[4] = '';
            $clean = 0;
        } else {
            if (strlen($dd[1]) > 0) {
                $_SESSION[$page . '_filtro'] = $dd[1];
                $_SESSION[$page . '_field'] = $dd[2];
                $_SESSION[$page . '_pos'] = $dd[4];
Exemplo n.º 17
0
    function mostra($data = 0, $page = 6)
    {
        global $institution_name, $institution_site;
        $data = round($data);
        $sql = "select * from cep_protocolos\n\t\t\t\t\tleft join usuario on cep_pesquisador = us_codigo\n\t\t\t\t\twhere cep_reuniao = {$data}\n\t\t\t\t\torder by cep_caae , cep_data\n\t\t\t\t";
        $rlt = db_query($sql);
        $link = '<A href="javascript:newxy2(\'meeting_schediled_popup.php?dd1=' . $data . '&dd2=' . $page . '\',800,600);">';
        $sh = '<table bgcolor="white" class="tabela00" 
						cellpadding=0 cellspacing=0 width="100%" 
						border=0>';
        $sh .= '<TR valign="top">
						<TD colspan=1 rowspan=2 width="10%">';
        $sh .= '<img src="img/logo_dictamen.jpg">';
        $sh .= '<TD colspan=2><center><B>' . $institution_name . '</B>';
        $sh .= '<BR>' . $institution_site;
        $sh .= '</center>';
        $sh .= '<div id="icone_pr">' . $link . '<img src="img/icone_print.png" width="48" border=0></A></div>';
        $sh .= '<TR><TD>';
        $sh .= '<div class="lt0" style="text-align: right">page</div>';
        $sh .= '</table>';
        /* Dados da pauta */
        $sh .= '<table class="table_proj tabela00" width="100%" border=0>';
        $sh .= '<TR><TD colspan=4><h2><center>' . msg("scheduled_meeting") . ' - ' . stodbr($data) . '</center></h2>';
        $sh .= '<TR>
						<TH width="10%">' . msg('protocol');
        $sh .= '<TH width="80%" colspan=2>' . msg('project_title');
        $sh .= '<TH width="10%">' . msg('results');
        $sx = '';
        $tot = 99;
        $totr = 0;
        $pag = 1;
        while ($line = db_read($rlt)) {
            if ($tot + 1 > $page) {
                $tot = 0;
                if ($pag > 1) {
                    $sx .= '</table>';
                    $sx .= '<p style="page-break-before: always;"></p>';
                }
                $sx .= troca($sh, 'page', 'p. ' . $pag);
                $pag++;
            }
            $tot++;
            $totr++;
            $sx .= '<TR valign="top" class="tabela01">';
            /* NR caae */
            $sx .= '<TD rowspan=2>
								<font class="lt1"><B>' . $line['cep_caae'] . '</B>' . '</font>';
            $sx .= '<BR>' . msg('version') . ' ' . $line['cep_versao'];
            $sx .= '<BR><center><font class="lt0">' . stodbr($line['cep_data']) . '</font></center>';
            /* Project title */
            $sx .= '<TD colspan=2><B>' . $line['cep_titulo'] . '</B>';
            /* Decision */
            $sx .= '<TD rowspan=2 width="60"><center>' . msg('decision');
            $sx .= '<table border=1 width=80%>
									<TR><TD height="30">&nbsp;</table>';
            $sx .= '<TR>';
            $sx .= '<TD colspan=2>' . msg('investigador') . ': <B>' . $line['us_nome'];
            $sx .= '</B> - ' . $line['us_instituition'];
            $sx .= '<BR>&nbsp;';
        }
        $sx .= '<TR><TD colspan=3>' . msg('found') . ' ' . $totr . ' ' . msg('register');
        $sx .= '</table>';
        $sx .= show_logo();
        return $sx;
    }
Exemplo n.º 18
0
 function config_file()
 {
     $ip = $_SERVER['HTTP_HOST'];
     $ip = troca($ip, '.', '_');
     $ip = troca($ip, ':', '_');
     $file = 'db_' . $ip . '.php';
     return $file;
 }
Exemplo n.º 19
0
$botton_submit = 0;
$xcdo = "X";
$se = '';
while ($line = db_read($rlt)) {
    /* Dados do campos de edicao */
    $name_id = $line['sub_codigo'];
    $s .= '<A NAME="' . $name_id . '"></A>';
    if ($xcod != $name_id) {
        $xcod = $name_id;
        /* Recupera dados gravados se nao tem acao */
        if (strlen($acao) == 0) {
            $value = trim($line['spc_content']);
        } else {
            $value = trim($_POST['dd' . $name_id]);
        }
        $value = troca($value, "'", "´");
        /* Dados do campos de edicao */
        $CP1 = trim($line['sub_field']);
        $CP2 = msg(trim($line['sub_descricao']));
        $CP2a = $CP2;
        $mmm = trim(trim($line['sub_descricao']) . '_inf');
        $mmm = msg($mmm);
        /* Se for botão anula mensagem de informação */
        if (substr($CP1, 0, 2) == '$B') {
            $mmm = '';
        }
        if (strpos($mmm, '_inf') > 0) {
            $mmm = '';
        }
        $CP3 = '';
        /* Armazena para gravacao dados ja inseridos */
Exemplo n.º 20
0
Arquivo: db.php Projeto: GCPUCPR/CsF
define(path,''.$_SERVER['PATH_INFO']);
define(host,getServerHost());
define(secu,'ojsbr');
$path = substr(path,1,100);
$charset = "ASCII";


//-------------------------------------- Leituras das Variaveis dd0 a dd99 (POST/GET)
$vars = array_merge($_GET, $_POST);
for ($k=0;$k < 100;$k++)
	{
	$varf='dd'.$k;
	$varf=$vars[$varf];
	//if (isset($varf) and ($k > 1)) {	//$varf = str_replace($varf,"A","�"); }
	$varf = troca($varf,chr(92),'');
	$dd[$k] = troca($varf,"'","�");
	}
$acao = $vars['acao'];
$nocab = $vars['nocab'];
$base = 'pgsql';


$http = 'http://www2.pucpr.br/reol/';

//-------------------------------------- Determina o Idioma de Navega��o
$idv = $vars['idioma'];
if (strlen($idv) > 0)
	{
	$_SESSION["idioma"] = $idv;

	$idioma = $idv;
Exemplo n.º 21
0
 function confirm_notify_by_email()
 {
     global $LANG, $hd;
     $email_cep = $hd->email_replay;
     $email_nome = $hd->title;
     $ic = new ic();
     $ic = $ic->ic('email_notify_subm');
     $this->le($this->protocolo_cep);
     $sx = $this->mostra_email($this->line);
     $texto = mst(utf8_decode($ic['text']));
     $subject = utf8_decode($ic['title']);
     $texto = troca($texto, '$INFORMACION_DEL_PROTOCOLO', $sx);
     $texto = troca($texto, '$PROTOCOL_INFORMATION', $sx);
     $texto = troca($texto, '$TITLE', $sx);
     $texto = troca($texto, '$INFORMACION_DEL_COMITTE', $sx);
     $texto = troca($texto, '$COMMITTEE_INFORMATION', $sx);
     $emails = array();
     array_push($emails, $email_cep);
     for ($r = 0; $r < count($emails); $r++) {
         $email = $emails[$r];
         //echo '<BR>'.msg('send_to_email').':'.$email;
         enviaremail($email, '', $subject, $texto);
     }
 }
Exemplo n.º 22
0
// 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
require 'db.php';
// PHP5 Implementation - uses MySQLi.
// mysqli('localhost', 'yourUsername', 'yourPassword', 'yourDatabase');
// Is there a posted query string?
if (isset($_POST['queryString'])) {
    $queryString = troca($_POST['queryString'], "'", "´");
    // Is the string length greater than 0?
    if (strlen($queryString) > 0) {
        // Run the query: We use LIKE '$queryString%'
        // The percentage sign is a wild-card, in my example of countries it works like this...
        // $queryString = 'Uni';
        // Returned data = 'United States, United Kindom';
        // YOU NEED TO ALTER THE QUERY TO MATCH YOUR DATABASE.
        // eg: SELECT yourColumnName FROM yourTable WHERE yourColumnName LIKE '$queryString%' LIMIT 10
        $sql = "SELECT it_nome FROM institutions WHERE it_nome LIKE '{$queryString}%' LIMIT 10";
        $rlt = db_query($sql);
        while ($line = db_read($rlt)) {
            echo '<li onClick="fill(\'' . $result->it_nome . '\');">' . $result->it_nome . '</li>';
        }
    }
}
Exemplo n.º 23
0
 function update11()
 {
     $up = 0;
     $new = 0;
     $filename = "_documents/ged_download_fld.php.xml";
     $sql = "delete from cep_submit_manuscrito_field ";
     $rlt = db_query($sql);
     $xml = "";
     $f = fopen($filename, 'r');
     while ($data = fread($f, 4096)) {
         $xml .= $data;
     }
     fclose($f);
     preg_match_all("/\\<reg\\>(.*?)\\<\\/reg\\>/s", $xml, $bookblocks);
     foreach ($bookblocks[1] as $block) {
         //$block = utf8_encode($block);
         $block = troca($block, '[e]', '&');
         preg_match_all("/\\<sub_pos\\>(.*?)\\<\\/sub_pos\\>/", $block, $sub_pos);
         preg_match_all("/\\<sub_field\\>(.*?)\\<\\/sub_field\\>/", $block, $sub_field);
         preg_match_all("/\\<sub_css\\>(.*?)\\<\\/sub_css\\>/", $block, $sub_css);
         preg_match_all("/\\<sub_descricao\\>(.*?)\\<\\/sub_descricao\\>/", $block, $sub_descricao);
         preg_match_all("/\\<sub_ativo\\>(.*?)\\<\\/sub_ativo\\>/", $block, $sub_ativo);
         preg_match_all("/\\<sub_codigo\\>(.*?)\\<\\/sub_codigo\\>/", $block, $sub_codigo);
         preg_match_all("/\\<sub_informacao\\>(.*?)\\<\\/sub_informacao\\>/", $block, $sub_informacao);
         preg_match_all("/\\<sub_projeto_tipo\\>(.*?)\\<\\/sub_projeto_tipo\\>/", $block, $sub_projeto_tipo);
         preg_match_all("/\\<sub_ordem\\>(.*?)\\<\\/sub_ordem\\>/", $block, $sub_ordem);
         preg_match_all("/\\<sub_pag\\>(.*?)\\<\\/sub_pag\\>/", $block, $sub_pag);
         preg_match_all("/\\<sub_obrigatorio\\>(.*?)\\<\\/sub_obrigatorio\\>/", $block, $sub_obrigatorio);
         preg_match_all("/\\<sub_editavel\\>(.*?)\\<\\/sub_editavel\\>/", $block, $sub_editavel);
         preg_match_all("/\\<sub_pdf_title\\>(.*?)\\<\\/sub_pdf_title\\>/", $block, $sub_pdf_title);
         preg_match_all("/\\<sub_pdf_mostra\\>(.*?)\\<\\/sub_pdf_mostra\\>/", $block, $sub_pdf_mostra);
         preg_match_all("/\\<sub_pdf_align\\>(.*?)\\<\\/sub_pdf_align\\>/", $block, $sub_pdf_align);
         preg_match_all("/\\<sub_pdf_font_size\\>(.*?)\\<\\/sub_pdf_font_size\\>/", $block, $sub_pdf_font_size);
         preg_match_all("/\\<sub_pdf_space\\>(.*?)\\<\\/sub_pdf_space\\>/", $block, $sub_pdf_space);
         preg_match_all("/\\<sub_limite\\>(.*?)\\<\\/sub_limite\\>/", $block, $sub_limite);
         preg_match_all("/\\<sub_caption\\>(.*?)\\<\\/sub_caption\\>/", $block, $sub_caption);
         preg_match_all("/\\<sub_id\\>(.*?)\\<\\/sub_id\\>/", $block, $sub_id);
         $_sub_pos = $sub_pos[1][0];
         $_sub_field = $sub_field[1][0];
         $_sub_css = $sub_css[1][0];
         $_sub_descricao = $sub_descricao[1][0];
         $_sub_ativo = $sub_ativo[1][0];
         $_sub_codigo = $sub_codigo[1][0];
         $_sub_pag = $sub_pag[1][0];
         $_sub_obrigatorio = $sub_obrigatorio[1][0];
         $_sub_editavel = $sub_editavel[1][0];
         $_sub_informacao = $sub_informacao[1][0];
         $_sub_projeto_tipo = $sub_projeto_tipo[1][0];
         $_sub_ordem = $sub_ordem[1][0];
         $_sub_pdf_title = $sub_pdf_title[1][0];
         $_sub_pdf_mostra = $sub_pdf_mostra[1][0];
         $_sub_pdf_align = $sub_pdf_align[1][0];
         $_sub_pdf_font_size = $sub_pdf_font_size[1][0];
         $_sub_pdf_space = $sub_pdf_space[1][0];
         $_sub_limite = $sub_limite[1][0];
         $_sub_caption = $sub_caption[1][0];
         $_sub_id = $sub_id[1][0];
         $sql = "insert cep_submit_manuscrito_field \n\t\t\t\t\t(\n\t\t\t\t\tsub_pos, sub_field, sub_css,\n\t\t\t\t\tsub_descricao, sub_ativo, sub_codigo,\n\t\t\t\t\tsub_pag, sub_obrigatorio, sub_editavel,\n\t\t\t\t\t\n\t\t\t\t\tsub_informacao, sub_projeto_tipo, sub_ordem,\n\t\t\t\t\tsub_pdf_title, sub_pdf_mostra, sub_pdf_align,\n\t\t\t\t\tsub_pdf_font_size, \tsub_pdf_space, sub_limite,\n\t\t\t\t\t\t\n\t\t\t\t\tsub_caption, sub_id)\n\t\t\t\t\tvalues\n\t\t\t\t\t(\n\t\t\t\t\t'{$_sub_pos}', '{$_sub_field}', '{$_sub_css}',\n\t\t\t\t\t'{$_sub_descricao}', '{$_sub_ativo}', '{$_sub_codigo}',\n\t\t\t\t\t'{$_sub_pag}', '{$_sub_obrigatorio}', '{$_sub_editavel}',\n\t\t\t\t\t\n\t\t\t\t\t'{$_sub_informacao}', '{$_sub_projeto_tipo}', '{$_sub_ordem}',\n\t\t\t\t\t'{$_sub_pdf_title}', '{$_sub_pdf_mostra}', '{$_sub_pdf_align}',\n\t\t\t\t\t'{$_sub_pdf_font_size}', \t'{$_sub_pdf_space}', '{$_sub_limite}',\n\t\t\t\t\t\t\n\t\t\t\t\t'{$_sub_caption}', '{$_sub_id}'\n\t\t\t\t\t)\n\t\t\t\t\t ";
         $RLT = db_query($sql);
         //exit;
         $new++;
     }
     if ($up + $new > 0) {
         echo '<br>' . msg('update') . ' 011 ' . msg('successful') . ' ' . $new . '/' . $up . ' updated';
     } else {
         echo '<br>' . msg('already update - 011');
     }
 }
Exemplo n.º 24
0
function LowerCaseSQL($d)
{
    $qch1 = "������������������������������������������������";
    $qch2 = "aeiouaeiouaeiouaeiouaeiouaeiouccaeiouaeiouaoaoao";
    for ($qk = 0; $qk < strlen($qch2); $qk++) {
        $d = troca($d, substr($qch1, $qk, 1), substr($qch2, $qk, 1));
    }
    $d = strtolower($d);
    return $d;
}
Exemplo n.º 25
0
// 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
/**
 * GED-ged_documento
 * @author Rene Faustino Gabriel Junior <*****@*****.**> (Analista-Desenvolvedor)
 * @copyright © Pan American Health Organization, 2013. All rights reserved.
 * @access public
 * @version v0.13.45
 * @package Class
 * @subpackage Ged
 */
require_once "_class/_class_ged.php";
$ged = new ged();
$path = $_SERVER['SCRIPT_FILENAME'];
$path = troca($path, page(), '') . 'document/';
$ged_up_path = $path;
$ged_up_maxsize = 1024 * 1024 * 2;
/* 10 Mega */
$ged_up_format = array('*');
$ged_up_month_control = 1;
$ged_up_doc_type = $tipo;
$ged_del = 'delete';
$ged_tabela = 'ged_documento';
$ged_up_format = array('.pdf', '.doc', '.docx', '.rdf', '.ocx', '.xls', '.xlsx', '.odt');
$ged = new ged();
$ged->up_maxsize = $ged_up_maxsize;
$ged->up_path = $ged_up_path;
$ged->up_format = $ged_up_format;
$ged->up_month_control = $ged_up_month_control;
$ged->up_doc_type = $ged_up_doc_type;
Exemplo n.º 26
0
function menus($menu, $tipo)
{
    global $acao, $dd, $tab_max, $uploaddir, $include;
    ///////////////////////////////////////////////////// redirecionamento
    if (isset($dd[1]) and strlen($dd[1]) > 0) {
        $col = 0;
        for ($k = 0; $k <= count($menu); $k++) {
            if ($dd[1] == CharE($menu[$k][1])) {
                header("Location: " . $menu[$k][2]);
            }
        }
    }
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    /////////////////////////////////// Tipo 1
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    if ($tipo == '1') {
        ?>
			<TABLE width="<?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
        echo $tab_max;
        ?>
" align="center" border="0">
			<TR><TD colspan="4">
				<FONT class="lt3">
				</FONT><FORM method="post" action="">
				</TD></TR>
			</TABLE>
			<TABLE width="<?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
        echo $tab_max;
        ?>
" align="center" border="0">
			<TR>
			<?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
        $xcol = 0;
        $seto = "X";
        for ($x = 0; $x <= count($menu); $x++) {
            if (isset($menu[$x][2])) {
                $xseto = $menu[$x][0];
                if (!($seto == $xseto)) {
                    echo '<TR><TD colspan="10">';
                    echo '<TABLE width="100%" cellpadding="0" cellspacing="0">';
                    echo '<TR><TD class="lt3" width="1%"><BR><NOBR><B><font color="#0000a0">' . $xseto . '&nbsp;</TD>';
                    echo '<TD><HR width="100%" size="2"></TD></TR>';
                    echo '</TABLE>';
                    echo '<TR class="lt3">';
                    $seto = $xseto;
                    $xcol = 0;
                }
                if ($xcol >= 3) {
                    echo '<TR><TD><img src="' . $img_dir . 'nada.gif" width="1" height="5" alt="" border="0"></TD><TR>';
                    $xcol = 0;
                }
                echo '<TD align="center">';
                echo '<input type="submit" name="dd1" value="' . CharE($menu[$x][1]) . '" ' . $estilo_admin . '>';
                echo '</TD>';
                $xcol = $xcol + 1;
            }
        }
        ?>
			</TABLE></FORM>		
			<?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
    }
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    /////////////////////////////////// Tipo 2
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    if ($tipo == '2') {
    }
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    /////////////////////////////////// Tipo 3
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    if ($tipo == '3') {
        $tps = 0;
        $seto = '';
        for ($x = 0; $x <= count($menu); $x++) {
            $xseto = $menu[$x][0];
            if (!($seto == $xseto)) {
                $tps++;
                $seto = $xseto;
            }
        }
        /////////////////////////////////
        $col = 0;
        $cola = 0;
        $mcol = intval($tps / 2);
        $cm1 = '';
        $cm2 = '';
        $seto = 'x';
        for ($x = 0; $x <= count($menu); $x++) {
            $xseto = $menu[$x][0];
            if (!($seto == $xseto)) {
                $cola++;
                if ($cola > $mcol) {
                    $col = 1;
                }
                $seto = lowercasesql($xseto);
                $seto = troca($seto, ' ', '_');
                $img_icone = 'img/icone_' . $seto . '.png';
                $updir = $_SERVER['SCRIPT_FILENAME'];
                $xx = strlen($updir);
                while ($xx > 0) {
                    if (substr($updir, $xx, 1) == '/') {
                        $updir = substr($updir, 0, $xx);
                        $xx = 0;
                    }
                    $xx--;
                }
                $image = trim($updir) . '/' . $img_icone;
                if (!file_exists($image)) {
                    $img_icone = $include . 'img/icone_noimage.png';
                }
                ////////////////////////////////////////////
                $sc = '<TR><TD colspan="10">';
                $sc .= '<TABLE width="100%" cellpadding="0" cellspacing="2" border="0"  class="menu_tit">';
                $sc .= '<TR><TD rowspan="2" width="48"><img src="' . $img_icone . '" width="48" height="48" alt=""></TD>';
                $sc .= '<TD width="80%"><BR><NOBR><B>' . $xseto . '&nbsp;</TD>';
                $sc .= '<TR><TD><HR width="100%" size="2"></TD></TR>';
                $sc .= '</TABLE>';
                $sc .= '<TR class="lt1"><TD><UL>';
                $seto = $xseto;
                $xcol = 0;
            } else {
                $sc = '';
            }
            if (isset($menu[$x][2])) {
                $link = '<A href="' . $menu[$x][2] . '" class="menu_item">';
                if (strlen(trim($menu[$x][2])) == 0) {
                    $link = '';
                }
                $pre = '';
                $pos = '';
                //////////////////////////////////////////////////////////////////////////// Título Em BOld
                if (substr($menu[$x][1], 0, 2) != '__' and strlen($link) == 0) {
                    $menu[$x][1] = '<B>' . $menu[$x][1] . '</B>';
                }
                if (substr($menu[$x][1], 0, 2) == '__') {
                    $menu[$x][1] = substr($menu[$x][1], 2, 100);
                    $pre = '<UL>';
                    $pos = '</UL>';
                }
                if ($col == 0) {
                    $cm1 .= $sc;
                    $cm1 .= $pre . '<LI class="menu_li">' . $link . $menu[$x][1] . '</A><BR>' . $pos;
                } else {
                    $cm2 .= $sc;
                    $cm2 .= $pre . '<LI class="menu_li">' . $link . $menu[$x][1] . '</A><BR>' . $pos;
                }
            }
        }
        $sm = '<TABLE width="' . $tab_max . '" border=0 align="center">';
        $sm .= '<TR valign="top">';
        $sm .= '<TD width="48%"><table width="100%">' . $cm1 . '</table></TD>';
        $sm .= '<TD width="4%"></TD>';
        $sm .= '<TD width="48%"><table width="100%">' . $cm2 . '</table></TD>';
        $sm .= '</TR>';
        $sm .= '</TABLE>';
        echo $sm;
    }
}
Exemplo n.º 27
0
function mst_autor($autor, $tp)
{
    if ($tp == 1 or $tp == 2) {
        $aut = array();
        $autor = $autor . chr(13);
        while (strpos($autor, chr(13)) > 0) {
            $wd = trim(substr($autor, 0, strpos($autor, chr(13))));
            if (strlen($wd) > 0) {
                array_push($aut, trim($wd) . ';');
            }
            $autor = substr($autor, strpos($autor, chr(13)) + 1, strlen($autor));
        }
        $autor = '';
        for ($qk = 0; $qk < count($aut); $qk++) {
            if (strlen($autor) > 0) {
                if ($tp == '1') {
                    $autor = $autor . ', ';
                }
                if ($tp == '2') {
                    $autor = $autor . '<BR>';
                }
            }
            $autor = $autor . substr($aut[$qk], 0, strpos($aut[$qk], ';'));
            if (strlen(substr($aut[$qk], strpos($aut[$qk], ';') + 1, 100)) > 0) {
                /* Qualificação */
                if ($tp == '2') {
                    $nx = substr($aut[$qk], strpos($aut[$qk], ';'), 100);
                    $nx = trim(troca($nx, ';', ''));
                    if (strlen($nx) > 0) {
                        $autor = $autor . '<sup>&nbsp;' . ($qk + 1) . '</sup>';
                    }
                }
            }
        }
        if (strlen($autor) > 0 and $tp == '1') {
            $autor = $autor . '. ';
        }
    }
    if ($tp == 3) {
        $aut = array();
        $autor = $autor . chr(13);
        while (strpos($autor, chr(13)) > 0) {
            $wd = trim(substr($autor, 0, strpos($autor, chr(13))));
            if (strlen($wd) > 0) {
                array_push($aut, $wd);
            }
            $autor = substr($autor, strpos($autor, chr(13)) + 1, strlen($autor));
        }
        $autor = '';
        for ($qk = 0; $qk < count($aut); $qk++) {
            if (strlen($autor) > 0) {
                $autor = $autor . '<BR>';
            }
            $mtautor = $aut[$qk];
            if (strpos($mtautor, ';') > 0) {
                $ntautor = ' ' . substr($mtautor, strpos($mtautor, ';') + 1, strlen($mtautor));
                if (strpos($ntautor, ';') > 0) {
                    $bmautor = "";
                    $btautor = substr($ntautor, strpos($ntautor, ';') + 1, strlen($ntautor));
                    if ($btautor == '[DIR]') {
                        $bmautor = "Diretor";
                    }
                    if ($btautor == '[POS]') {
                        $bmautor = "Aluno da Pós-Graduação";
                    }
                    if ($btautor == '[GRA]') {
                        $bmautor = "Aluno da Graduação";
                    }
                    if ($btautor == '[ORI]') {
                        $bmautor = "Orientador";
                    }
                    if ($btautor == '[COL]') {
                        $bmautor = "Colaborador";
                    }
                    if ($btautor == '[COO]') {
                        $bmautor = "Co-orientador";
                    }
                    if ($btautor == '[PUC]') {
                        $bmautor = "Bolsista PUCPR";
                    }
                    if ($btautor == '[CNPQ]') {
                        $bmautor = "Bolsista CNPQ";
                    }
                    if ($btautor == '[FA]') {
                        $bmautor = "Bolsista Fundação Araucária";
                    }
                    if ($btautor == '[ICV]') {
                        $bmautor = "ICV";
                    }
                    if (strlen($btautor . $bmautor) > 0) {
                        $autor = $autor . ($qk + 1) . ' ' . substr($ntautor, 0, strpos($ntautor, ';') - 1);
                        $autor = $autor . $bmautor;
                    }
                } else {
                    $autor = $autor . ($qk + 1) . ' ' . substr($ntautor, strpos($ntautor, ';') + 1, strlen($ntautor));
                }
            }
        }
    }
    return $autor;
}
Exemplo n.º 28
0
 function save_arq()
 {
     $sql = "select * from _committee limit 1";
     $rlt = db_query($sql);
     if ($line = db_read($rlt)) {
         $site = trim($line['cm_site']);
         $namei = trim($line['cm_name']);
         $name = trim($line['cm_admin_name']);
         $email = trim($line['cm_admin_email']);
         $addr = trim($line['cm_address']);
         $city = trim($line['cm_city']);
         $coun = trim($line['cm_country']);
         $phon = trim($line['cm_phone']);
         $code = trim($line['cm_committe']);
         $harvk = trim($line['cm_admin_key_harveting']);
         $harv = trim($line['cm_admin_key']);
         $chas = trim($line['cm_charcode']);
         $lang = trim($line['cm_language']);
         $type = trim($line['cm_type']);
     }
     $sx = "<?php\n// This file is part of the ProEthos Software. \n// \n// Copyright 2013, PAHO. All rights reserved. You can redistribute it and/or modify\n// ProEthos under the terms of the ProEthos License as published by PAHO, which\n// restricts commercial use of the Software. \n// \n// ProEthos is distributed in the hope that it will be useful, but WITHOUT ANY\n// WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A\n// PARTICULAR PURPOSE. See the ProEthos License for more details. \n// \n// You should have received a copy of the ProEthos License along with the ProEthos\n// Software. If not, see\n// https://raw.githubusercontent.com/bireme/proethos/master/LICENSE.txt\n\n\t\n\t\t\t\t#site='" . $site . "';\n\t\t\t\t#institution_name='" . $namei . "';\n\t\t\t\t#institution_site='" . $site . "';\n\t\t\t\t#institution_address='" . $addr . "';\n\t\t\t\t#institution_city='" . $city . "';\n\t\t\t\t#institution_country='" . $coun . "';\n\t\t\t\t#institution_phone='" . $phon . "';\n\t\t\t\t\n\t\t\t\t#harvestig='" . $harv . "';\n\t\t\t\t#harvesting_key='" . $harvk . "';\n\t\t\t\t#institution_logo='" . '' . "';\n\t\t\t\t#admin_nome='" . $name . "';\n\t\t\t\t#admin_email='" . $email . "';\n\t\t\t\t#email_adm='" . $email . "';\n\t\t\t\t#committe='" . $code . "';\n\t\t\t\t\n\t\t\t\t#language='" . $lang . "';\n\t\t\t\t#commite_type='" . $type . "';\n\n\t\t\t\t/* Screen - Config */\n\t\t\t\t#tab_max='98%';\n\t\t\t\t#charset='" . $chas . "';\n\t\t\t\t" . chr(13) . chr(10) . '?>';
     $sx = troca($sx, '#', '$');
     $file = $this->config_exist_file();
     $file = $this->file;
     $flt = fopen($file, 'w');
     fwrite($flt, $sx);
     fclose($flt);
 }
Exemplo n.º 29
0
<?php

include 'lib.php';
$link = opendb();
include 'cookies.php';
$userrow = checkcookies();
if (isset($_GET["do"])) {
    $do = $_GET["do"];
    if ($do == "troca") {
        troca();
    } elseif ($do == "troca2") {
        troca2();
    } elseif ($do == "troca3") {
        troca3();
    } elseif ($do == "troca4") {
        troca4();
    }
}
function troca()
{
    global $topvar;
    $topvar = true;
    $qual = $_GET['qual'];
    $jogador = $_GET['jogador'];
    $msg = $_GET['msg'];
    $html = $_GET['html'];
    if ($jogador != "") {
        $msg = "Para realizar uma troca com o jogador " . $jogador . ", pressione o botão Realizar Nova Troca.";
    }
    /* testando se está logado */
    //include('cookies.php');
Exemplo n.º 30
0
    $sa .= '<sub_css>' . $line['sub_css'] . '</sub_css>' . cr();
    $sa .= '<sub_descricao>' . $line['sub_descricao'] . '</sub_descricao>' . cr();
    $sa .= '<sub_ativo>' . $line['sub_ativo'] . '</sub_ativo>' . cr();
    $sa .= '<sub_codigo>' . $line['sub_codigo'] . '</sub_codigo>' . cr();
    $sa .= '<sub_pag>' . $line['sub_pag'] . '</sub_pag>' . cr();
    $sa .= '<sub_obrigatorio>' . $line['sub_obrigatorio'] . '</sub_obrigatorio>' . cr();
    $sa .= '<sub_editavel>' . $line['sub_editavel'] . '</sub_editavel>' . cr();
    $sa .= '<sub_informacao>' . $line['sub_informacao'] . '</sub_informacao>' . cr();
    $sa .= '<sub_projeto_tipo>' . $line['sub_projeto_tipo'] . '</sub_projeto_tipo>' . cr();
    $sa .= '<sub_ordem>' . $line['sub_ordem'] . '</sub_ordem>' . cr();
    $sa .= '<sub_pdf_title>' . $line['sub_pdf_title'] . '</sub_pdf_title>' . cr();
    $sa .= '<sub_pdf_mostra>' . $line['sub_pdf_mostra'] . '</sub_pdf_mostra>' . cr();
    $sa .= '<sub_pdf_align>' . $line['sub_pdf_align'] . '</sub_pdf_align>' . cr();
    $sa .= '<sub_pdf_font_size>' . $line['sub_pdf_font_size'] . '</sub_pdf_font_size>' . cr();
    $sa .= '<sub_pdf_space>' . $line['sub_pdf_space'] . '</sub_pdf_space>' . cr();
    $sa .= '<sub_limite>' . $line['sub_limite'] . '</sub_limite>' . cr();
    $sa .= '<sub_caption>' . $line['sub_caption'] . '</sub_caption>' . cr();
    $sa .= '<sub_id>' . $line['sub_id'] . '</sub_id>' . cr();
    $sa .= '</reg>' . cr();
    $sa = troca($sa, '&', '[e]');
    echo $sa;
}
echo '</fields>' . cr();
function cr()
{
    $sx = chr(13) . chr(10);
    return $sx;
}
?>