function ShowManutTable($query) { $numRows = mysqli_num_rows(query($query)); echo "<div class=\"divider\"></div>"; echo "<br>" . ($numRows > 0 ? $numRows : "Nenhuma") . " " . ($numRows > 1 ? "manutenções." : "manutenção."); PrintTable(query($query)); }
function ShowTable($query) { PrintTable(query($query)); $numRows = mysqli_num_rows(query($query)); echo "<div class=\"divider\"></div>"; echo "<br>" . ($numRows > 0 ? $numRows : "Nenhum") . " " . ($numRows > 1 ? "items." : "item."); }
function ShowHistTable($query) { $numRows = mysqli_num_rows(query($query)); echo "<br>" . ($numRows > 0 ? $numRows : "Nenhuma") . " " . ($numRows > 1 ? "manutenções." : "manutenção."); echo "<div class=\"divider\"></div>"; if (validaRoot()) { PrintEditTable2(query($query)); } else { PrintTable(query($query)); } }
<?php if (isset($_POST['submit'])) { require_once 'fcnsdb.php'; $nome = $_POST['nome']; $cargo = $_POST['cargo']; $query = "INSERT INTO udescti.servidor VALUES ('{$nome}','{$cargo}')"; query($query); $query = "SELECT * FROM udescti.servidor WHERE nome like '{$nome}'"; PrintTable(query($query)); }
<br /><div width="100%"> <table border="0"> <tr><td>'; $output .= "<form action='index.php'>"; $output .= '<ul class="actionButtons"> <li id="Button1"><a href="index.php?a=112&id=' . $moduleid . '"><img src="media/style' . $theme . '/images/icons/refresh.png"> ' . $shop_lang['refresh'] . '</a></li> <li id="Button1"><a href="#" onclick="get2(this.form);"><img src="media/style' . $theme . '/images/icons/save.png"> ' . $shop_lang['save'] . '</a></li> </ul>'; if ($output_notice != "") { $output .= '<div class="notice">' . $output_notice . '</div>'; } if ($output_error != "") { $output .= '<div class="error">' . $output_error . '</div>'; } $output .= '<table width="800px" border="0" cellspacing="0"> <tbody align="left" valign="top" > <tr><td width="35%"><div width="100%">'; $output .= '<div onclick="tree_toggle(arguments[0])">'; $output .= '<div><b>' . $shop_lang['prices_tree_title'] . '</b></div>'; //$output.='<ul class="Container">'; $output .= PrintLi($tsvshop['CatRoot'], $col, $pt, $col_p, $col_pr, $col_id); $output .= '</div>'; $output .= '</td><td width="65%">'; $output .= PrintTable(0, $pt, $col_p, $col_pr, $col_id); $output .= '</td> </tr> </tbody> </table>'; $output .= '</form>'; $output .= "<input id='price_col' type='hidden' size='10' value='" . PriceCol() . "'>"; $output .= '</td></tr> </table> </div>'; $output .= '</div>';
function Output() { PrintTable($this->header, $this->data); }
function PrintLi($j, $col, $pt, $col_p, $col_pr, $col_id) { settype($j, integer); $n = $col[$j]['col']; if ($n != "") { settype($n, integer); for ($i = 1; $i <= $n; $i++) { $z = $col[$j][$i]; settype($z, integer); $nu .= '<ul class="Container">'; $n2 = $col[$z]['col']; if ($n2 != "") { if ($i < $n) { $nu .= '<li class="Node ExpandClosed">'; } else { $nu .= '<li class="Node ExpandClosed IsLast">'; } } else { if ($i < $n) { $nu .= '<li class="Node ExpandLeaf">'; } else { $nu .= '<li class="Node ExpandLeaf IsLast">'; } } $nu .= '<div class="Expand"></div>'; $nu .= '<div class="Content"><a id="ler' . $z . '">' . $pt[$z]; if ($col_p[$z]['col'] != "") { $nu .= '<b> [' . $col_p[$z]['col'] . ']</b>'; PrintTable($z, $pt, $col_p, $col_pr, $col_id); } $nu .= '</a></div>'; $n2 = $col[$z]['col']; if ($n2 != "") { $nu .= PrintLi($z, $col, $pt, $col_p, $col_pr, $col_id); } $nu .= '</li>'; $nu .= '</ul>'; } } return $nu; }