<?php # form for teacher to edit their info (profile, available, consultation_rate) ?> <form action="/t/teacher" method="post"><fieldset> <input type="hidden" name="action" value="UPDATE" /> <label for="profile">Your main profile: (use HTML)</label> <textarea name="profile" id="profile" rows="10" cols="120" class="small"><?php print htmlspecialchars($teacher->profile()); ?> </textarea> <label for="available">Available for consultations?</label> <?php print formselect('available', array('t' => 'YES', 'f' => 'NO'), $teacher->available()); ?> <label for="consultation_rate">If yes, what's your rate? (Example: “$75/hr” or “$100/song”.)</label> <input type="text" name="consultation_rate" id="consultation_rate" value="<?php print htmlspecialchars($teacher->consultation_rate()); ?> " /> <br /><br /> <input type="submit" name="submit" value="UPDATE" /> </fieldset></form>
<h2>Add New Video</h2> <form action="/t/document" method="POST"><fieldset> <input type="hidden" name="action" value="ADD" /> <?php print '<input type="hidden" name="teacher_id" value="' . intval($defaultteacher) . '" />'; ?> <label for="name">Name:</label> <input type="text" name="name" id="name" value="" size="30" /> <label for="pricecode">Price: (<a href="/t/priceref">set new prices here</a>)</label> <?php print formselect('pricecode', $pricecodes); ?> <br /><input type="submit" name="submit" value="ADD VIDEO" /> </fieldset></form>
print htmlspecialchars($d->youtube()); ?> " size="12" /> <label for="bytes">Bytes:</label> <input type="text" name="bytes" id="bytes" value="<?php print $d->bytes(); ?> " size="10" /> <label for="length">Length: (example: “94 minutes”)</label> <input type="text" name="length" id="length" value="<?php print htmlspecialchars($d->length()); ?> " size="16" /> <label for="pricecode">Price: (<a href="/t/priceref">set new prices here</a>)</label> <?php print formselect('pricecode', $pricecodes, $d->pricecode()); ?> <label for="sentence">Short one-sentence description</label> <input type="text" name="sentence" id="sentence" value="<?php print htmlspecialchars($d->sentence()); ?> " size="50" /> <label for="description">Description:</label> <textarea name="description" id="description" cols="70" rows="10"><?php print htmlspecialchars($d->description()); ?> </textarea> <br /> <p>created_at: <?php print $d->created_at(); ?>
<?php print '<h3>Tags:</h3>'; print '<form action="/a/document/' . $d->id . '" method="POST"><div><input type="hidden" name="action" value="ADDTAG" />'; print formselect('tag_id', $addtags, '', 'add_tag_id'); print '<input type="submit" name="submit" value="add" />'; print '</div></form>'; if (count($removetags)) { print '<form action="/a/document/' . $d->id . '" method="POST"><div><input type="hidden" name="action" value="REMOVETAG" />'; print formselect('tag_id', $removetags, '', 'remove_tag_id'); print '<input type="submit" name="submit" value="remove" />'; print '</div></form>'; }