This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- ISO 3166-2 --> | |
<select name="都道府県"> | |
<option value="">都道府県をお選びください。</option> | |
<optgroup label="北海道・東北"> | |
<option value="JP-01">北海道</option> | |
<option value="JP-02">青森県</option> | |
<option value="JP-03">岩手県</option> | |
<option value="JP-04">宮城県</option> | |
<option value="JP-05">秋田県</option> | |
<option value="JP-06">山形県</option> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- JIS ISO 順 --> | |
<select name="都道府県"> | |
<option value="">都道府県をお選びください。</option> | |
<optgroup label="北海道・東北"> | |
<option value="北海道">北海道</option> | |
<option value="青森県">青森県</option> | |
<option value="岩手県">岩手県</option> | |
<option value="宮城県">宮城県</option> | |
<option value="秋田県">秋田県</option> | |
<option value="山形県">山形県</option> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$prefectures = array( | |
'北海道・東北' => array('北海道'=>'北海道', '青森県'=>'青森県', '岩手県'=>'岩手県', '宮城県'=>'宮城県', '秋田県'=>'秋田県', '山形県'=>'山形県', '福島県'=>'福島県'), | |
'関東' => array('茨城県'=>'茨城県', '栃木県'=>'栃木県', '群馬県'=>'群馬県', '埼玉県'=>'埼玉県', '千葉県'=>'千葉県', '東京都'=>'東京都', '神奈川県'=>'神奈川県'), | |
'甲信越・北陸' => array('新潟県'=>'新潟県', '富山県'=>'富山県', '石川県'=>'石川県', '福井県'=>'福井県', '山梨県'=>'山梨県', '長野県'=>'長野県'), | |
'東海' => array('岐阜県'=>'岐阜県', '静岡県'=>'静岡県', '愛知県'=>'愛知県', '三重県'=>'三重県'), | |
'関西' => array('滋賀県'=>'滋賀県', '京都府'=>'京都府', '大阪府'=>'大阪府', '兵庫県'=>'兵庫県', '奈良県'=>'奈良県', '和歌山県'=>'和歌山県'), | |
'中国' => array('鳥取県'=>'鳥取県', '島根県'=>'島根県', '岡山県'=>'岡山県', '広島県'=>'広島県', '山口県'=>'山口県'), | |
'四国' => array('徳島県'=>'徳島県', '香川県'=>'香川県', '愛媛県'=>'愛媛県', '高知県'=>'高知県'), | |
'九州・沖縄' => array('福岡県'=>'福岡県', '佐賀県'=>'佐賀県', '長崎県'=>'長崎県', '熊本県'=>'熊本県', '大分県'=>'大分県', '宮崎県'=>'宮崎県', '鹿児島県'=>'鹿児島県', '沖縄県'=>'沖縄県'), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Index: /cakephp/1.2.x.x/cake/dispatcher.php | |
=================================================================== | |
--- /cakephp/1.2.x.x/cake/dispatcher.php (リビジョン 8256) | |
+++ /cakephp/1.2.x.x/cake/dispatcher.php (作業コピー) | |
@@ -601,6 +601,9 @@ | |
$pos = strpos($url, $type . '/'); | |
} else { | |
$pos = strpos($url, 'img/'); | |
+ if ($pos === false) { | |
+ $pos = strpos($url, 'css/'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Options +FollowSymLinks | |
RewriteEngine on | |
RewriteCond %{HTTP_HOST} ^www\.hoge\.com | |
RewriteRule ^(.*)$ http://hoge.com$1 [R=301,L] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
public function area_tag($area_id = null, $tag_id = null) { | |
if (!$area_id || !$tag_id) { | |
$this->Session->setFlash(__('Invalid Shop', true)); | |
$this->redirect(array('action'=>'index')); | |
} | |
$this->paginate = array( | |
'conditions' => array( | |
'Shop.is_hidden' => 0, | |
'AreasShop.area_id' => $area_id, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class Post extends AppModel { | |
var $name = 'Post'; | |
} | |
?> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE DATABASE `workshop` DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- | |
-- テーブルの構造 `posts` | |
-- | |
CREATE TABLE `posts` ( | |
`id` int(11) NOT NULL AUTO_INCREMENT, | |
`title` varchar(50) COLLATE utf8_unicode_ci NOT NULL, | |
`body` text COLLATE utf8_unicode_ci NOT NULL, | |
`created` datetime DEFAULT NULL, | |
`modified` datetime DEFAULT NULL, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
INSERT INTO posts (title, body, created) VALUES ('大阪', 'これは、記事の本文でっせー。', NOW()); | |
INSERT INTO posts (title, body, created) VALUES ('また大阪か', 'そこに本文が続きまんがな。', NOW()); | |
INSERT INTO posts (title, body, created) VALUES ('大阪の逆襲', 'こりゃほんまおもろいで!って、うそやねん〜', NOW()); |