Merge branch 'master' of ssh://forthrd.ddns.net:2222/1TBHDD/ikong/taobin_project
This commit is contained in:
commit
ee6a472285
7 changed files with 9241 additions and 66 deletions
6
image/event/image_template3
Normal file
6
image/event/image_template3
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
normal_eng=ROOT/taobin_project/image/event/pro_mystery_cup_en.png
|
||||
normal_thai=ROOT/taobin_project/image/event/pro_mystery_cup_th.png
|
||||
press_eng=ROOT/taobin_project/image/event/pro_mystery_cup_en.png
|
||||
press_thai=ROOT/taobin_project/image/event/pro_mystery_cup_th.png
|
||||
disable_eng=ROOT/taobin_project/image/event/pro_mystery_cup_en.png
|
||||
disable_thai=ROOT/taobin_project/image/event/pro_mystery_cup_th.png
|
||||
|
|
@ -117,4 +117,54 @@ else:
|
|||
file_xml3.write( content_data)
|
||||
file_xml3.close()
|
||||
|
||||
if "template3" in param:
|
||||
file_inc3 = open(directory_to_process + "/event/promotion_template3.inc", 'r')
|
||||
file_inc3_content = file_inc3.read()
|
||||
file_inc_img = open(directory_to_process + "../image/event/image_template3", 'r')
|
||||
file_inc3_img_content = file_inc_img.read()
|
||||
|
||||
# replace key.
|
||||
|
||||
sp_key = file_inc3_img_content.split("\n")
|
||||
print("sp_key = " + str(len( sp_key)))
|
||||
for sp_line in sp_key:
|
||||
sp_line = sp_line.strip()
|
||||
key_val = sp_line.split("=")
|
||||
print("Kenta420:", key_val)
|
||||
if len( key_val) == 2:
|
||||
print("k = " + key_val[0] + " val=" + key_val[1])
|
||||
file_inc3_content = file_inc3_content.replace( "###" + key_val[0], '"' + key_val[1].strip() + '"')
|
||||
|
||||
|
||||
# file_inc_event_click = open(directory_to_process + "/event/promotion_onclick3.inc", 'r')
|
||||
# file_inc_event_click_content = file_inc_event_click.read()
|
||||
|
||||
# file_inc3_content = file_inc3_content.replace("###EventOnClick", file_inc_event_click_content)
|
||||
|
||||
|
||||
print(file_inc3_content)
|
||||
|
||||
#print( file_inc_content)
|
||||
content_data_was_repack = file_content_main.replace(";dummy_layout.inc", file_inc_content)
|
||||
content_data = content_data_was_repack.replace(";BigLogoLayout", file_inc3_content)
|
||||
|
||||
begin_text = content_data.index(";TAGESP")
|
||||
end_text = content_data.index(";TAGESP", begin_text + 7)
|
||||
#print("sub text = " + str(begin_text) + " end = " + str(end_text))
|
||||
tmp1 = content_data[: begin_text - 7]
|
||||
|
||||
tmp3 = content_data[ end_text:-1]
|
||||
#print("tmp1=" + tmp1)
|
||||
#print("tmp3=" + tmp3)
|
||||
|
||||
content_data = tmp1 + tmp3
|
||||
|
||||
file_xml3_out = open(directory_to_process + "/event/out_put_file3.txt", 'r')
|
||||
file_xml3_out_content = file_xml3_out.read()
|
||||
file_xml3_out_content = file_xml3_out_content.strip()
|
||||
file_xml3_out_content = file_xml3_out_content.replace("\r", "")
|
||||
file_xml3_out_content = file_xml3_out_content.replace("\n", "")
|
||||
|
||||
file_xml3 = open(directory_to_process + file_xml3_out_content, 'w')
|
||||
file_xml3.write( content_data)
|
||||
file_xml3.close()
|
||||
|
|
|
|||
1
xml/event/out_put_file3.txt
Normal file
1
xml/event/out_put_file3.txt
Normal file
|
|
@ -0,0 +1 @@
|
|||
/event/promotion_mystery_cup_35.xml
|
||||
9085
xml/event/promotion_mystery_cup_35.xml
Normal file
9085
xml/event/promotion_mystery_cup_35.xml
Normal file
File diff suppressed because it is too large
Load diff
47
xml/event/promotion_template3.inc
Normal file
47
xml/event/promotion_template3.inc
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
|
||||
<Button>
|
||||
<X> 42 </X>
|
||||
<Y> 520 </Y>
|
||||
<State> BigButtonEnable </State>
|
||||
<Filename>
|
||||
eval(
|
||||
If show_eng = "true" Then
|
||||
Var return = ###normal_eng
|
||||
Else
|
||||
Var return = ###normal_thai
|
||||
EndIf
|
||||
)
|
||||
</Filename>
|
||||
<FilenamePress>
|
||||
eval(
|
||||
If show_eng = "true" Then
|
||||
Var return = ###press_eng
|
||||
Else
|
||||
Var return = ###press_thai
|
||||
EndIf
|
||||
)
|
||||
</FilenamePress>
|
||||
<FilenameDisable>
|
||||
eval(
|
||||
If show_eng = "true" Then
|
||||
Var return = ###disable_eng
|
||||
Else
|
||||
Var return = ###disable_thai
|
||||
EndIf
|
||||
)
|
||||
</FilenameDisable>
|
||||
<EventOnClick>
|
||||
|
||||
;This is Custom Click for Mystery cup
|
||||
|
||||
</EventOnClick>
|
||||
</Button>
|
||||
|
||||
<EventUnitTest1>
|
||||
Var BigButtonEnable = "Enable"
|
||||
Refresh
|
||||
</EventUnitTest1>
|
||||
<EventUnitTest2>
|
||||
Var BigButtonEnable = "Invisible"
|
||||
Refresh
|
||||
</EventUnitTest2>
|
||||
|
|
@ -2,13 +2,11 @@
|
|||
; zone promote
|
||||
If OpenFromPageBoard = 1 Then
|
||||
|
||||
If PepsiProEnable = 1 Then
|
||||
If PepsiProCodeEnable = 0 Then
|
||||
OpenInst 2 "ROOT/taobin_project/xml/event/promotion_pepsi.xml"
|
||||
Else
|
||||
OpenInst 2 "ROOT/taobin_project/xml/event/promotion_pepsi_end.xml"
|
||||
EndIf
|
||||
If MysteryProEnable = 1 Then
|
||||
|
||||
OpenInst 2 "ROOT/taobin_project/xml/event/promotion_mystery_cup_35.xml"
|
||||
Var OpenFromPageBoard = 0
|
||||
|
||||
Else
|
||||
|
||||
OpenInst 2 "ROOT/taobin_project/xml/page_catalog_group_recommend.xml"
|
||||
|
|
@ -16,12 +14,8 @@ If OpenFromPageBoard = 1 Then
|
|||
EndIf
|
||||
Else
|
||||
|
||||
If PepsiProEnable = 1 Then
|
||||
If PepsiProCodeEnable = 0 Then
|
||||
Open "ROOT/taobin_project/xml/event/promotion_pepsi.xml"
|
||||
Else
|
||||
Open "ROOT/taobin_project/xml/event/promotion_pepsi_end.xml"
|
||||
EndIf
|
||||
If MysteryProEnable = 1 Then
|
||||
Open "ROOT/taobin_project/xml/event/promotion_mystery_cup_35.xml"
|
||||
Else
|
||||
|
||||
Open "ROOT/taobin_project/xml/page_catalog_group_recommend.xml"
|
||||
|
|
|
|||
|
|
@ -11,63 +11,52 @@ Var SoundBackToSchoolEnable = 0
|
|||
Var PromotionIDOreoBuyTwoSaveMore = 0
|
||||
Var BackToSchoolForFreeEnable = 0
|
||||
|
||||
Var SoundBackToSchoolType = 0
|
||||
; End
|
||||
|
||||
|
||||
|
||||
Var PepsiProEnable = 0
|
||||
Var PepsiPromoteVideo = 0
|
||||
Var PepsiProCodeEnable = 0
|
||||
|
||||
If SystemDateMonthInt = 6 Then
|
||||
Var SoundBackToSchoolType = 0
|
||||
; End
|
||||
|
||||
Var MysteryProEnable = 0
|
||||
|
||||
If SystemDateMonthInt = 7 Then
|
||||
If SystemDateDayInt = 3 Then
|
||||
Var MysteryProEnable = 1
|
||||
EndIf
|
||||
If SystemDateDayInt = 4 Then
|
||||
Var MysteryProEnable = 1
|
||||
EndIf
|
||||
If SystemDateDayInt = 5 Then
|
||||
Var MysteryProEnable = 1
|
||||
EndIf
|
||||
If SystemDateDayInt = 6 Then
|
||||
Var MysteryProEnable = 1
|
||||
EndIf
|
||||
If SystemDateDayInt = 7 Then
|
||||
Var MysteryProEnable = 1
|
||||
EndIf
|
||||
If SystemDateDayInt = 8 Then
|
||||
Var MysteryProEnable = 1
|
||||
EndIf
|
||||
If SystemDateDayInt = 9 Then
|
||||
Var MysteryProEnable = 1
|
||||
EndIf
|
||||
If SystemDateDayInt = 10 Then
|
||||
Var MysteryProEnable = 1
|
||||
EndIf
|
||||
If SystemDateDayInt = 11 Then
|
||||
Var MysteryProEnable = 1
|
||||
EndIf
|
||||
If SystemDateDayInt = 12 Then
|
||||
Var PepsiProEnable = 1
|
||||
Var MysteryProEnable = 1
|
||||
EndIf
|
||||
If SystemDateDayInt = 13 Then
|
||||
Var PepsiProEnable = 1
|
||||
Var MysteryProEnable = 1
|
||||
EndIf
|
||||
If SystemDateDayInt = 14 Then
|
||||
Var PepsiProEnable = 1
|
||||
Var MysteryProEnable = 1
|
||||
EndIf
|
||||
If SystemDateDayInt = 15 Then
|
||||
Var PepsiProEnable = 1
|
||||
EndIf
|
||||
If SystemDateDayInt = 16 Then
|
||||
Var PepsiProEnable = 1
|
||||
EndIf
|
||||
|
||||
If SystemDateDayInt = 19 Then
|
||||
Var PepsiProEnable = 1
|
||||
EndIf
|
||||
If SystemDateDayInt = 20 Then
|
||||
Var PepsiProEnable = 1
|
||||
EndIf
|
||||
If SystemDateDayInt = 21 Then
|
||||
Var PepsiProEnable = 1
|
||||
EndIf
|
||||
If SystemDateDayInt = 22 Then
|
||||
Var PepsiProEnable = 1
|
||||
EndIf
|
||||
If SystemDateDayInt = 23 Then
|
||||
Var PepsiProEnable = 1
|
||||
EndIf
|
||||
|
||||
If SystemDateDayInt = 24 Then
|
||||
Var PepsiProEnable = 1
|
||||
Var PepsiProCodeEnable = 1
|
||||
EndIf
|
||||
If SystemDateDayInt = 25 Then
|
||||
Var PepsiProEnable = 1
|
||||
Var PepsiProCodeEnable = 1
|
||||
EndIf
|
||||
|
||||
If SystemDateDayInt > 23 Then
|
||||
Var PepsiPromoteVideo = 0
|
||||
Else
|
||||
Var PepsiPromoteVideo = 1
|
||||
EndIf
|
||||
|
||||
EndIf
|
||||
|
||||
If BoxID = 200001 Then
|
||||
|
|
@ -75,6 +64,7 @@ If BoxID = 200001 Then
|
|||
Var OreoForFreeEnable = 0
|
||||
Var PepsiProEnable = 0
|
||||
Var PepsiProCodeEnable = 0
|
||||
Var MysteryProEnable = 0
|
||||
EndIf
|
||||
|
||||
If BoxID = 200000 Then
|
||||
|
|
@ -82,6 +72,7 @@ If BoxID = 200000 Then
|
|||
Var OreoForFreeEnable = 0
|
||||
Var PepsiProEnable = 0
|
||||
Var PepsiProCodeEnable = 0
|
||||
Var MysteryProEnable = 0
|
||||
EndIf
|
||||
|
||||
If BoxID = 173149 Then
|
||||
|
|
@ -89,28 +80,29 @@ If BoxID = 173149 Then
|
|||
Var OreoForFreeEnable = 0
|
||||
Var PepsiProEnable = 0
|
||||
Var PepsiProCodeEnable = 0
|
||||
Var MysteryProEnable = 0
|
||||
EndIf
|
||||
|
||||
If BoxID = 172053 Then
|
||||
Var PepsiProEnable = 1
|
||||
Var MysteryProEnable = 1
|
||||
EndIf
|
||||
|
||||
|
||||
If BoxID = 173149 Then
|
||||
Var PepsiProEnable = 1
|
||||
Var MysteryProEnable = 1
|
||||
EndIf
|
||||
If BoxID = 172527 Then
|
||||
Var PepsiProEnable = 1
|
||||
Var MysteryProEnable = 1
|
||||
EndIf
|
||||
|
||||
|
||||
DEBUGVAR PepsiProEnable
|
||||
DEBUGVAR PepsiPromoteVideo
|
||||
DEBUGVAR MysteryProEnable
|
||||
|
||||
If InternationalEnable = 1 Then
|
||||
Var PepsiProEnable = 0
|
||||
Var PepsiPromoteVideo = 0
|
||||
Var PepsiProCodeEnable = 0
|
||||
Var MysteryProEnable = 0
|
||||
EndIf
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue