Index: /branches/eccube-donation/html/mobile/frontparts/bloc/send_point.php
===================================================================
--- /branches/eccube-donation/html/mobile/frontparts/bloc/send_point.php (revision 20622)
+++ /branches/eccube-donation/html/mobile/frontparts/bloc/send_point.php (revision 20622)
@@ -0,0 +1,151 @@
+tpl_login = false;
+ $this->tpl_disable_logout = false;
+ $this->tpl_error = "";
+ }
+
+ /**
+ * Page のプロセス.
+ *
+ * @return void
+ */
+ function process() {
+
+ $objCustomer = new SC_Customer();
+ $objCustomer->updateSession();
+ // クッキー管理クラス
+ $objCookie = new SC_Cookie(COOKIE_EXPIRE);
+
+ // ログイン判定
+ if($objCustomer->isLoginSuccess()) {
+ $this->tpl_user_point = $objCustomer->getValue('point');
+ if (strlen($this->tpl_user_point) == 0) $this->tpl_user_point = 0;
+ if(isset($_POST["sendpoint"]) and $this->isValidToken()){
+ //ポイント寄付処理
+ $point = intval(mb_convert_kana($_POST["sendpoint"],"n"));
+ if(!$point or $this->tpl_user_point < $point){
+ $this->tpl_error = "1以上のポイントを保有ポイント内で半角数字で入力してください。";
+ }else{
+ $objQuery = new SC_Query;
+ $sqlval = array('point' => ($this->tpl_user_point - $point));
+ $where = 'customer_id = ? AND del_flg = 0 AND status = 2';
+ $rs = $objQuery->update('dtb_customer', $sqlval, $where, array($objCustomer->getValue('customer_id')));
+ if($rs){
+ $fp = fopen(DATA_PATH.'downloads/donation.csv','a+');
+ fwrite($fp,date("Y-m-d G:i:s").",".$objCustomer->getValue('customer_id').",".$point."\n");
+ $objCustomer->setValue("point", ($this->tpl_user_point - $point));
+ $this->tpl_error = "ご協力ありがとうございます。".$point."ptを承りました。
寄付頂いたポイント分を、東北地方太平洋沖地震の復旧活動へ寄付いたします。";
+ } else {
+ $this->tpl_error = "システムエラー";
+ }
+ }
+ }
+ $this->tpl_login = true;
+ $objCustomer->updateSession();
+ $this->tpl_user_point = $objCustomer->getValue('point');
+ if (strlen($this->tpl_user_point) == 0) $this->tpl_user_point = 0;
+ $this->tpl_name1 = $objCustomer->getValue('name01');
+ $this->tpl_name2 = $objCustomer->getValue('name02');
+ } else {
+ // クッキー判定
+ $this->tpl_login_email = $objCookie->getCookie('login_email');
+ if($this->tpl_login_email != "") {
+ $this->tpl_login_memory = "1";
+ }
+
+ // POSTされてきたIDがある場合は優先する。
+ if($_POST['login_email'] != "") {
+ $this->tpl_login_email = $_POST['login_email'];
+ }
+ }
+ $this->transactionid = $this->getToken();
+ }
+
+ /**
+ * デストラクタ.
+ *
+ * @return void
+ */
+ function destroy() {
+ parent::destroy();
+ }
+}
+
+$objPage = new LC_Page_FrontParts_Bloc_SendPoint();
+register_shutdown_function(array($objPage, "destroy"));
+$objPage->init();
+$objPage->process();
+
+?>
+
+
東北地方太平洋沖地震へのポイント寄付のお願い
+tpl_login){?> +現在お客様が保有している当店のポイントを東北地方太平洋沖地震の復旧活動へ寄付出来ます。 tpl_error; ?> 会員のお客様は、現在お客様が保有している当店のポイントを東北地方太平洋沖地震の復旧活動へ寄付できます。ログインしてご協力をお願いします。
+下記フォームに寄付するポイント数を入力の上、「寄付」ボタンをクリックしてください。
+運営担当者が寄付されたポイントを集計し、東北地方太平洋沖地震の復旧活動に寄付させて頂きます。
+
+- ログイン -
+運営担当者が寄付されたポイントを集計し、東北地方太平洋沖地震の復旧活動へ寄付させて頂きます。
現在お客様が保有している当店のポイントを東北地方太平洋沖地震の復旧活動へ寄付出来ます。
+下記フォームに寄付するポイント数を入力の上、「寄付」ボタンをクリックしてください。
+運営担当者が寄付されたポイントを集計し、東北地方太平洋沖地震の復旧活動に寄付させて頂きます。
+tpl_error; ?>
+ +会員のお客様は、現在お客様が保有している当店のポイントを東北地方太平洋沖地震の復旧活動へ寄付できます。ログインしてご協力をお願いします。
+- ログイン -
+運営担当者が寄付されたポイントを集計し、東北地方太平洋沖地震の復旧活動へ寄付させて頂きます。
+ +集まったポイント | pt | +
---|---|
義援金総額 | 円 | +
顧客の保持ポイント合計 | pt | +
集まった義援金総額を, 義援金として日本赤十字社などにお贈り下さい
+ +寄付日時 | 顧客ID | お名前 | 寄付ポイント | +
---|---|---|---|
+ | + | + | pt | +