• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP updatetable函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中updatetable函数的典型用法代码示例。如果您正苦于以下问题:PHP updatetable函数的具体用法?PHP updatetable怎么用?PHP updatetable使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了updatetable函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: auth_update

function auth_update($set, $where)
{
    $set = base_protect($set);
    $where = base_protect($where);
    $flag = updatetable('authmap', $set, $where);
    return $flag;
}
开发者ID:jjvein,项目名称:my_php_framework,代码行数:7,代码来源:auth.func.php


示例2: update

 function update($uId, $appIds, $appName, $privacy, $allowSideNav, $allowFeed, $allowProfileLink, $version, $displayMethod, $displayOrder = null)
 {
     global $_SGLOBAL;
     switch ($privacy) {
         case 'public':
             $privacy = 0;
             break;
         case 'friends':
             $privacy = 1;
             break;
         case 'me':
             $privacy = 3;
             break;
         case 'none':
             $privacy = 5;
             break;
         default:
             $privacy = 0;
     }
     $where = sprintf('uid = %d AND appid IN (%s)', $uId, simplode($appIds));
     $setarr = array('appname' => $appName, 'privacy' => $privacy, 'allowsidenav' => $allowSideNav, 'allowfeed' => $allowFeed, 'allowprofilelink' => $allowProfileLink);
     if ($displayOrder !== null) {
         $setarr['displayorder'] = $displayOrder;
     }
     updatetable('userapp', $setarr, $where);
     $result = $_SGLOBAL['db']->affected_rows();
     $displayMethod = $displayMethod == 'iframe' ? 1 : 0;
     if (is_array($appIds)) {
         foreach ($appIds as $appId) {
             $this->refreshApplication($appId, $appName, $version, $displayMethod, null, null, null);
         }
     }
     return new APIResponse($result);
 }
开发者ID:v998,项目名称:discuzx-en,代码行数:34,代码来源:UserApplication.php


示例3: setActionLink

 function setActionLink($uId, $appId, $actionMarkup)
 {
     global $_SGLOBAL;
     $fields = array('profilelink' => $actionMarkup);
     $where = array('uid' => $uId, 'appid' => $appId);
     updatetable('userappfield', $fields, $where);
     $result = $_SGLOBAL['db']->affected_rows();
     return new APIResponse($result);
 }
开发者ID:shiyake,项目名称:php-ihome,代码行数:9,代码来源:Profile.php


示例4: update

 function update($appId, $appName, $version, $displayMethod, $displayOrder = null)
 {
     $fields = array('appname' => $appName);
     $where = array('appid' => $appId);
     $result = updatetable('userapp', $fields, $where);
     $displayMethod = $displayMethod == 'iframe' ? 1 : 0;
     $this->refreshApplication($appId, $appName, $version, $displayMethod, null, null, $displayOrder);
     return new APIResponse($result);
 }
开发者ID:xiaoxiaoleo,项目名称:ngintek,代码行数:9,代码来源:Application.php


示例5: edit

 /**
  * 编辑指定ID信息
  *
  * @param unknown_type $eid
  * @return unknown
  */
 function edit($eid, $dataarray)
 {
     if (is_array($dataarray) && !empty($eid)) {
         //更新数据库操作
         $wheresqlarr = " " . $this->idname . "='{$eid}'";
         updatetable($this->table, $dataarray, $wheresqlarr);
         return "OK";
     }
     return lang('Array_format_error');
 }
开发者ID:dalinhuang,项目名称:c2my,代码行数:16,代码来源:table.class.php


示例6: update

 public function update($appId, $appName, $version, $displayMethod, $displayOrder = null)
 {
     $db_prefix = getDbPrefix();
     global $_SGLOBAL;
     $fields = array('appname' => $appName);
     $where = array('appid' => $appId);
     $result = updatetable('myop_myapp', $fields, $where);
     $result = updatetable('myop_userapp', $fields, $where) || $result;
     $displayMethod = $displayMethod == 'iframe' ? 1 : 0;
     $this->refreshApplication($appId, $appName, $version, $displayMethod, null, null, $displayOrder);
     return new APIResponse($result);
 }
开发者ID:armebayelm,项目名称:thinksns-vietnam,代码行数:12,代码来源:Application.class.php


