• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP strzero函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: check_this_year

 function check_this_year()
 {
     $year = date("Y");
     for ($bln = 1; $bln <= 12; $bln++) {
         $period = $year . "-" . strzero($bln, 2);
         if (!$this->exist($period)) {
             $last_date = date("Y-m-t", strtotime($year . "-" . strzero($bln, 2) . "-01"));
             //lastday
             $this->save(array("period" => $period, "year_id" => $year, "sequence" => $bln, "startdate" => $year . "-" . strzero($bln, 2) . "-01 00:00:00", "enddate" => $last_date . " 23:59:59", "closed" => 0, "month_name" => date("M", strtotime($last_date))));
         }
     }
 }
开发者ID:AlvaCorp,项目名称:maxon,代码行数:12,代码来源:periode_model.php


示例2: updatex

 function updatex()
 {
     global $base;
     $c = 'amt';
     $c1 = 'id_' . $c;
     $c2 = $c . '_codigo';
     $c3 = 3;
     $sql = "update " . $this->tabela . " set \n\t\t\t\t\t\t{$c2} = lpad({$c1},{$c3},0) \n\t\t\t\t\t\twhere {$c2}='' ";
     if ($base == 'pgsql') {
         $sql = "update " . $this->tabela . " set {$c2} = trim(to_char(id_" . $c . ",'" . strzero(0, $c3) . "')) where {$c2}='' ";
     }
     $rlt = db_query($sql);
 }
开发者ID:bireme,项目名称:proethos,代码行数:13,代码来源:_class_cep_amendment_type.php


示例3: proses_kredit_save

 function proses_kredit_save($data)
 {
     //param $data['old_loan_id'], $data['new_loan_id'], $data['loan_date']
     $this->load->model("leasing/invoice_header_model");
     $ok = false;
     $old = $data['old_loan_id'];
     $data['loan_date'] = date('Y-m-d H:i:s', strtotime($data['loan_date']));
     if ($data['new_loan_id'] == "") {
         $data['new_loan_id'] = "01630" . substr($old, -6);
     }
     $rs_loan['loan_id'] = $data['new_loan_id'];
     $rs_loan['loan_date'] = $data['loan_date'];
     $rs_loan['loan_date'] = $data['loan_date'];
     $rs_loan['status'] = 1;
     if ($query = $this->db->where("loan_id", $data['old_loan_id'])->update("ls_loan_master", $rs_loan)) {
         $this->db->query("update ls_loan_obj_items \n\t\t\t\tset loan_id='" . $data['new_loan_id'] . "' \n\t\t\t\twhere loan_id='" . $data['old_loan_id'] . "'");
         if ($query = $this->db->query("select * from ls_loan_master lm\n\t\t\t\twhere lm.loan_id='" . $data['new_loan_id'] . "'")) {
             if ($row_loan = $query->row()) {
                 $qspk = $this->db->query("select * from ls_app_master  \n\t\t\t\t\twhere app_id='" . $row_loan->app_id . "'");
                 $spk = $qspk->row();
                 $rs_invoice = null;
                 // hapus dulu data invoice yg ada
                 $this->db->where("loan_id", $data['new_loan_id'])->delete("ls_invoice_header");
                 $tgl_tagih = date('Y-m-d H:i:s', strtotime($data['loan_date']));
                 for ($tenor = 0; $tenor < $row_loan->max_month; $tenor++) {
                     $faktur = $row_loan->loan_id . "-" . strzero($tenor + 1, 2);
                     $rs_invoice['loan_id'] = $row_loan->loan_id;
                     $rs_invoice['app_id'] = $spk->app_id;
                     $rs_invoice['idx_month'] = strzero($tenor + 1, 2);
                     $rs_invoice['invoice_number'] = $faktur;
                     $rs_invoice['invoice_date'] = add_date($tgl_tagih, 0, $tenor + 1);
                     $rs_invoice['invoice_type'] = "I";
                     $rs_invoice['amount'] = $spk->inst_amount;
                     $rs_invoice['cust_deal_id'] = $row_loan->cust_id;
                     $rs_invoice['cust_deal_ship_id'] = $spk->counter_id;
                     $rs_invoice['gross_amount'] = $spk->inst_amount;
                     $rs_invoice['insr_amount'] = $spk->insr_amount;
                     $rs_invoice['pokok'] = $spk->inst_amount - $spk->rate_amount;
                     $rs_invoice['bunga'] = $spk->rate_amount;
                     $rs_invoice['disc_amount'] = 0;
                     $rs_invoice['paid'] = 0;
                     $rs_invoice['admin_amount'] = 0;
                     $ok = $this->invoice_header_model->save($rs_invoice);
                 }
                 $this->db->where("app_id", $spk->app_id)->update("ls_app_master", array("status" => "Finish", "contract_id" => $row_loan->loan_id));
             }
         } else {
             echo mysql_error();
         }
     }
     return $ok;
 }
