Skip to content

Commit

Permalink
an offer bug...
Browse files Browse the repository at this point in the history
  • Loading branch information
tongyifan committed Jun 7, 2019
1 parent fc94346 commit 7969fa9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
7 changes: 2 additions & 5 deletions lang/_target/lang_offers.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,8 @@
'msg_offer_voted_on' => "你的候选被投票允许。你可以上传 ",
'msg_offer_voted_off' => "你的候选被投票拒绝。你不可以上传 ",
'msg_offer_deleted' => "你的候选被删除",
'msg_your_offer' => "你的候选",
'msg_voted_on' => "被投票允许",
'msg_offer_deleted' => "候选被删除",
'msg_your_offer' => "你的候选'",
'msg_voted_on' => "你的候选进入了投票待定状态",
'msg_status_change' => "状态变更",
'msg_was_deleted_by' => "'被管理员",
'msg_blank' => "删除。",
'msg_you_must_upload_in' => "请在",
Expand All @@ -40,7 +38,6 @@
'msg_offer_is_wrong' => "由于候选资源的标题或者简介存在填写不规范的问题,管理员",
'msg_has_freezed' => "冻结了你的候选 ",
'msg_revise_your_offer' => "请你修改你的候选,修改完成后请PM管理员请求解冻。冻结状态中净支持超过15票也不能通过候选,直到满足候选区使用规范后管理员解冻,资源才能发布 ",
'msg_subject_freezed' => "你的候选被冻结 ",
'msg_your_offer' => "你的候选 ",
'msg_has_thawed' => "解冻 ",
'msg_was_thawed_by' => "被管理员",
Expand Down
7 changes: 4 additions & 3 deletions offers.php
Original file line number Diff line number Diff line change
Expand Up @@ -834,17 +834,18 @@ function quick_reply_to(username)
} else
$timeoutnote = "";
$msg = $lang_offers_target [get_user_lang($arr ["userid"])] ['msg_offer_voted_on'] . "[b][url=offers.php?id=$offid&off_details=1]" . $arr ['name'] . "[/url][/b]." . $lang_offers_target [get_user_lang($arr ["userid"])] ['msg_find_offer_option'] . $timeoutnote;
sql_query("UPDATE offers SET allowed = 'allowed',allowedtime ='" . sqlesc($finishvotetime) . "' WHERE id = $offid") or sqlerr(__FILE__, __LINE__);
sql_query("UPDATE offers SET allowed = 'allowed',allowedtime =" . sqlesc($finishvotetime) . " WHERE id = $offid") or sqlerr(__FILE__, __LINE__);
} else if (($no - $yes) >= $minoffervotes) {
$msg = $lang_offers_target [get_user_lang($arr ["userid"])] ['msg_offer_voted_off'] . "[b][url=offers.php?id=$offid&off_details=1]" . $arr ['name'] . "[/url][/b]." . $lang_offers_target [get_user_lang($arr ["userid"])] ['msg_offer_deleted'];
sql_query("UPDATE offers SET allowed = 'denied' WHERE id = $offid") or sqlerr(__FILE__, __LINE__);
} else {
$msg = $lang_offers_target [get_user_lang($arr ["userid"])] ['msg_voted_on'] . "[b][url=offers.php?id=$offid&off_details=1]" . $arr ['name'] . "[/url][/b].";
sql_query("UPDATE offers SET allowed = 'pending' WHERE id = $offid") or sqlerr(__FILE__, __LINE__);
}

// ===use this line if you DO HAVE subject in your PM system
$subject = $lang_offers_target [get_user_lang($arr ['userid'])] ['msg_your_offer'] . $arr ['name'] . $lang_offers_target [get_user_lang($arr ['userid'])] ['msg_voted_on'];
sql_query("INSERT INTO messages (sender, subject, receiver, added, msg) VALUES(0, " . sqlesc($subject) . ", $arr[userid], '" . sqlesc($finishvotetime) . "', " . sqlesc($msg) . ")") or sqlerr(__FILE__, __LINE__);
$subject = $lang_offers_target [get_user_lang($arr ['userid'])] ['msg_your_offer'] . $arr ['name'] . $lang_offers_target [get_user_lang($arr ['userid'])] ['msg_status_change'];
sql_query("INSERT INTO messages (sender, subject, receiver, added, msg) VALUES(0, " . sqlesc($subject) . ", $arr[userid], " . sqlesc($finishvotetime) . ", " . sqlesc($msg) . ")") or sqlerr(__FILE__, __LINE__);
// ===use this line if you DO NOT subject in your PM system
// sql_query("INSERT INTO messages (sender, receiver, added, msg) VALUES(0,
// $arr[userid], '" . date("Y-m-d H:i:s") . "', " . sqlesc($msg) . ")") or
Expand Down

0 comments on commit 7969fa9

Please sign in to comment.