Changeset 10985 for temp/branches/ec-cube-beta/html
- Timestamp:
- 2006/12/19 22:45:39 (20 years ago)
- Location:
- temp/branches/ec-cube-beta/html
- Files:
-
- 2 edited
-
admin/contents/campaign_create_tag.php (modified) (3 diffs)
-
campaign/default/index.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
temp/branches/ec-cube-beta/html/admin/contents/campaign_create_tag.php
r10979 r10985 127 127 $objPage->arrCatList = sfGetCategoryList(); 128 128 129 sfprintr(lfGetJavascript); 130 129 131 //----¡¡¥Ú¡¼¥¸É½¼¨ 130 132 $objView->assignobj($objPage); … … 155 157 } 156 158 159 160 /* ¥¿¥°¤òÀ¸À® */ 161 function lfGetCreateTag($product_id, $arrProductClass) { 162 163 global $objQuery; 164 165 $create_tag .= "<select name=\"classcategory_id1_$product_id\" style=\"\" onchange=\"lnSetSelect('classcategory_id1_$product_id');\">\n"; 166 $create_tag .= "<option value=\"\">ÁªÂò¤·¤Æ¤¯¤À¤µ¤¤</option>\n"; 167 foreach($arrProductClass as $arrVal) { 168 $classcategory_name = $objQuery->get("dtb_classcategory", "name", "classcategory_id = ?", array($arrVal['classcategory_id1'])); 169 $create_tag .= "<option label=\"$classcategory_name\" value=\"" . $arrVal['classcategory_id1'] . "\">" . $classcategory_name . "</option>\n"; 170 } 171 $create_tag .= "</select>\n"; 172 $create_tag .= "<a href=\"#\" onclick=\"fnFormModeSubmit('form1', 'cart', 'product_id', 404)\"><img src=\"images/top/button_03.jpg\" alt=\"¹ØÆþ¤¹¤ë\" width=\"138\" height=\"60\" border=\"0\" style=\"margin-left:10px;\" /></a>\n"; 173 174 return $create_tag; 175 } 176 177 /* javascript¼èÆÀ */ 178 function lfGetJavascript($product_id) { 179 180 // µ¬³Ê̾°ìÍ÷ 181 $arrClassName = sfGetIDValueList("dtb_class", "class_id", "name"); 182 // µ¬³ÊʬÎà̾°ìÍ÷ 183 $arrClassCatName = sfGetIDValueList("dtb_classcategory", "classcategory_id", "name"); 184 // javascriptÀ¸À® 185 $objPage = lfMakeSelect($product_id, $arrClassName, $arrClassCatName); 186 // ¹ØÆþÀ©¸Â¿ô¤ò¼èÆÀ 187 $objPage = lfGetSaleLimit($objPage->arrProducts[$i]); 188 189 return $objPage; 190 } 191 192 /* µ¬³Ê¥»¥ì¥¯¥È¥Ü¥Ã¥¯¥¹¤ÎºîÀ® */ 193 function lfMakeSelect($product_id, $arrClassName, $arrClassCatName) { 194 global $objPage; 195 196 $classcat_find1 = false; 197 $classcat_find2 = false; 198 // ºß¸Ë¤¢¤ê¤Î¾¦ÉʤÎÍ̵ 199 $stock_find = false; 200 201 // ¾¦Éʵ¬³Ê¾ðÊó¤Î¼èÆÀ 202 $arrProductsClass = lfGetProductsClass($product_id); 203 204 // µ¬³Ê1¥¯¥é¥¹Ì¾¤Î¼èÆÀ 205 $objPage->tpl_class_name1[$product_id] = $arrClassName[$arrProductsClass[0]['class_id1']]; 206 // µ¬³Ê2¥¯¥é¥¹Ì¾¤Î¼èÆÀ 207 $objPage->tpl_class_name2[$product_id] = $arrClassName[$arrProductsClass[0]['class_id2']]; 208 209 // ¤¹¤Ù¤Æ¤ÎÁȤ߹ç¤ï¤»¿ô 210 $count = count($arrProductsClass); 211 212 $classcat_id1 = ""; 213 214 $arrSele = array(); 215 $arrList = array(); 216 217 $list_id = 0; 218 $arrList[0] = "\tlist". $product_id. "_0 = new Array('ÁªÂò¤·¤Æ¤¯¤À¤µ¤¤'"; 219 $arrVal[0] = "\tval". $product_id. "_0 = new Array(''"; 220 221 for ($i = 0; $i < $count; $i++) { 222 // ºß¸Ë¤Î¥Á¥§¥Ã¥¯ 223 if($arrProductsClass[$i]['stock'] <= 0 && $arrProductsClass[$i]['stock_unlimited'] != '1') { 224 continue; 225 } 226 227 $stock_find = true; 228 229 // µ¬³Ê1¤Î¥»¥ì¥¯¥È¥Ü¥Ã¥¯¥¹ÍÑ 230 if($classcat_id1 != $arrProductsClass[$i]['classcategory_id1']){ 231 $arrList[$list_id].=");\n"; 232 $arrVal[$list_id].=");\n"; 233 $classcat_id1 = $arrProductsClass[$i]['classcategory_id1']; 234 $arrSele[$classcat_id1] = $arrClassCatName[$classcat_id1]; 235 $list_id++; 236 } 237 238 // µ¬³Ê2¤Î¥»¥ì¥¯¥È¥Ü¥Ã¥¯¥¹ÍÑ 239 $classcat_id2 = $arrProductsClass[$i]['classcategory_id2']; 240 241 // ¥»¥ì¥¯¥È¥Ü¥Ã¥¯¥¹É½¼¨ÃÍ 242 if($arrList[$list_id] == "") { 243 $arrList[$list_id] = "\tlist". $product_id. "_". $list_id. " = new Array('ÁªÂò¤·¤Æ¤¯¤À¤µ¤¤', '". $arrClassCatName[$classcat_id2]. "'"; 244 } else { 245 $arrList[$list_id].= ", '".$arrClassCatName[$classcat_id2]."'"; 246 } 247 248 // ¥»¥ì¥¯¥È¥Ü¥Ã¥¯¥¹POSTÃÍ 249 if($arrVal[$list_id] == "") { 250 $arrVal[$list_id] = "\tval". $product_id. "_". $list_id. " = new Array('', '". $classcat_id2. "'"; 251 } else { 252 $arrVal[$list_id].= ", '".$classcat_id2."'"; 253 } 254 } 255 256 $arrList[$list_id].=");\n"; 257 $arrVal[$list_id].=");\n"; 258 259 // µ¬³Ê1 260 $objPage->arrClassCat1[$product_id] = $arrSele; 261 262 $lists = "\tlists".$product_id. " = new Array("; 263 $no = 0; 264 foreach($arrList as $val) { 265 $objPage->tpl_javascript.= $val; 266 if ($no != 0) { 267 $lists.= ",list". $product_id. "_". $no; 268 } else { 269 $lists.= "list". $product_id. "_". $no; 270 } 271 $no++; 272 } 273 $objPage->tpl_javascript.= $lists.");\n"; 274 275 $vals = "\tvals".$product_id. " = new Array("; 276 $no = 0; 277 foreach($arrVal as $val) { 278 $objPage->tpl_javascript.= $val; 279 if ($no != 0) { 280 $vals.= ",val". $product_id. "_". $no; 281 } else { 282 $vals.= "val". $product_id. "_". $no; 283 } 284 $no++; 285 } 286 $objPage->tpl_javascript.= $vals.");\n"; 287 288 // ÁªÂò¤µ¤ì¤Æ¤¤¤ëµ¬³Ê2ID 289 $classcategory_id = "classcategory_id". $product_id; 290 $objPage->tpl_onload .= "lnSetSelect('".$classcategory_id."_1','".$classcategory_id."_2','".$product_id."','".$_POST[$classcategory_id."_2"]."'); "; 291 292 // µ¬³Ê1¤¬ÀßÄꤵ¤ì¤Æ¤¤¤ë 293 if($arrProductsClass[0]['classcategory_id1'] != '0') { 294 $classcat_find1 = true; 295 } 296 297 // µ¬³Ê2¤¬ÀßÄꤵ¤ì¤Æ¤¤¤ë 298 if($arrProductsClass[0]['classcategory_id2'] != '0') { 299 $classcat_find2 = true; 300 } 301 302 $objPage->tpl_classcat_find1[$product_id] = $classcat_find1; 303 $objPage->tpl_classcat_find2[$product_id] = $classcat_find2; 304 $objPage->tpl_stock_find[$product_id] = $stock_find; 305 306 return $objPage; 307 } 308 157 309 /* ¾¦Éʵ¬³Ê¾ðÊó¤Î¼èÆÀ */ 158 310 function lfGetProductsClass($product_id) { … … 170 322 } 171 323 172 /* ¥¿¥°¤òÀ¸À® */ 173 function lfGetCreateTag($product_id, $arrProductClass) { 174 175 global $objQuery; 176 177 $create_tag .= "<select name=\"classcategory_id1_$product_id\" style=\"\" onchange=\"lnSetSelect('classcategory_id1_$product_id');\">\n"; 178 $create_tag .= "<option value=\"\">ÁªÂò¤·¤Æ¤¯¤À¤µ¤¤</option>\n"; 179 foreach($arrProductClass as $arrVal) { 180 $classcategory_name = $objQuery->get("dtb_classcategory", "name", "classcategory_id = ?", array($arrVal['classcategory_id1'])); 181 $create_tag .= "<option label=\"$classcategory_name\" value=\"" . $arrVal['classcategory_id1'] . "\">" . $classcategory_name . "</option>\n"; 182 } 183 $create_tag .= "</select>\n"; 184 $create_tag .= "<a href=\"#\" onclick=\"fnFormModeSubmit('form1', 'cart', 'product_id', 404)\"><img src=\"images/top/button_03.jpg\" alt=\"¹ØÆþ¤¹¤ë\" width=\"138\" height=\"60\" border=\"0\" style=\"margin-left:10px;\" /></a>\n"; 185 186 return $create_tag; 187 } 324 // ¹ØÆþÀ©¸Â¿ô¤ÎÀßÄê 325 function lfGetSaleLimit($product) { 326 /* 327 global $objPage; 328 //ºß¸Ë¤¬Ìµ¸Â¤Þ¤¿¤Ï¹ØÆþÀ©¸ÂÃͤ¬ÀßÄêÃͤè¤êÂ礤¤¾ì¹ç 329 if($product['sale_unlimited'] == 1 || $product['sale_limit'] > SALE_LIMIT_MAX) { 330 $objPage->tpl_sale_limit[$product['product_id']] = SALE_LIMIT_MAX; 331 } else { 332 $objPage->tpl_sale_limit[$product['product_id']] = $product['sale_limit']; 333 } 334 335 return $objPage; 336 */ 337 } 338 188 339 ?> -
temp/branches/ec-cube-beta/html/campaign/default/index.php
r10963 r10985 18 18 $objView = new SC_SiteView(false); 19 19 $objQuery = new SC_Query(); 20 21 22 20 23 21 24 // ¥Ç¥£¥ì¥¯¥È¥ê̾¤ò¼èÆÀ
Note: See TracChangeset
for help on using the changeset viewer.