开发者ID:AlvaCorp,项目名称:maxon,代码行数:52,代码来源:loan_master_model.php


示例4: comment_form

    function comment_form()
    {
        global $dd, $ss;
        $us = strzero(round($ss->user_id), 7);
        $sx = '';
        $sxf = '';
        if (strlen($dd[1]) > 0) {
            if (strlen($dd[2]) == 0) {
                $sxf = '<script>' . chr(13);
                $sxf .= " alert('" . msg('need_comment_type') . "');";
                $sxf .= '</script>' . chr(13);
            } else {
                $this->comment = $dd[1];
                $this->avaliation = $dd[2];
                $this->user = $us;
                $this->comment_save();
                $dd[1] = '';
                $dd[2] = '';
                redirecina(page());
            }
        }
        $disp1 = 'display: none;';
        $disp2 = 'display: block;';
        if (strlen($dd[1]) > 0) {
            $disp2 = 'display: none;';
            $disp1 = 'display: block;';
        }
        $sx .= '<div id="posted" style="' . $disp1 . '">';
        $sx .= '<form method="post" action="' . page() . '">';
        //				$sx .= '<input type="hidden" name="dd0" value="'.$dd[0].'">'.chr(13);
        //				$sx .= '<input type="hidden" name="dd90" value="'.$dd[90].'">'.chr(13);
        $sx .= '<table width="98%">';
        $sx .= '<TR><TD>';
        $sx .= msg('comment_post') . '<BR>';
        $sx .= '<TR><TD><textarea name="dd1" cols="80" rows="5">';
        $sx .= $dd[1];
        $sx .= '</textarea>';
        $sx .= '<TR><TD>';
        /** Avaliation **/
        /* $sx .= msg('comment_type').':';
        			
        			$chk1 = ''; $chk2 = '';
        			if ($dd[2]=='1') { $chk1 = 'checked'; }
        			if ($dd[2]=='0') { $chk2 = 'checked'; }
        			
        			/** Radio **/
        /** com avalia��o		
        					$sx .= '<input type="radio" value="1" name="dd2" '.$chk1.'>';
        					$sx .= '<img src="img/icone_coment_ok.png">';
        	
        					$sx .= '<input type="radio" value="0" name="dd2" '.$chk2.'>';
        					$sx .= '<img src="img/icone_coment_nook.png">';
        					**/
        /** sem avalia��o **/
        $sx .= '<input type="hidden" value="1" name="dd2" >';
        /**  **/
        $sx .= '<BR><input type="submit" value="' . msg('comment_submit') . '">';
        $sx .= '</table>';
        $sx .= '</form>';
        $sx .= '</div>';
        /** **/
        $sx .= '<input id="mst" type="button" value="' . msg('comment_add', 1) . '" onclick="mostrar();"  style="' . $disp2 . '">';
        $sx .= chr(13) . '<script>
					      $("#mst").click(function () {
					      		$("#posted").fadeIn("slow"); 
						   		$("#mst").fadeOut("slow"); 
						  }); 
						';
        $sx .= chr(13) . '</script>';
        return $sx . $sxf;
    }
开发者ID:bireme,项目名称:proethos,代码行数:71,代码来源:_class_cep_comment.php


示例5: redirecina

