本文整理汇总了PHP中member::point_work方法的典型用法代码示例。如果您正苦于以下问题:PHP member::point_work方法的具体用法?PHP member::point_work怎么用?PHP member::point_work使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类member
的用法示例。
在下文中一共展示了member::point_work方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: member
function back_point($data, $memo = '')
{
if (!is_array($data)) {
$data = $this->conn->GetRow("select * from " . $this->table . " where id='" . $data . "'");
}
if ($data && $data["member_id"] != '' && $data["addpoint_status"] == '1') {
$member = new member($this->conn, PREFIX . "member");
$member->getmember(" where id='" . $data["member_id"] . "'", 'login');
$ind['shopping_car_id'] = $data["id"];
$member->point_work($data["addpoint"] * -1, $memo != '' ? $memo : '訂單' . $order_no . '移除紅利', $ind);
$this->conn->Execute("UPDATE " . $this->table . " SET addpoint_status=0 where id='" . $data["id"] . "'");
}
}
示例2: explode
$loadata = $conn->GetRow("select * from " . $_POST["table"] . " where " . $where_sql);
$loadata[$_POST["row"]] = explode('|__|', $loadata[$_POST["row"]]);
$loadata[$_POST["row"]][$temp_str_add[1] * 1] = quotes($_POST["editabledata"]);
$indata[$_POST["row"]] = implode('|__|', $loadata[$_POST["row"]]);
} else {
$indata[$_POST["row"]] = quotes($_POST["editabledata"]);
}
if ($_SESSION["admin_info"]["account"] && $conn->AutoExecute($_POST["table"], $indata, "UPDATE", $where_sql)) {
echo '更新成功';
} else {
echo '更新失敗';
}
}
//--訂單紅利操作
if ($_GET["back_point"]) {
$member = new member($conn, PREFIX . "member");
$check_data = $conn->GetRow("select * from " . PREFIX . "shopping_car where id='" . $_GET["back_point"] . "'");
$member->getmember(" where id='" . $check_data["member_id"] . "'", 'login');
$member->work();
if ($check_data["addpoint_status"] == '1') {
$member->point_work($check_data['addpoint'] * -1, '後台訂單調整回收紅利');
$conn->Execute("UPDATE " . PREFIX . "shopping_car SET addpoint_status=0 where id='" . $_GET["back_point"] . "'");
echo '已回收紅利點數';
exit;
} else {
$member->point_work($check_data['addpoint'], '後台訂單調整發放紅利');
$conn->Execute("UPDATE " . PREFIX . "shopping_car SET addpoint_status=1 where id='" . $_GET["back_point"] . "'");
echo '已發放紅利點數';
exit;
}
}