Changeset 17623
- Timestamp:
- 2008/09/22 23:41:51 (16 years ago)
- Location:
- branches/comu-ver2
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/comu-ver2/data/Smarty/templates/default/admin/basis/index.tpl
r17605 r17623 170 170 </table> 171 171 172 <h2>定休日設定</h2> 173 <table id="basis-index-func"> 174 <tr> 175 <th>定休日</th> 176 <td> 177 <span class="attention"><!--{$arrErr.regular_holiday_ids}--></span> 178 <!--{html_checkboxes name="regular_holiday_ids" options=$arrRegularHoliday selected=$arrForm.regular_holiday_ids}--> 179 </td> 180 </tr> 181 </table> 182 172 183 <h2>SHOP機能</h2> 173 184 <table id="basis-index-func"> -
branches/comu-ver2/data/class/pages/admin/basis/LC_Page_Admin_Basis.php
r16741 r17623 52 52 $this->arrTAXRULE = $masterData->getMasterData("mtb_taxrule"); 53 53 $this->tpl_subtitle = 'SHOPマスタ'; 54 55 //定休日用配列 56 $this->arrRegularHoliday[0] = '日'; 57 $this->arrRegularHoliday[1] = '月'; 58 $this->arrRegularHoliday[2] = '火'; 59 $this->arrRegularHoliday[3] = '水'; 60 $this->arrRegularHoliday[4] = '木'; 61 $this->arrRegularHoliday[5] = '金'; 62 $this->arrRegularHoliday[6] = '土'; 54 63 } 55 64 … … 82 91 // 入力データの変換 83 92 $this->arrForm = $this->lfConvertParam($this->arrForm); 93 $this->arrForm['regular_holiday_ids'] = $_POST['regular_holiday_ids']; // 定休日情報を付加 84 94 // 入力データのエラーチェック 85 95 $this->arrErr = $this->lfErrorCheck($this->arrForm); … … 98 108 $this->tpl_onload = "window.alert('SHOPマスタの登録が完了しました。');"; 99 109 } 110 if( empty($this->arrForm['regular_holiday_ids']) ) { 111 $this->arrSel = array(); 112 } else { 113 $this->arrSel = $this->arrForm['regular_holiday_ids']; 114 } 100 115 } else { 101 116 $arrCol = $this->lfGetCol(); … … 103 118 $arrRet = $objQuery->select($col, "dtb_baseinfo"); 104 119 $this->arrForm = $arrRet[0]; 120 121 $regular_holiday_ids = explode('|', $this->arrForm['regular_holiday_ids']); 122 $this->arrForm['regular_holiday_ids'] = $regular_holiday_ids; 105 123 } 106 124 … … 145 163 "free_rule", 146 164 "good_traded", 147 "message" 165 "message", 166 "regular_holiday_ids" 148 167 149 168 ); … … 155 174 $arrCol = $this->lfGetCol(); 156 175 foreach($arrCol as $val) { 157 $sqlval[$val] = $array[$val]; 176 //配列の場合は、パイプ区切りの文字列に変換 177 if(is_array($array[$val])) { 178 $sqlval[$val] = implode("|", $array[$val]); 179 } else { 180 $sqlval[$val] = $array[$val]; 181 } 158 182 } 159 183 $sqlval['update_date'] = 'Now()'; -
branches/comu-ver2/data/class/pages/frontparts/bloc/LC_Page_FrontParts_Bloc_Calendar.php
r17073 r17623 63 63 } 64 64 65 // 休日取得取得 66 $this->arrHoliday = $this->lfGetHoliday(); 67 65 68 // 定休日取得取得 66 $this->arr Holiday = $this->lfGetHoliday();69 $this->arrRegularHoliday = $this->lfGetRegularHoliday(); 67 70 68 71 // カレンダーデータ取得 … … 127 130 $arrCalendar[$j][$i]['month'] = $month; 128 131 $arrCalendar[$j][$i]['day'] = $Day->day; 129 if ($this->lfCheckHoliday($month, $Day->day) || $Day->first || $Day->last) {132 if ($this->lfCheckHoliday($month, $Day->day)) { 130 133 $arrCalendar[$j][$i]['holiday'] = true; 131 134 } else { … … 152 155 } 153 156 157 // 定休日取得 158 function lfGetRegularHoliday() { 159 $objSIteInfo = new SC_SiteInfo(); 160 $arrRegularHoliday = explode('|', $objSIteInfo->data['regular_holiday_ids']); 161 return $arrRegularHoliday; 162 } 163 154 164 // 休日チェック 155 165 function lfCheckHoliday($month, $day) { 156 166 if (!empty($this->arrHoliday[$month])) { 157 167 if (in_array($day, $this->arrHoliday[$month])) { 168 return true; 169 } 170 } 171 if (!empty($this->arrRegularHoliday)) { 172 $w = date('w', mktime(0,0,0 ,$month, $day, date('Y'))); 173 if (in_array($w, $this->arrRegularHoliday)) { 158 174 return true; 159 175 } -
branches/comu-ver2/html/install/sql/create_table_mysql.sql
r17601 r17623 142 142 mypage_tpl text, 143 143 good_traded text, 144 message text 144 message text, 145 regular_holiday_ids text 145 146 ) TYPE=InnoDB ; 146 147 -
branches/comu-ver2/html/install/sql/create_table_pgsql.sql
r17601 r17623 145 145 mypage_tpl text, 146 146 good_traded text, 147 message text 147 message text, 148 regular_holiday_ids text 148 149 ); 149 150
Note: See TracChangeset
for help on using the changeset viewer.