(First{wc:$item['qishu']}period)
{wc:$item['title']}
{wc:$item['title2']}
{wc:if $itemzx}
- First{wc:$itemzx['qishu']}periodOngoing
-
- {wc:$itemzx['canyurenshu']}Participants
- {wc:$itemzx['zongrenshu']}Total
- {wc:$itemzx['shenyurenshu']}Remaining
details
{wc:if:end}
Issue: {wc:$item['qishu']} Lucky Treasure Code
Announce results
{wc:loop $q_user_code_arr $q_code_num}
{wc:$q_code_num}
{wc:loop:end}
-
Calculation formula
{wc:php:start}
$result1 = 0;
foreach ($addList as $key => $value) {
$tmp = explode('.', $value['time']);
$item_time = date("His",$tmp[0]);
$item_time .= $tmp[1];
$result1 = bcadd($result1, $item_time);
}
$result2 = str_split($item['period1']);
{wc:php:end}
Congratulations
{wc:fun:get_user_name($q_user)} Get the goods of this issue
userID:{wc:$item['q_uid']}(IDUnique and unchanged identifier for users)
Announced time:{wc:fun:microt($item['q_end_time'])}
{wc:fun:_cfg('web_name_two')}time:{wc:fun:microt($user_shop_time)}
The total number of product winners in this issue{wc:fun:_cfg('web_name_two')}Off{wc:$user_shop_number}Person-time {wc:fun:microt($user_shop_time)}
-
{wc:fun:yunma($user_shop_codes,"b")}
1、Take the last of all the products on the website before the last purchase time of the product100Records of purchase time
2、Every time record on time、Minute、second、Number of milliseconds in sequence
3、Will this100The sum of the values is divided by the total number of participants of the product to take the remainder,Remainder plus10000001 That is“Lucky Cloud Purchase Code”。
{wc:if !$item['q_content']}
Since the site is not yet full100Purchase records。So follow 10000001 + (Announce time to sum the results*100/The number of participants) Remainder of That is“Lucky Cloud Purchase Code”。
{wc:if:end}
{wc:if $item['q_content']}
- Cloud purchase time
- member account
- product name
- Cloud purchases
As of this product announced the purchase time【{wc:fun:microt($item['q_end_time'])}】At last100A total of purchase time records
{wc:loop $item['q_content'] $record}
{wc:php:start}
$record_time = explode(".",$record['time']);
$record['time'] = $record_time[0];
{wc:php:end}
- {wc:fun:date("Y-m-d",$record['time'])}{wc:fun:date("H:i:s",$record['time'])}.{wc:$record_time[1]}
- {wc:$record['timeadd']}
- {wc:fun:get_user_name($record['uid'])}
- (First{wc:$record['shopqishu']}period){wc:$record['shopname']}
- {wc:$record['gonumber']}Person-time
{wc:loop:end}
{wc:php:start}
$shop_fmod = fmod($item['q_counttime'],$item['canyurenshu']);
{wc:php:end}
100Results
Calculation results
Sum:
{wc:$item['q_counttime']}(Above100The sum of the value of the cloud purchase record time)
Balance:
{wc:$item['q_counttime']}(100Sum of time records)
% {wc:$item['canyurenshu']}(This product always needs to participate)
= {wc:$shop_fmod}(remainder)
result:
{wc:$shop_fmod}(remainder)
+ 10000001 = {wc:$item['q_user_code']}
Final Results:{wc:$item['q_user_code']}
{wc:else}
Not full100Results
Calculation results
Sum:
{wc:$user_shop_time_add}(Announce time to sum the results)
Balance:
{wc:$user_shop_time_add}(Announced time)
* 100 / {wc:$item['canyurenshu']}(This product always needs to participate)
= {wc:$user_shop_fmod}(remainder)
result:
{wc:$user_shop_fmod}(remainder)
+ 1000001 = {wc:$item['q_user_code']}
Final Results:{wc:$item['q_user_code']}
{wc:if:end}