?> </option> <option value="Odontogeriatria"><?php echo $LANG['patients']['odontogeriatry']; ?> </option> <option value="Ortopedia"><?php echo $LANG['patients']['orthopedy']; ?> </option> </select> <select name="procurar2" id="procurar2" style="display:none" class="forms" onchange="javascript:Ajax('pacientes/pesquisa', 'pesquisa', 'pesquisa='%2Bthis.options[this.selectedIndex].value%2B'&campo='%2BgetElementById('campo').options[getElementById('campo').selectedIndex].value)"> <option></option> <?php $dentista = new TDentistas(); $lista = $dentista->ListDentistas(); for ($i = 0; $i < count($lista); $i++) { if ($row[codigo_dentistaprocurado] == $lista[$i][codigo]) { echo '<option value="' . $lista[$i][codigo] . '" selected>' . $lista[$i][titulo] . ' ' . $lista[$i][nome] . '</option>'; } else { echo '<option value="' . $lista[$i][codigo] . '">' . $lista[$i][titulo] . ' ' . $lista[$i][nome] . '</option>'; } } ?> </select> <div id="procurar3" style="display:none"> <select name="mes1" id="mes1" class="forms" onchange="javascript:niver()"> <option value=""></option> <?php for ($i = 1; $i <= 12; $i++) { echo ' <option value="' . str_pad($i, 2, '0', STR_PAD_LEFT) . '">' . nome_mes($i) . '</option>';
include "../lib/calendario.inc.php"; ?> </div> <div class="conteudo" id="conteudo_central"> <table width="100%" border="0" cellpadding="0" cellspacing="0" class="conteudo"> <tr> <td width="43%"> <img src="agenda/img/agenda.png" alt="Agenda"> <span class="h3"><?php echo $LANG['calendar']['manage_calendar']; ?> </span></td> <td width="28%" valign="bottom"> <select name="codigo_dentista" class="forms" id="codigo_dentista" onchange="javascript:Ajax('agenda/pesquisa', 'pesquisa', 'pesquisa='%2BgetElementById('procurar').value%2B'&codigo_dentista='%2Bthis.options[this.selectedIndex].value)"> <option></option> <?php $dentista = new TDentistas(); $lista = $dentista->ListDentistas("SELECT * FROM `dentistas` WHERE `ativo` = 'Sim' ORDER BY `nome` ASC"); for ($i = 0; $i < count($lista); $i++) { if ($_SESSION[cpf] == $lista[$i][cpf]) { echo '<option value="' . $lista[$i][codigo] . '" selected>' . $lista[$i][titulo] . ' ' . $lista[$i][nome] . '</option>'; } else { echo '<option value="' . $lista[$i][codigo] . '">' . $lista[$i][titulo] . ' ' . $lista[$i][nome] . '</option>'; } } ?> </select></td> <td width="27%" align="right" valign="bottom"> <?php echo $LANG['calendar']['date']; ?> <input name="procurar" id="procurar" value="<?php
$dentistas = new TDentistas(); if ($_GET[campo] == 'nascimento') { $where = "WHERE MONTH(`nascimento`) = '" . $_GET[pesquisa] . "'"; } elseif ($_GET[campo] == 'nome') { $where = "WHERE `nome` LIKE '%" . $_GET[pesquisa] . "%'"; } elseif ($_GET[campo] == 'cpf') { $where = "WHERE `cpf` = '" . $_GET[pesquisa] . "'"; } if ($_GET[pg] != '') { $limit = ($_GET[pg] - 1) * PG_MAX; } else { $limit = 0; $_GET[pg] = 1; } $sql = "SELECT * FROM `dentistas` " . $where . " ORDER BY `nome` ASC"; $lista = $dentistas->ListDentistas($sql . ' LIMIT ' . $limit . ', ' . PG_MAX); $total_regs = $dentistas->ListDentistas($sql); $par = $odev = "F0F0F0"; $impar = "F8F8F8"; for ($i = 0; $i < count($lista); $i++) { if ($i % 2 == 0) { $odev = $par; } else { $odev = $impar; } if ($lista[$i][ativo] == 'Não') { $ativo = '#808080'; } else { $ativo = '#000000'; } ?>