<b class="left">Добавить запись</b> <br/> <form action="<?php echo $url; ?> " method="POST"> <input type="hidden" value="add" name="action"> <div class="field_costs"> <input type="date" name="add[date]"> </div> <div class="field_costs"> <input type="text" placeholder="Введите сумму" name="add[sum]" required> </div> <div class="field_costs"> <?php print_options($connection, 'Pay_types', 'Pay_type', '', 'add[pay_type]'); ?> </div> <div class="field_costs"> <input type="text" placeholder="Комментарий" name="add[comment]"> </div> <div class="field_costs"> <input type="submit" value="Добавить"> </div> </form> </div> <div class="clear"></div> </div>
<option value="e">e</option> <option value="f">f</option> <option value="g">g</option> <option value="h">h</option> <option value="j">j</option> <option value="k">k</option> </select> <b>ή</b> Ανασυνδυασμένος: <input name=HCVGenotype_combination> </p><p> Ημερομηνία πρώτης διάγνωσης Ημέρα: <select name="HCVDate_day"><option value="" selected><?php print_options(31); ?> </option></select> Μήνας: <select name="HCVDate_month"><option value="" selected><?php print_options(31); ?> </option></select> Έτος: <select name="HCVDate_year"><option value="" selected><?php print_years(); ?> </option></select> </div> <?php } ?> </select></P> <?php } else { echo "<p><b>Δεν μπορείτε να καταχωρήσετε HCV συλλοίμωξη για τον ασθενή γιατί </b><p>"; echo "<UL>\n";
<TR> <TD class="show" align="center">Ημερομηνία Διακοπής </TD> </TR> <TR><TD></TD></TR> <TR><TD></TD></TR> <TR> <TD align="center">Ημέρα: <select name="EndDate_day"> <option value=""></option> <?php print_options(31); ?> </select> Μήνας: <select name="EndDate_month"> <option value=""></option> <?php print_options(12); ?> </select> Έτος: <select name="EndDate_year"> <option value=""></option> <?php print_years_no_unknown(); ?> <option value=""></option> </select> </TD> </TR> </TABLE> </TD> </TR> <TR> <TD align=center style="border: 1px solid; background-color: white">
function print_update_page($connection, $table, $user, $id) { $lower_table = strtolower($table); #Выбираем редактируемую запись $query = "SELECT * FROM {$table} WHERE User = {$user} AND ID = {$id}"; $result = mysqli_query($connection, $query) or die(mysqli_error($connection)); #Количество колонок $cols = mysqli_num_fields($result) or die(mysqli_error($connection)); #Записать строку в переменную $row = mysqli_fetch_array($result) or die(mysqli_error($connection)); for ($i = 0; $i < $cols; $i++) { $values[$i] = $row[$i]; } echo "<div class='change_block'>\n\t\t\t\t\t<form method='POST' action=" . $lower_table . ".php>"; echo "<input type='hidden' value='update' name='action'>"; echo "<input type='hidden' value=" . $id . " name='update[id]'>"; echo "<div class='field_costs'>\n\t\t\t\t\t\t<input type='date' name=update[date] value=" . $values[1] . ">\n\t\t\t\t\t</div>"; echo "<div class='field_costs'>\n\t\t\t\t\t\t<input type='text' placeholder='Введите сумму' name=update[sum] value=" . $values[2] . " required>\n\t\t\t\t\t</div>"; echo "<div class='field_costs'>"; print_options($connection, 'Pay_types', 'pay_type', $values[3], $user); echo "</div>"; if (strpos($table, 'Costs')) { echo "<div class='field_costs'>\n\t\t\t\t\t\t<input type='text' placeholder='Место' name=update[place] value=" . $values[5] . ">\n\t\t\t\t\t</div>"; echo "<div class='field_costs'>"; print_options($connection, 'Buy_types', 'buy_type', $values[4]); echo "</div>"; echo "<div class='field_costs'>\n\t\t\t\t\t\t<input type='text' placeholder='Комментарий' name=update[comment] value='" . $values[6] . "'>\n\t\t\t\t\t</div>"; } elseif (strpos($table, 'Income')) { echo "<div class='field_costs'>\n\t\t\t\t\t\t<input type='text' placeholder='Комментарий' name=update[comment] value='" . $values[4] . "'>\n\t\t\t\t\t</div>"; } echo "<div class='field_costs'>\n\t\t\t\t\t\t<input type='submit' value='Update'>\n\t\t\t\t\t</div>"; echo "</form>\n\t\t\t\t</div>"; }
<link rel="stylesheet" type="text/css" href="style3.css"> </head> <?php include "_conect.php"; $sql = "select id,nume,prenume from {$clasa}"; $result = mysqli_query($conn, $sql); $id_to_name = array("" => ""); $name_to_id = array("" => ""); while ($row = mysqli_fetch_assoc($result)) { $id_now = $row["id"]; $nume = $row["nume"]; $pren = $row["prenume"]; $nume_comp = $nume . " " . $pren; $id_to_name[$id_now] = $nume_comp; $name_to_id[$nume_comp] = $id_now; } $sql = "select id,nume,prenume,sex from {$clasa}"; $result = mysqli_query($conn, $sql); function print_options($name_to_id, $name) { echo "<select name=\"{$name}\">"; foreach ($name_to_id as $name => $id) { echo "<option value=\"{$id}\">{$name}</option>"; } echo "</select>"; } echo "<p>Selectati elevul destinat stergerii:</p> "; echo "<form action=\"take_delete.php\" method=\"post\">\n"; print_options($name_to_id, "elev_sters"); echo "<input type=\"submit\" value=\"Trimite\">\n"; echo "</form>";
<?php print_options("ESSTISCH", "eg.tisch", TRUE, "EG"); ?> </TD><TD></TD><TD> <?php print_options("BAHNLICHT", "eg.bahnlicht", FALSE, "EG"); ?> </TD><TD></TD></TR> <TR height=20 align=center></TR> <TR height=70 align=center><TD></TD><TD></TD><TD></TD><TD></TD><TD colspan=3> <?php print_options("DECKE", "eg.decke", FALSE, "EG"); ?> </TD><TD></TD><TD> <?php print_options("SITZPLATZ", "eg.sitzplatz", FALSE, "EG"); ?> </TD><TD></TD></TR> <TR></TR> </TABLE> <HR> <A name="GE"> <H2>Send generic command:</H2> <FORM action="fs20.php"> <?php echo "<INPUT type=\"textarea\" cols=\"80\" rows=\"5\" name=\"generic\""; printf("value=\"%s\">", isset($_GET['generic']) ? $_GET['generic'] : ""); ?> <INPUT type="submit" name="submit" value="send">
<td valign="top"><label>' . translate('Event template') . ':</label></td> <td><textarea rows="12" cols="60" name="event_template" id="event_template">' . htmlentities($event_template, ENT_COMPAT, $charset) . '</textarea></td> <td class="aligntop cursoradd" width="150px">'; foreach ($event_options as $option) { print_options('event_template', $option); } echo ' </td> <td class="aligntop cursoradd">'; $extra_names = get_site_extras_names(EXTRA_DISPLAY_REPORT); if (count($extra_names) > 0) { echo ' <label>' . translate('Site Extras') . '</label><br />'; } foreach ($extra_names as $name) { print_options('event_template', 'extra:' . $name); } echo ' </td> </tr> <tr> <td colspan="4"> <input type="submit" value="' . translate('Save') . '" />' . ($adding_report ? '' : ' <input type="submit" name="delete" value="' . translate('Delete') . '" onclick="return confirm( \'' . str_replace('XXX', translate('report'), translate('Are you sure you want to delete this XXX?')) . '\');" />'); ob_end_flush(); ?> </td> </tr> </table> </form> <script type="text/javascript" language="javascript">
" method="POST"> <input type="hidden" value="add" name="action"> <div class="field_costs"> <input type="date" name="add[date]"> </div> <div class="field_costs"> <input type="text" placeholder="Введите сумму" name="add[sum]" required> </div> <div class="field_costs"> <?php print_options($connection, 'Pay_types', 'Pay_type', '', 'add[pay_type]'); ?> </div> <div class="field_costs"> <input type="text" placeholder="Место" name="add[place]"> </div> <div class="field_costs"> <?php print_options($connection, 'Buy_types', 'Buy_type', '', 'add[buy_type]'); ?> </div> <div class="field_costs"> <input type="text" placeholder="Комментарий" name="add[comment]"> </div> <div class="field_costs"> <input type="submit" value="Добавить"> </div> </form> </div>
echo "<p> Inserare relatii: </p>\n"; echo "<table>\n\n <form action=\"take_preferences.php\" method=\"post\">\n"; echo " <table border=solid> \n"; echo "<tr> <th>Id</th> <th>Nume</th> <th>Prenume</th> <th>Sex</th>\n <th>Pref1</th> <th>Pref2</th> <th>Pref3</th>\n <th>Anti1</th> <th>Anti2</th> <th>Anti3</th> </tr>\n"; $i = 0; while ($row = mysqli_fetch_assoc($result)) { echo "<tr>\n"; echo " <td>" . $row["id"] . "</td>\n"; echo " <td>" . $row["nume"] . "</td>\n"; echo " <td>" . $row["prenume"] . "</td>\n"; echo " <td>" . $row["sex"] . "</td>\n"; print_options($name_to_id, "id_p1_" . $i, $i); print_options($name_to_id, "id_p2_" . $i, $i); print_options($name_to_id, "id_p3_" . $i, $i); print_options($name_to_id, "id_a1_" . $i, $i); print_options($name_to_id, "id_a2_" . $i, $i); print_options($name_to_id, "id_a3_" . $i, $i); echo "</tr>\n"; ++$i; } echo "<input type=\"submit\" value=\"Trimite\">\n\n </form></table>\n"; } else { echo "0 results"; } mysqli_close($conn); ?> <html> </html>
function generate_form($inst_id) { global $USER, $COURSE, $CFG; $options = print_options($COURSE->id); $html = ''; $html .= "<span id='massaction_javascriptwarning'>" . get_string('javascript', 'block_massaction') . "</span>"; $html .= "<form name = \"massactionexecute\" id =\"massactionexecute\" action=\"{$CFG->wwwroot}/blocks/massaction/action.php\" method=\"post\">"; $html .= print_hidden_input("return_to", $_SERVER["REQUEST_URI"]); $html .= print_hidden_input("act_move", "move"); $html .= print_hidden_input("sesskey", $USER->sesskey); $html .= print_hidden_input("courseid", $COURSE->id); $html .= print_hidden_input("instance_id", $inst_id); $html .= "<table>"; $html .= "<tr><td colspan = 3><b>" . get_string('select', 'block_massaction') . "</b></td></tr>"; $html .= "<tr><td><img src=\"{$CFG->pixpath}/spacer.gif\" style='width:11px';/></td>"; $html .= "<td colspan = 2><a href=\"javascript:select_all()\">" . get_string('selectall', 'block_massaction') . "</a></td></tr> "; $html .= $options['select']; $html .= "<tr><td/><td colspan = 2><a href=\"javascript:deselect_all()\">" . get_string('deselectall', 'block_massaction') . "</a></td></tr>"; $html .= "<tr><td><div style='height:8px;'></div></td></tr>"; $html .= "<tr><td colspan = 3><b>" . get_string('with_selected', 'block_massaction') . "</b></td></tr>"; if (right_to_left()) { // support rtl / ltr (nadavkav patch) $html .= print_submit_text('outdent', '/t/right.gif'); $html .= print_submit_text('indent', '/t/left.gif'); } else { $html .= print_submit_text('outdent', '/t/left.gif'); $html .= print_submit_text('indent', '/t/right.gif'); } $html .= print_submit_text('hide', '/t/show.gif'); $html .= print_submit_text('show', '/t/hide.gif'); $html .= print_submit_text('delete', '/t/delete.gif'); $html .= $options['move']; $html .= "<tr><td colspan=4 style='text-align:center; width:100%'>" . helpbutton('massaction', get_string('title', 'block_massaction'), 'block_massaction', true, false, NULL, true) . "</td></tr>"; $html .= "</table></form>"; return $html; }
print_options($connection, 'Pay_types', 'Pay_type', '', $user, 'change[pay_type]'); ?> <input type="text" placeholder="Введите сумму" name="change[sum]" required> <input type="submit" value="Go"> </form> <form action="<?php echo $url; ?> " method="POST"> <input type="hidden" value="transfer" name="action"> <input type="text" placeholder="Введите сумму" name="transfer[sum]" required> <?php print_options($connection, 'Pay_types', 'Pay_type', '', $user, 'transfer[from]'); ?> <?php print_options($connection, 'Pay_types', 'Pay_type', '', $user, 'transfer[to]'); ?> <input type="submit" value="Transfer"> </form> </div> <div class="table_header"> <p>Состояние счетов</p> </div> <div class="table"> <?php print_accounts($connection, $user); ?> </div>
$result = mysqli_query($conn, $sql); $id_to_name = array("" => ""); $name_to_id = array("" => ""); while ($row = mysqli_fetch_assoc($result)) { $id_now = $row["id"]; $nume = $row["nume"]; $pren = $row["prenume"]; $nume_comp = $nume . " " . $pren; $id_to_name[$id_now] = $nume_comp; $name_to_id[$nume_comp] = $id_now; } $sql = "select id,nume,prenume,sex from {$clasa}"; $result = mysqli_query($conn, $sql); function print_options($name_to_id, $name) { echo "<select name=\"{$name}\">"; foreach ($name_to_id as $name => $id) { echo "<option value=\"{$id}\">{$name}</option>"; } echo "</select><br>"; } echo "<h3>Selectati elevul destinat schimbarii de date personale:</h3>"; echo "<form action=\"take_change.php\" method=\"post\">\n"; print_options($name_to_id, "elev"); echo "<p>"; echo "Nume : <input type=\"text\" name=\"nume\" placeholder=\"nume\"><br>\n"; echo "Prenume : <input type=\"text\" name=\"pren\" placeholder=\"prenume\"><br>\n"; echo "Sex : <input type=\"text\" name=\"sex\" placeholder=\"sex\"><br>\n"; echo "<input type=\"submit\" value=\"Trimite\">\n"; echo "</form>"; echo "</p>";