示例7: update

	function update($appId, $appName, $version, $displayMethod, $displayOrder = null) {
		global $_SGLOBAL;
		$fields = array('appname' => $appName);
		$where = array('appid'	=> $appId);
		updatetable('myapp', $fields, $where);
		updatetable('userapp', $fields, $where);

		$result = $_SGLOBAL['db']->affected_rows();
		
		$displayMethod = ($displayMethod == 'iframe') ? 1 : 0;
		$this->refreshApplication($appId, $appName, $version, $displayMethod, null, null, $displayOrder);
		return new APIResponse($result);
	}
开发者ID:BGCX262,项目名称:zyyhong-svn-to-git,代码行数:13,代码来源:Application.php


示例8: update_doing

function update_doing($db_uch, $uid, $uname, $msg)
{
    $mtime = explode(' ', microtime());
    $doingarr = array("uid" => $uid, "username" => $uname, "dateline" => $mtime[1], "message" => $msg, "ip" => "IM");
    inserttable($db_uch, "doing", $doingarr, 1);
    updatetable($db_uch, "spacefield", array("note" => $uname), array("uid" => $uid));
    $feedarr = array("appid" => 1, "icon" => "doing", "uid" => $uid, "username" => $uname, "dateline" => $mtime[1], "title_template" => "{actor}:{message}", "body_template" => "", "body_general" => "", "image_1" => "", "image_1_link" => "", "image_2" => "", "image_2_link" => "", "image_3" => "", "image_3_link" => "", "image_4" => "", "image_4_link" => "", "target_ids" => "", "friend" => "");
    $feedarr = sstripslashes($feedarr);
    $feedarr['title_data'] = serialize(sstripslashes(array("message" => $msg)));
    $feedarr['body_data'] = serialize(sstripslashes(array()));
    $feedarr['hash_template'] = md5($feedarr['title_template'] . "\t" . $feedarr['body_template']);
    $feedarr['hash_data'] = md5($feedarr['title_template'] . "\t" . $feedarr['title_data'] . "\t" . $feedarr['body_template'] . "\t" . $feedarr['body_data']);
    $feedarr = sstripslashes($feedarr);
    inserttable($db_uch, "feed", $feedarr);
}
开发者ID:BGCX261,项目名称:ziuziu-cn-svn-to-git,代码行数:15,代码来源:doing.php


示例9: auth

 function auth($uId, $picData, $picExt = 'jpg', $isReward = false)
 {
     global $_SGLOBAL;
     $pic = base64_decode($picData);
     if (!$pic || strlen($pic) == strlen($picData)) {
         $errCode = '200';
         $errMessage = 'Error argument';
         return new APIErrorResponse($errCode, $errMessage);
     }
     $secret = md5($_SGLOBAL['timestamp'] . "\t" . $_SGLOBAL['supe_uid']);
     $picDir = S_ROOT . './data/avatar/' . substr($secret, 0, 1);
     if (!is_dir($picDir)) {
         if (!mkdir($picDir, 0777)) {
             $errCode = '300';
             $errMessage = 'Cannot create directory';
             return new APIErrorResponse($errCode, $errMessage);
         }
     }
     $picDir .= '/' . substr($secret, 1, 1);
     if (!is_dir($picDir)) {
         if (!@mkdir($picDir, 0777)) {
             $errCode = '300';
             $errMessage = 'Cannot create directory';
             return new APIErrorResponse($errCode, $errMessage);
         }
     }
     $picPath = $picDir . '/' . $secret . '.' . $picExt;
     $fp = @fopen($picPath, 'wb');
     if ($fp) {
         if (fwrite($fp, $pic) !== FALSE) {
             fclose($fp);
             //The main table
             updatetable('space', array('videostatus' => 1), array('uid' => $uId));
             //Attached table
             $fields = array('videopic' => $secret);
             updatetable('spacefield', $fields, array('uid' => $uId));
             $result = $_SGLOBAL['db']->affected_rows();
             if ($isReward) {
                 // Bonus Points
                 getreward('videophoto', 1, $uId, '', 0);
             }
             return new APIResponse($result);
         }
     }
     $errCode = '300';
     $errMessage = 'Video Auth Error';
     return new APIErrorResponse($errCode, $errMessage);
 }
开发者ID:v998,项目名称:discuzx-en,代码行数:48,代码来源:VideoAuth.php


示例10: insertsession

