本文整理汇总了PHP中member::update方法的典型用法代码示例。如果您正苦于以下问题:PHP member::update方法的具体用法?PHP member::update怎么用?PHP member::update使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类member
的用法示例。
在下文中一共展示了member::update方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: urlencode
exit;
}
//--社群按鈕
$data["twitterurl"] = '//' . $_SERVER['HTTP_HOST'] . '/includes/twitter/twitterapi.php?callback=' . urlencode('//' . $_SERVER['HTTP_HOST'] . '/member/net_login');
$data["yahoourl"] = '//' . $_SERVER['HTTP_HOST'] . '/includes/openid/yahooapi.php?callback=' . urlencode('//' . $_SERVER['HTTP_HOST'] . '/member/net_login');
$data["fburl"] = '//' . $_SERVER['HTTP_HOST'] . '/includes/openid/fbapi.php?callback=' . urlencode('//' . $_SERVER['HTTP_HOST'] . '/member/net_login');
$data["googleurl"] = '//' . $_SERVER['HTTP_HOST'] . '/includes/googleapi/googleapi.php?callback=' . urlencode('//' . $_SERVER['HTTP_HOST'] . '/member/net_login');
switch ($act) {
case "detail":
$_SESSION["member_info"]["member"] = $member->getinfo();
//--級別
$temp = $console->conn->GetRow("select * from " . PREFIX . "data_list where type='memberdesh' and new_type='" . $_SESSION["member_info"]["member"]["type"] . "'");
$_SESSION["member_info"]["member"]["type_html"] = $temp["name"];
if ($_POST) {
unset($_POST["account"]);
if ($member->update($_POST)) {
alert($console->tags('UPDATE_SURE'), $console->_j_web_set['main_path'] . "/member/detail");
// 修改成功!!
exit;
}
}
break;
case "cpw":
if ($_POST) {
//--判斷有新密碼 以及 (舊密碼等於會員中的資料 或者 不需要判別資料)
if ($_POST["new_password"] && (md5($_POST["password"]) == $member->getinfo('password') || $_GET["nock"])) {
$update["password"] = $_POST["new_password"];
$update["create_date"] = date("Y-m-d H:i:s");
if ($member->update($update)) {
alert($console->tags('UPDATE_SURE'), $console->_j_web_set['main_path'] . "/member/detail");
//修改成功!!
示例2: foreach
$order_list = $shopping_car->order_list("pay_status=1 and status=1 and create_date>='" . $member->getinfo('mode_time') . "'");
if ($order_list) {
foreach ($order_list as $k => $v) {
$check_total += $v['total'] * 1;
}
}
//--
$vip_m = $conn->GetRow("select * from " . PREFIX . "data_list where type='memberdesh' and new_type='vip' and status=1");
if ($vip_m) {
if ($check_total >= $vip_m['memo'] * 1 && $vip_m['memo'] * 1 > 0) {
$indata["type"] = $vip_m['new_type'];
$indata["mode_time"] = date('Y-m-d H:i:s', strtotime('+1 year'));
} else {
$indata['type'] = 'member';
}
$member->update($indata);
}
}
}
//--刪除
if ($_GET["del"] && $_GET["del"] != '') {
if ($shopping_car->car_remove($_GET["del"])) {
linkto('?list=1');
}
}
//--付款
if ($_GET["payorder"]) {
$pay_bill = $shopping_car->getorder(" where id='" . $_GET["payorder"] . "'");
if ($pay_bill["pay_status"] != '1') {
$temp = $shopping_car->esun_pay_send($pay_bill, '回傳路由');
} else {
示例3: exit
case 'avatar':
if ($_FILES) {
exit(json_encode(array('state' => 1, 'return_data' => $_FILES)));
}
if (!$_FILES || !is_uploaded_file($_FILES['val']['tmp_name'])) {
exit(json_encode($return_data['return_data'] = '请选择上传文件'));
}
$file_name = date("YmdHi") . "_" . rand(1000, 9999) . $ext_name;
if (!is_dir($pathname)) {
mkdirs($pathname);
}
@move_uploaded_file($_FILES['val']['tmp_name'], $pathname . '/' . $file_name);
$fileName = $path . '/' . $file_name;
$update_arr = array('avatar' => $fileName);
$where = "`id`={$mid}";
$member->update($update_arr, $where);
//删掉之前使用的头像
unlink('../' . $member_rs['avatar']);
$return_data['return_data'] = API_URL . $fileName;
break;
case 'nickname':
if (!$val) {
exit(json_encode($return_data['return_data'] = '请输入您的昵称'));
}
$val = substr($val, 0, 25);
$update_arr = array('nickname' => $val);
$where = "`id`={$mid}";
$member->update($update_arr, $where);
$return_data['return_data'] = $val;
break;
case 'name':