Langkah 9: Buat Proyek View
Pandangan file yang berisi lapisan presentasi untuk aplikasi Anda. Tujuannya adalah untuk menjaga informasi ini terpisah dari logika aplikasi Anda untuk usabilitas mudah dan kode bersih.
Untuk proyek ini, tiga pandangan yang diperlukan: maksud untuk daftar
koleksi album, maksud untuk membuat album baru, dan pandangan untuk
mengedit album yang sudah ada.
Buat file bernama list.php dalam aplikasi / views / dan paste kode berikut di:
01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 | <span class = "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class = "google-src-text" style= "direction: ltr; text-align: left" ><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" ></span> <! DOCTYPE html PUBLIC "- // W3C // DTD XHTML 1.0 Strict // EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" ></span> <span class = "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class = "google-src-text" style= "direction: ltr; text-align: left" ><html></span> <Html></span> <span class = "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class = "google-src-text" style= "direction: ltr; text-align: left" ><head></span> <Head></span> <span class = "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class = "google-src-text" style= "direction: ltr; text-align: left" ><?php</span> <? Php</span> <span class = "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class = "google-src-text" style= "direction: ltr; text-align: left" > echo html::stylesheet( array </span> gema html :: stylesheet ( array </span> <span class = "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class = "google-src-text" style= "direction: ltr; text-align: left" >(</span> (</span> <span class = "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class = "google-src-text" style= "direction: ltr; text-align: left" > 'assets/css/style' </span> 'Aset / css / style' </span> <span class = "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class = "google-src-text" style= "direction: ltr; text-align: left" >),</span> ),</span> <span class = "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class = "google-src-text" style= "direction: ltr; text-align: left" > array </span> susunan</span> <span class = "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class = "google-src-text" style= "direction: ltr; text-align: left" >(</span> (</span> <span class = "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class = "google-src-text" style= "direction: ltr; text-align: left" > 'screen' </span> 'Layar' </span> <span class = "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class = "google-src-text" style= "direction: ltr; text-align: left" >), FALSE);</span> ), SALAH);</span> <span class = "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class = "google-src-text" style= "direction: ltr; text-align: left" >?></span> ?></span> <span class = "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class = "google-src-text" style= "direction: ltr; text-align: left" ><title>CD COLLECTION</title></span> <Title> CD COLLECTION </ title></span> <span class = "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class = "google-src-text" style= "direction: ltr; text-align: left" ></head></span> </ Head></span> <span class = "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class = "google-src-text" style= "direction: ltr; text-align: left" ><body></span> <Body></span> <span class = "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class = "google-src-text" style= "direction: ltr; text-align: left" ><?php</span> <? Php</span> <span class = "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class = "google-src-text" style= "direction: ltr; text-align: left" > echo html::image( 'assets/images/add.png' );</span> gema html :: gambar (aset / gambar / add.png ');</span> <span class = "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class = "google-src-text" style= "direction: ltr; text-align: left" > echo html::anchor( 'album/show_create_editor' , 'Add new album' );</span> gema html :: anchor ( 'album / show_create_editor' , 'Add album baru' );</span> <span class = "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class = "google-src-text" style= "direction: ltr; text-align: left" >?></span> ?></span> <span class = "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class = "google-src-text" style= "direction: ltr; text-align: left" ><table class = "list" cellspacing= "0" ></span> <Class table = "daftar" cellspacing = "0" ></span> <span class = "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class = "google-src-text" style= "direction: ltr; text-align: left" ><tr></span> <Tr></span> <span class = "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class = "google-src-text" style= "direction: ltr; text-align: left" ><td colspan= "5" class = "list_title" >CD Collection</td></span> <Td colspan = "5" class = "list_title" > CD Collection </ td></span> <span class = "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class = "google-src-text" style= "direction: ltr; text-align: left" ></tr></span> </ Tr></span> <span class = "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class = "google-src-text" style= "direction: ltr; text-align: left" ><tr></span> <Tr></span> <span class = "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class = "google-src-text" style= "direction: ltr; text-align: left" ><td class = "headers" >Album name</td></span> <Td class = "header" > Nama album </ td></span> <span class = "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class = "google-src-text" style= "direction: ltr; text-align: left" ><td class = "headers" >Author</td></span> <Td class = "header" > Penulis </ td></span> <span class = "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class = "google-src-text" style= "direction: ltr; text-align: left" ><td colspan= '3' class = "headers" >Genre</td></span> <Td colspan = '3' class = "header" > Genre </ td></span> <span class = "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class = "google-src-text" style= "direction: ltr; text-align: left" ></tr></span> </ Tr></span> <span class = "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class = "google-src-text" style= "direction: ltr; text-align: left" ><?php</span> <? Php</span> <span class = "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class = "google-src-text" style= "direction: ltr; text-align: left" > foreach ( $albums_list as $item )</span> foreach ($ albums_list sebagai $ item)</span> <span class = "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class = "google-src-text" style= "direction: ltr; text-align: left" >{</span> {</span> <span class = "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class = "google-src-text" style= "direction: ltr; text-align: left" > echo "<tr>" ;</span> echo "<tr>" ;</span> <span class = "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class = "google-src-text" style= "direction: ltr; text-align: left" > echo "<td class='item'>" . $item ->name. "</td>" ;</span> echo "<td class = 'item'>" $ item-> nama "</ td>" ..;</span> <span class = "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class = "google-src-text" style= "direction: ltr; text-align: left" > echo "<td class='item'>" . $item ->author. "</td>" ;</span> echo "<td class = 'item'>" $ item-> penulis "</ td>" ..;</span> <span class = "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class = "google-src-text" style= "direction: ltr; text-align: left" > echo "<td class='item'>" . $item ->genre. "</td>" ;</span> echo "<td class = 'item'>" $ item-> bergenre "</ td>" ..;</span> <span class = "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class = "google-src-text" style= "direction: ltr; text-align: left" > echo "<td</span> echo " <td</span> class = 'item' > ".html::anchor('album/delete/'.$item->id,html::image('assets/images/delete.png'))." </td>"; <span class = "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class = "google-src-text" style= "direction: ltr; text-align: left" > echo "<td</span> echo " <td</span> class = 'item' > ".html::anchor('album/show_update_editor/'.$item->id,html::image('assets/images/edit.png'))." </td>"; <span class = "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class = "google-src-text" style= "direction: ltr; text-align: left" > echo "</tr>" ;</span> echo "</ tr>" ;</span> <span class = "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class = "google-src-text" style= "direction: ltr; text-align: left" >}</span> }</span> <span class = "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class = "google-src-text" style= "direction: ltr; text-align: left" >?></span> ?></span> <span class = "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class = "google-src-text" style= "direction: ltr; text-align: left" ></table></span> </ Table></span> <span class = "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class = "google-src-text" style= "direction: ltr; text-align: left" ></body></span> </ Body></span> <span class = "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class = "google-src-text" style= "direction: ltr; text-align: left" ></html></span> </ Html></span> |
Pandangan ini menunjukkan halaman html yang berisi daftar semua album. Daftar ini telah dibuat menggunakan foreach loop yang mencetak informasi dalam tabel html. Untuk setiap baris album, ada dua gambar: a "palang merah" dan "dompet". Mereka menghubungkan masing-masing metode menghapus controller dan metode update. Kedua lulus id album ke album kontroler menggunakan permintaan get. Daftar di atas ada tombol untuk membuat album baru.
Dalam kode ini kami juga menggunakan penolong html yang disediakan oleh
Kohana yang mempercepat operasi untuk menulis halaman html.
Sekarang mari kita membuat sebuah file yang bernama create.php dalam aplikasi / views /.
01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 | <span class = "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class = "google-src-text" style= "direction: ltr; text-align: left" ><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" ></span> <! DOCTYPE html PUBLIC "- // W3C // DTD XHTML 1.0 Strict // EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" ></span> <span class = "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class = "google-src-text" style= "direction: ltr; text-align: left" ><html></span> <Html></span> <span class = "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class = "google-src-text" style= "direction: ltr; text-align: left" ><head></span> <Head></span> <span class = "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class = "google-src-text" style= "direction: ltr; text-align: left" ><?php</span> <? Php</span> <span class = "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class = "google-src-text" style= "direction: ltr; text-align: left" > echo html::stylesheet( array </span> gema html :: stylesheet ( array </span> <span class = "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class = "google-src-text" style= "direction: ltr; text-align: left" >(</span> (</span> <span class = "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class = "google-src-text" style= "direction: ltr; text-align: left" > 'assets/css/style' </span> 'Aset / css / style' </span> <span class = "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class = "google-src-text" style= "direction: ltr; text-align: left" >),</span> ),</span> <span class = "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class = "google-src-text" style= "direction: ltr; text-align: left" > array </span> susunan</span> <span class = "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class = "google-src-text" style= "direction: ltr; text-align: left" >(</span> (</span> <span class = "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class = "google-src-text" style= "direction: ltr; text-align: left" > 'screen' </span> 'Layar' </span> <span class = "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class = "google-src-text" style= "direction: ltr; text-align: left" >), FALSE);</span> ), SALAH);</span> <span class = "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class = "google-src-text" style= "direction: ltr; text-align: left" >?></span> ?></span> <span class = "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class = "google-src-text" style= "direction: ltr; text-align: left" ><title>CD COLLECTION</title></span> <Title> CD COLLECTION </ title></span> <span class = "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class = "google-src-text" style= "direction: ltr; text-align: left" ></head></span> </ Head></span> <span class = "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class = "google-src-text" style= "direction: ltr; text-align: left" ><body></span> <Body></span> <span class = "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class = "google-src-text" style= "direction: ltr; text-align: left" ><?php echo form::open( 'album/create' );</span> ? <Form php echo :: terbuka ( 'album / buat' );</span> <span class = "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class = "google-src-text" style= "direction: ltr; text-align: left" >?></span> ?></span> <span class = "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class = "google-src-text" style= "direction: ltr; text-align: left" ><table class = 'editor' ></span> <Class tabel = 'Editor' ></span> <span class = "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class = "google-src-text" style= "direction: ltr; text-align: left" ><tr></span> <Tr></span> <span class = "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class = "google-src-text" style= "direction: ltr; text-align: left" ><td colspan= '2' class = 'editor_title' >Create new album</td></span> <Td colspan = "2" class = 'editor_title' > Buat album baru </ td></span> <span class = "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class = "google-src-text" style= "direction: ltr; text-align: left" ></tr></span> </ Tr></span> <span class = "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class = "google-src-text" style= "direction: ltr; text-align: left" ><?php</span> <? Php</span> <span class = "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class = "google-src-text" style= "direction: ltr; text-align: left" > echo "<tr>" ;</span> echo "<tr>" ;</span> <span class = "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class = "google-src-text" style= "direction: ltr; text-align: left" > echo "<td>" .form::label( 'name' , 'Name: ' ). "</td>" ;</span> echo "<td>" bentuk :: label ( 'nama' , 'Nama:' ) "</ td>" ;..</span> <span class = "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class = "google-src-text" style= "direction: ltr; text-align: left" > echo "<td>" .form::input( 'name' , '' ). "</td>" ;</span> echo "<td>" bentuk :: input ( 'nama' , '' ) "</ td>" ..;</span> <span class = "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class = "google-src-text" style= "direction: ltr; text-align: left" > echo "</tr>" ;</span> echo "</ tr>" ;</span> <span class = "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class = "google-src-text" style= "direction: ltr; text-align: left" > echo "<tr>" ;</span> echo "<tr>" ;</span> <span class = "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class = "google-src-text" style= "direction: ltr; text-align: left" > echo "<td>" .form::label( 'author' , 'Author: ' ). "</td>" ;</span> echo "<td>" bentuk :: label ( 'penulis' , 'Penulis:' ) "</ td>" ;..</span> <span class = "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class = "google-src-text" style= "direction: ltr; text-align: left" > echo "<td>" .form::input( 'author' , '' ). "</td>" ;</span> echo "<td>" bentuk :: input ( 'penulis' , '' ) "</ td>" ..;</span> <span class = "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class = "google-src-text" style= "direction: ltr; text-align: left" > echo "<tr/>" ;</span> echo "<tr />" ;</span> <span class = "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class = "google-src-text" style= "direction: ltr; text-align: left" > echo "<tr>" ;</span> echo "<tr>" ;</span> <span class = "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class = "google-src-text" style= "direction: ltr; text-align: left" > echo "<td>" .form::label( 'genre' , 'Genre: ' ). "</td>" ;</span> echo "<td>" bentuk :: label ( 'bergenre' , 'Genre:' ) "</ td>" ;..</span> <span class = "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class = "google-src-text" style= "direction: ltr; text-align: left" > echo "<td>" .form::dropdown( 'genre_id' , $genres_list ). "</td>" ;</span> echo "<td>" bentuk :: dropdown ( 'genre_id' , $ genres_list) "</ td>" ..;</span> <span class = "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class = "google-src-text" style= "direction: ltr; text-align: left" > echo "<tr/>" ;</span> echo "<tr />" ;</span> <span class = "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class = "google-src-text" style= "direction: ltr; text-align: left" > echo "<tr>" ;</span> echo "<tr>" ;</span> <span class = "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class = "google-src-text" style= "direction: ltr; text-align: left" > echo "<td colspan='2' align='left'>" .form::submit( 'submit' , 'Create album' ). "</td>" ;</span> echo "<td colspan =" 2 "align = 'meninggalkan'>" bentuk :: mengirimkan ( 'submit' , 'Buat album' ) "</ td>" ..;</span> <span class = "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class = "google-src-text" style= "direction: ltr; text-align: left" > echo "</tr>" ;</span> echo "</ tr>" ;</span> <span class = "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class = "google-src-text" style= "direction: ltr; text-align: left" >?></span> ?></span> <span class = "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class = "google-src-text" style= "direction: ltr; text-align: left" ></table></span> </ Table></span> <span class = "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class = "google-src-text" style= "direction: ltr; text-align: left" ><?php echo form::close();</span> ? <Form php echo :: dekat ();</span> <span class = "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class = "google-src-text" style= "direction: ltr; text-align: left" >?></span> ?></span> <span class = "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class = "google-src-text" style= "direction: ltr; text-align: left" ></body></span> </ Body></span> <span class = "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class = "google-src-text" style= "direction: ltr; text-align: left" ></html></span> </ Html></span> |
Terakhir namun tidak sedikit adalah pandangan pembaruan. Mari kita membuat sebuah file yang bernama update.php dalam aplikasi / views /.
01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 | <span class = "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class = "google-src-text" style= "direction: ltr; text-align: left" ><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" ></span> <! DOCTYPE html PUBLIC "- // W3C // DTD XHTML 1.0 Strict // EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" ></span> <span class = "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class = "google-src-text" style= "direction: ltr; text-align: left" ><html></span> <Html></span> <span class = "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class = "google-src-text" style= "direction: ltr; text-align: left" ><head></span> <Head></span> <span class = "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class = "google-src-text" style= "direction: ltr; text-align: left" ><?php</span> <? Php</span> <span class = "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class = "google-src-text" style= "direction: ltr; text-align: left" > echo html::stylesheet( array </span> gema html :: stylesheet ( array </span> <span class = "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class = "google-src-text" style= "direction: ltr; text-align: left" >(</span> (</span> <span class = "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class = "google-src-text" style= "direction: ltr; text-align: left" > 'assets/css/style' </span> 'Aset / css / style' </span> <span class = "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class = "google-src-text" style= "direction: ltr; text-align: left" >),</span> ),</span> <span class = "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class = "google-src-text" style= "direction: ltr; text-align: left" > array </span> susunan</span> <span class = "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class = "google-src-text" style= "direction: ltr; text-align: left" >(</span> (</span> <span class = "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class = "google-src-text" style= "direction: ltr; text-align: left" > 'screen' </span> 'Layar' </span> <span class = "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class = "google-src-text" style= "direction: ltr; text-align: left" >), FALSE);</span> ), SALAH);</span> <span class = "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class = "google-src-text" style= "direction: ltr; text-align: left" >?></span> ?></span> <span class = "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class = "google-src-text" style= "direction: ltr; text-align: left" ><title>CD COLLECTION</title></span> <Title> CD COLLECTION </ title></span> <span class = "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class = "google-src-text" style= "direction: ltr; text-align: left" ></head></span> </ Head></span> <span class = "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class = "google-src-text" style= "direction: ltr; text-align: left" ><body></span> <Body></span> <span class = "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class = "google-src-text" style= "direction: ltr; text-align: left" ><?php echo form::open( 'album/update' );</span> ? <Form php echo :: terbuka ( 'album / update' );</span> <span class = "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class = "google-src-text" style= "direction: ltr; text-align: left" >?></span> ?></span> <span class = "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class = "google-src-text" style= "direction: ltr; text-align: left" ><table class = 'editor' ></span> <Class tabel = 'Editor' ></span> <span class = "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class = "google-src-text" style= "direction: ltr; text-align: left" ><tr></span> <Tr></span> <span class = "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class = "google-src-text" style= "direction: ltr; text-align: left" ><td colspan= '2' class = 'editor_title' >Update album</td></span> <Td colspan = "2" class = 'editor_title' > Perbarui album </ td></span> <span class = "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class = "google-src-text" style= "direction: ltr; text-align: left" ></tr></span> </ Tr></span> <span class = "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class = "google-src-text" style= "direction: ltr; text-align: left" ><?php</span> <? Php</span> <span class = "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class = "google-src-text" style= "direction: ltr; text-align: left" > echo "<tr>" ;</span> echo "<tr>" ;</span> <span class = "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class = "google-src-text" style= "direction: ltr; text-align: left" > echo "<td>" .form::label( 'name' , 'Name: ' ). "</td>" ;</span> echo "<td>" bentuk :: label ( 'nama' , 'Nama:' ) "</ td>" ;..</span> <span class = "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class = "google-src-text" style= "direction: ltr; text-align: left" > echo "<td>" .form::input( 'name' , $name ). "</td>" ;</span> echo "<td>" bentuk :: input ( 'nama' , $ nama) "</ td>" ..;</span> <span class = "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class = "google-src-text" style= "direction: ltr; text-align: left" > echo "</tr>" ;</span> echo "</ tr>" ;</span> <span class = "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class = "google-src-text" style= "direction: ltr; text-align: left" > echo "<tr>" ;</span> echo "<tr>" ;</span> <span class = "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class = "google-src-text" style= "direction: ltr; text-align: left" > echo "<td>" .form::label( 'author' , 'Author: ' ). "</td>" ;</span> echo "<td>" bentuk :: label ( 'penulis' , 'Penulis:' ) "</ td>" ;..</span> <span class = "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class = "google-src-text" style= "direction: ltr; text-align: left" > echo "<td>" .form::input( 'author' , $author ). "</td>" ;</span> echo "<td>" bentuk :: input ( 'penulis' , $ author) "</ td>" ..;</span> <span class = "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class = "google-src-text" style= "direction: ltr; text-align: left" > echo "<tr/>" ;</span> echo "<tr />" ;</span> <span class = "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class = "google-src-text" style= "direction: ltr; text-align: left" > echo "<tr>" ;</span> echo "<tr>" ;</span> <span class = "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class = "google-src-text" style= "direction: ltr; text-align: left" > echo "<td>" .form::label( 'genre' , 'Genre: ' ). "</td>" ;</span> echo "<td>" bentuk :: label ( 'bergenre' , 'Genre:' ) "</ td>" ;..</span> <span class = "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class = "google-src-text" style= "direction: ltr; text-align: left" > echo "<td>" .form::dropdown( 'genre_id' , $genres_list , $genre_id ). "</td>" ;</span> echo "<td>" bentuk :: dropdown ( 'genre_id' , $ genres_list, $ genre_id) "</ td>" ..;</span> <span class = "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class = "google-src-text" style= "direction: ltr; text-align: left" > echo "<tr/>" ;</span> echo "<tr />" ;</span> <span class = "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class = "google-src-text" style= "direction: ltr; text-align: left" > echo "<tr>" ;</span> echo "<tr>" ;</span> <span class = "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class = "google-src-text" style= "direction: ltr; text-align: left" > echo "<td colspan='2' align='left'>" .form::submit( 'submit' , 'Update album' ). "</td>" ;</span> echo "<td colspan =" 2 "align = 'meninggalkan'>" bentuk :: mengirimkan ( 'submit' , 'Update album' ) "</ td>" ..;</span> <span class = "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class = "google-src-text" style= "direction: ltr; text-align: left" > echo "</tr>" ;</span> echo "</ tr>" ;</span> <span class = "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class = "google-src-text" style= "direction: ltr; text-align: left" >?></span> ?></span> <span class = "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class = "google-src-text" style= "direction: ltr; text-align: left" ></table></span> </ Table></span> <span class = "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class = "google-src-text" style= "direction: ltr; text-align: left" ><?php</span> <? Php</span> <span class = "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class = "google-src-text" style= "direction: ltr; text-align: left" > echo form::hidden( 'album_id' , $album_id );</span> bentuk gema :: tersembunyi ( 'album_id' , $ album_id);</span> <span class = "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class = "google-src-text" style= "direction: ltr; text-align: left" > echo form::close();</span> bentuk gema :: dekat ();</span> <span class = "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class = "google-src-text" style= "direction: ltr; text-align: left" >?></span> ?></span> <span class = "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class = "google-src-text" style= "direction: ltr; text-align: left" ></body></span> </ Body></span> <span class = "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class = "google-src-text" style= "direction: ltr; text-align: left" ></html></span> </ Html></span> |
Yang pertama adalah editor sederhana yang memungkinkan pengguna untuk memasukkan informasi tentang album baru.
Bidang seperti penulis dan nama akan dimasukkan menggunakan input html dan genre menggunakan
kotak kombo. Setelah pengguna mengklik pada membuat tombol, semua informasi dilewatkan,
sebagai permintaan POST, dengan membuat / update metode di controller album. Ketika controller menerima ini diposting
variabel, panggilan model yang memasukkan album baru ke dalam database. Bentuk-bentuk, baik dilihat, memanfaatkan Kohana bentuk helper.
Untuk memberikan sedikit gaya untuk aplikasi kita, membuat folder aset di root Kohana pada tingkat yang sama dari folder aplikasi. Sekarang, buka dan membuat dua folder baru: css dan gambar.
Dalam folder css membuat file bernama style.css baru dan paste ini:
01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 | <span class= "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class= "google-src-text" style= "direction: ltr; text-align: left" >a {</span> Sebuah {</span> <span class= "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class= "google-src-text" style= "direction: ltr; text-align: left" > font-family : Verdana , Geneva, Arial , Helvetica , sans-serif ;</span> font-family : Verdana , Geneva, Arial , Helvetica , sans-serif ;</span> <span class= "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class= "google-src-text" style= "direction: ltr; text-align: left" > font-weight : normal ;</span> font-weight : normal ;</span> <span class= "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class= "google-src-text" style= "direction: ltr; text-align: left" > font-size : 12px ;</span> font-size : 12px ;</span> <span class= "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class= "google-src-text" style= "direction: ltr; text-align: left" > color : #00F ;</span> color : # 00 F;</span> <span class= "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class= "google-src-text" style= "direction: ltr; text-align: left" > vertical-align : text-top ;</span> vertical-align : text-top ;</span> <span class= "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class= "google-src-text" style= "direction: ltr; text-align: left" >}</span> }</span> <span class= "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class= "google-src-text" style= "direction: ltr; text-align: left" >img {</span> img {</span> <span class= "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class= "google-src-text" style= "direction: ltr; text-align: left" > border : 0 ;</span> border : 0 ;</span> <span class= "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class= "google-src-text" style= "direction: ltr; text-align: left" >}</span> }</span> <span class= "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class= "google-src-text" style= "direction: ltr; text-align: left" >label {</span> label {</span> <span class= "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class= "google-src-text" style= "direction: ltr; text-align: left" > font-family : Verdana , Geneva, Arial , Helvetica , sans-serif ;</span> font-family : Verdana , Geneva, Arial , Helvetica , sans-serif ;</span> <span class= "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class= "google-src-text" style= "direction: ltr; text-align: left" > font-weight : normal ;</span> font-weight : normal ;</span> <span class= "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class= "google-src-text" style= "direction: ltr; text-align: left" > font-size : 12px ;</span> font-size : 12px ;</span> <span class= "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class= "google-src-text" style= "direction: ltr; text-align: left" >}</span> }</span> <span class= "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class= "google-src-text" style= "direction: ltr; text-align: left" >input {</span> memasukkan {</span> <span class= "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class= "google-src-text" style= "direction: ltr; text-align: left" > border : 1px solid #000 ;</span> border : 1px solid # 000 ;</span> <span class= "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class= "google-src-text" style= "direction: ltr; text-align: left" >}</span> }</span> <span class= "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class= "google-src-text" style= "direction: ltr; text-align: left" >select {</span> pilih {</span> <span class= "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class= "google-src-text" style= "direction: ltr; text-align: left" > width : 185px ;</span> width : 185px ;</span> <span class= "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class= "google-src-text" style= "direction: ltr; text-align: left" >}</span> }</span> <span class= "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class= "google-src-text" style= "direction: ltr; text-align: left" >table.editor</span> table.editor</span> <span class= "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class= "google-src-text" style= "direction: ltr; text-align: left" >{</span> {</span> <span class= "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class= "google-src-text" style= "direction: ltr; text-align: left" > text-align : center ;</span> text-align : center ;</span> <span class= "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class= "google-src-text" style= "direction: ltr; text-align: left" > font-family : Verdana , Geneva, Arial , Helvetica , sans-serif ;</span> font-family : Verdana , Geneva, Arial , Helvetica , sans-serif ;</span> <span class= "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class= "google-src-text" style= "direction: ltr; text-align: left" > font-weight : normal ;</span> font-weight : normal ;</span> <span class= "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class= "google-src-text" style= "direction: ltr; text-align: left" > font-size : 11px ;</span> font-size : 11px ;</span> <span class= "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class= "google-src-text" style= "direction: ltr; text-align: left" > color : #fff ;</span> Warna: # fff;</span> <span class= "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class= "google-src-text" style= "direction: ltr; text-align: left" > width : 280px ;</span> width : 280px ;</span> <span class= "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class= "google-src-text" style= "direction: ltr; text-align: left" > background-color : #666 ;</span> background-color : # 666 ;</span> <span class= "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class= "google-src-text" style= "direction: ltr; text-align: left" > border : 0px ;</span> border : 0px ;</span> <span class= "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class= "google-src-text" style= "direction: ltr; text-align: left" > border-collapse : collapse ;</span> border-collapse : collapse ;</span> <span class= "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class= "google-src-text" style= "direction: ltr; text-align: left" > border-spacing : 0px ;</span> border-spacing : 0px ;</span> <span class= "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class= "google-src-text" style= "direction: ltr; text-align: left" >}</span> }</span> <span class= "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class= "google-src-text" style= "direction: ltr; text-align: left" >table.editor td.editor_title</span> table.editor td.editor_title</span> <span class= "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class= "google-src-text" style= "direction: ltr; text-align: left" >{</span> {</span> <span class= "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class= "google-src-text" style= "direction: ltr; text-align: left" > background-color : #666 ;</span> background-color : # 666 ;</span> <span class= "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class= "google-src-text" style= "direction: ltr; text-align: left" > color : #fff ;</span> Warna: # fff;</span> <span class= "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class= "google-src-text" style= "direction: ltr; text-align: left" > padding : 4px ;</span> padding : 4px ;</span> <span class= "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class= "google-src-text" style= "direction: ltr; text-align: left" > text-align : left ;</span> text-align : left ;</span> <span class= "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class= "google-src-text" style= "direction: ltr; text-align: left" > font-weight : bold ;</span> font-weight : bold ;</span> <span class= "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class= "google-src-text" style= "direction: ltr; text-align: left" > font-size : 16px ;</span> font-size : 16px ;</span> <span class= "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class= "google-src-text" style= "direction: ltr; text-align: left" >}</span> }</span> <span class= "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class= "google-src-text" style= "direction: ltr; text-align: left" >table.editor td</span> table.editor td</span> <span class= "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class= "google-src-text" style= "direction: ltr; text-align: left" >{</span> {</span> <span class= "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class= "google-src-text" style= "direction: ltr; text-align: left" > padding : 4px ;</span> padding : 4px ;</span> <span class= "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class= "google-src-text" style= "direction: ltr; text-align: left" >}</span> }</span> <span class= "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class= "google-src-text" style= "direction: ltr; text-align: left" >table.list</span> table.list</span> <span class= "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class= "google-src-text" style= "direction: ltr; text-align: left" >{</span> {</span> <span class= "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class= "google-src-text" style= "direction: ltr; text-align: left" > text-align : center ;</span> text-align : center ;</span> <span class= "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class= "google-src-text" style= "direction: ltr; text-align: left" > font-family : Verdana , Geneva, Arial , Helvetica , sans-serif ;</span> font-family : Verdana , Geneva, Arial , Helvetica , sans-serif ;</span> <span class= "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class= "google-src-text" style= "direction: ltr; text-align: left" > font-weight : normal ;</span> font-weight : normal ;</span> <span class= "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class= "google-src-text" style= "direction: ltr; text-align: left" > font-size : 11px ;</span> font-size : 11px ;</span> <span class= "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class= "google-src-text" style= "direction: ltr; text-align: left" > color : #fff ;</span> Warna: # fff;</span> <span class= "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class= "google-src-text" style= "direction: ltr; text-align: left" > width : 280px ;</span> width : 280px ;</span> <span class= "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class= "google-src-text" style= "direction: ltr; text-align: left" > background-color : #666 ;</span> background-color : # 666 ;</span> <span class= "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class= "google-src-text" style= "direction: ltr; text-align: left" > border : 0px ;</span> border : 0px ;</span> <span class= "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class= "google-src-text" style= "direction: ltr; text-align: left" > border-collapse : collapse ;</span> border-collapse : collapse ;</span> <span class= "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class= "google-src-text" style= "direction: ltr; text-align: left" > border-spacing : 0px ;</span> border-spacing : 0px ;</span> <span class= "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class= "google-src-text" style= "direction: ltr; text-align: left" >}</span> }</span> <span class= "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class= "google-src-text" style= "direction: ltr; text-align: left" >table.list td.item</span> td.item table.list</span> <span class= "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class= "google-src-text" style= "direction: ltr; text-align: left" >{</span> {</span> <span class= "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class= "google-src-text" style= "direction: ltr; text-align: left" > background-color : #CCC ;</span> background-color : # ccc;</span> <span class= "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class= "google-src-text" style= "direction: ltr; text-align: left" > color : #000 ;</span> color : # 000 ;</span> <span class= "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class= "google-src-text" style= "direction: ltr; text-align: left" > padding : 4px ;</span> padding : 4px ;</span> <span class= "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class= "google-src-text" style= "direction: ltr; text-align: left" > text-align : left ;</span> text-align : left ;</span> <span class= "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class= "google-src-text" style= "direction: ltr; text-align: left" > border : 1px #fff solid ;</span> border : 1px # fff padat;</span> <span class= "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class= "google-src-text" style= "direction: ltr; text-align: left" >}</span> }</span> <span class= "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class= "google-src-text" style= "direction: ltr; text-align: left" >table.list td.list_title,table.list td.headers</span> td.list_title table.list, td.headers table.list</span> <span class= "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class= "google-src-text" style= "direction: ltr; text-align: left" >{</span> {</span> <span class= "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class= "google-src-text" style= "direction: ltr; text-align: left" > background-color : #666 ;</span> background-color : # 666 ;</span> <span class= "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class= "google-src-text" style= "direction: ltr; text-align: left" > color : #fff ;</span> Warna: # fff;</span> <span class= "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class= "google-src-text" style= "direction: ltr; text-align: left" > padding : 4px ;</span> padding : 4px ;</span> <span class= "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class= "google-src-text" style= "direction: ltr; text-align: left" > text-align : left ;</span> text-align : left ;</span> <span class= "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class= "google-src-text" style= "direction: ltr; text-align: left" > border-bottom : 2px #fff solid ;</span> border-bottom : 2px # fff padat;</span> <span class= "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class= "google-src-text" style= "direction: ltr; text-align: left" > font-weight : bold ;</span> font-weight : bold ;</span> <span class= "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class= "google-src-text" style= "direction: ltr; text-align: left" >}</span> }</span> <span class= "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class= "google-src-text" style= "direction: ltr; text-align: left" >table.list td.list_title</span> td.list_title table.list</span> <span class= "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class= "google-src-text" style= "direction: ltr; text-align: left" >{</span> {</span> <span class= "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class= "google-src-text" style= "direction: ltr; text-align: left" > font-size : 16px ;</span> font-size : 16px ;</span> <span class= "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class= "google-src-text" style= "direction: ltr; text-align: left" >}</span> }</span> <span class= "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class= "google-src-text" style= "direction: ltr; text-align: left" >table.list td.headers</span> td.headers table.list</span> <span class= "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class= "google-src-text" style= "direction: ltr; text-align: left" >{</span> {</span> <span class= "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class= "google-src-text" style= "direction: ltr; text-align: left" > font-size : 12px ;</span> font-size : 12px ;</span> <span class= "notranslate" onmouseover= "_tipon(this)" onmouseout= "_tipoff()" ><span class= "google-src-text" style= "direction: ltr; text-align: left" >}</span> }</span> |
Sekarang salin gambar berikut ke folder gambar:
Itu saja. Arahkan browser Anda ke http: //localhost/kohana/index.php/album dan Anda akan melihat sesuatu seperti ini:
Jika Anda mencoba untuk membuat album baru atau mengedit yang sudah ada Anda akan melihat sesuatu seperti ini:
Kohana: The Swift PHP Framework Langkah 10: Final Thoughts
Kohana: The Swift PHP Framework
Kohana: The Swift PHP Framework Langkah 10: Final Thoughts
Kohana: The Swift PHP Framework Langkah 9: Buat Proyek View
Kohana: The Swift PHP Framework Langkah 8: Buat Model Project
Kohana: The Swift PHP Framework Langkah 7: Buat Controller
Kohana: The Swift PHP Framework Langkah 6: Database Proyek
Kohana: The Swift PHP Framework Langkah 5: pertama Kohana Proyek Anda
Kohana: The Swift PHP Framework Langkah 4: Konfigurasi Kohana
Kohana: The Swift PHP Framework Langkah 3: Instalasi Kohana
Kohana: The Swift PHP Framework Langkah 2: Men-download Kohana
Kohana: The Swift PHP Framework Langkah 1: Apa Kohana?
0 komentar:
Posting Komentar
silahkan komentar