function insertsession($setarr)
{
    global $_SGLOBAL, $_SCONFIG;
    $_SCONFIG['onlinehold'] = intval($_SCONFIG['onlinehold']);
    if ($_SCONFIG['onlinehold'] < 300) {
        $_SCONFIG['onlinehold'] = 300;
    }
    $_SGLOBAL['db']->query("DELETE FROM " . tname('session') . " WHERE uid='{$setarr['uid']}' OR lastactivity<'" . ($_SGLOBAL['timestamp'] - $_SCONFIG['onlinehold']) . "'");
    //添加在线
    $ip = getonlineip(1);
    $setarr['lastactivity'] = $_SGLOBAL['timestamp'];
    $setarr['ip'] = $ip;
    inserttable('session', $setarr, 0, true, 1);
    //更新用户
    updatetable('space', array('lastlogin' => $_SGLOBAL['timestamp'], 'ip' => $ip), array('uid' => $setarr['uid']), 1);
}
开发者ID:xiaoxiaoleo,项目名称:ngintek,代码行数:16,代码来源:function_space.php


示例11: update

 function update($appId, $appName, $version, $displayMethod, $displayOrder = null)
 {
     global $_SGLOBAL;
     $result = true;
     $sql = "SELECT appname FROM " . tname('myapp') . " WHERE appid = {$appId}";
     $query = $_SGLOBAL['db']->query($sql);
     $row = $_SGLOBAL['db']->fetch_array($query);
     if ($row['appname'] != $appName) {
         $fields = array('appname' => $appName);
         $where = array('appid' => $appId);
         updatetable('myapp', $fields, $where);
         updatetable('userapp', $fields, $where);
         $result = $_SGLOBAL['db']->affected_rows();
     }
     $displayMethod = $displayMethod == 'iframe' ? 1 : 0;
     $this->refreshApplication($appId, $appName, $version, $displayMethod, null, null, $displayOrder);
     return new APIResponse($result);
 }
开发者ID:v998,项目名称:discuzx-en,代码行数:18,代码来源:Application.php


示例12: find_pwd

/**
@param (忘记密码)通过地址栏用户名和新密码登陆
@param return null
*/
function find_pwd()
{
    global $_MooClass, $dbTablePre, $userid, $_MooCookie;
    //	if($userid){
    //		return;
    //	}
    $uid = MooGetGPC('uid', 'string', G);
    $pwd = MooGetGPC('upwd', 'string', G);
    /*	echo md5($uid).'<br>';
    	echo md5($pwd);
    	print_r($_COOKIE);
    	exit;
    */
    if ($_MooCookie['findpwd'] == md5($pwd) && md5($uid) == $_MooCookie['finduser']) {
        $newpwd = md5(base64_decode($pwd));
        //note 修改密码
        //$_MooClass['MooMySQL']->query("update {$dbTablePre}members set password = '{$newpwd}' where uid = '{$uid}'");
        //if(MOOPHP_ALLOW_FASTDB){
        //			MooFastdbUpdate('members','uid',$uid);
        //		}
        MooSetCookie('auth', MooAuthCode("{$uid}\t{$newpwd}", 'ENCODE'), 86400);
        //note 写入session表需要的字段值
        $online_ip = GetIP();
        $lastactive = $GLOBALS['timestamp'];
        //$uid = $user['uid'];
        //note 更新用户的最近登录ip和最近登录时间
        $updatesqlarr = array('lastip' => $online_ip, 'lastvisit' => $lastactive, 'password' => $newpwd);
        $wheresqlarr = array('uid' => $uid);
        updatetable("members_search", $updatesqlarr, $wheresqlarr);
        if (MOOPHP_ALLOW_FASTDB) {
            $val = array();
            $val['lastip'] = $online_ip;
            $val['lastvisit'] = $lastactive;
            $val['password'] = $newpwd;
            MooFastdbUpdate('members_search', 'uid', $uid, $val);
            //!!
        }
        //note 先删除表里面已存在对应用户的session
        //$_MooClass['MooMySQL']->query("DELETE FROM `{$dbTablePre}membersession` WHERE `uid` ='$uid'");
        //$_MooClass['MooMySQL']->query("REPLACE INTO `{$dbTablePre}membersession` SET `username`= '$user[username]',`password`='$user[password]',`ip` = '$online_ip',`lastactive` = '$lastactive',`uid` = '$uid'");
        return 1;
    }
    return 0;
}
开发者ID:noikiy,项目名称:zays,代码行数:48,代码来源:function.php


示例13: wz_checkauth

