TecDoc補åã¯ãç¹å®ã®ã«ã¿ãã°ããŒãçªå·ãæã€ã¹ãã¢ããŒãã¡ãŒã«ãŒã®æ¥ç¶ã ãã§ãªããååã®ç»åãæšå¥šäŸ¡æ ŒããããŠæãéèŠãªããšã«ã¯ã¢ããã°ãæ€çŽ¢ããæ©èœãå«ãäžçš®ã®ããŒã¿ããŒã¹ã§ãã
ãµã€ããTecDocã«ã¿ãã°ã«ãªã³ã¯ããã«ã¯ããã®ããŒã¿ããŒã¹ãMySQLã«ã¢ããããŒãããå¿ èŠããããŸããã World Wide Webã®åºå€§ãã«ãããŠããã®æ å ±ã¯åé¡ãªãèŠã€ããããšãã§ãããããããã«ã€ããŠã¯è§ŠããŸããã
ãã®ãªã³ã©ã€ã³ã¹ãã¢ã§ã¯ãèªåè»ã®ã¹ãã¢ããŒãã販売ããŠããŸãã
ãªã³ã©ã€ã³ã¹ãã¢ã®åºç€ã¯CMS "HostCMS"ã§ãã 顧客ã¯ãã®CMSã®ã©ã€ã»ã³ã¹ãæã£ãŠããã®ã§ãããã°ãäœããããã§åããªããã°ãªããŸããã§ããã ããã«äœ¿çšã§ããŸããããã®è£œåã¯ãã®æ©èœã«ãæºè¶³ã§ããŸãã
ãªã³ã©ã€ã³ã¹ãã¢ã®äž»ãªæ¹è¯ç¹ã¯ãååãã«ã¿ãã°ã«ãã€ã³ãã§ããããšã§ããTecDocããŒã¿ããŒã¹ã¯ãåŠåã* .xls圢åŒã®äŸ¡æ Œè¡šããããŸãã¯æåã§-ãµã€ãã³ã³ãããŒã«ããã«ããããŠã³ããŒãã§ããããšãèæ ®ããŠããŸãã
ãŠãŒã¶ãŒãã¹ãã¢ã§ååãèŠã€ããããã®ããŒã«ããããŸãã
- ååãšäŒç€Ÿã§ã
- ãTecDocãã®å ã®çªå·ã§ã
- ãªã³ã©ã€ã³ã¹ãã¢ã®ã«ã¿ãã°ã®å éšçªå·ã«ããã
- ããŒãã®ã«ããŽãªã®ããªãŒã«ããã
- ãããŠæãéèŠãªããšã¯ããYour CarãããŒã«ã䜿çšããããšã§ãã
次ã«ãååé¡ã®è§£æ±ºæ¹æ³ã®è©³çŽ°ã«ã€ããŠèª¬æããŸãã
ååã®èŒžå ¥ã
æåã®ã¿ã¹ã¯ã¯ãçæãããäŸ¡æ Œè¡šããæ°ããã¢ã€ãã ãããŠã³ããŒãããããšã§ããã
äŸ¡æ Œè¡šã¯* .xls圢åŒã§ããããã®CMSã§ãã®åœ¢åŒãæäœããããã®æ¢è£œã®ããŒã«ããªãããã ãPHPExcelãã䜿çšããããšã«ããŸããã
ãPHPExcelãã¯ããã¡ã€ã«ããããŒã¿ãèªã¿åãã ãã§ãªãããã¡ã€ã«ãçæã§ãã䟿å©ãªããŒã«ã§ãã
ãã¹ãŠãçŸããèŠããããã«ããµã€ãã³ã³ãããŒã«ããã«ã§ã¢ãžã¥ãŒã«ãäœæããã€ã³ã¹ããŒã«ãããŠããã¢ãžã¥ãŒã«ã®ãªã¹ãã«ãã®ã¢ãžã¥ãŒã«ãžã®ãªã³ã¯ã衚瀺ããŸããã
ãªã³ã¯ãã¯ãªãã¯ãããšã管çè ã¯ãã¡ã€ã«ãããŠã³ããŒãããããã®ãã©ãŒã ã衚瀺ããŸãã ãã®éšåãããã°ã©ããŒåŽããèŠããšããã¹ãŠãæšæºã§ããã€ãŸãããã©ãŒã ãäœæããããã¡ã€ã«ãåä¿¡ãããååãå€æŽãããç®çã®ãã£ã¬ã¯ããªã«è»¢éãããŸãã ãã¡ã€ã«ã¿ã€ãããXSSãã«å¯Ÿããä¿è·ãªã©ãããããçš®é¡ã®ãã§ãã¯ãè¿œå ããããšããå§ãããŸãã
ãã©ãŒã ã§ã管çè ã¯ãµãŒããŒã«æ£åžžã«ã¢ããããŒãããããã¡ã€ã«ãéžæããŸãã
ãã®ããããã¡ã€ã«ã¯ãµãŒããŒã«ã¢ããããŒããããŸãã çŸåšã2ã€ã®ãªãã·ã§ã³ããããŸãã
1.åŠçã®ããã«ãã¡ã€ã«å šäœãå®è¡ããŸãã é©åãªãªãã·ã§ã³ã§ãããæ°äžä»¶ã®ã¬ã³ãŒããããå Žåãã€ã³ããŒãããã»ã¹ã¯å¶åŸ¡ãããŸããã
2. 2çªç®ã®ãªãã·ã§ã³ãããã䜿çšããŸããã
2.1ãã¡ã€ã«ãããŠã³ããŒãããåŸãå¡ãã€ã¶ãããè¡ã®æ°ã決å®ãããŸãã
2.2åŠçã®ããã«è¡çªå·ãéä¿¡ããã¹ã¯ãªãããçæãããŸã
2.2.1ã€ã³ããŒãããã»ã¹ã¯ããŒã»ã³ããŒãžã§è¡šç€ºãããŸã
2.2.2ãã€ã³ããŒãã®çµæã¯ãã€ã³ããŒãäžã«äžåãã«æé·ããããŒãã«ã®åœ¢åŒã§è¡šç€ºãããŸãã
2.3çµæã®è¡šããã管çè ã¯å補åã®çµæãšå¯èœãªã¢ã¯ã·ã§ã³ã確èªã§ããŸãã
å ·äœçã«ã¯ãäŸ¡æ Œè¡šã®è£œåã®äŸã瀺ããŸãã
ã¹ã¯ãªãããåŠçããè¡çªå·ãéä¿¡ãããšãå補åã®ããããã£ã®é åãåãåããŸãã ã€ãŸããäŸ¡æ Œè¡šã®åè¡ã¯åå¥ã®è£œåã«å¯Ÿå¿ããŠããããã®è£œåã«ã€ããŠã¯ãäŸ¡æ Œãæ°éãTecDocã«ã¿ãã°ã®é¡äŒŒç©ãªã©ã®ããããã£ãåŒãåºããŸãã
äŸ¡æ Œè¡šãã£ãŒã«ããå€æŽã§ããããŒã«ãäœæããå¿ èŠãããå Žåã¯ãååã®æåã®è¡ã«èå¥å±æ§ïŒããšãã°ããV.numbãããName.manufacturerããªã©ïŒãèšè¿°ãã2è¡ç®ãã¿ã€ãã«ã«ãªããŸããåã ãã®çµæãã€ã³ããŒãã¯3è¡ç®ããéå§ããå¿ èŠããããŸãã ã€ã³ããŒãããåã«ãèå¥å±æ§ã«åºã¥ããŠå¿ èŠãªãã£ãŒã«ãã決å®ããå¿ èŠããããŸãã
次ã®æé ã§ã¯ãå éšçªå·ãã¹ãã¢ã®ã«ã¿ãã°è£œåãšTecDocããŒã¹ã«ãªã³ã¯ããŸãã
1.å éšçªå·ã§ã«ã¿ãã°ãæ€çŽ¢ãã
2.補åãèŠã€ãã£ãå Žåã補åã®ç¹æ§ïŒäŸ¡æ Œãæ°éãªã©ïŒãæŽæ°ããŸã
3.補åãã¹ãã¢ã§èŠã€ãããªãå Žåã¯ããTecDocãã§æ€çŽ¢ããŸã
3.1äžããããå ã®çªå·ãšããã«å¯Ÿå¿ããé¡äŒŒç©ã«å¯ŸããŠ1ã€ã®è£œåãèŠã€ãã£ãå Žåããæ°ãã補åã®è¿œå ãã«é²ã¿ãŸãã
3.2è€æ°ã®è£œåãèŠã€ãã£ãå Žåãã補åã®ãããããéžæããžã®ãªã³ã¯ã衚瀺ããŸã
3.3補åãèŠã€ãããªãå Žåã¯ããä»»æã®è£œåãéžæããžã®ãªã³ã¯ãæäŸããŸã
3.4è€æ°ã®è£œåãããå ŽåããŸãã¯è£œåãèŠã€ãããªãå Žåãã¢ããã°ã¬ã³ãŒãã«å€æŽãå ããŸãïŒåããã£ãŒã«ãã«èšå·ã/ãã§åºåãããè€æ°ã®æ°åãããå ŽåãäžèŠãªæåãåé€ããããé åã«åå²ããŸãïŒãæ°ãã補åãè¿œå »
4.ãæ°ãã補åã®è¿œå ã-äŸ¡æ Œãªã¹ãã®ãã£ãŒã«ãã«åºã¥ããŠã«ã¿ãã°ã«æ°ãã補åãäœæããã補åã®æ¬ èœããŠããããããã£ã¯ããã©ã«ãå€ãåãåããŸãã ãšã³ããªãè¿œå ããçµæã®ããŒãã«ã«è¡šç€ºãããŸã
5.ã補åã®1ã€ãéžæã-ãã€ã¢ãã°ããã¯ã¹ã¯ã¹ã¯ãªããã®çµæã§ãã ãTecDocãã§ããã€ãã®ã¢ã€ãã ãèŠã€ãã£ã補åã®å察åŽãã¯ãªãã¯ãããšãã¹ã¯ãªãããã¢ã¯ãã£ãã«ãªããŸãã èŠã€ãã£ãTecDocã®äœçœ®çªå·ãåãå ¥ããå¿ èŠãªçªå·ãéžæã§ããŸãã
6.ã補åãéžæã-ãã€ã¢ãã°ããã¯ã¹ã¯ã¹ã¯ãªããã®çµæã§ãã ãã®ã¹ã¯ãªããã¯ããTecDocãã§ã¢ã€ãã ãèŠã€ãããªãã£ã補åã®å察åŽãã¯ãªãã¯ããããšã§ã¢ã¯ãã£ãã«ãªãããã¹ãŠã®ã¡ãŒã«ãŒããç®çã®ããŒããéžæã§ããŸãã
ã¢ãžã¥ãŒã«ã®å€èŠ³ïŒ
ã€ã³ããŒãããã»ã¹ïŒ
MySQL
ãã¹ãŠã®ã¯ãšãªã¯ãã€ã³ã¿ãŒãããäžã®æ€çŽ¢ã䜿çšããŠèŠã€ããããšãã§ããŸãã
äžããããã¯ãšãªã¯ãç¹å®ã®ã¿ã¹ã¯ã®ç¹æ®åãšæé©åã®ããã«å€æŽãããŸããã ãããã次ã®ã¿ã¹ã¯ãèŠããšå€ãã®ããšãç解ã§ããŸãã
ã¿ã¹ã¯1.ç»åã¢ãã¬ã¹ãæ€çŽ¢ãã
SELECT CONCAT(GRA_TAB_NR, '/',GRA_GRD_ID, '.', IF(LOWER(DOC_EXTENSION)='jp2', 'jpg', LOWER(DOC_EXTENSION))) AS PATH FROM LINK_GRA_ART INNER JOIN GRAPHICS ON GRA_ID = LGA_GRA_ID INNER JOIN DOC_TYPES ON DOC_TYPE = GRA_DOC_TYPE WHERE LGA_ART_ID = @ARTICLE AND (GRA_LNG_ID = 16 OR GRA_LNG_ID = 255) AND GRA_DOC_TYPE <> 2 ORDER BY GRA_GRD_ID
ç»åã«ã¿ãã°ã«ãã¹ãè¿œå ããååšã®ç¢ºèªããµã€ãºå€æŽãè¡ããŸã-å¿ èŠã«å¿ããŠããµã€ãã«å®å šã«è¡šç€ºã§ããŸãã
ã¿ã¹ã¯2.ã¢ããã°ã®æ€çŽ¢ïŒ
SELECT ARL_KIND, IF (ART_LOOKUP.ARL_KIND = 2, SUPPLIERS.SUP_BRAND, BRANDS.BRA_BRAND) AS BRAND, ARL_DISPLAY_NR FROM ART_LOOKUP LEFT JOIN BRANDS ON BRA_ID = ARL_BRA_ID INNER JOIN ARTICLES ON ARTICLES.ART_ID = ART_LOOKUP.ARL_ART_ID INNER JOIN SUPPLIERS ON SUPPLIERS.SUP_ID = ARTICLES.ART_SUP_ID WHERE ARL_ART_ID = @ART_ID AND ARL_KIND IN (2, 3, 4) ORDER BY ARL_KIND, BRA_BRAND, ARL_DISPLAY_NR LIMIT 100
ãã®ãªã¯ãšã¹ãã¯ãååã®èŒžå ¥æã«äœ¿çšã§ããŸããããã®ååãšãã®é¡äŒŒåã®é©åæ§ã確èªããããã«ãããã«å€æŽããŸãã
ã¿ã¹ã¯3.補åæ å ±ã衚瀺ãã
SELECT ART_ARTICLE_NR, SUP_BRAND, DES_TEXTS.TEX_TEXT AS ART_COMPLETE_DES_TEXT, DES_TEXTS2.TEX_TEXT AS ART_DES_TEXT, DES_TEXTS3.TEX_TEXT AS ART_STATUS_TEXT FROM ARTICLES INNER JOIN DESIGNATIONS ON DESIGNATIONS.DES_ID = ART_COMPLETE_DES_ID AND DESIGNATIONS.DES_LNG_ID = @LNG_ID INNER JOIN DES_TEXTS ON DES_TEXTS.TEX_ID = DESIGNATIONS.DES_TEX_ID LEFT JOIN DESIGNATIONS AS DESIGNATIONS2 ON DESIGNATIONS2.DES_ID = ART_DES_ID AND DESIGNATIONS2.DES_LNG_ID = @LNG_ID LEFT JOIN DES_TEXTS AS DES_TEXTS2 ON DES_TEXTS2.TEX_ID = DESIGNATIONS2.DES_TEX_ID INNER JOIN SUPPLIERS ON SUP_ID = ART_SUP_ID INNER JOIN ART_COUNTRY_SPECIFICS ON ACS_ART_ID = ART_ID INNER JOIN DESIGNATIONS AS DESIGNATIONS3 ON DESIGNATIONS3.DES_ID = ACS_KV_STATUS_DES_ID AND DESIGNATIONS3.DES_LNG_ID = @LNG_ID INNER JOIN DES_TEXTS AS DES_TEXTS3 ON DES_TEXTS3.TEX_ID = DESIGNATIONS3.DES_TEX_ID WHERE ART_ID = @ART_ID;
@LNG_IDãå¿ããªãã§ãã ããããã·ã¢èªã®å Žåãããšãã°16ã«çããå€ãããã«å ¥åããŸãã
補åãæ€çŽ¢ããŸãã
ã«ã¿ãã°
æãç°¡åãªãªãã·ã§ã³ã¯ã蚪åè ãã«ã¿ãã°ã«å ¥ããšãããŒãžã«åå²ããããã¹ãŠã®è£œåã®ãªã¹ãã衚瀺ãããããšã§ãã ããã§ã¯ãçåã¯çããªããšæããŸãã ããã°ã©ããŒã¯ãã«ã¿ãã°å ã®ãã¹ãŠã®è£œåã衚瀺ããŸãã
ãã£ã«ã¿ãªã³ã°
ãã£ã«ã¿ãšããŠãã«ããŽãªããªãŒãäœæãã蚪åè ããããããã²ãŒãã§ããããã«ããããšãã§ããŸãã äŸïŒ
-è»
-ããã£
---ããã£ããŒã/ãŠã£ã³ã°/ãããã¡ãŒ
---ã°ã¬ãŒãžã³ã°/ãã©ãŒ
---ã«ããŒ/ããŒã/ãã¢/å¯åå±æ ¹/æãããã¿å±æ ¹
---äºåã®ãããã©ã€ã/ã¢ã¯ã»ãµãªãŒ
---ç §æã·ã¹ãã /ã¢ã©ãŒã
-ãšã³ãžã³
---ã¬ã¹ã±ãã
---最æ»ã·ã¹ãã
---ã·ãªã³ããŒããã
---空æ°äŸçµŠã·ã¹ãã
-ææ°ã·ã¹ãã
---åãä»ãã®è©³çŽ°
---å°¿çŽ æ³šå ¥
---ãµã€ã¬ã³ãµãŒã¢ã»ã³ããª
---觊åª
---ã©ã ããããŒã
ãããŠä»ããã£ã«ã¿ãŒãéžæãããšããã®ã«ããŽãªãŒã«é¢é£ä»ããããŠããã«ã¿ãã°ã®éšåã®ã¿ã衚瀺ãããŸããã€ãŸãããTecDocãããã®äœçœ®ãžã®ãã€ã³ãã«ãããã«ããŽãªãŒã«ãããã£ã«ã¿ãŒãè¿œå ãããŸãã ãã£ã«ã¿ãŒãéžæãããšãã«ã«ã¿ãã°å ã®è£œåã®ãªã¹ããæŽæ°ããã«ã¯ãAjaxã䜿çšããŠåçã«è¡ãããšããããŒãžãæŽæ°ããããšãã§ããŸãã
次ã¯ãã«ããŽãªCarsïŒ10001ïŒã®ãµãã«ããŽãªã®ããªãŒã衚瀺ããã¯ãšãªã§ãã
SELECT STR_ID, STR_ID_PARENT, TEX_TEXT AS STR_DES_TEXT, IF(EXISTS( SELECT * FROM SEARCH_TREE AS SEARCH_TREE2 WHERE SEARCH_TREE2.STR_ID_PARENT <=> SEARCH_TREE.STR_ID LIMIT 1 ), 1, 0) AS DESCENDANTS FROM SEARCH_TREE INNER JOIN DESIGNATIONS ON DES_ID = STR_DES_ID INNER JOIN DES_TEXTS ON TEX_ID = DES_TEX_ID WHERE STR_ID_PARENT <=> 10001 AND DES_LNG_ID = 16;
ãªã¯ãšã¹ãã¯ã«ã¿ãã°ã®ãã¹ãŠã®ããŒãžã§æåéãå®è¡ããããããçµæããã£ãã·ã¥ã«è¿œå ããããšããå§ãããŸãã äžè¬çã«ã倧ããªè² è·ãšé 延ãããããããã«ããã¯ã調æ»ããå¿ èŠããããŸãã
ãã®CMSã®ãã£ãã·ã¥ã¢ãžã¥ãŒã«ã¯éåžžã«äŸ¿å©ã§ãã åšããèŠæž¡ãã°ããããããã©ã®ãã¬ãŒã ã¯ãŒã¯ã§ãããµã€ãã§æãè² è·ã®é«ãå Žæããã£ãã·ã¥ã§ããŸãã
å ç·çªå·ã§æ€çŽ¢
ããã§ã¯è£œåã®èšäºã確èªããååšããå Žåã¯ãã®äœçœ®ã®ããŒãžã衚瀺ããããããã®ã»ã¯ã·ã§ã³ã§ã¯è³ªåãããŸããã ãŠãŒã¶ãŒã®èšäºçªå·ãå ¥åãããšãã«ããã®ã»ã¯ã·ã§ã³ãèªåè£å®ã§è£å®ã§ããŸãã
å ã®çªå·ã§æ€çŽ¢
ãã®åé¡ã解決ããã«ã¯ããã¹ãŠã®ãã®ãããããã§ãã ååã®è¿œå ããããã£ã«è¿œå ãããå ã®çªå·ãŸãã¯ãã®ã¢ããã°ã®çªå·ãèæ ®ããŠãã«ã¿ãã°ã®ãã¹ãŠã®è£œåãç°¡åã«è¡šç€ºã§ããŸãã
ããã...
ãã®ãããªèŠæ±ã®é床ã¯ããªãé ãã§ãã MySQLãµãŒããŒã®ããããçš®é¡ã®æé©åã䜿çšããŠããçµæã¯æåŸ ã¯ããã§ãã
Sphinx ïŒæ€çŽ¢ãšã³ãžã³ïŒã¯ãããžã§ã¯ãã§è€æ°å䜿çšãããŠãããåžžã«ãã®ãã¯ãããžãŒã¯ãããžã§ã¯ãã®æ¹åã®ã¿ãèš±å¯ããŠããŸããã ãããŠä»åãSphinxã䜿çšãããšããç§ãã¡ã¯é©ããŸããïŒ
- ç°¡åãªçµ±åãšã«ã¹ã¿ãã€ãºã
- ã€ã³ããã¯ã¹äœæé床ã
- ãããŠæåŸã«ãæ€çŽ¢é床ã
ãããžã§ã¯ãã®ããŒãºã«åãããŠæ§æãã¡ã€ã«ã調æŽããã€ã³ããã¯ã¹ãåäœæããŸãããSphinxããªãå Žåãšæ¯èŒããŠãæ€çŽ¢é床ãæ¬åœã«åäžããŸããã
ããŒã¯ãŒãæ€çŽ¢
é床ã®åé¡ã¯å ã®æ°å€ã«ãã£ããããã¡ã€ã³æ€çŽ¢ãSphinxãã¯ãããžãŒã䜿çšããŠå®è¡ããå¿ èŠããããšå€æãããŸããã
ããã«ããã®ãã¯ãããžãŒã«ããã以äžã䜿çšã§ããŸãã
- æ€çŽ¢æã®è¿œå å±æ§ã
- åæ£æ€çŽ¢
- ãã·ã¢èªã®ãµããŒãã
- è€æ°ã®ã€ã³ããã¯ã¹ãäœæããŸãã
ã¡ãªã¿ã«ããããžã§ã¯ãã®æåã«ãYour carãããŒã«ã玹ä»ãããŸããã
ãã®ããŒã«ã䜿çšãããšãTecDocã«ã¿ãã°å šäœããè»äž¡ã®å€æŽã®ã¿ãéžæãããã®è»äž¡ã®ã¿ã«äœããã®åœ¢ã§é¢é£ãããã¹ãŠã®è£œåã衚瀺ã§ããŸãã
ãã®ããŒã«ã¯ãåã®ãã£ãŒã«ãã®éžæã«å¿ããŠåçã«æŽæ°ãããäžé£ã®ãã£ãŒã«ãã§ãã ããšãã°ãèªåè»ã®çç£å¹ŽãéžæããåŸãå©çšå¯èœãªèªåè»ãã©ã³ããéžæãããšã³ãžã³ã®ã¢ãã«ãšã¿ã€ããéžæããŸãã 圌ã®ä»äºã®çµæã以äžã«ç€ºããŸãã
ãã®çµæããã®è»ã®äž»èŠãªä¿®æ£ã衚瀺ããããã®äžããå¿ èŠãªãã®ãéžæããŸãã è»ãéžæãããšã«ã¿ãã°ãéããŸãããããªãã®è»ããã£ã«ã¿ãŒã«ãªãããµã€ãã¯ãŠãŒã¶ãŒã®è»ãèšæ¶ããããããåãæ¿ããŠæ°ããè»ãéžæã§ããããã«ããå¿ èŠããããŸãã
ãŸãšãããš
å ¥å Žã®ãããå€ã倧ããã«ãããããããã¿ã¹ã¯ã¯é£ããã¯ãããŸããã§ããã ãã®ã¢ãžã¥ãŒã«ãäœæããããã«ã次ã®ã¢ãããŒããæè¡ãããŒã«ãæ€èšããããšããå§ãããŸãã
- OOPãªãã§ã¯ãé£ããã§ããã...
- åºæ¬ã¯ãããã°ãMySQLã ã ãPHPã ã ãHTMLã ã ãJSã ã ãCSSããšãããµã€ãã®ããã¯ããŒã³ã§ãã
- CMSãHostCMSãã®åçãç解ãã
- ä»ã®éçºè ã®ãAPIããšé£æºããèœå
- ãã¹ãã£ã³ã¯ã¹ããæ€çŽ¢
- ãµã€ãã®ããŒããããå Žæãæ¢çŽ¢ããã³ãŒããæé©åããæ©èœ
- jQueryãŸãã¯PrototypeãæãŸãã
- ãã¡ãããçå®ã¯è°è«ã®äœå°ããããããçš®ã®ãçµ±åéçºç°å¢ããšé£æºããèœåã§ãã
ãããŠæãéèŠãªããšã¯ãæ¢è£œã®ãšã³ãžã³ã䜿çšããªããŠããããšãã°ãã¬ãŒã ã¯ãŒã¯ã䜿çšããŠéçºãããèªäœã®èªåè»ã«ã¿ãã°ããªã³ã©ã€ã³ã¹ãã¢ã§ãåæ§ã®çµæãåŸãããããšã§ãã
PSè¿œå ãšããŠããããžã§ã¯ãããããã€ãã®ã¹ã¯ãªããã玹ä»ããŸãããããã¯å°ãªããšã決å®çã§ã¯ãããŸãããããã®æ¬è³ªãç解ããããšãã§ããŸãã
ããã»ã¹ããªã¯ãšã¹ãã«åå²ããã¹ã¯ãªããã¯ããªã¹ãããè¿œå ããã»ããã€ã³ããŒãããã»ã¹ã«ã€ããŠéç¥ããŸãã
< script> // knum1,knum2,knum3,knum4,knum5 - // inum - // pz,pr - // lim - // wh1, wh2 - // count - // art_id - //name - //num_fnd - tecDoc var from = 3; var to = 3; var percent = 0; var chk = 0; var cond = ''; function get_list(fromf,tof) { $.post( "/admin/import_excel_new/get_list.php", { from: fromf, to: tof },outputt ); function outputt(data) { if(chk == 0) { from += 1; to += 1; percent = ( from / cond ) * 100; } else { from = cond; percent = ( from / cond ) * 100; } if ((to - cond) > 0) { to = cond; chk = 1; get_list(from,to); to = 0; }else if((to - cond) == 0) { chk = 1; get_list(from,to); to = 0; } document.getElementById("perc").innerHTML=percent.toFixed(2)+"%"; $("#progressbar").children(".ui-progressbar-value").css("width", percent+"%"); document.getElementById("tab_cont").innerHTML+=data; if(chk == 1) { $("#progressbar").css("display", "none"); $("#progresspercent").css("display", "none"); } if ( chk == 0) { get_list(from,to); //setTimeout(get_list, 100, from, to); } } } alert(" , !"); get_list(from,to); function createWindow(count,art_id,inum,knum1,knum2,name,knum3,knum4,knum5,wh1, wh2,pz,pr,num_fnd,lim) { $.post( "/admin/import_excel_new/get_tab.php", { id: art_id, num_fnd: num_fnd },outputt2 ); function outputt2(data) { document.getElementById("inum").innerHTML=inum; document.getElementById("cntnt").innerHTML=data; document.getElementById("btn").innerHTML="<input type=\"button\" name=\"add\" id=\"add_id\" style=\"float:right; margin-top:5px;\" value=\"\" onclick=\"insert_item(\'"+count+"\', \'"+inum+"\',\'"+knum1+"\',\'"+knum2+"\',\'"+name+"\', \'"+knum3+"\',\'"+knum4+"\',\'"+knum5+"\',\'"+wh1+"\', \'"+wh2+"\',\'"+pz+"\',\'"+pr+"\',\'"+num_fnd+"\', \'"+lim+"\')\" />"; } document.getElementById("open_block").style.display="block"; } function loadNum() { bnum = document.getElementById("brand_id").value; $.post( "/admin/import_excel_new/get_number.php", { num: bnum },outputt11 ); function outputt11(data) { document.getElementById("list_num").innerHTML=data; } } function insert_item(count,inum,knum1,knum2,name,knum3,knum4,knum5,wh1,wh2,pz, pr,num_fnd,lim) { if (document.getElementById("opt_id_1").checked === true) art_id=document.getElementById("art_list_id").value; else if (document.getElementById("opt_id_2").checked === true) art_id=document.getElementById("txtnum_id").value; if(document.getElementById("txtnum_id").value!="") { $.post( "/admin/import_excel_new/insert_item.php", { count: count, id: art_id, inum: inum, knum1: knum1, knum2: knum2, name: name, knum3: knum3, knum4: knum4, knum5: knum5, wh1: wh1, wh2: wh2, pz: pz, pr: pr, num_fnd: num_fnd, lim: lim },outputt3 ); function outputt3(data) { document.getElementById("id_"+inum).innerHTML="<span style=\'color:green;\'></span>"; document.getElementById("id_opt_"+inum).innerHTML="<a style=\"cursor:pointer; text-decoration:underline; color:#0090ff;\" onclick=\"createWindow(\'1\',\'"+data+"\', \'"+inum+"\',\'"+knum1+"\',\'"+knum2+"\',\'"+name+"\',\'"+knum3+"\',\'"+knum4+"\',\'"+knum5+"\', \'"+wh1+"\',\'"+wh2+"\',\'"+pz+"\',\'"+pr+"\',\'"+num_fnd+"\',\'"+lim+"\')\"></a>"; } } document.getElementById(\'open_block\').style.display=\'none\'; } </ script>
éšåçªå·ãšã¡ãŒã«ãŒåã«åºã¥ããŠååãè¿œå ããæ©èœ
< ?php // $DataBase - // $knum1,$knum2,$knum3,$knum4,$knum5 - // $inum - // $pz,$pr - // $user - // $date - // $lim - // $wh1, $wh2 - // $nameProizvoditel, $numberProizvod - , function addToCatalogForNoTecdoc($DataBase,$knum1,$knum2,$knum3,$knum4, $knum5,$inum,$pr,$user,$date,$pz,$lim,$wh1,$wh2,$nameProizvoditel,$numberProizvod){ $symbols = array("`"," ", "~", "!", "@", "#", "$", "%", "^", "&", "*", "(", ")", "-", "_", "=", "+", "/", "\\", "|", "?", ":", ";", "\"", "'", "â", ",", "."); $numberProizvodVithSymbols = str_replace($symbols, '', $numberProizvod); $nameProizvoditelUpper=strtoupper($nameProizvoditel); $query = " SELECT DISTINCT IF (ART_LOOKUP.ARL_KIND IN (3, 4), BRANDS.BRA_BRAND, SUPPLIERS.SUP_BRAND) AS brand, ART_LOOKUP.ARL_SEARCH_NUMBER AS NUMBER, `ARL_ART_ID` AS item_id, `ARL_SEARCH_NUMBER` AS num_fnd, `DES_TEXTS`.`TEX_TEXT` AS item_txt FROM ART_LOOKUP LEFT JOIN BRANDS ON BRANDS.BRA_ID = ART_LOOKUP.ARL_BRA_ID INNER JOIN ARTICLES ON ARTICLES.ART_ID = ART_LOOKUP.ARL_ART_ID INNER JOIN SUPPLIERS ON SUPPLIERS.SUP_ID = ARTICLES.ART_SUP_ID INNER JOIN DESIGNATIONS ON DESIGNATIONS.DES_ID = ARTICLES.ART_COMPLETE_DES_ID INNER JOIN DES_TEXTS ON DES_TEXTS.TEX_ID = DESIGNATIONS.DES_TEX_ID WHERE ART_LOOKUP.ARL_SEARCH_NUMBER = '".$numberProizvodVithSymbols."' AND ART_LOOKUP.ARL_KIND IN (1, 2, 3, 4) AND DESIGNATIONS.DES_LNG_ID = 16 AND (BRANDS.BRA_BRAND='".$nameProizvoditelUpper."' OR SUPPLIERS.SUP_BRAND='".$nameProizvoditelUpper."') GROUP BY brand, NUMBER ;"; $result1 = $DataBase->query($query); $row1 = mysql_fetch_array($result1); echo '<div class="'.$inum.'" style="display: none;"><b>'; var_dump($query); echo '</b>'; echo '<pre>'; var_dump($row1); echo '</pre></div>'; $art_id=$row1["item_id"]; $txt = $row1['item_txt']; $brand = $row1['brand']; $rez=array(); if($row1){ $rez['status']=true; }else{ $rez['status']=false; } if($rez['status']){ // $DataBase->Insert('shop_items_catalog_table', array( 'shop_currency_id' => '4', 'shop_shops_id' => '3', 'shop_items_catalog_name' => $brand.': '.$txt, 'shop_items_catalog_marking' => $art_id, 'shop_vendorcode' => $knum1, 'shop_extension' => $inum, 'shop_items_catalog_price' => $pr, 'users_id' => $user, 'shop_items_catalog_date_time' => $date, 'shop_items_catalog_putoff_date' => $date, 'shop_items_catalog_weight'=>0 )); $last_id = mysql_insert_id(); // function addToMarking($DataBase,$marking_id, $vendor_id){ if(trim($vendor_id)!="" && $vendor_id!=" "){ $DataBase->Insert('marking', array('marking_id' => $marking_id, 'vendor_id' => $vendor_id)); } } addToMarking($DataBase,$art_id, $numberProizvod); addToMarking($DataBase,$art_id, $knum1); addToMarking($DataBase,$art_id, $knum2); addToMarking($DataBase,$art_id, $knum3); addToMarking($DataBase,$art_id, $knum4); addToMarking($DataBase,$art_id, $knum5); // function addToShop_warehouse_items_table($DataBase,$shop_warehouse_id, $shop_items_catalog_item_id, $shop_warehouse_items_count, $users_id){ if(trim($vendor_id)!="" && $vendor_id!=" "){ $DataBase->Insert('shop_warehouse_items_table', array( 'shop_warehouse_id' => $shop_warehouse_id, 'shop_items_catalog_item_id' => $shop_items_catalog_item_id, 'shop_warehouse_items_count' => $shop_warehouse_items_count, 'users_id' => $users_id )); } } $whResult=0; if(trim($wh1)!=""){ $whResult=$wh1; }else{ $whResult=0; } addToShop_warehouse_items_table($DataBase,4, $last_id, $whResult, $user); if(trim($wh2)!=""){ $whResult=$wh2; }else{ $whResult=0; } addToShop_warehouse_items_table($DataBase,3, $last_id, $whResult, $user); addToShop_warehouse_items_table($DataBase,5, $last_id, 0, $user); function addToShop_prices_to_item_table ($DataBase,$last_id, $prices, $p){ $DataBase->Insert('shop_prices_to_item_table', array('shop_items_catalog_item_id' => $last_id, 'shop_list_of_prices_id' => $prices, 'shop_prices_to_item_value' => $p)); } // addToShop_prices_to_item_table ($DataBase,$last_id, 4, $pz); addToShop_prices_to_item_table ($DataBase,$last_id, 5, $pr); // $DataBase->Insert('shop_properties_items_table', array('shop_items_catalog_item_id' => $last_id, 'shop_list_of_properties_id' => 155, 'shop_properties_items_value' => $lim)); $param = array(); $param['item_id'] = $last_id; $param['path'] = 'item_' . $last_id; $DataBase->Update('shop_items_catalog_table', array('shop_items_catalog_item_id' => $param['item_id'], 'shop_items_catalog_path' => $param['path'] ), " `shop_currency_id` = '4' and `shop_shops_id` = '3' and `shop_items_catalog_name` = '".$brand . ': ' . $txt."' and `shop_items_catalog_marking` = ".$art_id ." and `shop_vendorcode` = '".$knum1."' and `shop_extension` = '".$inum."' and `shop_items_catalog_price` = ".$pr." " ); // $img=getImgForARTid($DataBase,$art_id); if($img) { $DataBase->Insert('shop_properties_items_table', array('shop_items_catalog_item_id' => $last_id, 'shop_list_of_properties_id' => 164, 'shop_properties_items_value' => $img)); } $img=''; } $rez['str_item']=$art_id; $rez['str_num_find']=$row1["num_fnd"]; return $rez; } ?>
PSæ°ããèšäºãä»ã®èšäºãããæ©ãåãåãããåã«æ°ããåºçç©ãèŠéããªãããã«ãã-Facebook ã VK ã Twitter ã LiveJournal ã LinkedInã§è³Œèªãã
PPSãŸããªããDigitovããžãã¹ã¹ã¯ãŒã«ã§ã³ãŒã¹ãéå§ãããŸãããžã¥ãã¢PHPéçºè ã«ãªãããã§ãã ä»ããã³ãŒã¹ã賌èªãããšãå²åŒäŸ¡æ Œã§è³Œå ¥ã§ããŸãã
æºåãããèšäº
SECL Group ãããã«PHPéçºè ãVladimir
SECLã°ã«ãŒã CEOããããŒã¿