Settings
|
Sign in
|
Sign up
Bar
Post
Home
>
Bar 侃吧調試中心
>
View post
Reply the post
|
View author only
There are currently
15
posts.
First
Previous
1
2
【思路】日曆右側活動列表實現持續時間大於1天的活動塊狀顯示
Floor 11
巨大八爪鱼
11/11/10 13:50
時間真是太少了!
Floor 12
巨大八爪鱼
11/11/10 22:12
第一步成功了!
Floor 13
巨大八爪鱼
11/11/10 22:12
高興ing!
Floor 14
巨大八爪鱼
11/11/10 22:13
//排序
foreach ($stfed as $i=>$v){
/*
$stfed:昨天的全部活動,$stf:今天的全部活動
$i:昨天的活動顯示序號,$v:昨天的活動編號
若昨天的活動編號今天有,則對齊
$i就是昨天的活動編號,首先判斷今天有沒有這個活動,沒有的話就continue
*/
$Is=arraygetid($stf,$v); //獲得今天顯示該活動的序號(錯誤的)
if ($Is==-1){
//$v:昨天這個活動的顯示序號
continue; # 若今天沒有這個活動
}
//對齊
# 檢測今天活動的正確位置是否被其他活動佔了
if (isset($std[$i])){
//佔了就交換位置
$a=$std[$Is]; # 今天活動的錯誤位置的活動數據
$b=$std[$i]; # 今天活動的正確位置的活動數據
$std[$i]=$a;
$std[$Is]=$b;
# 糾正$stf數組(防止第三日的活動錯位),使各日的活動與第一天平行
$a=$stf[$Is];
$b=$stf[$i];
$stf[$i]=$a;
$stf[$Is]=$b;
}else{
//沒占
}
}
Floor 15
巨大八爪鱼
11/11/10 22:13
接下來是//沒占
First
Previous
1
2
Content converter:
No conversion
Mainland
Taiwan
Hong Kong
Singapore
Reply the post
Content:
User:
You are currently anonymous.
Captcha:
Unclear? Try another one.
©2010-2025 Purasbar Ver3.0 [Mobile] [
Desktop
]
Except where otherwise noted, content on
this site
is licensed under a
Creative Commons Attribution-ShareAlike 3.0 Unported license
.