1
This commit is contained in:
parent
43904b111c
commit
cd2eb8948e
@ -534,48 +534,50 @@ class SignController{
|
||||
));
|
||||
$order = 0;
|
||||
$lastid = 0;
|
||||
foreach ($rowShare as $rs) {
|
||||
if ($rs['status'] == 1) {
|
||||
$order++;
|
||||
}
|
||||
$lastid = $rs['ach_id'];
|
||||
}
|
||||
if ($order >= count($rowShare)) {
|
||||
//更新新的邀请列表
|
||||
$s = $this->getShare($lastid);
|
||||
if (!$s) {
|
||||
die();
|
||||
}
|
||||
$share_meta_table = require('../res/share@share.php');
|
||||
$type = $s['type'] + 1;
|
||||
if ($lastid >= count($share_meta_table)) {
|
||||
$type = $s['type'];
|
||||
}
|
||||
$count = 0;
|
||||
for ($i = 1; $i <= count($share_meta_table); $i++) {
|
||||
$s1 = $this->getShare($i);
|
||||
if (!$s1 || $s1['type'] != $type) {
|
||||
continue;
|
||||
if (count($rowShare) != 0) {
|
||||
foreach ($rowShare as $rs) {
|
||||
if ($rs['status'] == 1) {
|
||||
$order++;
|
||||
}
|
||||
$id = $i;
|
||||
$updateid = $rowShare[$count]['ach_id'];
|
||||
$count++;
|
||||
$share_ret = $conn->execScript('UPDATE share_achievement SET ach_id=:ach_id, status=0, modify_time=:modify_time ' .
|
||||
' WHERE accountid=:accountid AND ach_id=:id;',
|
||||
$lastid = $rs['ach_id'];
|
||||
}
|
||||
if ($order >= count($rowShare)) {
|
||||
//更新新的邀请列表
|
||||
$s = $this->getShare($lastid);
|
||||
if (!$s) {
|
||||
die();
|
||||
}
|
||||
$share_meta_table = require('../res/share@share.php');
|
||||
$type = $s['type'] + 1;
|
||||
if ($lastid >= count($share_meta_table)) {
|
||||
$type = $s['type'];
|
||||
}
|
||||
$count = 0;
|
||||
for ($i = 1; $i <= count($share_meta_table); $i++) {
|
||||
$s1 = $this->getShare($i);
|
||||
if (!$s1 || $s1['type'] != $type) {
|
||||
continue;
|
||||
}
|
||||
$id = $i;
|
||||
$updateid = $rowShare[$count]['ach_id'];
|
||||
$count++;
|
||||
$share_ret = $conn->execScript('UPDATE share_achievement SET ach_id=:ach_id, status=0, modify_time=:modify_time ' .
|
||||
' WHERE accountid=:accountid AND ach_id=:id;',
|
||||
array(
|
||||
':accountid' => $account_id,
|
||||
':modify_time' => time(),
|
||||
':ach_id' => $id,
|
||||
':id' => $updateid
|
||||
));
|
||||
}
|
||||
} else {
|
||||
$share_ret = $conn->execScript('UPDATE share_achievement SET status=0, modify_time=:modify_time ' .
|
||||
' WHERE accountid=:accountid;',
|
||||
array(
|
||||
':accountid' => $account_id,
|
||||
':modify_time' => time(),
|
||||
':ach_id' => $id,
|
||||
':id' => $updateid
|
||||
));
|
||||
}
|
||||
} else {
|
||||
$share_ret = $conn->execScript('UPDATE share_achievement SET status=0, modify_time=:modify_time ' .
|
||||
' WHERE accountid=:accountid;',
|
||||
array(
|
||||
':accountid' => $account_id,
|
||||
':modify_time' => time(),
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user