Changeset 1784440
- Timestamp:
- 12/11/2017 12:32:54 AM (8 years ago)
- Location:
- salon-booking/trunk
- Files:
-
- 14 edited
-
languages/salon-booking-ja.mo (modified) (previous)
-
languages/salon-booking-ja.po (modified) (4 diffs)
-
readme.txt (modified) (2 diffs)
-
salon.php (modified) (5 diffs)
-
src/comp/booking-component.php (modified) (1 diff)
-
src/comp/link-component.php (modified) (1 diff)
-
src/comp/linkFunctionHotpepper-component.php (modified) (4 diffs)
-
src/comp/salonconst-component.php (modified) (1 diff)
-
src/control/link-control.php (modified) (1 diff)
-
src/data/basic-data.php (modified) (2 diffs)
-
src/data/link-data.php (modified) (1 diff)
-
src/page/booking_pc-page.php (modified) (1 diff)
-
src/page/configbooking-page.php (modified) (2 diffs)
-
src/page/salon-page.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
salon-booking/trunk/languages/salon-booking-ja.po
r1742391 r1784440 4 4 "Report-Msgid-Bugs-To: \n" 5 5 "POT-Creation-Date: 2017-07-28 08:20+0900\n" 6 "PO-Revision-Date: 2017-1 0-06 09:02+0900\n"6 "PO-Revision-Date: 2017-12-10 08:37+0900\n" 7 7 "Last-Translator: \n" 8 8 "Language-Team: \n" … … 42 42 #: salon-booking/salon.php:427 43 43 msgid "Salon Maintenance" 44 msgstr " サロン全体の設定"44 msgstr "全体の設定" 45 45 46 46 #: salon-booking/salon.php:430 … … 99 99 #: salon-booking/salon.php:479 100 100 msgid "Salon Management" 101 msgstr " サロン日々の管理"101 msgstr "日々の管理" 102 102 103 103 #: salon-booking/salon.php:482 … … 3898 3898 #: salon-booking/src/page/salon-page.php:3196 3899 3899 msgid "PC On business color" 3900 msgstr " 特別な営業日の色(PC)"3900 msgstr "営業日の色(PC)" 3901 3901 3902 3902 #: salon-booking/src/page/salon-page.php:3197 3903 3903 msgid "\\\"On business\\\" color on \\\"Reservtion\\\"" 3904 msgstr "予約画面の 特別な営業日の色"3904 msgstr "予約画面の営業日の色" 3905 3905 3906 3906 #: salon-booking/src/page/salon-page.php:3201 -
salon-booking/trunk/readme.txt
r1742391 r1784440 4 4 Requires at least: 4.0 5 5 Tested up to: 4.8 6 Stable tag: 1.8. 26 Stable tag: 1.8.3 7 7 License: GPLv2 or later 8 8 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 74 74 75 75 == Changelog == 76 = 1.8.3 = 77 * Changed display "special holiday" 78 * Fixed bug 79 76 80 = 1.8.2 = 77 81 * Fixed about drag/drop in front page -
salon-booking/trunk/salon.php
r1742391 r1784440 4 4 Plugin URI: http://salon.mallory.jp 5 5 Description: Salon Booking enables the reservation to one-on-one business between a client and a staff member. 6 Version: 1.8. 26 Version: 1.8.3 7 7 Author: tanaka-hisao 8 8 Author URI: http://salon.mallory.jp … … 10 10 Domain Path: /languages/ 11 11 */ 12 define( 'SL_VERSION', '1.8. 2' );12 define( 'SL_VERSION', '1.8.3' ); 13 13 define( 'SL_DOMAIN', 'salon-booking' ); 14 14 define( 'SL_PLUGIN_BASENAME', plugin_basename( __FILE__ ) ); … … 67 67 68 68 public function __construct() { 69 add_action('init', array( &$this, 'init_session_start'));69 // add_action('init', array( &$this, 'init_session_start')); 70 70 71 71 $this->maintenance = SL_DOMAIN.'-maintenace'; … … 133 133 // add_action( 'wp_ajax_sllink', array( &$this,'edit_link') ); 134 134 require_once(SL_PLUGIN_SRC_DIR . 'comp/linkFunctionHotpepper-component.php'); 135 add_action('wp_ajax_sllink', array( &$this,'edit_link')); 135 136 } 136 137 … … 319 320 320 321 321 public function init_session_start(){322 if (!isset($_SESSION)) session_start();323 }322 // public function init_session_start(){ 323 // if (!isset($_SESSION)) session_start(); 324 // } 324 325 325 326 public function update_profile_fields( $contactmethods ) { -
salon-booking/trunk/src/comp/booking-component.php
r1727804 r1784440 314 314 315 315 public function doServiceFromSalon($set_datas_array) { 316 // var_export($set_datas_array); 317 // wp_clear_scheduled_hook('sl_update_service_hotpepper'); 318 if (SALON_FOR_LINK ) { 316 if (1 != 1 && SALON_FOR_LINK ) { 319 317 320 318 $set_datas_array['type'] = $_POST['type']; -
salon-booking/trunk/src/comp/link-component.php
r1742391 r1784440 40 40 } 41 41 42 public function runLink() { 43 wp_schedule_event(time(), 'hourly', 'sl_update_reservation_hotpepper'); 44 } 42 45 46 public function checkEnviroment($service_cd, $branch_cd) { 47 $isOk = true; 48 $messages = array(); 49 //店の予約時間は30分単位 50 if (!$this->checkBranch($service_cd, $branch_cd, $messages)) { 51 $isOk = false; 52 } 53 //imapのクラスが必要 54 if (!$this->checkConfig($service_cd,$messages)) { 55 $isOk = false; 56 } 57 if (!$isOk) { 58 return $messages; 59 } 60 return $isOk; 61 62 } 63 64 public function checkBranch($service_cd, $branch_cd, &$messages) { 65 $isOk = true; 66 $branch_datas = $this->datas->getBranchData($branch_cd, 'open_time,close_time,time_step'); 67 if ($branch_datas !== false) { 68 switch ($service_cd) { 69 case Salon_Service::HOTPEPPER: 70 //hotpepperは30分単位 71 if ($branch_datas['time_step'] % 30 != 0) { 72 $messages[] = "店情報の「" 73 .__('Unit of Time (minutes)',SL_DOMAIN) 74 ."」は30分で割り切れる時間にしてください。"; 75 $isOk = false; 76 } 77 if (+substr($branch_datas['open_time'], -2) % 30 != 0) { 78 $messages[] = "店情報の「" 79 .__('Open Time',SL_DOMAIN) 80 ."」はXX:00またはXX:30にしてください。"; 81 $isOk = false; 82 } 83 if (+substr($branch_datas['close_time'], -2) % 30 != 0) { 84 $messages[] = "店情報の「" 85 .__('Close Time',SL_DOMAIN) 86 ."」はXX:00またはXX:30にしてください。"; 87 $isOk = false; 88 } 89 break; 90 } 91 } 92 return $isOk; 93 } 94 public function checkConfig($service_cd, &$messages) { 95 global $wp_filter; 96 $isOk = true; 97 98 if (!is_array($messages)) { 99 $messages = array(); 100 } 101 if ( !function_exists('imap_open') ) { 102 $messages[] = "IMAPが使用できません。"; 103 $isOk = false; 104 } 105 switch($service_cd) { 106 case Salon_Service::HOTPEPPER: 107 if (!isset($wp_filter['salon_set_config_for_hotpepper'])) { 108 $messages[] = "必要とするFILTERが定義されていません。"; 109 $isOk = false; 110 } 111 break; 112 } 113 return $isOk; 114 } 115 116 public function getLinkInformation() { 117 return wp_next_scheduled( 'sl_update_reservation_hotpepper' ); 118 } 119 120 public function stopLink() { 121 $start_time = wp_next_scheduled( 'sl_update_reservation_hotpepper' ); 122 $original_args = array(); 123 124 wp_unschedule_event( $start_time, 'sl_update_reservation_hotpepper', $original_args ); 125 } 43 126 44 127 -
salon-booking/trunk/src/comp/linkFunctionHotpepper-component.php
r1742391 r1784440 129 129 } 130 130 131 132 133 134 131 private function _editLinkData($datas) { 135 132 $set_data = array(); … … 148 145 149 146 public function update_reservation_from_service() { 147 //メールを読む 148 //アクセスする 149 //salon-bookingを更新する 150 150 151 151 } … … 351 351 352 352 $kanji = str_replace(" "," ",$set_datas['non_regist_name']); 353 $kana = mb_convert_kana($kanji, "C"); 354 if(preg_match("/^[ァ-ヾ]+$/u",$kana) === false) { 355 $kana = "サロン ブッキング"; 356 } 357 353 354 // $kana = mb_convert_kana($kanji, "C"); 355 // if(preg_match("/^[ァ-ヾ]+$/u",$kana) === false) { 356 // $kana = "サロン ブッキング"; 357 // } 358 // $kanas = explode(' ', $kana); 359 $kana = array("サロン","ブッキング"); 358 360 $names = explode(' ', $kanji); 359 $kanas = explode(' ', $kana);360 361 361 362 $url = self::URL_POST_REGIST; … … 386 387 ,"nmSeiKana" => $kanas[0] 387 388 ,"nmMeiKana" => $kanas[1] 388 ,"nmSei" => ""389 ,"nmMei" => ""389 ,"nmSei" => trim($names[0]) 390 ,"nmMei" => trim($names[1]) 390 391 ,"tel" => "" 391 392 ,"tel2" => "" -
salon-booking/trunk/src/comp/salonconst-component.php
r1742391 r1784440 174 174 //const PC_BACK = "#C2D5FC"; 175 175 const PC_BACK = "#FFFFFF"; 176 const PC_BACK_PALLET0 = "#696"; 176 177 const PC_BACK_PALLET1 = "#6633FF"; 177 178 const PC_BACK_PALLET2 = "#996600"; -
salon-booking/trunk/src/control/link-control.php
r1742391 r1784440 40 40 41 41 if ($this->action_class == 'Link_Page' ) { 42 $this->pages->set_link_information($this->comp->getLinkInformation()); 42 43 $this->pages->set_link_datas($this->datas->getLinkDatas()); 44 $user_login = $this->datas->getUserLogin(); 45 $this->pages->set_messages_of_check($this->comp->checkEnviroment(Salon_Service::HOTPEPPER,$this->datas->getBracnCdbyCurrentUser($user_login))); 46 47 43 48 44 49 } 45 50 elseif ($this->action_class == 'Link_Edit' ) { 46 51 $this->pages->check_request(); 47 $res = $this->comp->editTableData(); 48 $this->datas->update( $res); 52 if ($_POST['type'] == 'run' ) { 53 $this->comp->runLink(); 54 } 55 elseif ($_POST['type'] == 'stop' ) { 56 $this->comp->stopLink(); 57 } 58 49 59 } 50 60 -
salon-booking/trunk/src/data/basic-data.php
r1524367 r1784440 15 15 $now = new DateTime(date_i18n('Y-m-d')); 16 16 $min = clone $now; 17 $max = clone $now;17 // $max = clone $now; 18 18 // $min->sub(new DateInterval("P".$this->getConfigData('SALON_CONFIG_BEFORE_DAY')."D")); 19 19 // $max->add(new DateInterval("P".$this->getConfigData('SALON_CONFIG_AFTER_DAY')."D")); 20 20 $min->modify("-".$this->getConfigData('SALON_CONFIG_BEFORE_DAY')." day"); 21 $max->modify("+".$this->getConfigData('SALON_CONFIG_AFTER_DAY')." day");21 // $max->modify("+".$this->getConfigData('SALON_CONFIG_AFTER_DAY')." day"); 22 22 $minYmd = $min->format("Ymd"); 23 $maxYmd = $max->format("Ymd");23 // $maxYmd = $max->format("Ymd"); 24 24 25 $maxYmd = $target_year + 1 . '1231'; 25 26 26 27 $datas = $this->getBranchData($target_branch_cd,'sp_dates,open_time,close_time'); … … 28 29 if ($datas) { 29 30 $sp_dates = unserialize($datas['sp_dates']); 30 if ($sp_dates && !empty($sp_dates[$target_year])) { 31 foreach ($sp_dates[$target_year] as $k1 => $d1) { 32 if ($minYmd <= $k1 && $k1 <= $maxYmd) { 33 $title = __('special holiday',SL_DOMAIN); 34 if ($d1['status'] == Salon_Status::OPEN) $title = __('on business',SL_DOMAIN); 35 $target_date = __('%%m/%%d/%%Y',SL_DOMAIN); 36 $target_date = str_replace('%%Y',substr($k1,0,4),$target_date); 37 $target_date = str_replace('%%m',substr($k1,4,2),$target_date); 38 $target_date = str_replace('%%d',substr($k1,6,2),$target_date); 39 $show_date = $target_date . " " 40 . substr($d1['fromHHMM'],0,2) . ":" . substr($d1['fromHHMM'],2,2) 41 ." - " . substr($d1['toHHMM'],0,2) . ":" . substr($d1['toHHMM'],2,2); 42 $result[$target_date] = array("show_date"=>$show_date,"target_date"=>$target_date,"status_title"=>$title,"status"=>$d1['status'],"fromHHMM"=>$d1['fromHHMM'],"toHHMM"=>$d1['toHHMM']); 31 for($yyyy = $target_year ; $yyyy < $target_year + 2 ; $yyyy++) { 32 if ($sp_dates && !empty($sp_dates[$yyyy])) { 33 foreach ($sp_dates[$yyyy] as $k1 => $d1) { 34 if ($minYmd <= $k1 && $k1 <= $maxYmd) { 35 $title = __('special holiday',SL_DOMAIN); 36 if ($d1['status'] == Salon_Status::OPEN) $title = __('on business',SL_DOMAIN); 37 $target_date = __('%%m/%%d/%%Y',SL_DOMAIN); 38 $target_date = str_replace('%%Y',substr($k1,0,4),$target_date); 39 $target_date = str_replace('%%m',substr($k1,4,2),$target_date); 40 $target_date = str_replace('%%d',substr($k1,6,2),$target_date); 41 $show_date = $target_date . " " 42 . substr($d1['fromHHMM'],0,2) . ":" . substr($d1['fromHHMM'],2,2) 43 ." - " . substr($d1['toHHMM'],0,2) . ":" . substr($d1['toHHMM'],2,2); 44 $result[$target_date] = array("show_date"=>$show_date,"target_date"=>$target_date,"status_title"=>$title,"status"=>$d1['status'],"fromHHMM"=>$d1['fromHHMM'],"toHHMM"=>$d1['toHHMM']); 45 } 43 46 } 47 48 44 49 } 45 50 } -
salon-booking/trunk/src/data/link-data.php
r1742391 r1784440 139 139 ' * '. 140 140 ' FROM '.$wpdb->prefix.'salon_link '. 141 ' ORDER BY reservation_cd';141 ' ORDER BY update_time desc '; 142 142 if ($wpdb->query($sql) === false ) { 143 143 $this->_dbAccessAbnormalEnd(); -
salon-booking/trunk/src/page/booking_pc-page.php
r1742391 r1784440 1403 1403 else { 1404 1404 save_target_event._dhx_changed = false; 1405 scheduler._lame_copy(scheduler._events[s id],save_target_event);1405 scheduler._lame_copy(scheduler._events[save_target_event.id],save_target_event); 1406 1406 scheduler.updateEvent(save_target_event.id); 1407 1407 } -
salon-booking/trunk/src/page/configbooking-page.php
r1727804 r1784440 56 56 // || isset($this->config_datas['SALON_CONFIG_DO_NEW_FUNCTION'])) : ?> 57 57 $j('.color-picker').wpColorPicker({ 58 defaultColor: "<?php echo Salon_Color::PC_BACK; ?>"58 defaultColor:false 59 59 ,mode:'hsl' 60 60 ,controls: { … … 68 68 ,width: 350 // the width of the collection of UI elements 69 69 // ,palettes: false // show a palette of basic colors beneath the square. 70 ,palettes:['<?php echo Salon_Color::PC_BACK ; ?>'70 ,palettes:['<?php echo Salon_Color::PC_BACK_PALLET0; ?>' 71 71 , '<?php echo Salon_Color::PC_BACK_PALLET1; ?>' 72 72 , '<?php echo Salon_Color::PC_BACK_PALLET2; ?>' -
salon-booking/trunk/src/page/salon-page.php
r1727804 r1784440 2171 2171 this.show_cover(); 2172 2172 }; 2173 scheduler._on_dbl_click=function(e,a){if(a=a||e.target||e.srcElement,!this.config.readonly){var c=a.className.split(" ")[0];switch(c){case"dhx_scale_holder":case"dhx_scale_holder_now":case"dhx_month_body":case"dhx_wa_day_data":case"dhx_marked_timespan":if(!scheduler.config.dblclick_create)break;if(-1==a.className.indexOf("on_business") )this.addEventNow(this.getActionData(e).date,null,e);else{var t=this.dblclick_dhx_matrix_cell;t.call(this,e)}break;case"dhx_cal_event":case"dhx_wa_ev_body":case"dhx_agenda_line":case"dhx_grid_event":case"dhx_cal_event_line":case"dhx_cal_event_clear":var i=this._locate_event(a);if(!this.callEvent("onDblClick",[i,e]))return;this.config.details_on_dblclick||this._table_view||!this.getEvent(i)._timed||!this.config.select?this.showLightbox(i):this.edit(i);break;case"dhx_time_block":case"dhx_cal_container":return;default:var t=this["dblclick_"+c];if(t)t.call(this,e);else if(a.parentNode&&a!=this)return scheduler._on_dbl_click(e,a.parentNode)}}};2173 scheduler._on_dbl_click=function(e,a){if(a=a||e.target||e.srcElement,!this.config.readonly){var c=a.className.split(" ")[0];switch(c){case"dhx_scale_holder":case"dhx_scale_holder_now":case"dhx_month_body":case"dhx_wa_day_data":case"dhx_marked_timespan":if(!scheduler.config.dblclick_create)break;if(-1==a.className.indexOf("on_business")||"timeline"!=scheduler._mode)this.addEventNow(this.getActionData(e).date,null,e);else{var t=this.dblclick_dhx_matrix_cell;t.call(this,e)}break;case"dhx_cal_event":case"dhx_wa_ev_body":case"dhx_agenda_line":case"dhx_grid_event":case"dhx_cal_event_line":case"dhx_cal_event_clear":var i=this._locate_event(a);if(!this.callEvent("onDblClick",[i,e]))return;this.config.details_on_dblclick||this._table_view||!this.getEvent(i)._timed||!this.config.select?this.showLightbox(i):this.edit(i);break;case"dhx_time_block":case"dhx_cal_container":return;default:var t=this["dblclick_"+c];if(t)t.call(this,e);else if(a.parentNode&&a!=this)return scheduler._on_dbl_click(e,a.parentNode)}}}; 2174 2174 EOT; 2175 2175 if ($over24) {
Note: See TracChangeset
for help on using the changeset viewer.