本帖最后由 lawy 于 2009-8-23 04:28 编辑
版本包:UCenter_Home_2.0beta_SC_UTF8
function_cp.php line 341
- //创建相册
- function album_creat($arr) {
- global $_SGLOBAL, $space;
- //检查相册是否存在
- $albumid = getcount('album', array('albumname'=>$arr['albumname'], 'uid'=>$_SGLOBAL['supe_uid']), 'albumid');
- if($albumid) {
- return $albumid;
- } else {
- $arr['uid'] = $_SGLOBAL['supe_uid'];
- $arr['username'] = $_SGLOBAL['supe_username'];
- $arr['dateline'] = $arr['updatetime'] = $_SGLOBAL['timestamp'];
- $albumid = inserttable('album', $arr, 1);
-
- //检查数量
- if(empty($space['albumnum'])) {
- $space['albumnum'] = getcount('album', array('uid'=>$space['uid']));
- updatetable('space', array('albumnum'=>$space['albumnum']+1), array('uid'=>$space['uid']));
- } else {
- $_SGLOBAL['db']->query("UPDATE ".tname('album')." SET albumnum=albumnum+1 WHERE uid='$space[uid]'");
- }
- return $albumid;
- }
- }
复制代码 $_SGLOBAL['db']->query("UPDATE ".tname('album')." SET albumnum=albumnum+1 WHERE uid='$space[uid]'");//本行的更新表名album应该为space请更正 |