本文整理汇总了PHP中datab函数的典型用法代码示例。如果您正苦于以下问题:PHP datab函数的具体用法?PHP datab怎么用?PHP datab使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了datab函数的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: datab
print $row["data_compra"];
?>
</TD>
</tr>
<TR>
<TD width="20%" align="left" bgcolor=<?php
print TD_COLOR;
?>
><b>Data do cadastro:</b></TD>
<TD colspan='3' width="30%" align="left" bgcolor=<?php
print BODY_COLOR;
?>
><?php
print datab($hoje);
?>
</TD>
</TR>
<TR>
<TD width="20%" align="left" bgcolor=<?php
print TD_COLOR;
?>
><b>Comentário:</b></TD>
<TD colspan='3' width="80%" align="left" bgcolor=<?php
print BODY_COLOR;
?>
><?php
print $row["comentario"];
?>
示例2: TRANS
} else {
print "<TR class='header'><td class='line'><B>" . TRANS('TXT_OCCO_ONLY_FOUND') . "</B></TD></TR>";
}
//print "</TD>";
//print "<td class='line'>";
print "<TABLE border='0' cellpadding='5' cellspacing='0' align='center' width='100%'>";
print "<TR class='header'><td class='line'>" . TRANS('COL_NUMBER') . "</TD><td class='line'>" . TRANS('COL_PROB') . "</TD><td class='line'>" . TRANS('COL_LOCAL') . "</TD><td class='line'>" . TRANS('COL_OPERATOR') . "</TD>\n <td class='line'>" . TRANS('COL_OPEN') . "</TD><td class='line'>" . TRANS('COL_STATUS') . "</TD><td class='line'>" . TRANS('COL_EDIT') . "</TD><td class='line'>" . TRANS('COL_DEL') . "</TD></TR>";
$i = 0;
$j = 2;
while ($row = mysql_fetch_array($resultado)) {
if ($j % 2) {
$trClass = "lin_par";
} else {
$trClass = "lin_impar";
}
$j++;
print "<tr class=" . $trClass . " id='linhax" . $j . "' onMouseOver=\"destaca('linhax" . $j . "','" . $_SESSION['s_colorDestaca'] . "');\" onMouseOut=\"libera('linhax" . $j . "','" . $_SESSION['s_colorLinPar'] . "','" . $_SESSION['s_colorLinImpar'] . "');\" onMouseDown=\"marca('linhax" . $j . "','" . $_SESSION['s_colorMarca'] . "');\">";
print "<td class='line'><a href='mostra_consulta.php?numero=" . $row['numero'] . "'>" . $row['numero'] . "</a></TD>";
print "<td class='line'>" . $row['problema'] . "</TD>";
print "<td class='line'>" . $row['setor'] . "</TD>";
print "<td class='line'>" . $row['nome'] . "</TD>";
print "<td class='line'>" . datab($row['data_abertura']) . "</TD>";
print "<td class='line'>" . $row['chamado_status'] . "</TD>";
print "<td class='line'><a onClick=\"redirect('altera_dados_ocorrencia.php?numero=" . $row['numero'] . "')\"><img height='16' width='16' src='" . ICONS_PATH . "edit.png' title='" . TRANS('HNT_EDIT') . "'></a></TD>";
print "<td class='line'><a onClick=\"confirma('" . TRANS('MSG_DEL_OCCO_SYSTEM') . "','excluir_ocorrencia.php?numero=" . $row['numero'] . "')\"><img height='16' width='16' src='" . ICONS_PATH . "drop.png' title='" . TRANS('HNT_DEL') . "'></a></TD>";
print "</TR>";
$i++;
}
print "</table>";
print "</BODY>";
print "</HTML>";
示例3: TRANS
print "<option value=null selected>" . TRANS('SEL_RESOLUT_SCANNER') . ": </option>";
$query = "SELECT * from resolucao order by resol_nome";
$resultado = mysql_query($query);
while ($rowResol = mysql_fetch_array($resultado)) {
print "<option value='" . $rowResol['resol_cod'] . "' ";
// if (isset($row) && $rowResol['resol_cod'] == $row['resolucao_cod'])
// print " selected";
print ">" . $rowResol['resol_nome'] . "</option>";
}
print "<option value=null>" . TRANS('cmb_selec_nenhum') . "</option>";
print "</SELECT>";
print "</TD>";
print "</tr>";
print "<TR>";
print "<TD width='20%' align='left' bgcolor='" . TD_COLOR . "'><b>" . TRANS('COL_SUBSCRIBE_DATE') . ":</b></TD>";
print "<TD width='30%' align='left' bgcolor='" . BODY_COLOR . "'>" . datab($hoje) . "</TD>";
print "</TR>";
print "<TR>";
print "<TD colspan='2' align='right' bgcolor='" . BODY_COLOR . "'><input type='submit' value='" . TRANS('bt_cadastrar') . "' name='submit' " . "class='button' title='Cadastrar as informações fornecidas.'>";
print "</TD>";
print "<TD colspan='2' align='right' bgcolor='" . BODY_COLOR . "'><INPUT type='reset' value='" . TRANS('bt_cancelar') . "' " . "class='button' onClick='javascript:history.back()'></TD>";
print "</TR>";
print "</TABLE>";
print "</FORM>";
?>
<script type="text/javascript">
<!--
function valida(){
var ok = validaForm('idTipo','COMBO','Tipo de equipamento',1);
if (ok) var ok = validaForm('idFab','COMBO','Fabricante',1);
示例4: substr
print " ";
print "</TD>";
$volta++;
}
print "<TD bgcolor={$cor1} align=right>";
print $acumula_semana;
print "</TD>";
print "</TR>";
$acumula_semana = 0;
}
print "<TR>";
print "<TD bgcolor={$color}>";
print $dia_semana;
print "</TD>";
print "<TD bgcolor={$color} align=center>";
print substr(datab($data_i), 0, 10);
print "</TD>";
$i = 0;
$acumula_dia = 0;
while ($i < $num_operador) {
$operador = mysql_result($resultado, $i, 0);
if ($tipo_data == "abertura") {
$query = "SELECT * from ocorrencias WHERE operador='{$operador}' AND (data_abertura BETWEEN '{$data_i}' AND '{$data_f}')";
} else {
$query = "SELECT * from ocorrencias WHERE operador='{$operador}' AND (data_fechamento BETWEEN '{$data_i}' AND '{$data_f}')";
}
if (!empty($area) and $area != "-1") {
$query .= "and sistema={$area}";
}
$ocorrencias = mysql_query($query);
$linhas = mysql_num_rows($ocorrencias);
示例5: datab
echo "<META HTTP-EQUIV=REFRESH CONTENT=\"0;URL=mensagem.php?aviso={$aviso}&origem={$origem}\">";
}
}
print "<BR><B>OcoMon - Relatório de ocorrências por período.</B> - <a href=relatorio_periodo_numero.php>Voltar</a><BR>";
print "<HR>";
?>
<TABLE border="0" align="center" width="100%">
<TR>
<TABLE border="0" align="center" width="100%">
<TD width="20%" align="left">Período de:</TD>
<TD width="20%" align="left"><?php
print datab($data_inicial);
?>
a <?php
print datab($data_final);
?>
</TD>
<TD width="40%" align="left">Número total de ocorrências no período:</TD>
<TD width="20%" align="left"><?php
print $linhas_total;
?>
</TD>
</TABLE>
</TR>
<TR>
<TABLE border="0" align="center" width="100%">
<TD width="20%" align="left">Ocorrências abertas:</TD>
<TD width="30%" align="left"><?php
print $linhas_abertas;
示例6: while
$i = 0;
$j = 2;
while ($i < $linhas) {
if ($j % 2) {
$color = BODY_COLOR;
} else {
$color = white;
}
$j++;
?>
<TR>
<TD bgcolor=<?php
print $color;
?>
><?php
print datab(mysql_result($resultado, $i, 3));
?>
</TD>
<TD bgcolor=<?php
print $color;
?>
><?php
print mysql_result($resultado, $i, 4);
?>
</TD>
<TD bgcolor=<?php
print $color;
?>
><a href=altera_dados_solucoes.php?numero=<?php
print mysql_result($resultado, $i, 0);
?>
示例7: mysql_result
<TD width="30%" align="left"><?php
print mysql_result($resultado3, 0, 1);
?>
</TD>
<TD width="20%" align="left">Operador:</TD>
<TD width="30%" align="left"><?php
print mysql_result($resultado, $j, 8);
?>
</TD>
</TABLE>
</TR>
<TR>
<TABLE border="0" align="center" width="100%">
<TD width="20%" align="left">Data de abertura:</TD>
<TD width="30%" align="left"><?php
print datab(mysql_result($resultado, $j, 9));
?>
</TD>
<TD width="20%" align="left">Status:</TD>
<TD width="30%" align="left"><?php
print mysql_result($resultado, $j, 11);
?>
</TD>
</TABLE>
</TR>
</TABLE>
<HR>
<?php
}
//###############################################################################
if ($relatorio == "intranet") {
示例8: date
$auth->testa_user($_SESSION['s_usuario'], $_SESSION['s_nivel'], $_SESSION['s_nivel_desc'], 2);
$hoje = date("Y-m-d H:i:s");
$cor = TD_COLOR;
$cor1 = TD_COLOR;
$cor3 = BODY_COLOR;
$query = $QRY["vencimentos"];
$result = mysql_query($query);
//----------------TABELA -----------------//
print "<br><br><p align='center'>" . TRANS('TTL_PREVIEWS_EXP_GUARANTEE') . ": <a href='estat_vencimentos_full.php'>" . TRANS('SHOW_FULL_5_YEARS') . "</a></p>";
print "<table cellspacing='0' border='1' align='center' style=\"{border-collapse:collapse;}\">";
print "<tr><td ><b>" . TRANS('COL_DATE_2') . "</b></td><td ><b>" . TRANS('COL_AMOUNT') . "</b></td><td ><b>" . TRANS('COL_TYPE_2') . "</b></td><td ><b>" . TRANS('COL_MODEL_2') . "</b></td></tr>";
//-----------------FINAL DA TABELA -----------------------//
$tt_garant = 0;
while ($row = mysql_fetch_array($result)) {
$temp1 = explode(" ", $row['vencimento']);
$temp = explode(" ", datab($row['vencimento']));
$vencimento1 = $temp1[0];
$vencimento = $temp[0];
$tt_garant += $row['quantidade'];
print "<tr><td ><a onClick=\"popup('mostra_consulta_comp.php?VENCIMENTO=" . $vencimento1 . "')\">" . $vencimento . "</a></td>" . "<td align='center'><a onClick=\"popup('mostra_consulta_comp.php?VENCIMENTO=" . $vencimento1 . "')\">" . $row['quantidade'] . "</a></td>" . "<td >" . $row['tipo'] . "</td><td >" . $row['fabricante'] . " " . $row['modelo'] . "</td></tr>";
}
// while
print "<tr><td ><b>" . TRANS('COL_OVERALL') . "</b></td><td colspan='3'><b>" . $tt_garant . "</b></td></tr>";
print "</table><br><br>";
print "<TABLE width='80%' align='center'>";
print "<tr><td ></TD></tr>";
print "<tr><td ></TD></tr>";
print "<tr><td ></TD></tr>";
print "<tr><td ></TD></tr>";
print "<tr><td width='80%' align='center'><b>" . TRANS('SLOGAN_OCOMON') . " <a href='http://www.unilasalle.edu.br' target='_blank'>" . TRANS('COMPANY') . "</a>.</b></td></tr>";
print "</TABLE>";
示例9: mysql_query
$execInst = mysql_query($qryInst) or die(TRANS('MSG_ERR_RESCUE_INFO_INSTIT') . '<BR>' . $qryInst);
$rowInst = mysql_fetch_array($execInst);
print "<br><table border='0' cellspacing='1' summary=''";
print "<tr><td class='line'><b>Etiqueta:\t</b>" . $_GET['inv'] . "</TD></tr>";
print "<tr><td class='line'><b>Unidade:\t</b>" . $rowInst['inst_nome'] . "</TD></tr>";
print "</table><br>";
print "<TABLE border='0' cellpadding='5' cellspacing='0' align='left' width='100%'>";
print "<TR class='header'><td class='line'>" . TRANS('COL_COMPONENT') . "</TD><td class='line'>" . TRANS('COL_DESC') . "</TD><td class='line'>" . TRANS('COL_MODIF_IN') . "</td><td class='line'>" . TRANS('COL_MODIF_FOR') . "</td></tr>";
$j = 0;
while ($row = mysql_fetch_array($resultado)) {
if ($j % 2) {
$trClass = "lin_par";
} else {
$trClass = "lin_impar";
}
$j++;
print "<tr class=" . $trClass . " id='linhax" . $j . "' onMouseOver=\"destaca('linhax" . $j . "','" . $_SESSION['s_colorDestaca'] . "');\" onMouseOut=\"libera('linhax" . $j . "','" . $_SESSION['s_colorLinPar'] . "','" . $_SESSION['s_colorLinImpar'] . "');\" onMouseDown=\"marca('linhax" . $j . "','" . $_SESSION['s_colorMarca'] . "');\">";
print "<td class='line'>" . $row['item_nome'] . "</TD>";
print "<td class='line'>" . $row['mdit_fabricante'] . " " . $row['mdit_desc'] . " " . $row['mdit_desc_capacidade'] . " " . $row['mdit_sufixo'] . "</td>";
print "<td class='line'>" . datab($row['hwa_data']) . "</td>";
print "<td class='line'>" . $row['nome'] . "</td>";
print "</tr>";
}
print "<tr><td colspan='4'> </td></tr>";
print "<tr><td colspan='4' align='center'><input type='button' class='minibutton' value='" . TRANS('LINK_CLOSE') . "' onClick=\"javascript:self.close()\"</td></tr>";
print "</TABLE>";
}
?>
</BODY>
</HTML>
示例10: mysql_query
$execChkSol[$i] = mysql_query($qryChkSol[$i]) or die(TRANS('MSG_ERR_CONSUL') . '<br>' . $qryChkSol);
if (mysql_numrows($execChkSol[$i]) > 0) {
$achou[] = normaliza($palavrasA[$i]);
//$achou[] = noHtml($palavrasA[$i]);
$achou = array_unique($achou);
}
}
reIndexArray($achou);
//if ((!isset($_POST['anyword']) && count($achou) >= count($termos)) || (isset($_POST['anyword']))) {
if (isset($_POST['anyword']) || !isset($_POST['anyword']) && (count($achou) >= count($termos) && count($termos) == 1) || !isset($_POST['anyword']) && (count($achou) == count($termos) && count($termos) > 1)) {
print "<TABLE border='1' style=\"{border-collapse:collapse;}\" align='center' width='100%'>";
print "<tr>";
print "<TD align='left' bgcolor='" . TD_COLOR . "'>" . TRANS('OCO_FIELD_NUMBER') . ":</TD>";
print "<TD align='left'><a onClick= \"javascript: popup_alerta('mostra_consulta.php?popup=true&numero=" . $row['numero'] . "&destaca=" . $destacaProb . "')\">" . "<font color='blue'>" . $row['numero'] . "</font></a></TD>";
print "<TD align='left'>" . TRANS('OCO_DATE') . ":</TD>";
print "<TD align='left'>" . datab($row['data']) . "</TD>";
print "<TD align='left'>" . TRANS('OCO_FIELD_OPERATOR') . ":</TD>";
print "<TD align='left'>" . $row['nome'] . "</TD>";
print "</TR>";
print "<TR>";
print "<TD width='20%' align='left' bgcolor='" . TD_COLOR . "' valign='top'>" . TRANS('OCO_FIELD_PROB') . ":</TD>";
print "<TD colspan='5' width='80%' align='left'>" . destaca($destacaProb, nl2br($row['problema'])) . "</TD>";
print "</TR>";
print "<TR>";
print "<TD width='20%' align='left' bgcolor='" . TD_COLOR . "' valign='top'>" . TRANS('COL_TIT_SOLUTION') . ":</TD>";
print "<TD colspan='5' width='80%' align='left'>" . destaca($destacaProb, nl2br($row['solucao'])) . "</TD>";
print "</TR>";
print "<HR>";
print "</TABLE>";
}
//ZERANDO O ARRAY ACHOU
示例11: mysql_fetch_array
$row = mysql_fetch_array($resultado);
print "<BR><B>" . TRANS('COL_EDIT_LOAN') . "</B><BR>";
print "<TR>";
print "<TD width='20%' align='left' bgcolor='" . TD_COLOR . "' valign='top'>" . TRANS('COL_MAT') . ":</TD>";
print "<TD width='80%' colspan='3' align='left' bgcolor='" . BODY_COLOR . "'><textarea class='textarea' name='material' id='idMaterial'>" . $row['material'] . "</textarea></td>";
print "</TR>";
print "<TR>";
print "<TD width='20%' align='left' bgcolor='" . TD_COLOR . "' valign='top'>" . TRANS('OCO_FIELD_FOR_WHO') . ":</TD>" . "<TD width='30%' align='left' bgcolor='" . BODY_COLOR . "'><INPUT type='text' class='text' name='quem' id='idQuem' value='" . $row['quem'] . "'>";
print "<TD width='20%' align='left' bgcolor='" . TD_COLOR . "'>" . TRANS('OCO_PHONE') . " *:</TD>";
print "<TD width='30%' align='left' bgcolor='" . BODY_COLOR . "'><INPUT type='text' class='text' name='ramal' id='idRamal' value='" . $row['ramal'] . "'></TD>";
print "</tr>";
print "<TR>";
print "<TD width='20%' align='left' bgcolor='" . TD_COLOR . "'>" . TRANS('OCO_FIELD_DATE_EXIT') . ":</TD>";
print "<TD width='30%' align='left' bgcolor='" . BODY_COLOR . "'><INPUT type='text' class='text' name='saida' id='idDataSaida' value='" . datab($row['data_empr']) . "'></TD>";
print "<TD width='20%' align='left' bgcolor='" . TD_COLOR . "'>" . TRANS('COL_WHO') . ":</TD>";
print "<TD width='30%' align='left' bgcolor='" . BODY_COLOR . "'><INPUT type='text' name='volta' class='text' id='idDataDevolucao' value='" . datab($row['data_devol']) . "'></TD>";
print "</tr>";
print "<TR>";
print "<TD width='20%' align='left' bgcolor='" . TD_COLOR . "' valign='top'>" . TRANS('MNS_OPERADOR') . ":</TD>" . "<TD width='30%' align='left' bgcolor='" . BODY_COLOR . "'><select class='select' name='responsavel' id='idResponsavel'>";
$sql = "select * from usuarios where user_id=" . $row['responsavel'] . "";
$commit = mysql_query($sql);
$rowR = mysql_fetch_array($commit);
print "<option value=-1 >" . TRANS('OCO_SEL_OPERATOR') . "</option>";
$sql = "select * from usuarios order by nome";
$commit = mysql_query($sql);
while ($rowB = mysql_fetch_array($commit)) {
print "<option value=" . $rowB["user_id"] . "";
if ($rowB['user_id'] == $row['user_id']) {
print " selected";
}
print ">" . $rowB["nome"] . "</option>";
示例12: TRANS
print "<tr><td colspan='7' class='line'>";
print "<B>" . TRANS('FOUND') . " <font color=red>" . $PAGE->NUMBER_REGS . "</font> " . TRANS('RECORDS_IN_SYSTEM') . ". " . TRANS('SHOWING_PAGE') . " " . $PAGE->PAGE . " (" . $PAGE->NUMBER_REGS_PAGE . " " . TRANS('RECORDS') . ")</B></TD></tr>";
//print "".TRANS('THERE_IS_ARE')." <b>".$registros."</b> ".TRANS('USER_S_IN_SYSTEM').".<br>";
print "<TR class='header'><td class='line'>" . TRANS('OPT_NAME', 'Nome') . "</TD>" . "<td class='line'>" . TRANS('OPT_LOGIN_NAME', 'Login') . "</TD><td class='line'>" . TRANS('OCO_FIELD_AREA', 'Área') . "</TD>" . "<td class='line'>" . TRANS('OCO_FIELD_AREA_ADMIN', 'Área admin') . "</TD>" . "<td class='line'>" . TRANS('OCO_FIELD_SUBSCRIBE_DATE', 'Data de inclusão') . "</TD><td class='line'>" . TRANS('OCO_FIELD_HIRE_DATE', 'Data de admissão') . "</TD>" . "<td class='line'>" . TRANS('OCO_FIELD_EMAIL', 'E-mail') . "</TD><td class='line'>" . TRANS('OCO_FIELD_PHONE', 'Telefone') . "</TD>" . "<td class='line'>" . TRANS('OCO_FIELD_LEVEL', 'Nível') . "</TD><td class='line'>" . TRANS('OCO_FIELD_ALTER', 'Alterar') . "</TD>" . "<td class='line'>" . TRANS('OCO_FIELD_EXCLUDE', 'Excluir') . "</TD></TR>";
$i = 0;
$j = 2;
while ($row = mysql_fetch_array($PAGE->RESULT_SQL)) {
$j % 2 ? $trClass = "lin_par" : ($trClass = "lin_impar");
$j++;
print "<tr class=" . $trClass . " id='linhax" . $j . "' onMouseOver=\"destaca('linhax" . $j . "','" . $_SESSION['s_colorDestaca'] . "');\" onMouseOut=\"libera('linhax" . $j . "','" . $_SESSION['s_colorLinPar'] . "','" . $_SESSION['s_colorLinImpar'] . "');\" onMouseDown=\"marca('linhax" . $j . "','" . $_SESSION['s_colorMarca'] . "');\">";
print "<td class='line'>" . $row['nome'] . "</TD>";
print "<td class='line'>" . $row['login'] . "</TD>";
print "<td class='line'>" . $row['sistema'] . "</TD>";
print "<td class='line'>" . transbool($row['user_admin']) . "</TD>";
print "<td class='line'>" . datab($row['data_inc']) . "</TD>";
print "<td class='line'>" . datab($row['data_admis']) . "</TD>";
print "<td class='line'>" . $row['email'] . "</TD>";
print "<td class='line'>" . NVL($row['fone']) . "</TD>";
print "<td class='line'><a href='usuarios.php?nivel=" . $row['nivel_cod'] . "&n_desc=" . $row['nivel_nome'] . "'>" . $row['nivel_nome'] . "</a></TD>";
print "<td class='line'><a onClick=\"redirect('usuarios.php?action=alter&cellStyle=true&login=" . $row['user_id'] . "')\"><img height='16' width='16' src='" . ICONS_PATH . "edit.png' title='" . TRANS('HNT_EDIT') . "'></a></td>";
print "<td class='line'><a onClick=\"javascript:confirmaAcao('" . TRANS('ENSURE_DEL') . " " . $row['nome'] . "?','usuarios.php','action=excluir&login=" . $row['user_id'] . "');\"><img height='16' width='16' src='" . ICONS_PATH . "drop.png' title='" . TRANS('HNT_DEL') . "'></TD>";
print "</TR>";
}
print "<tr><td colspan='8'>";
$PAGE->showOutputPages();
print "</td></tr>";
}
} else {
if (isset($_GET['action']) && $_GET['action'] == "incluir" && empty($_POST['submit'])) {
$row = mysql_fetch_array($resultado);
print "<BR>";