} require_once R_P . 'require/credit.php'; $o_photos_creditset = unserialize($o_photos_creditset); $o_photos_creditset['Createalbum'] = @array_diff($o_photos_creditset['Createalbum'], array(0)); if (!empty($o_photos_creditset['Createalbum'])) { foreach ($o_photos_creditset['Createalbum'] as $key => $value) { if ($value > 0) { $moneyname = $credit->cType[$key]; if ($value > $credit->get($winduid, $key)) { createfail($checkpwd, 'colony_moneylimit2'); Showmsg('colony_moneylimit2'); } } } //积分变动 $creditset = getCreditset($o_photos_creditset['Createalbum'], false); $credit->sets($winduid, $creditset, true); updateMemberid($winduid); } if ($creditlog = unserialize($o_photos_creditlog)) { addLog($creditlog['Createalbum'], $windid, $winduid, 'photos_Createalbum'); } /* if ($o_camoney) { require_once R_P.'require/credit.php'; if ($o_camoney > $credit->get($winduid,$o_moneytype)) { $moneyname = $credit->cType[$o_moneytype]; createfail($checkpwd,'colony_moneylimit2'); Showmsg('colony_moneylimit2'); } $credit->addLog('hack_cyalbum',array($o_moneytype => -$o_camoney),array(
// } // $db->update("DELETE FROM pw_diary WHERE did=".S::sqlEscape($id)); // $db->update("UPDATE pw_diarytype SET num=num-1 WHERE dtid=".S::sqlEscape($diary['dtid'])); if ($affected_rows = delAppAction('diary', $id)) { countPosts("-{$affected_rows}"); } $userCache = L::loadClass('Usercache', 'user'); $userCache->delete($winduid, 'carddiary'); /* $usercache = L::loadDB('Usercache', 'user'); $usercache->delete($winduid, 'diary', $id); */ //积分变动 require_once R_P . 'require/credit.php'; $o_diary_creditset = unserialize($o_diary_creditset); $creditset = getCreditset($o_diary_creditset['Delete'], false); $creditset = array_diff($creditset, array(0)); if (!empty($creditset)) { require_once R_P . 'require/postfunc.php'; $credit->sets($diary['uid'], $creditset, true); updateMemberid($diary['uid'], false); } if ($creditlog = unserialize($o_diary_creditlog)) { addLog($creditlog['Delete'], $diary['username'], $diary['uid'], 'diary_Delete'); } updateUserAppNum($diary['uid'], 'diary', 'minus'); echo "success\t"; ajax_footer(); } elseif ($a == 'copydiary') { S::gp(array('did', 'dtid', 'privacy')); if (!$did) {
$share_code = ''; } else { $share_code = ''; } $type_name = getLangInfo('app', $type); !$title && ($title = substrs($share['link'], 40)); pwAddFeed($winduid, 'share', $f_id, array('lang' => 'share_view', 'link' => $share['link'], 'title' => $title, 'descrip' => $descrip, 'abstract' => $abstract, 'imgs' => $imgs, 'share_code' => $share_code, 'uid' => $winduid, 'username' => $windid, 'type_name' => $type_name)); $a = 'self'; } else { $a = 'my'; } countPosts('+1'); //积分变动 require_once R_P . 'require/credit.php'; $o_share_creditset = unserialize($o_share_creditset); $creditset = getCreditset($o_share_creditset['Post']); $creditset = array_diff($creditset, array(0)); if (!empty($creditset)) { $credit->sets($winduid, $creditset, true); updateMemberid($winduid); } if ($creditlog = unserialize($o_share_creditlog)) { addLog($creditlog['Post'], $windid, $winduid, 'share_Post'); } updateUserAppNum($winduid, 'share'); $memberShare = array('reply' => "memberShareThread", 'topic' => "memberShareThread", 'diary' => "memberShareDiary", 'album' => "memberShareAlbum", 'user' => "memberShareUser", 'group' => "memberShareGroup", 'photo' => "memberSharePic", 'web' => "memberShareLink", 'video' => "memberShareVideo", 'music' => "memberShareMusic"); $threadShare = array('topic' => "threadShare", 'diary' => "diaryShare", 'photo' => "picShare"); $threadFav = array('diary' => "diaryFav", 'photo' => "picFav"); if (isset($memberShare[$type])) { updateDatanalyse($winduid, $memberShare[$type], 1); }
} else { !in_array($secondgradestyle, $o_style_relation[$firstgradestyle]) && Showmsg('请选择二级分类!'); $styleid = $secondgradestyle; array_push($styles, $firstgradestyle, $secondgradestyle); } } /* if (empty($cid) || !isset($o_classdb[$cid])) { $cid = 0; } */ $rt = $db->get_one("SELECT id FROM pw_colonys WHERE cname=" . S::sqlEscape($cname)); $rt['id'] > 0 && Showmsg('colony_samename'); //积分变动 if (!empty($o_groups_creditset['Creategroup'])) { $creditset = getCreditset($o_groups_creditset['Creategroup'], false); $credit->sets($winduid, $creditset, true); updateMemberid($winduid); } if ($creditlog = $o_groups_creditlog) { addLog($creditlog['Creategroup'], $windid, $winduid, 'groups_Creategroup'); } @asort($o_groups_levelneed); $commonLevel = key($o_groups_levelneed); empty($commonLevel) && Showmsg("系统未创建群组等级,无法创建群组!"); S::gp(array('title1', 'title2', 'title3', 'title4')); $titlefont = S::escapeChar("{$title1}~{$title2}~{$title3}~{$title4}~{$title5}~{$title6}~"); /** $db->update("INSERT INTO pw_colonys SET " . S::sqlSingle(array( 'cname' => $cname, //'classid' => $cid,
require_once R_P . 'apps/groups/lib/group.class.php'; $colony = getGroupByCyid($cyid); require_once R_P . 'require/credit.php'; $o_groups_creditset['Createalbum'] = array_diff($o_groups_creditset['Createalbum'], array(0)); if (!empty($o_groups_creditset['Createalbum'])) { foreach ($o_groups_creditset['Createalbum'] as $key => $value) { if ($value > 0) { $moneyname = $credit->cType[$key]; $moneyvalue = $value; if ($value > $credit->get($winduid, $key)) { Showmsg('colony_moneylimit2'); } } } //积分变动 $creditset = getCreditset($o_groups_creditset['Createalbum'], false); $credit->sets($winduid, $creditset, true); updateMemberid($winduid); } if ($creditlog = $o_groups_creditlog) { addLog($creditlog['Createalbum'], $windid, $winduid, 'groups_Createalbum'); } $db->update("INSERT INTO pw_cnalbum SET " . S::sqlSingle(array('aname' => $aname, 'aintro' => $aintro, 'atype' => 1, 'private' => $private ? 1 : 0, 'ownerid' => $cyid, 'owner' => $colony['cname'], 'lasttime' => $timestamp, 'crtime' => $timestamp, 'memopen' => $memopen))); //* $db->update("UPDATE pw_colonys SET albumnum=albumnum+1 WHERE id=" . S::sqlEscape($cyid)); $db->update(pwQuery::buildClause("UPDATE :pw_table SET albumnum=albumnum+1 WHERE id=:id", array('pw_colonys', $cyid))); $aid = $db->insert_id(); $colony['albumnum']++; updateGroupLevel($colony['id'], $colony); if ($ajax == 1) { echo "success\t{$aid}\t{$aname}\t{$job}"; ajax_footer();
function addColonyUser($uid, $username, $frombbs = false) { global $credit; require_once R_P . 'require/credit.php'; //积分变动 $o_groups_creditset = L::config('o_groups_creditset', 'o_config'); if (!empty($o_groups_creditset['Joingroup'])) { require_once R_P . 'u/require/core.php'; $credit->appendLogSet(L::config('o_groups_creditlog', 'o_config'), 'groups'); $creditset = getCreditset($o_groups_creditset['Joingroup'], false); $credit->addLog('groups_Joingroup', $creditset, array('uid' => $uid, 'username' => $username, 'ip' => $GLOBALS['onlineip'])); $credit->sets($uid, $creditset); } /** $this->_db->update("INSERT INTO pw_cmembers SET " . S::sqlSingle(array( 'uid' => $uid, 'username' => $username, 'ifadmin' => $this->info['ifcheck'] == 2 ? '0' : '-1', 'colonyid' => $this->cyid, 'addtime' => $GLOBALS['timestamp'] ))); **/ pwQuery::insert('pw_cmembers', array('uid' => $uid, 'username' => $username, 'ifadmin' => $this->info['ifcheck'] == 2 ? '0' : '-1', 'colonyid' => $this->cyid, 'addtime' => $GLOBALS['timestamp'])); if ($this->info['ifcheck'] == 2) { $this->updateInfoCount(array('members' => 1)); } $this->_sendJoinMsg($frombbs); if ($this->info['ifcheck'] == 2) { updateUserAppNum($uid, 'group'); return 'colony_joinsuccess'; } return 'colony_joinsuccess_check'; }
$userCache = L::loadClass('Usercache', 'user'); $userCache->delete($winduid, 'carddiary'); updateDatanalyse($did, 'diaryNew', $timestamp); if ($sendWeiboPrivacy && $ifsendweibo) { $weiboService = L::loadClass('weibo', 'sns'); /* @var $weiboService PW_Weibo */ $atc_content = substrs(stripWindCode($weiboService->escapeStr($atc_content)), 125); $weiboExtra = array('did' => $did, 'title' => stripslashes($atc_title)); $weiboService->send($winduid, $atc_content, 'diary', $did, $weiboExtra); } } countPosts('+1'); //积分变动 require_once R_P . 'require/credit.php'; $o_diary_creditset = unserialize($o_diary_creditset); $creditset = getCreditset($o_diary_creditset['Post']); $creditset = array_diff($creditset, array(0)); if (!empty($creditset)) { $credit->sets($winduid, $creditset, true); updateMemberid($winduid); } if ($creditlog = unserialize($o_diary_creditlog)) { addLog($creditlog['Post'], $windid, $winduid, 'diary_Post'); } updateUserAppNum($winduid, 'diary'); if ($db_tcheck) { $postcheck['diary'] = $diaryCheck; $pwInfoSQL['postcheck'] = serialize($postcheck); } S::isArray($pwInfoSQL) && $userService->update($winduid, array(), $pwInfoSQL); $url = "{$basename}a=detail&did={$did}";
//会员资讯缓存 $userCache = L::loadClass('Usercache', 'user'); /* @var $userCache PW_Usercache */ $userCache->delete($winduid, 'cardphoto'); /* $usercache = L::loadDB('Usercache', 'user'); $usercachedata = $usercache->get($winduid,'photos'); $usercachedata = explode(',',$usercachedata['value']); is_array($usercachedata) || $usercachedata = array(); if (count($usercachedata) >=4) array_pop($usercachedata); array_unshift($usercachedata,$pid); $usercachedata = implode(',',$usercachedata); $usercache->update($winduid,'photos',$pid,$usercachedata); */ } $db->update("UPDATE pw_cnalbum SET lasttime=" . S::sqlEscape($timestamp, false) . ',lastpid=' . S::sqlEscape(implode(',', $lastpid)) . (!$rt['lastphoto'] ? ',lastphoto=' . S::sqlEscape($img->getLastPhoto()) : '') . " WHERE aid=" . S::sqlEscape($aid)); countPosts("+{$photoNum}"); //积分变动 require_once R_P . 'require/credit.php'; $creditset = getCreditset($o_photos_creditset['Uploadphoto'], true, $photoNum); $creditset = array_diff($creditset, array(0)); if (!empty($creditset)) { $credit->sets($winduid, $creditset, true); updateMemberid($winduid); } if ($creditlog = unserialize($o_photos_creditlog)) { addLog($creditlog['Uploadphoto'], $windid, $winduid, 'photos_Uploadphoto'); } updateUserAppNum($winduid, 'photo', 'add', $photoNum); echo "success\t" . $photoInfo['pintro'] . "\t" . $pid . "\t" . $photo . "\t" . $photoThumb; ajax_footer();
function weibocredit($action = 'weibo_Post') { global $o_weibo_creditset, $o_weibo_creditlog, $onlineip, $winduid, $windid, $credit; require_once R_P . 'require/credit.php'; $o_weibo_creditset = unserialize($o_weibo_creditset); $type = $action == 'weibo_Post' ? true : false; $creditset = $type == true ? getCreditset($o_weibo_creditset['Post'], $type) : getCreditset($o_weibo_creditset['Delete'], $type); $creditset = array_diff($creditset, array(0)); //积分变动 if ($creditlog = unserialize($o_weibo_creditlog)) { $credit->appendLogSet($creditlog, 'weibo'); $credit->addLog($action, $creditset, array('uid' => $winduid, 'username' => $windid, 'ip' => $onlineip)); } if (!empty($creditset)) { $credit->sets($winduid, $creditset, true); updateMemberid($winduid); } }
} if ($o_allowjoin > 0 && $o_allowjoin <= $db->get_value("SELECT COUNT(*) as sum FROM pw_cmembers WHERE uid=" . pwEscape($winduid))) { Showmsg('colony_joinlimit'); } if (empty($_POST['step'])) { require_once PrintEot('m_ajax'); ajax_footer(); } else { if ($o_joinmoney > 0) { $credit->addLog('hack_cyjoin', array($o_moneytype => -$o_joinmoney), array('uid' => $winduid, 'username' => $windid, 'ip' => $onlineip, 'cnname' => $colony['cname'])); $credit->set($winduid, $o_moneytype, -$o_joinmoney); } //积分变动 if (!empty($o_groups_creditset['Joingroup'])) { require_once R_P . 'require/postfunc.php'; $creditset = getCreditset($o_groups_creditset['Joingroup'], false); $credit->sets($winduid, $creditset, true); updateMemberid($winduid); } if ($creditlog = unserialize($o_groups_creditlog)) { addLog($creditlog['Joingroup'], $windid, $winduid, 'groups_Joingroup'); } $db->update("INSERT INTO pw_cmembers SET " . pwSqlSingle(array('uid' => $winduid, 'username' => $windid, 'ifadmin' => $colony['ifcheck'] == 2 ? '0' : '-1', 'colonyid' => $cyid, 'addtime' => $timestamp))); pwAddFeed($winduid, 'colony', $cyid, array('lang' => 'colony_pass', 'colonyid' => $cyid, 'cname' => $colony['cname'], 'link' => "{$db_bbsurl}/{#APPS_BASEURL#}q=group&cyid={$cyid}")); $db->update("UPDATE pw_colonys SET members=members+1 WHERE id=" . pwEscape($cyid)); if ($colony['ifcheck'] == 2) { updateUserAppNum($winduid, 'group'); Showmsg('colony_joinsuccess'); } else { Showmsg('colony_joinsuccess_check'); }
$photo = $photoService->delPhoto($pid); if (empty($photo)) { Showmsg('data_error'); } $weiboService = L::loadClass('weibo', 'sns'); /* @var $weiboService PW_Weibo */ $weibo = $weiboService->getWeibosByObjectIdsAndType($pid, 'photos'); if ($weibo) { $weiboService->deleteWeibos($weibo['mid']); } $affected_rows = delAppAction('photo', $pid) + 1; countPosts("-{$affected_rows}"); //积分变动 require_once R_P . 'require/credit.php'; $o_photos_creditset = unserialize($o_photos_creditset); $creditset = getCreditset($o_photos_creditset['Deletephoto'], false); $creditset = array_diff($creditset, array(0)); if (!empty($creditset)) { require_once R_P . 'require/postfunc.php'; $credit->sets($photo['uid'], $creditset, true); updateMemberid($photo['uid'], false); } if ($creditlog = unserialize($o_photos_creditlog)) { addLog($creditlog['Deletephoto'], $photo['uploader'], $photo['uid'], 'photos_Deletephoto'); } updateUserAppNum($photo['uid'], 'photo', 'minus'); echo 'ok' . "\t" . $photo['aid']; ajax_footer(); } elseif ($a == 'delalbum') { define('AJAX', 1); define('F_M', true);
$sql = "AND uid=" . pwEscape($owritedata['uid']); $authorid = $owritedata['uid']; $author = $owritedata['username']; } $db->update("DELETE FROM pw_owritedata WHERE id=" . pwEscape($id) . $sql); if ($db->affected_rows() == 0) { Showmsg('mode_o_write_del_error'); } else { $affected_rows = delAppAction('write', $id) + 1; countPosts("-{$affected_rows}"); $usercache = L::loadDB('Usercache'); $usercache->delete($winduid, 'write', $id); //积分变动 require_once R_P . 'require/credit.php'; $o_write_creditset = unserialize($o_write_creditset); $creditset = getCreditset($o_write_creditset['Delete'], false); $creditset = array_diff($creditset, array(0)); if (!empty($creditset)) { require_once R_P . 'require/postfunc.php'; $credit->sets($authorid, $creditset, true); updateMemberid($authorid, false); } if ($creditlog = unserialize($o_write_creditlog)) { addLog($creditlog['Delete'], $author, $authorid, 'write_Delete'); } updateUserAppNum($authorid, 'owrite', 'minus'); Showmsg('mode_o_write_del'); } } elseif ($do == 'my') { $u != $winduid && Showmsg('undefined_action'); $writedata = array();