Beispiel #1
0
?>
<div class="contactform">
    <div class="formular">
        <form method="post" action="logic.php">
            <label>Title:</label><br />
            <input type="text" required value="" name="titel"/><br />
            <label>Subtitle:</label><br />
            <input type="text" required value="" name="untertitel"/><br />
            <label>Text:</label><br />
            <textarea required name="text" rows="10"></textarea><br />
            <label>Foto:</label><br />
            <input type="text" required value="" name="foto" /><br />
            <label>Autor:</label><br />
						<select name="autor_id">
							<?php 
$list = fetchAuthors();
$length = count($list);
for ($i = 0; $i < $length; $i += 1) {
    echo '<option value="' . $list[$i][0] . '">' . $list[$i][1] . '</option>';
}
?>
						</select><br /
            <label>Link:</label><br />
            <select name="kategorie_id">
							<?php 
$categories = fetchCategories();
foreach ($categories as $key => $value) {
    echo '<option value="' . $value[0] . '">' . $value[1] . '</option>';
}
?>
						</select><br />
Beispiel #2
0
$k = 0;
while ($myrow = db_fetch($result)) {
    alt_table_row_color($k);
    label_cell($myrow[1]);
    label_cell($myrow[2]);
    label_cell($myrow[3]);
    label_cell($myrow[4]);
    edit_button_cell("Edit" . $myrow[0], _("Edit"));
    delete_button_cell("Delete" . $myrow[0], _("Delete"));
    end_row();
}
end_table(1);
start_table(TABLESTYLE2);
if ($selected_id != -1) {
    if ($Mode == 'Edit') {
        $result = fetchAuthors($selected_id);
        while ($myrow = db_fetch($result)) {
            $_POST['fname'] = $myrow['author_fname'];
            $_POST['mname'] = $myrow['author_mname'];
            $_POST['lname'] = $myrow['author_lname'];
            $_POST['bdate'] = sql2date($myrow["author_birthdate"]);
            $_POST['address'] = $myrow['author_address'];
            $_POST['contact_number'] = $myrow['author_contact_number'];
            $_POST['email_address'] = $myrow['author_email'];
            $_POST['selected_id'] = $myrow['id'];
        }
    }
    hidden('selected_id', $selected_id);
}
text_row_ex(_("First Name:"), 'fname', 25);
text_row_ex(_("Middle Name:"), 'mname', 25);