if (strlen($adm) == 0) {
    return 'admin.php';
}
/* Admin Common */
$ok = ($perfil->valid('#ADM') or $perfil->valid('#SCR') or $perfil->valid('#COO'));
if ($ok == 0) {
    redirecina('main.php');
}
require "_class/_class_submit_manuscrito_field.php";
global $acao, $dd, $cp, $tabela;
require $include . 'sisdoc_colunas.php';
require $include . '_class_form.php';
$form = new form();
require "form_css.php";
echo '<h1>' . msg('amendment_' . $adm) . '</h1>';
$dd[12] = strzero($adm, 5);
$cl = new fields();
$cp = $cl->cp();
$tabela = $cl->tabela;
$http_edit = 'admin_submit_ed.php';
$http_redirect = '';
/** Comandos de Edicao */
$tela = $form->editar($cp, $tabela);
/** Caso o registro seja validado */
if ($form->saved > 0) {
    echo 'Salvo';
    $cl->updatex();
    redirecina('admin_submit_000.php');
} else {
    echo $tela;
}
开发者ID:bireme,项目名称:proethos,代码行数:31,代码来源:admin_submit_000_ed.php


示例6: updatex

 function updatex()
 {
     global $base;
     $c = 'us';
     $c1 = 'id_' . $c;
     $c2 = $c . '_codigo';
     $c3 = 7;
     $sql = "update " . $this->tabela . " set {$c2} = lpad({$c1},{$c3},0) ,\n\t\t\t\t\t\tus_login =  lpad({$c1},{$c3},0) ,\n\t\t\t\t\t\tus_cracha =  lpad({$c1},{$c3},0) \n\t\t\t\t\t\twhere {$c2}='' or 1=1";
     if ($base == 'pgsql') {
         $sql = "update " . $this->tabela . " set {$c2} = trim(to_char(id_" . $c . ",'" . strzero(0, $c3) . "')) where {$c2}='' or  {$c2} isnull ";
     }
     $rlt = db_query($sql);
 }
开发者ID:bireme,项目名称:proethos,代码行数:13,代码来源:_class_user.php


示例7: ic

require "_class/_class_cep_submit.php";
require "_class/_class_team.php";
require $include . 'sisdoc_data.php';
require $include . 'sisdoc_email.php';
require '_class/_class_ic.php';
$ic = new ic();
$proj = new submit();
$proj->doc_autor_principal = $ss->user_codigo;
require "_class/_class_ged.php";
require "_class/_class_cep.php";
$cep = new cep();
/****/
if (strlen($dd[91]) > 0) {
    $_SESSION['proj_page'] = $dd[91];
    redirecina('submit.php?time' . date("dmYhis"));
}
$pag_id = round($_SESSION['proj_id']);
$pag_page = round($_SESSION['proj_page']);
//if ($pag_id == 0) { $pag_page = 1; }
//if ($pag_page == 0) { $pag_page = 1; }
$pag_id = $_SESSION['proj_id'];
$dd[0] = $pag_id;
$protocolo = strzero($dd[0], 7);
echo '<H2>' . msg('submit_end_monitoreo_008') . '</h2>';
//echo msg('protocolo').' '.$protocolo;
echo '<BR><BR>';
echo '<div style="text-align: justify; width: 80%">';
echo msg('submit_end_monitoreo_008_text');
echo '</div>';
echo '</div>';
echo $hd->foot();
开发者ID:bireme,项目名称:proethos,代码行数:31,代码来源:submit_end_monitoreo_008.php


示例8: update12

 function update12()
 {
     $new = 0;
     for ($r = 1; $r <= 10; $r++) {
         $cod = strzero($r, 3);
         $sql = "select * from cep_amendment_type \n\t\t\t\t\t\t\twhere amt_codigo = '{$cod}' ";
         $rlt = db_query($sql);
         if ($line = db_read($rlt)) {
         } else {
             $sql = "insert into cep_amendment_type \n\t\t\t\t\t\t\t\t\t(amt_codigo, amt_descrip, amt_form, amt_ord,amt_ativo)\n\t\t\t\t\t\t\t\t\t\tvalues\n\t\t\t\t\t\t\t\t\t('{$cod}','amendment_{$cod}','00{$cod}','{$r}',1);";
             $rlt = db_query($sql);
             $new++;
         }
     }
     if ($new > 0) {
         echo '<br>' . msg('update') . ' 012 ' . msg('successful') . ' ' . $new . ' updated';
     } else {
         echo '<br>' . msg('already update - 012');
     }
 }
