示例#1
0
?>
</textarea></td>
  		</tr>
  		<tr class="styling_sub"><!-- background audio -->
  			<td>Background audio</td>
  			<td><?php 
echo @(!empty($page->audio)) ? basename($page->audio) : 'No background audio has been set';
?>
</td>
  			<td class="styling_last"><select name="scalar:audio"><option value="">Choose an uploaded audio</option><?php 
$matched = false;
foreach ($book_audio as $book_audio_row) {
    if (@$page->audio == $book_audio_row->versions[$book_audio_row->version_index]->url) {
        $matched = true;
    }
    $slug_version = get_slug_version($book_audio_row->slug);
    echo '<option value="' . $book_audio_row->versions[$book_audio_row->version_index]->url . '" ' . (@$page->audio == $book_audio_row->versions[$book_audio_row->version_index]->url ? 'selected' : '') . '>' . $book_audio_row->versions[$book_audio_row->version_index]->title . (!empty($slug_version) ? ' (' . $slug_version . ')' : '') . '</option>';
}
if (!$matched) {
    echo '<option value="' . @$page->audio . '" selected>' . @$page->audio . '</option>';
}
?>
</td>
  		</tr>
  		</table>
  	</td>
  </tr>

	<!--  meta -->
	<tr id="add_meta">
	  <td class="field" valign="top"><a class="edit_page_arrow edit_page_arrow_down">Metadata</a></td>
示例#2
0
 echo "</td>\n";
 echo "</tr>\n";
 // Background
 echo '<tr typeof="books">';
 echo '<td><p>Background image</p></td>' . "\n";
 echo '<td style="vertical-align:middle;">';
 if (!empty($row->background)) {
     echo '<img src="' . abs_url($row->background, confirm_slash(base_url()) . $row->slug) . '?t=' . time() . '" style="vertical-align:middle;margin-right:10px;height:75px;border:solid 1px #aaaaaa;" /> ' . "\n";
 }
 echo '<p>Select image: <select name="background" style="max-width:400px;"><option value="">Choose an imported image</option>';
 $matched = false;
 foreach ($current_book_images as $book_image_row) {
     if (@$row->background == $book_image_row->versions[$book_image_row->version_index]->url) {
         $matched = true;
     }
     $slug_version = get_slug_version($book_image_row->slug);
     echo '<option value="' . $book_image_row->versions[$book_image_row->version_index]->url . '" ' . (@$row->background == $book_image_row->versions[$book_image_row->version_index]->url ? 'selected' : '') . '>' . $book_image_row->versions[$book_image_row->version_index]->title . (!empty($slug_version) ? ' (' . $slug_version . ')' : '') . '</option>';
 }
 if (@(!empty($row->background)) && !$matched) {
     echo '<option value="' . @$row->background . '" selected>' . @$row->background . '</option>';
 }
 echo '</select></p>';
 if (!empty($row->background)) {
     echo '<p><input type="checkbox" name="remove_background" id="remove_background" value="1" /><label for="remove_background"> Remove image</label></p></td>' . "\n";
 }
 echo '<td>';
 echo '</td>' . "\n";
 echo "</tr>\n";
 // Thumbnail
 echo '<tr typeof="books">';
 echo '<td><p>Thumbnail image</p></td>' . "\n";