function wz_checkauth($wxid, $token, $mid, $op_wxid)
{
    global $_SGLOBAL;
    if ($_COOKIE['site_auth']) {
        @(list($password, $token_id) = explode(" ", authcode($_COOKIE['site_auth'], 'DECODE')));
        $_SGLOBAL['supe_token_id'] = intval($token_id);
        if ($password && $_SGLOBAL['supe_token_id']) {
            $query = $_SGLOBAL['db']->query("SELECT * FROM " . tname("wz_session") . " WHERE token_id=" . $_SGLOBAL['supe_token_id']);
            if ($session = $_SGLOBAL['db']->fetch_array($query)) {
                if ($session['password'] == $password) {
                    $token_mid = $_SGLOBAL['db']->getone('select mid from ' . tname('wz_token') . ' where id=' . $_SGLOBAL['supe_token_id']);
                    $token_op_wxid = $_SGLOBAL['db']->getone('select op_wxid from ' . tname('wz_token') . ' where id=' . $_SGLOBAL['supe_token_id']);
                    if ($token_mid == $mid && $token_op_wxid == $op_wxid) {
                        updatetable(tname('wz_token'), array('state' => 1), array('wxid' => $session['wxid'], 'mid' => $mid, 'op_wxid' => $op_wxid));
                        $_SGLOBAL['supe_wxid'] = addslashes($session['wxid']);
                        wz_insertsession($session);
                        //更新session
                        return $_SGLOBAL['supe_token_id'];
                    }
                }
            }
        }
    }
    $query = $_SGLOBAL['db']->query("SELECT * FROM " . tname("wz_token") . " WHERE wxid='" . $wxid . "' and mid=" . $mid . " and op_wxid=" . $op_wxid . " and state=0");
    if ($wz = $_SGLOBAL['db']->fetch_array($query)) {
        if ($wz['token'] == $token) {
            updatetable(tname('wz_token'), array('state' => 1), array('wxid' => $wxid, 'mid' => $mid, 'op_wxid' => $op_wxid));
            $_SGLOBAL['supe_wxid'] = addslashes($wz['wxid']);
            $session = array('token_id' => $wz['id'], 'wxid' => $_SGLOBAL['supe_wxid'], 'password' => $token);
            wz_insertsession($session);
            //登录
            $cookietime = 3600;
            //3600 * 24 * 15;
            //设置cookie
            ssetcookie('site_auth', authcode($session["password"] . ' ' . $session["token_id"], 'ENCODE'), $cookietime);
            $_SGLOBAL['supe_token_id'] = $session['token_id'];
            return $_SGLOBAL['supe_token_id'];
        }
    }
    obclean();
    ssetcookie('site_auth', '', -86400 * 365);
    return 0;
}
开发者ID:hugolong,项目名称:weixiao,代码行数:43,代码来源:function_weizhan.php


示例14: space_friend_stat

function space_friend_stat($start, $perpage)
{
    global $_SGLOBAL;
    $next = false;
    $query = $_SGLOBAL['db']->query("SELECT uid, friend FROM " . tname('spacefield') . " LIMIT {$start},{$perpage}");
    while ($value = $_SGLOBAL['db']->fetch_array($query)) {
        $next = true;
        $fuids = array();
        $subquery = $_SGLOBAL['db']->query("SELECT fuid FROM " . tname('friend') . " WHERE uid='{$value['uid']}' AND status='1'");
        while ($subvalue = $_SGLOBAL['db']->fetch_array($subquery)) {
            $fuids[$subvalue['fuid']] = $subvalue['fuid'];
        }
        $fuidstr = implode(',', $fuids);
        if ($fuidstr != $value['friend']) {
            updatetable('spacefield', array('friend' => $fuidstr), array('uid' => $value['uid']));
        }
    }
    return $next;
}
开发者ID:xiaoxiaoleo,项目名称:ngintek,代码行数:19,代码来源:function_stat.php


示例15: refreshApplication

 function refreshApplication($appId, $appName, $version, $displayMethod, $narrow, $flag, $displayOrder)
 {
     global $_SGLOBAL;
     $fields = array();
     if ($appName !== null && strlen($appName) > 1) {
         $fields['appname'] = $appName;
     }
     if ($version !== null) {
         $fields['version'] = $version;
     }
     if ($displayMethod !== null) {
         // todo: remove
         $fields['displaymethod'] = $displayMethod;
     }
     if ($narrow !== null) {
         $fields['narrow'] = $narrow;
     }
     if ($flag !== null) {
         $fields['flag'] = $flag;
     }
     if ($displayOrder !== null) {
         $fields['displayorder'] = $displayOrder;
     }
     $sql = sprintf('SELECT * FROM %s WHERE appid = %d', tname('myapp'), $appId);
     $query = $_SGLOBAL['db']->query($sql);
     if ($application = $_SGLOBAL['db']->fetch_array($query)) {
         $where = sprintf('appid = %d', $appId);
         updatetable('myapp', $fields, $where);
     } else {
         $fields['appid'] = $appId;
         $result = inserttable('myapp', $fields, 1);
     }
     //update cache
     include_once S_ROOT . './source/function_cache.php';
     userapp_cache();
 }