开发者ID:bireme,项目名称:proethos,代码行数:20,代码来源:_class_update.php


示例9: protocolos_avaliacao

 function protocolos_avaliacao($sta, $tipo = '')
 {
     global $ss;
     $us = strzero(round($ss->user_id), 7);
     if (strlen($tipo) > 0) {
         $wh = " and (cep_tipo = '{$tipo}' )";
     } else {
         $wh = '';
     }
     if ($sta == 'Z') {
         $sql = "select * from " . $this->tabela . " \n\t\t\t\t\t inner join cep_dictamen on pp_protocolo = cep_protocol \n\t\t\t\t\t where \n\t\t\t\t\t (cep_status = '@' or cep_status = 'A' or cep_status = 'B' or cep_status = 'C' or cep_status = 'D')\n\t\t\t\t\t and pp_avaliador = '{$us}' \n\t\t\t\t\t and (pp_status <> 'B' and pp_status <> 'X')\n\t\t\t\t\t {$wh}\n\t\t\t\t\t order by cep_reuniao ";
     } else {
         $sql = "select * from " . $this->tabela . " \n\t\t\t\t\t left join usuario on us_codigo = cep_pesquisador\n\t\t\t\t\t where cep_status = '{$sta}' \n\t\t\t\t\t {$wh}\n\t\t\t\t\t order by cep_reuniao \n\t\t\t\t\t ";
     }
     $rlt = db_query($sql);
     $dta = 19000101;
     $tot = 0;
     while ($line = db_read($rlt)) {
         $tot++;
         $data = $line['cep_reuniao'];
         if ($data != $dta) {
             $sx .= '<TR><TD colspan=4 align="center" class="lt2"><center>' . msg('meet_data') . ' ' . stodate($data);
             $dta = $data;
         }
         $sx .= $this->mostra($line);
     }
     $sa = '<table width=96% class="table_normal" border=0>';
     $sa .= '<TR><TH>' . msg('protocol');
     $sa .= '<TH>' . msg('project_title');
     $sa .= '<TH>' . msg('status');
     $sa .= $sx;
     $sa .= '<TR><TD colspan=5>' . msg('found') . ' ' . $tot . ' ' . msg('records');
     $sa .= '</table>';
     if ($tot == 0) {
         $sa = '';
     }
     return $sa;
 }
开发者ID:bireme,项目名称:proethos,代码行数:38,代码来源:_class_cep.php


示例10: form_field


//.........这里部分代码省略.........
                }
                $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++) {
开发者ID:CGPUCPR,项目名称:SwB-2nd,代码行数:67,代码来源:form_sisdoc_helper.php


示例11: documents

$documents = new documents();
/* Sessao e pagina da Submissao */
$sx = '<H1>' . msg('documents_title_commite') . '</h1>';
$sx .= '<fieldset>';
$sx .= '<Table width="100%" class="tabela00" align="center" >';
$sx .= '<TR><TD>';
$sql = "select * from ged_documento_tipo \n\t\twhere (doct_publico = 1) ";
/* Restricted documents to members */
if ($perfil->valid('#MEM')) {
    $sql .= " or (doct_publico = 0) ";
}
/* Executa busca */
$rlt = db_query($sql);
$to = 0;
while ($line = db_read($rlt)) {
    $ged->protocol = strzero(round($line['doct_codigo']), 7);
    $sf = '<h2>' . utf8_encode(msg(trim($line['doct_nome']))) . '</h2>';
    $ged->table_class = "tabela01";
    $sf .= $ged->filelist_download();
    $to = $to + $ged->total_files;
}
$sx .= $sf;
$sx .= '</table>';
$sx .= '</fieldset>';
if ($to > 0) {
    echo $sx;
}
echo '<BR>';
echo '<H1>' . msg('documents_title') . '</h1>';
echo '<fieldset>';
require "documents_proethos.php";
开发者ID:bireme,项目名称:proethos,代码行数:31,代码来源:documents.php


示例12: round

    if ($dda < $dini) {
        $dini = $dda;
    }
    $dda = round("0" . $oline['cso_dt_fim']);
    if ($dda > $dfim) {
        $dfim = $dda;
    }
}
$meses = calcmeses($dini, $dfim);
if ($meses > 0) {
    $wt = intval(80 / $meses);
    $wi = 120;
    for ($kr = 0; $kr < count($crono); $kr++) {
        ////////// nomear datas
        $mm1 = strzero($crono[$kr][1], 6);
        $mm2 = strzero($crono[$kr][2], 6);
        $mn = nomemes_short(intval(substr($mm1, 0, 2))) . '/' . substr($mm1, 2, 4);
        $crono[$kr][3] = $mn;
        $mn = nomemes_short(intval(substr($mm2, 0, 2))) . '/' . substr($mm2, 2, 4);
        $crono[$kr][4] = $mn;
        if ($crono_cab == false) {
            $crono_cab = true;
            $pdf->MultiCell(0, 0, ' ', 1, 'L');
            $pdf->Ln($ln);
            $pdf->SetFont('Times', 'B', 12);
            $pdf->MultiCell(0, 8, msg('crono'), 0, 'L');
            $orca_cab = true;
            $pdf->Ln(6);
            /////////////////qqq cabecalho orcamento
            $y = $pdf->GetY();
            $pdf->SetLineWidth(0.3);
开发者ID:bireme,项目名称:proethos,代码行数:31,代码来源:submit_pdf_cronograma.php


示例13: trim

// 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
global $institution_name, $LANG, $messa;
$line = $dic->line;
require 'fphp-170/fpdf.php';
$versao_pdf = '0.0.38a';
$ln = 4;
$caae = trim($line['cep_caae']);
$nrp = strzero($dic->line['id_pr'], 5) . '/' . substr($dic->line['pr_data_emissao'], 0, 4);
$pdf = new FPDF();
$pdf->AliasNbPages();
$ln = 0;
$pdf->AddPage();
/* Logo Novo */
$img = 'document/proegthos_logo_1.jpg';
if (!file_exists($img)) {
    $img = 'img/logo_dictamen.jpg';
}
$pdf->Image($img, 20, 10);
$pdf->SetFont('Times', 'B', 16);
$pdf->MultiCell(0, 10, $institution_name, 0, 'R');
/* Research Project Evaluation Form */
$pdf->SetFont('Times', '', 14);
$pdf->MultiCell(0, 1, utf8_decode(msg('dictamen_title')), 0, 'R');
开发者ID:bireme,项目名称:proethos,代码行数:31,代码来源:dictamen_pdf_projeto.php


示例14: 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 */
//.........这里部分代码省略.........
开发者ID:GCPUCPR,项目名称:CsF,代码行数:101,代码来源:form_sisdoc_helper.php


示例15: redirecina

}
/* Redireciona se 008 */
if ($adm == '008') {
    redirecina('admin_submit_blocked.php');
    exit;
}
require "_class/_class_submit_manuscrito_field.php";
/* Dados da Classe */
$clx = new fields();
$tabela = $clx->tabela;
echo '<h1>' . msg('amendment_' . $adm) . '</h1>';
/* Nao alterar - dados comuns */
$label = msg($tabela);
$http_edit = 'admin_submit_000_ed.php';
//$http_ver = 'pibic_bolsa_tipo_detalhe.php';
$editar = True;
$http_redirect = page();
$clx->row();
$busca = true;
$offset = 20;
//$pre_where = " e_mailing = '".$cl->mail_codigo."' ";
if ($order == 0) {
    $order = $cdf[1];
}
$order = ' sub_pag, sub_pos, sub_ordem ';
$pre_where = " sub_projeto_tipo = '" . strzero($adm, 5) . "' ";
echo '<TABLE width="' . $tab_max . '" align="center"><TR><TD>';
require $include . 'sisdoc_row.php';
echo '</table>';
echo '</div>';
echo $hd->foot();
开发者ID:bireme,项目名称:proethos,代码行数:31,代码来源:admin_submit_000.php


示例16: dictamen_form

    function dictamen_form()
    {
        global $dd, $acao, $cep, $messa, $LANG;
        $sx = '';
        /* recupera tipo do projeto */
        $tipo = $dd[41];
        $sql = "select * from parecer_modelo where pm_type = '{$tipo}' ";
        $rlt = db_query($sql);
        $fmt = array();
        array_push($fmt, array('', '---', '00000', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0));
        while ($line = db_read($rlt)) {
            array_push($fmt, array(trim($line['pm_name']), $line['pm_decision'], $line['pm_codigo'], $line['pm_0'], $line['pm_1'], $line['pm_2'], $line['pm_3'], $line['pm_4'], $line['pm_5'], $line['pm_6'], $line['pm_7'], $line['pm_8'], $line['pm_accompaniment']));
        }
        /* JavaScript */
        $cpa = array('a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j');
        $ja .= 'function mostra_fields(a,b,c,d,e,f,g,h,i,j) { ' . chr(13);
        for ($rr = 0; $rr < count($cpa); $rr++) {
            $ja .= 'if (' . $cpa[$rr] . ' == 1) 
							{ $("#dic' . strzero($rr, 3) . '").fadeIn("slow"); } else 
							{ $("#dic' . strzero($rr, 3) . '").fadeOut("slow"); } ' . chr(13);
        }
        $ja .= ' } ' . chr(13);
        /* Mostra formularios */
        $pos = 0;
        /* monta formulario Select */
        $sa .= '<input type="hidden" id="dd1" name="dd1" value="' . $dd[1] . '">';
        $sa .= '<select id="dd27" name="dd27">';
        $jb = '';
        $jb2 = '';
        for ($r = 0; $r < count($fmt); $r++) {
            $chk = '';
            if ($dd[27] == $fmt[$r][1]) {
                $chk = 'selected';
            }
            $sa .= '<option value="' . $fmt[$r][1] . '" ' . $chk . '>';
            $sa .= msg($fmt[$r][0]);
            $sa .= '</option>';
            /* monta comando java show */
            $jb1 = 'if (ask == "' . $fmt[$r][1] . '") { mostra_fields(';
            for ($ra = 0; $ra < 9; $ra++) {
                $jb1 .= $fmt[$r][$ra + 3] . ',';
            }
            $jb1 .= $fmt[$r][12] . '); } ' . chr(13);
            if ($chk == 'selected') {
                $jb2 .= 'var x = mostra_fields(';
                for ($ra = 0; $ra < 9; $ra++) {
                    $jb2 .= $fmt[$r][$ra + 3] . ',';
                }
                $jb2 .= $fmt[$r][12] . '); ' . chr(13);
            }
            $jb .= $jb1;
        }
        $sa .= '</select>';
        $sx .= $sa;
        $sx .= '<table class="table_proj2" width="100%">';
        for ($r = 0; $r < 9; $r++) {
            $stl = '';
            if ($fmt[$pos][$r + 3] == 0) {
                $stl = 'style="display: none;"';
            }
            $sx .= chr(13);
            $sx .= '<TR><TD colspan=2 class="lt0"><div id="dic' . strzero($r, 3) . '" ' . $stl . '>';
            $sx .= msg('dic_pm_' . $r) . '<BR>';
            $sx .= '<textarea rows=6 cols=80 style="width: 96%;" name="dd' . ($r + 20) . '" id="dd' . ($r + 20) . '">';
            $sx .= $dd[$r + 20];
            $sx .= '</textarea>';
            $sx .= '</div>';
        }
        /* Acompanhamento */
        $sx .= chr(13);
        $acop = array(array('', ''), array(180, msg('semiannual')), array(365, msg('annual')), array(-1, msg('end_of_the_investigation')), array(0, msg('not_applied')));
        $hd = 'style="display: none;"';
        /*
         * Acompanhamento
         **/
        $sx .= '<TR><TD colspan=2 class="lt0"><div id="dic009" 	' . $hd . '>';
        $sx .= msg('accompaniment') . ' ';
        $sx .= chr(13);
        $sx .= '<select id="dd29" name="dd29">';
        for ($r = 0; $r < count($acop); $r++) {
            $chk = '';
            $sx .= chr(13);
            if ($dd[29] == $acop[$r][0]) {
                $chk = 'selected';
            }
            $sx .= '<option value="' . $acop[$r][0] . '" ' . $chk . '>';
            $sx .= msg($acop[$r][1]);
            $sx .= '</option>';
        }
        $sx .= chr(13) . '</select>';
        /* Botao */
        $sx .= chr(13);
        $sx .= '<TR><TD colspan=2 class="lt0"><div id="dicfim" style="' . $hid . '">';
        $bto = msg('save_dictamen');
        $sx .= '<BR>';
        $sx .= '<input type="checkbox" value="1" id="dd31">';
        $sx .= ' ' . msg('final_version');
        $sx .= '<BR>';
        $sx .= '<input type="button" value="' . $bto . '" id="save_dictamen" class="form_submit">';
        $sx .= chr(13) . '</table>';
//.........这里部分代码省略.........
开发者ID:bireme,项目名称:proethos,代码行数:101,代码来源:_class_dictamen.php


示例17: mostra_todas_csf

    function mostra_todas_csf($aluno_id)
    {
        $sql = "select * from csf_view where id_us = " . round($aluno_id);
        $rlt = $this->db->query($sql);
        $rlt = $rlt->result_array($rlt);
        $sx = '<table width="100%" align="left" class="border1 tabela01" border=0>';
        $sx .= '<tr>						
						<th width="5%"  align=left> protocolo</th>
						<th width="10%" align=left> situação</th>
						<th width="20%" align=left> edital</th>
						<th width="24%" align=left> universidade</th>
						<th width="10%" align=left> país</th>
						<th width="10%" align=left> parceiro</th>
						<th width="5%"  align=center> saída</th>
						<th width="5%"  align=center> retorno</th>
						<th width="1%"  >-</th>
					</tr>
					';
        $tot = 0;
        for ($r = 0; $r < count($rlt); $r++) {
            $tot++;
            $line = $rlt[$r];
            $link = base_url('index.php/csf/ver/' . $line['id_csf'] . '/' . checkpost_link($line['id_csf']));
            $link = '<A HREF="' . $link . '" class="lt4 link">';
            $sx .= '<tr valign="top">';
            $sx .= '<td class="borderb1" align="center">';
            $sx .= $link . 'CF' . strzero($line['id_csf'], 5) . '</A>';
            $sx .= '</td>';
            $sx .= '<td class="borderb1">';
            $sx .= $line['cs_descricao'];
            $sx .= '</td>';
            $sx .= '<td class="lt1 borderb1">';
            $sx .= $line['ed_titulo'];
            $sx .= '</td>';
            $sx .= '<td class="borderb1">';
            $sx .= $line['gpip_nome'];
            $sx .= '</td>';
            $sx .= '<td class="borderb1">';
            $sx .= $line['nome'];
            $sx .= '</td>';
            $sx .= '<td class="borderb1">';
            $sx .= $line['cp_descricao'];
            $sx .= '</td>';
            $sx .= '<td class="borderb1" align="center">';
            $dt1 = $line['csf_saida'];
            $prev = '';
            if ($dt1 == '0000-00-00') {
                $dt1 = $line['csf_saida_previsao'];
                $prev = '<a ref="#" title="previsão de saída">*</A>';
            }
            $sx .= stodbr($dt1);
            $sx .= '<span color="blue">' . $prev . '</span>';
            $sx .= '</td>';
            $sx .= '<td class="borderb1" align="center">';
            $dt1 = $line['csf_retorno'];
            $prev = '';
            if ($dt1 == '0000-00-00') {
                $dt1 = $line['csf_retorno_previsao'];
                $prev = '<a ref="#" title="previsão de retorno">*</A>';
            }
            $sx .= stodbr($dt1);
            $sx .= '<span color="blue">' . $prev . '</span>';
            $sx .= '</td>';
            $sx .= '<td class="borderb1">';
            $img = '<img src="' . base_url('img/icon/icone_editar.png') . '" border=0 height="24" onclick="mostra(\'csf' . $r . '\',' . $line['id_csf'] . ');" class="link">';
            $sx .= $img;
            $sx .= '</td>';
            $sx .= '<tr><td colspan=10>';
            $sx .= '<div id="csf' . $r . '" style="display:none; width: 100%;">aguarde ...</div>';
            $sx .= '</td></tr>';
        }
        $sx .= '<tr><td colspan=10 class="lt0">* Previsão</td></tr>';
        $sx .= '</table>';
        $sx .= '
		<script>
			function mostra($id,$reg)
				{
					
					$idr = "#"+$id;
					$($idr).fadeIn();
					var $url = "' . base_url('index.php/csf/ajax/') . '/"+$reg+"/"+$id;
					$.ajax({
					        url: $url,
					        type: "post",
					        success: function(data){
					            $($idr).html(data);
					        },
					        error:function(data){
					            $($idr).html(data);
					        }
					    });					
				}
		</script>
		';
        return $sx;
    }
开发者ID:GCPUCPR,项目名称:CsF,代码行数:96,代码来源:Csfs.php


示例18: keyid_form

 function keyid_form()
 {
     global $secu;
     $size = 10;
     $key = troca(microtime() + rand(), '.', '');
     $key = substr($key, strlen($key) - $size, $size);
     $this->key_form = $key;
     $this->key_form_check = strzero(3 * $key, $size);
     return $key;
 }
开发者ID:bireme,项目名称:proethos,代码行数:10,代码来源:_class_form.php


示例19: db_query

//
// 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
$prj_nr = $protocolo;
if (strlen($prj_nr) == 0) {
    $sql = "select * from cep_submit_documento where doc_id = '" . $prj_nr . "' ";
    $rlt = db_query($sql);
    if (!($line = db_read($rlt))) {
        $novo = true;
    }
}
/* SAVE */
$sql = "delete from cep_submit_documento_valor ";
$sql .= " where spc_pagina = '" . strzero($pag, 3) . "' ";
$sql .= " and spc_projeto = '" . $protocolo . "' ";
$sql .= " and spc_autor = '" . $proj->doc_autor_principal . "' ";
$rlt = db_query($sql);
$xsql = '';
for ($k = 0; $k < count($cops); $k++) {
    $xsql = "insert into cep_submit_documento_valor ";
    $xsql .= "(spc_codigo,spc_projeto,spc_content,";
    $xsql .= "spc_pagina,spc_autor,spc_ativo) ";
    $xsql .= " values ";
    $xsql .= "('" . $cops[$k][0] . "','" . $protocolo . "','" . $cops[$k][1] . "',";
    $xsql .= "'" . strzero($pag, 3) . "','" . $proj->doc_autor_principal . "','1') ";
    $rlt = db_query($xsql);
}
$sql = "update cep_submit_documento set doc_status = '@', doc_dt_atualizado = " . date("Ymd") . "\n\t\t\t\twhere doc_protocolo = '{$protocolo}' ";
$rlt = db_query($sql);
$sql .= '';
开发者ID:bireme,项目名称:proethos,代码行数:31,代码来源:submit_save.php


示例20: msg

        $op = msg("top_submit_menu_" . $r);
    }
    $name = "item" . $r;
    $class_name = "topmenu_off";
    if ($ini == $r) {
        $class_name = 'topmenu_on';
    }
    echo '<TD align="center" class="' . $class_name . '" height=30>';
    if ($protocolo != '0000000') {
        echo '<A HREF="submit.php?dd91=' . $r . '">';
    }
    echo '<center><font class="' . $class_name . '">';
    echo $op;
    echo '</A></center>';
    echo '<TD class="' . $class_name . '" width="20">';
    echo '<img src="img/topmenu_sp.png">';
}
echo '</table>';
$edit_mode = $edit_mode_old;
/* Omite título se não for projeto */
if ($doc_tipo == 'PROJE') {
    echo '<H1>' . msg("submit_process") . '</h1>';
}
/* Le dados do protocolo */
$proj->le($protocolo);
/* Classe que mostra os dados do protocolo */
echo $proj->protocolo_mostrar();
$proto_cep = strzero($_SESSION['proto_cep'], 7);
// print "<pre>";
// var_dump($proj);
$clinic = round($proj->doc_clinic);
开发者ID:bireme,项目名称:proethos,代码行数:31,代码来源:submit_cab.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP stub函数代码示例发布时间:2022-05-23
下一篇:
PHP strxlen函数代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap