commit 67acbfb5a6ac42591b4c6bf3cf2b5fac97b78796
Author: hasse <hasegawa@i-hearts.jp>
Date:   Wed Mar 9 21:07:37 2016 -0500

    パスワード再発行機能実装

diff --git a/app/Controller/UsersController.php b/app/Controller/UsersController.php
index 879d3d9..a4c82f3 100755
--- a/app/Controller/UsersController.php
+++ b/app/Controller/UsersController.php
@@ -14,7 +14,7 @@ class UsersController extends AppController {
 
     public function beforeFilter() {
         parent::beforeFilter();
-        $this->Auth->allow('register','activate','confirm','sent','login','index');
+        $this->Auth->allow('register','activate','confirm','sent','login','reset_pwd','reset_pwd_confirm','reset_pwd_sent','newpwd','reset_pwd_comp_mail');
     }
 
 /**
@@ -198,15 +198,15 @@ class UsersController extends AppController {
  * @return void
  */
 	public function login() {
-		//var_dump(Security::hash( "123", 'blowfish'));
-		if($this->Auth->user()){
-			$this->redirect($this->Auth->redirectUrl());                          
-		}
+		// if($this->Auth->user()){
+		// 	$this->redirect($this->Auth->redirectUrl());                          
+		// }
 		if ($this->request->is('post')) {
 			if ($this->Auth->login()) {
-				// var_dump($this->Auth->login('User.status'));
-				// exit;
-				if($this->Auth->user('User.status') == 1){
+		 //    $options = array('conditions' => array('User.email' => $this->Auth->user('User.email'),'User.status' => 1));
+			// $this->request->data = $this->User->find('first', $options);
+			// $this->set('user', $this->request->data);
+				if($this->Auth->user('status') == 1){
 					$this->redirect('/Users/login_top');                          
 				}else{
 				$this->Flash->loginerror('まだ本登録が完了していません。送られてきたメールを見てね！', array(
@@ -240,6 +240,176 @@ class UsersController extends AppController {
 	}
 
 
+/**
+ * reset_pwd
+ */
+	public function reset_pwd() {
+		$this->User->validate = $this->User->reset_pwd_validate;
+		if ($this->request->is(array('post', 'put'))) {
+			$this->User->set($this->request->data);
+			if($this->User->validates()){
+				$this->Session->write('register',$this->request->data);
+				$this->redirect(array('action'=>'reset_pwd_confirm'));
+			}else{
+				$this->Flash->loginerror('メールアドレスが一致しません。誤りがないかもう一度ご確認の上、正確にご入力ください。', array(
+				    'key' => 'positive',
+					));
+			}
+		}
+	}
+	
+/**
+ * reset_pwd confirm
+ */
+	public function reset_pwd_confirm() {
+		if($this->Session->read('register')){
+			$this->set('register',$this->Session->read('register'));
+		}else{
+			$this->redirect(array('action'=>'reset_pwd'));
+		}
+	}
+
+
+/**
+ * register sent
+ */
+	public function reset_pwd_sent() {
+		// if (!empty( $this->data)){
+	 //        //  保存
+	    if($this->Session->read('register')){
+	            //  メール送信
+		$this->set('register',$this->Session->read('register'));
+		$mail = $this->Session->read('register.User.email');
+		$options = array('conditions' => array('User.email' => $mail));
+		$user = $this->User->find('first', $options);
+		$name = $user['User']['login_id'];
+
+        // ユーザアクティベート(本登録)用URLの作成 DSはスラッシュの意味
+        $url = 
+            DS . 'users' .          // コントローラ
+            DS . 'newpwd' .                       // アクション
+            DS . $user['User']['id'] .                  // ユーザID
+            DS . $this->User->getActivationHash();  // ハッシュ値
+        $url = Router::url( $url, true);  // ドメイン(+サブディレクトリ)を付与
+		$comment = $url;
+		$Email = new CakeEmail();
+		$Email->charset('ISO-2022-JP');
+		$Email->emailFormat('text');
+		$Email->template('user_reset_pwd');
+		$Email->viewVars(array('name'=>$name,'comment'=>$comment));
+		$Email->from( MAIL_FROM ); //MAIL_FROM：Config/const.phpにて定義
+		$Email->to($mail);
+		$Email->subject('[PICT CODE]問い合わせ');
+		$Email->send();
+	    }
+
+	}
+
+
+
+/**
+ * new password
+ */
+	public function newpwd( $user_id = null, $in_hash = null) {
+		$this->User->validate = $this->User->new_pwd_validate;
+
+	    // UserモデルにIDをセット
+	    $this->User->id = $user_id;
+	    if ($this->User->exists() && $in_hash == $this->User->getActivationHash()) {
+	        $this->Session->setFlash( '無効なURLです');
+			return $this->redirect(array('controller' => 'top', 'action' => 'index'));
+
+	    }else{
+		    if ($this->request->is(array('post', 'put'))) {
+
+				$this->set('user', $this->request->data);
+				if ($this->User->save($this->request->data)) {
+					return $this->redirect(array('action' => 'reset_pwd_comp_mail'));
+				} 
+			} else {
+			    $options = array('conditions' => array('User.id' => $user_id,'User.status' => 1));
+				$this->request->data = $this->User->find('first', $options);
+				$this->set('user', $this->request->data);
+					  //   	var_dump($this->request->data);
+		    	// exit;
+			}
+	    }
+
+	 //    $options = array('conditions' => array('User.id' => $user_id,'User.status' => 1));
+		// // $this->request->data = $this->set('user',$this->User->find('first', $options));
+		// $this->set('user',$this->User->find('first', $options));
+		// // $this->set('user', $this->request->data);
+
+
+	 //    // if ($this->User->exists() && $in_hash == $this->User->getActivationHash()) {
+	 //    // var_dump($this->request->data);
+	 //    // exit;
+	 //        if ($this->request->is(array('post', 'put'))) {
+		// 		// if($this->User->validates()){
+
+	 //            	$this->User->save($this->request->data);
+		// 			$this->redirect(array('action'=>'reset_pwd_comp_mail'));
+	 //     //        } else {
+		// 				// $this->Flash->loginerror('パスワードが一致しません。誤りがないかもう一度ご確認の上、正確にご入力ください。', array(
+		// 				//     'key' => 'positive',
+		// 				// 	));
+	 //     //        }
+	 //   //      } else {
+		// 	 //    $options = array('conditions' => array('User.id' => $user_id,'User.status' => 1));
+		// 		// $this->request->data = $this->set('user',$this->User->find('first', $options));
+		// 		// // $this->set('user', $this->request->data);
+	 //   //      $this->Session->setFlash( '無効なURLですaaa');
+	 //        // }
+
+
+	 //    }else{
+	 //    // 本登録に無効なURL
+	 //        $this->Session->setFlash( '無効なURLです');
+	 //    }
+	}
+
+/**
+ * 
+ */
+	public function reset_pwd_comp_mail() {
+		// if (!empty( $this->data)){
+		 //  保存
+		$this->User->validate = $this->User->new_pwd_validate;
+		    if( $this->User->save($this->request->data('user'))){
+		            //  メール送信
+			$this->set('register',$this->Session->read('register'));
+			$mail = $this->Session->read('register.User.email');
+			// exit;
+			$options = array('conditions' => array('User.email' => $mail));
+			$user = $this->User->find('first', $options);
+			$name = $user['User']['login_id'];
+
+	        // ユーザアクティベート(本登録)用URLの作成 DSはスラッシュの意味
+	        // $url = 
+	        //     DS . 'users' .          // コントローラ
+	        //     DS . 'newpwd' .                       // アクション
+	        //     DS . $user['User']['id'] .                  // ユーザID
+	        //     DS . $this->User->getActivationHash();  // ハッシュ値
+	        // $url = Router::url( $url, true);  // ドメイン(+サブディレクトリ)を付与
+			$comment = "本文本文本文本文本文本文本文本文";
+			$Email = new CakeEmail();
+			$Email->charset('ISO-2022-JP');
+			$Email->emailFormat('text');
+			$Email->template('comp_reset_pwd');
+			$Email->viewVars(array('name'=>$name,'comment'=>$comment));
+			$Email->from( MAIL_FROM ); //MAIL_FROM：Config/const.phpにて定義
+			$Email->to($mail);
+			$Email->subject('[PICT CODE]問い合わせ');
+			$Email->send();
+	    	}
+	    // }
+		// }else{
+	 //        exit;
+		// }
+debug($this->User->validationErrors);
+	}
+
+
 
 }
 
diff --git a/app/Model/ContactValidate.php b/app/Model/ContactValidate.php
index ffce6ae..e6b1f95 100755
--- a/app/Model/ContactValidate.php
+++ b/app/Model/ContactValidate.php
@@ -31,26 +31,49 @@ class ContactValidate extends AppModel {
  */
 	public $validate = array(
 		'name' => array(
-			'notblank' => array(
 				'rule' => array('notBlank'),
-				'message' => '入力されていません',
-			),
+                'message' => 'この項目は入力必須です'
 		),
-		'email' => array(
-			'notblank' => array(
+        'email' => array(
+        	array(
 				'rule' => array('notBlank'),
-				'message' => '入力されていません',
-			),
-			'isEmail' => array(
+                'message' => 'メールアドレスを入力してください'
+            ),
+            // メールアドレスであること。
+            'isEmail' => array( 
 				'rule' => 'Email',
-				'message' => '入力形式が正しくありません',
-			),
-		),
-		'comment' => array(
+            	'message' => '正しいメールアドレスを入力してください'
+            ),
+            array(
+                'rule' => 'emailConfirm', 
+                'message' => 'メールアドレスが一致していません'
+            ), 
+        ),
+        'email_confirm' => array(
+            array(
+				'rule' => array('notBlank'),
+                'message' => 'メールアドレス(確認)を入力してください'
+            ), 
+        ),
+
+        'comment' => array(
 			'notblank' => array(
 				'rule' => array('notblank'),
 				'message' => '入力されていません',
 			),
 		),
 	);
+
+
+    public function emailConfirm($check){
+        //２つのパスワードフィールドが一致する事を確認する
+        if($this->data['ContactValidate']['email'] === $this->data['ContactValidate']['email_confirm']){
+            return true;
+        }else{
+            return false;
+        }
+
+    }
+
+
 }
diff --git a/app/Model/User.php b/app/Model/User.php
index 944e56e..7c6022e 100755
--- a/app/Model/User.php
+++ b/app/Model/User.php
@@ -39,6 +39,18 @@ class User extends AppModel {
             // 一意性チェック
             // 'emailExists' => array( 'rule' => 'isUnique', 'message' => '既に登録されています'),
         ),
+        'email_confirm' => array(
+            array(
+				'rule' => array('notBlank'),
+                'message' => 'メールアドレス(確認)を入力してください'
+            ), 
+            array(
+                'rule' => 'emailConfirm', 
+                'message' => 'メールアドレスが一致していません'
+            ), 
+
+        ),
+
         'password' => array(
             array(
 				'rule' => array('notBlank'),
@@ -71,7 +83,79 @@ class User extends AppModel {
 		),
 	);
 
+	public $reset_pwd_validate = array(
+        'email' => array(
+        	array(
+				'rule' => array('notBlank'),
+                'message' => 'メールアドレスを入力してください'
+            ),
+            // メールアドレスであること。
+            'isEmail' => array( 
+				'rule' => 'Email',
+            	'message' => '正しいメールアドレスを入力してください'
+            ),
+            array(
+                'rule' => 'emailConfirm', 
+                'message' => 'メールアドレスが一致していません'
+            ), 
+            array(
+                'rule' => 'NotExistEmailCheck', 
+                'message' => 'このメールアドレスは登録されていません'
+            ), 
 
+        ),
+        'email_confirm' => array(
+            array(
+				'rule' => array('notBlank'),
+                'message' => 'メールアドレス(確認)を入力してください'
+            ), 
+
+        ),
+
+        'password' => array(
+            array(
+				'rule' => array('notBlank'),
+                'message' => 'パスワードを入力してください'
+            ), 
+            array(
+                'rule' => array('minLength', 8), 
+                'message' => 'パスワードは8文字以上入力してください', 
+            ),
+            array(
+                'rule' => 'passwordConfirm', 
+                'message' => 'パスワードが一致していません'
+            ), 
+        ),
+        'password_confirm' => array(
+            array(
+				'rule' => array('notBlank'),
+                'message' => 'パスワード(確認)を入力してください'
+            ), 
+        ),
+	);
+	public $new_pwd_validate = array(
+
+        'password' => array(
+            array(
+				'rule' => array('notBlank'),
+                'message' => 'パスワードを入力してください'
+            ), 
+            array(
+                'rule' => array('minLength', 8), 
+                'message' => 'パスワードは8文字以上入力してください', 
+            ),
+            array(
+                'rule' => 'passwordConfirm', 
+                'message' => 'パスワードが一致していません'
+            ), 
+        ),
+        'password_confirm' => array(
+            array(
+				'rule' => array('notBlank'),
+                'message' => 'パスワード(確認)を入力してください'
+            ), 
+        ),
+	);
 	public function DuplicateEmailCheck(){
 		$query = array('conditions' => array('User.email' => $this->data['User']['email'],'User.status' => 1));
 		$num = $this->find('count',$query);
@@ -95,6 +179,15 @@ class User extends AppModel {
 
     }
 
+    public function emailConfirm($check){
+        //２つのパスワードフィールドが一致する事を確認する
+        if($this->data['User']['email'] === $this->data['User']['email_confirm']){
+            return true;
+        }else{
+            return false;
+        }
+
+    }
 
 	public function getActivationHash() {
 	    // ユーザIDの有無確認
@@ -106,6 +199,20 @@ class User extends AppModel {
 	}
 
 
+	//メールアドレスが登録されていない、またはメールアドレスのstatusが１ではない場合、エラーを出す
+	public function NotExistEmailCheck(){
+		$query = array('conditions' => array('User.email' => $this->data['User']['email'],'User.status' => 1));
+		$num = $this->find('count',$query);
+		//$this->log($recodes);
+		//var_dump($num);
+		//exit;
+		if($num > 0){
+            return true;	//未登録
+		} else{
+            return false;	//登録済み
+		}
+	}
+
 	public function beforeSave($options = array()) {
 	    if (isset($this->data[$this->alias]['password'])) {
 	        $passwordHasher = new BlowfishPasswordHasher();
diff --git a/app/View/Emails/text/comp_reset_pwd.ctp b/app/View/Emails/text/comp_reset_pwd.ctp
new file mode 100755
index 0000000..0d2d91c
--- /dev/null
+++ b/app/View/Emails/text/comp_reset_pwd.ctp
@@ -0,0 +1,19 @@
+━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+このメールは、PICT CODE から配信されています
+━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+
+パスワードが変更されました。
+
+変更★変更★変更	
+
+お名前：<?php echo $name;?>
+
+お問い合わせ内容：
+
+<?php echo $comment;?>
+
+━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+PICT CODE カスタマーサポートセンター
+メールでのお問い合わせ： info@itkids.com
+━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
diff --git a/app/View/Emails/text/user_reset_pwd.ctp b/app/View/Emails/text/user_reset_pwd.ctp
new file mode 100755
index 0000000..d3c73f0
--- /dev/null
+++ b/app/View/Emails/text/user_reset_pwd.ctp
@@ -0,0 +1,17 @@
+━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+このメールは、PICT CODE から配信されています
+━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+
+パスワードを変更する場合には下記リンクからお願いします。
+
+お名前：<?php echo $name;?>
+
+お問い合わせ内容：
+
+<?php echo $comment;?>
+
+━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+PICT CODE カスタマーサポートセンター
+メールでのお問い合わせ： info@itkids.com
+━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
diff --git a/app/View/top/contact.ctp b/app/View/top/contact.ctp
index b3a15e6..52e3345 100755
--- a/app/View/top/contact.ctp
+++ b/app/View/top/contact.ctp
@@ -4,7 +4,7 @@
 			<h2>
 				<img src="/img/img_h1_contact01.png" alt="お問い合わせ - 送信内容入力">
 			</h2>
-			<p>PictCodeに関するお問い合わせやご相談、ご質問などがございましたら、下記のお問い合わせフォームより対応いたします。</p>
+			<p>PictCodeに関するお問い合わせやご相談、ご質問などがございましたら、下記のお問い合わせフォームよりご連絡ください。</p>
 		<hr>
 			<?php echo $this->Form->create('ContactValidate',array(
 										'div' => false,
@@ -36,14 +36,14 @@
 											'label' => 'メールアドレス',
 											'maxlength' => '255',
 								 			'type' => 'email'));
-								echo $this->Form->input('email',
+								echo $this->Form->input('email_confirm',
 									array('placeholder'=>'半角英数字',
 											'label' => 'メールアドレス(確認用)',
 											'maxlength' => '255',
 								 			'type' => 'email'));
-								echo $this->Form->input('postcode', array('label'=>'郵便番号',
+								echo $this->Form->input('postcode', array('label'=>'郵便番号（ハイフンなし）',
 											'onkeyup'=>'zipsearch()',
-											'placeholder'=>'半角数字で入力して下さい',
+											'placeholder'=>'半角数字',
 											)); 
 								echo $this->Form->input('prefecture', array('label'=>'ご住所',
 											'placeholder'=>'例） ○○県 ○○市○○町 ○丁目 ○‐○',
@@ -53,7 +53,7 @@
 											'placeholder'=>'例） ○○ビル○○号室',
 											)); 
 								echo $this->Form->input('tel',
-									array('placeholder'=>'半角英数字',
+									array('placeholder'=>'半角数字(00-0000-0000)',
 											'label' => 'お電話番号',
 											'maxlength' => '13',
 								 			'type' => 'text'));
diff --git a/app/View/users/login.ctp b/app/View/users/login.ctp
index fce486b..1aee454 100755
--- a/app/View/users/login.ctp
+++ b/app/View/users/login.ctp
@@ -37,7 +37,7 @@
                 </fieldset>   
                 <?php echo $this->Flash->render('positive') ?>
                 <section>
-                    <p>ニックネームや パスワードを 忘れたばあいには お父さんや お母さんに 相談して、<br><a href="reminder.html"><span class="link_reminder">コチラ</span></a>を　クリックして　パスワードを　再はっこうしてもらってね！</p>
+                    <p>ニックネームや パスワードを 忘れたばあいには お父さんや お母さんに 相談して、<br><a href="reset_pwd"><span class="link_reminder">コチラ</span></a>を　クリックして　パスワードを　再はっこうしてもらってね！</p>
                 </section>
                 <section class="button_area01">
                     <a href="/top/index"><p class="button btn_back02"></p></a>
diff --git a/app/View/users/newpwd.ctp b/app/View/users/newpwd.ctp
new file mode 100755
index 0000000..45c308c
--- /dev/null
+++ b/app/View/users/newpwd.ctp
@@ -0,0 +1,87 @@
+<!-- ログイン リマインダー -->
+	<main role="main">
+		<article class="contact">
+			<h2>
+				<img src="/img/img_h1_reissue.png" alt="パスワードの再設定">
+			</h2>
+			<p>パスワードの再設定を行います。ご両親にご確認の上、パスワードを正しく入力して下さい。入力されたパスワードは、忘れないようにメモに残しておき、大切に保管しましょう。</p>
+			<div id="contents">
+			<hr>
+			<?php echo $this->Form->create('User',array(
+										'div' => false,
+										'novalidate' => true,
+										'inputDefaults' => array(
+									        'before'  => '<dt>',
+									        'between' => '</dt><dd>',
+									        'after' => '</dd>',
+									        'div' => false
+									        )
+										)); ?>
+				<fieldset>
+					<section>
+						<dl>
+							<dt><label for="">ニックネーム</label></dt>
+							<dd>
+								<?php echo h($user['User']['login_id']); ?>
+							</dd>
+							<?php
+								echo $this->Form->input('password',
+									array( 'placeholder'=>'パスワード',
+											'label' => 'パスワード',
+											'maxlength' => '50',
+											'type' => 'password',
+											'value' => '',
+										));
+								 echo $this->Form->input('password_confirm',
+								  	array( 'placeholder'=>'パスワード（確認用）',
+											'label' => 'パスワード（確認用）',
+								  		 'maxlength' => '50', 
+								  		  'type' => 'password'
+								  		));
+
+
+								 //表示されない領域
+								echo $this->Form->input('login_id',
+									array( 'type' => 'hidden',
+											'label' => 'ニックネーム',
+											'placeholder'=>'ニックネーム',
+										 	'value' => $user['User']['login_id'],	
+										));
+								echo $this->Form->input( 'email',
+									array('placeholder'=>'メールアドレス',
+											'label' => 'メールアドレス',
+											'maxlength' => '255',
+										 	'value' => $user['User']['email'],	
+								 			'type' => 'hidden'));
+							//キャプチャコード　（recapcha）		
+								// echo $this->Recaptcha->display(array(
+								// 	    'recaptchaOptions' => array(
+								// 			 'theme' => 'blackglass'
+								// 			 )
+								// 		 ));
+								echo $this->Form->input('user_flg',
+								 	array(	'type' => 'hidden',
+										 	'value' => 0,	
+								 		));
+								echo $this->Form->input('status',
+								 	array(	'type' => 'hidden',
+										 	'value' => 1,	
+								 		));
+							?>
+						</dl>
+					</section>
+				</fieldset>
+
+                <?php echo $this->Flash->render('positive') ?>
+			</div>
+				<section class="button_area01">
+					<a href="javascript:history.back();">
+						<p class="button btn_back01"></p>
+					</a>
+				<?php  echo $this->Form->submit('',array('class'=>'button btn_check01')); ?>
+				<?php  echo $this->Form->end(); ?>
+
+<!-- 					<a href="reminder_check.html"><p class="button btn_check01"></p></a>
+ -->				</section>
+		</article>
+	</main>
\ No newline at end of file
diff --git a/app/View/users/register.html b/app/View/users/register.html
deleted file mode 100755
index 7b989ed..0000000
--- a/app/View/users/register.html
+++ /dev/null
@@ -1,100 +0,0 @@
-<!DOCTYPE html>
-
-<html>
-<head>
-	<title>-PictCode-</title>
-	<meta name="apple-mobile-web-app-capable" content="yes">
-	<meta name="viewport" content="width=device-width, initial-scale=1.0,  maximum-scale=1.0, minimum-scale=1.0">
-	<meta charset = "UTF-8">
-	<meta http-equiv="pragma" content="public">
-	<meta http-equiv="Cache-Control" content="public">
-	<meta http-equiv="Expires" content="-1">
-	<meta http-equiv="Expires" content="86400">
-	<!-- css -->
-	<link href = "css/main.css" rel="stylesheet" type="text/css">
-	<link href="css/bootstrap/bootstrap.css" rel="stylesheet" >
-	<link href="css/jquery-ui.min.css" rel="stylesheet" >
-	<!-- 	<link href = "css/fixedheaderandfooter.css" rel="stylesheet" type="text/css">-->
-</head>
-
-<body>
-	<!-- ヘッダー -->
-
-	<header>
-		<a href=""><img class="header_button left" type="button" src="img/btn_header_004.png" alt=""></a>
-		<img class="center" src="img/header_title.png" alt="Pict Code">
-		<a href=""><img class="header_button right" type="button" src="img/btn_header_014.png" alt=""></a>
-	</header>
-	
-	<!-- メインコンテンツ -->
-
-	<script type="text/javascript">
-	$(function(){
-		reviseMargin();
-		$(window).on("resize",reviseMargin);
-		function reviseMargin(){
-			$("#contents").css({
-				"margin-top":$("header")[150].offsetHeight + "px",
-				"margin-bottom": $("footer")[450].offsetHeight + "px"
-			});
-		}
-	});
-	</script>
-
-	<main role="main">
-		<article class="register">
-			<h2>
-				<img src="img/img_h1_register01.png" alt="PictCode登録 - 情報入力">
-			</h2>
-			<ol>
-			<li id="navigator01_on"></li>
-			<li id="navigator02_off"></li>
-			<li id="navigator03_off"></li>
-			<li id="navigator04_off"></li>
-			</ol>
-			<p class="">PictCodeに新規登録を行います。登録の際にはご両親の付き添い、または管理のもと、お間違いのないよう入力を行ってください。</p>
-			<div id="contents">
-				<section>
-					<dl>
-						<dt><label for="">ニックネーム</label></dt>
-						<dd><input type="text" name="name" value="" id="" placeholder="ニックネーム" /></dd>
-						<dt><label for="">パスワード</label></dt>
-						<dd><input type="text" name="email" value="" id="" placeholder="パスワード" /></dd>
-						<dt><label for="">パスワード（確認用）</label></dt>
-						<dd><input type="text" name="email" value="" id="" placeholder="パスワード(確認用)" /></dd>
-						<dt><label for="">メールアドレス</label></dt>
-						<dd><input type="text" name="email" value="" id="" placeholder="メールアドレス" /></dd>
-						<dt><label for="">キャプチャコード</label></dt>
-						<dd><input type="text" name="email" value="" id="" placeholder="絵の文字" /></dd>
-					</dl>
-				</section>
-			</div>
-				<section class="button_area01">
-					<a href="index.html"><p class="button btn_back01"></p></a>
-					<a href="register_check.html"><p class="button btn_check01"></p></a>
-				</section>
-		</article>
-	</main>
-
-	<!-- フッター -->
-
-	<footer>
-		<div id="wrapper">
-			<ul>
-				<li><a href="aboutthis.html" alt="">PictCodeについて</a></li>
-				<li><a href="terms.html" alt="">利用規約</a></li>
-				<li><a href="privacy.html" alt="">プライバシーポリシー</a></li>
-				<li><a href="aboutus.html" alt="">運営会社情報</a></li>
-				<li><a href="contact.html" alt="">お問い合わせ</a></li>
-			</ul>
-			<a href="index.html"><img class="logo" src="img/footer_logo01.png" alt=""></a>
-			<hr>
-			<img class="logo" src="img/footer_logo02.png" alt="">
-		</div>
-	</footer>
-
-	<!-- js -->
-	<script src="js/require_config.js"></script>
-	<script data-main="js/app.js" src="js/require.js"></script>
-</body>
-</html>
diff --git a/app/View/users/reset_pwd.ctp b/app/View/users/reset_pwd.ctp
new file mode 100755
index 0000000..ea55712
--- /dev/null
+++ b/app/View/users/reset_pwd.ctp
@@ -0,0 +1,52 @@
+<!-- ログイン リマインダー -->
+<main role="main">
+	<article class="contact">
+		<h2>
+			<img src="/img/img_h1_reissue.png" alt="パスワードの再設定">
+		</h2>
+		<p>パスワードを再発行します。ご両親にご確認の上、ご登録いただいたメールアドレスを入力し、パスワード再発行用のURLを取得してください。ニックネームに関しましては、再発行用URLをクリックした際に表示されます。<br>(※携帯電話用メールアカウントの場合、メールフィルターを解除する必要があります。「itkids.club」のアカウント受信設定を行ってください。)</p>
+		<div id="contents">
+		<hr>
+		<?php echo $this->Form->create('User',array(
+									'div' => false,
+									'novalidate' => true,
+									'inputDefaults' => array(
+								        'before'  => '<dt>',
+								        'between' => '</dt><dd>',
+								        'after' => '</dd>',
+								        'div' => false
+								        )
+									)); ?>
+			<fieldset>
+				<section>
+					<dl>
+						<?php
+							echo $this->Form->input('email',
+								array('placeholder'=>'メールアドレス',
+										'label' => 'メールアドレス',
+										'maxlength' => '255',
+							 			'type' => 'email'));
+							echo $this->Form->input('email_confirm',
+								array('placeholder'=>'メールアドレス(確認用)',
+										'label' => 'メールアドレス(確認用)',
+										'maxlength' => '255',
+							 			'type' => 'email'));
+
+						?>
+					</dl>
+				</section>
+			</fieldset>
+                <?php //echo $this->Flash->render('positive') ?>
+		</div>
+			<section class="button_area01">
+				<a href="javascript:history.back();">
+					<p class="button btn_back01"></p>
+				</a>
+			<?php  echo $this->Form->submit('',array('class'=>'button btn_check01')); ?>
+			<?php  echo $this->Form->end(); ?>
+
+<!-- 					<a href="reminder_check.html"><p class="button btn_check01"></p></a>
+-->
+			</section>
+	</article>
+</main>
\ No newline at end of file
diff --git a/app/View/users/reset_pwd_comp_mail.ctp b/app/View/users/reset_pwd_comp_mail.ctp
new file mode 100755
index 0000000..c9099f9
--- /dev/null
+++ b/app/View/users/reset_pwd_comp_mail.ctp
@@ -0,0 +1,16 @@
+<!-- ログイン リマインダー送信完了画面 -->
+	<main role="main">
+		<article class="contact">
+			<h2>
+				<img src="/img/img_h1_reissue.png" alt="お問い合わせ - 送信完了">
+			</h2>
+				<p>パスワード再発行用のURLを、ご登録いただいたメールアドレス宛てに送信しました。</p>
+				<p>メールボックスをご確認の上、メールに添付されているURLをクリックし、指示に従ってパスワードの再発行を行ってください。</p>
+			<section class="image">
+				<img src="/img/img_img_sendmail.png">
+			</section>
+			<section class="button_area01">
+					<a href="/top/index"><p class="button btn_top02"></p></a>
+			</section>
+		</article>
+	</main>
\ No newline at end of file
diff --git a/app/View/users/reset_pwd_confirm.ctp b/app/View/users/reset_pwd_confirm.ctp
new file mode 100755
index 0000000..dd758fe
--- /dev/null
+++ b/app/View/users/reset_pwd_confirm.ctp
@@ -0,0 +1,25 @@
+<!-- ログイン リマインダー確認画面 -->
+	<main role="main">
+		<article class="contact">
+			<h2>
+				<img src="/img/img_h1_reissue.png" alt="パスワードの再設定">
+			</h2>
+			<p class="">パスワードを再発行します。ご両親にご確認の上、ご登録いただいたメールアドレスを入力し、パスワード再発行用のURLを取得してください。ニックネームに関しましては、再発行用URLをクリックした際に表示されます。<br>(※携帯電話用メールアカウントの場合、メールフィルターを解除する必要があります。「itkids.club」のアカウント受信設定を行ってください。)</p>
+			<div id="contents">
+			<hr>
+				<section>
+					<dl>
+						<dt><label for="">メールアドレス</label></dt>
+						<dd><p><?php echo $register['User']['email'];?></p></dd>
+					</dl>
+				</section>
+				<section>
+					<p>以上の内容でよろしいでしょうか？内容に誤りがある場合には「修正する」ボタンを押し修正を、再発行する場合には「送信する」ボタンを押して再発行用URLを取得してください。</p>
+				</section>
+			</div>
+					<section class="button_area01">
+					<a href="javascript:history.back();"><p class="button btn_alter01"></p></a>
+					<a href="/users/reset_pwd_sent"><p class="button btn_reissue"></p></a>
+				</section>
+		</article>
+	</main>
\ No newline at end of file
diff --git a/app/View/users/reset_pwd_sent.ctp b/app/View/users/reset_pwd_sent.ctp
new file mode 100755
index 0000000..c9099f9
--- /dev/null
+++ b/app/View/users/reset_pwd_sent.ctp
@@ -0,0 +1,16 @@
+<!-- ログイン リマインダー送信完了画面 -->
+	<main role="main">
+		<article class="contact">
+			<h2>
+				<img src="/img/img_h1_reissue.png" alt="お問い合わせ - 送信完了">
+			</h2>
+				<p>パスワード再発行用のURLを、ご登録いただいたメールアドレス宛てに送信しました。</p>
+				<p>メールボックスをご確認の上、メールに添付されているURLをクリックし、指示に従ってパスワードの再発行を行ってください。</p>
+			<section class="image">
+				<img src="/img/img_img_sendmail.png">
+			</section>
+			<section class="button_area01">
+					<a href="/top/index"><p class="button btn_top02"></p></a>
+			</section>
+		</article>
+	</main>
\ No newline at end of file
diff --git a/app/View/users/user_register.ctp b/app/View/users/user_register.ctp
deleted file mode 100755
index 7f13c51..0000000
--- a/app/View/users/user_register.ctp
+++ /dev/null
@@ -1,16 +0,0 @@
-━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
-このメールは、PICT CODE から配信されています
-━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
-
-以下の内容で、お客様よりお問い合わせがありました。
-
-お名前：<?php echo $name;?>
-
-お問い合わせ内容：
-
-<?php echo $comment;?>
-
-━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
-PICT CODE カスタマーサポートセンター
-メールでのお問い合わせ： info@itkids.com
-━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
diff --git a/app/View/users/yano_login.ctp b/app/View/users/yano_login.ctp
deleted file mode 100755
index b6d27ee..0000000
--- a/app/View/users/yano_login.ctp
+++ /dev/null
@@ -1,22 +0,0 @@
-<div class="users form">
-<?php echo $this->Flash->render('auth'); ?>
-<?php echo $this->Form->create('User',array(
-										'inputDefaults' => array(
-											'div' => 'form-group',
-											'wrapInput' => false,
-											'class' => 'form-control'
-										),
-											'class' => 'well')); ?>
-    <fieldset>
-        <legend>
-            <?php echo __('ユーザーネームとパスワードを入力してください'); ?>
-        </legend>
-        <?php echo $this->Form->input('login_id',array( 'type' => 'text'));
-        echo $this->Form->input('password');
-    ?>
-    </fieldset>
-<?php echo $this->Session->Flash(); ?>
-<?php echo $this->Form->submit('ログイン',array('class'=>'btn btn-info')); ?>
-<?php echo $this->Form->end(); ?>
-</div>
-<?php echo $this->element('footer');?>
diff --git a/app/webroot/css/main.css b/app/webroot/css/main.css
index 6b5f26c..127cbc1 100755
--- a/app/webroot/css/main.css
+++ b/app/webroot/css/main.css
@@ -661,8 +661,7 @@ article.contact dl dd textarea {
 	-moz-border-radius: 5px;
 	border-radius: 5px;
 }
-article.contact dl dd div input span,
-article.contact dl dd div textarea span{
+article.contact dl dd div.input span{
 	margin: 0 0 0 120px;
 }
 