开发者ID:xiaoxiaoleo,项目名称:ngintek,代码行数:36,代码来源:MyBase.php


示例16: topic_join

function topic_join($topicid, $uid, $username) {
	global $_SGLOBAL;
	
	$query = $_SGLOBAL['db']->query("SELECT * FROM ".tname('topicuser')." WHERE uid='$uid' AND topicid='$topicid'");
	if($value = $_SGLOBAL['db']->fetch_array($query)) {
		updatetable('topicuser', array('dateline'=>$_SGLOBAL['timestamp']), array('id'=>$value['id']));
	} else {
		$_SGLOBAL['db']->query("UPDATE ".tname('topic')." SET joinnum=joinnum+1, lastpost='$_SGLOBAL[timestamp]' WHERE topicid='$topicid'");
		$setarr = array(
			'uid' => $uid,
			'topicid' => $topicid,
			'username' => $username,
			'dateline' => $_SGLOBAL['timestamp']
		);
		inserttable('topicuser', $setarr);
	}
}
开发者ID:BGCX262,项目名称:zyyhong-svn-to-git,代码行数:17,代码来源:function_cp.php


示例17: updatetable

    updatetable('space', $space, array('uid' => $newuid));
    if ($bp['birthday']) {
        $birth_year = intval(substr($bp['birthday'], 0, 4));
        $birth_month = intval(substr($bp['birthday'], 4, 2));
        $birth_day = intval(substr($bp['birthday'], 6, 2));
        $birthday_info = array('birthyear' => $birth_year, 'birthmonth' => $birth_month, 'birthday' => $birth_day);
        updatetable('spacefield', $birthday_info, array('uid' => $newuid));
        $_SGLOBAL['db']->query("INSERT INTO " . tname('spaceinfo') . " (type,subtype,uid,friend) VALUES ('base','birth'," . $newuid . ",1)");
    }
    if ($bp['unit']) {
        $workinfo = array('uid' => $newuid, 'type' => 'work', 'title' => $bp['unit']);
        inserttable('spaceinfo', $workinfo, 1);
    }
    if ($bp['academy'] && $bp['class'] && $bp['startyear']) {
        $eduinfo = array('uid' => $newuid, 'type' => 'edu', 'title' => '北京航空航天大学', 'subtitle' => $bp['academy'] . $bp['startyear'] . '级' . $bp['class'] . '班', 'startyear' => $bp['startyear']);
        $tagname = $bp['startyear'] . '年' . $bp['class'] . '班';
        auto_join($newuid, $tagname, $_SGLOBAL['db']);
        inserttable('spaceinfo', $eduinfo, 1);
    }
    //更新手机验证表记录
    $_SGLOBAL['db']->query("UPDATE " . tname('mobilereg') . " SET status=1 WHERE mobile = '{$mobile}' and verifycode = '{$verifycode}'");
    //设置隐私
    $_SGLOBAL['db']->query("INSERT INTO " . tname('spaceinfo') . " (type,subtype,uid,friend) VALUES ('contact','mobile'," . $newuid . ",1)");
    //更新用户手机绑定字段
    updatetable('spacefield', array('mobile' => $mobile, 'mobiletask' => 1), array('uid' => $newuid));
    //变更记录--用户登录时间
    if ($_SCONFIG['my_status']) {
        inserttable('userlog', array('uid' => $newuid, 'action' => 'add', 'dateline' => $_SGLOBAL['timestamp']), 0, true);
    }
    showmessage('registered', 'space.php?do=home', 1);
}
开发者ID:shiyake,项目名称:php-ihome,代码行数:31,代码来源:do_overseasinvite.php


示例18: uc_user_synlogin

    $ucsynlogin = uc_user_synlogin($setarr['uid']);
    //好友邀请
    if ($invitearr) {
        //成为好友
        include_once S_ROOT . './source/function_cp.php';
        invite_update($invitearr['id'], $setarr['uid'], $setarr['username'], $invitearr['uid'], $invitearr['username'], $app);
    }
    //判断用户是否设置了头像
    $setarr = array();
    $avatar_exists = ckavatar($space['uid']);
    if ($avatar_exists) {
        if (!$space['avatar']) {
            $setarr['avatar'] = 1;
            $setarr['updatetime'] = $_SGLOBAL['timestamp'];
        }
    } else {
        if ($space['avatar']) {
            $setarr['avatar'] = 0;
        }
    }
    if ($setarr) {
        updatetable('space', $setarr, array('uid' => $space['uid']));
    }
    if (empty($_POST['refer'])) {
        $_POST['refer'] = 'space.php?do=home';
    }
    showmessage('login_success', $app ? "userapp.php?id={$app}" : $_POST['refer'], 1, array($ucsynlogin));
}
$membername = empty($_SCOOKIE['loginuser']) ? '' : sstripslashes($_SCOOKIE['loginuser']);
$cookiecheck = ' checked';
include template('do_login');
开发者ID:xiaoxiaoleo,项目名称:ngintek,代码行数:31,代码来源:do_login.php


示例19: exit

<?php

if (!defined('iBUAA')) {
    exit('Access Denied');
}
//idtype到含有magiccolor字段的表映射
$mapping = array('blogid' => 'blogfield', 'tid' => 'thread');
if (!isset($mapping[$idtype])) {
    showmessage('magicuse_bad_object');
}
magic_check_idtype($id, $idtype);
//彩色灯
if (submitcheck("usesubmit")) {
    //颜色代号
    $tablename = $mapping[$idtype];
    $_POST['color'] = intval($_POST['color']);
    updatetable($tablename, array('magiccolor' => $_POST['color']), array($idtype => $id, 'uid' => $_SGLOBAL['supe_uid']));
    //feed也加上颜色
    $query = $_SGLOBAL['db']->query('SELECT * FROM ' . tname('feed') . " WHERE id='{$id}' AND idtype='{$idtype}' AND uid='{$_SGLOBAL['supe_uid']}'");
    $feed = $_SGLOBAL['db']->fetch_array($query);
    if ($feed) {
        $feed['body_data'] = unserialize($feed['body_data']);
        $feed['body_data'] = is_array($feed['body_data']) ? $feed['body_data'] : array();
        $feed['body_data']['magic_color'] = $_POST['color'];
        $feed['body_data'] = serialize($feed['body_data']);
        updatetable('feed', array('body_data' => $feed['body_data']), array('feedid' => $feed['feedid']));
    }
    magic_use($mid, array('id' => $id, 'idtype' => $idtype), true);
    showmessage('magicuse_success', $_POST['refer'], 0);
}
开发者ID:shiyake,项目名称:php-ihome,代码行数:30,代码来源:magic_color.php


示例20: intval

    $id = intval($_GET['id']);
    $uid = $id ? getcount('blog', array('blogid' => $id), 'uid') : 0;
    showmessage('do_success', "space.php?uid={$uid}&do=blog&id={$id}", 0);
} elseif ($_GET['op'] == 'edithot') {
    //权限
    if (!checkperm('manageblog')) {
        showmessage('no_privilege');
    }
    if (submitcheck('hotsubmit')) {
        $_POST['hot'] = intval($_POST['hot']);
        updatetable('blog', array('hot' => $_POST['hot']), array('blogid' => $blog['blogid']));
        if ($_POST['hot'] > 0) {
            include_once S_ROOT . './source/function_feed.php';
            feed_publish($blog['blogid'], 'blogid');
        } else {
            updatetable('feed', array('hot' => $_POST['hot']), array('id' => $blog['blogid'], 'idtype' => 'blogid'));
        }
        showmessage('do_success', "space.php?uid={$blog['uid']}&do=blog&id={$blog['blogid']}", 0);
    }
} else {
    //添加编辑
    //获取个人分类
    $classarr = $blog['uid'] ? getclassarr($blog['uid']) : getclassarr($_SGLOBAL['supe_uid']);
    //获取相册
    $albums = getalbums($_SGLOBAL['supe_uid']);
    $tags = empty($blog['tag']) ? array() : unserialize($blog['tag']);
    $blog['tag'] = implode(' ', $tags);
    $blog['target_names'] = '';
    $friendarr = array($blog['friend'] => ' selected');
    $passwordstyle = $selectgroupstyle = 'display:none';
    if ($blog['friend'] == 4) {
开发者ID:NaturalWill,项目名称:UCQA,代码行数:31,代码来源:cp_blog.php



注:本文中的updatetable函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP updatethreadcount函数代码示例发布时间:2022-05-23
下一篇:
PHP updatestat函数代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap