function videopic_upload($FILE, $uid) { if($FILE['size']) { //本地上传 $newfilename = md5(substr($_SGLOBAL['timestamp'], 0, 7).$uid); //创建目录 $dir1 = substr($newfilename, 0, 1); $dir2 = substr($newfilename, 1, 1); if(!is_dir(S_ROOT.'./data/avatar/'.$dir1)) { if(!mkdir(S_ROOT.'./data/avatar/'.$dir1)) return ''; } if(!is_dir(S_ROOT.'./data/avatar/'.$dir1.'/'.$dir2)) { if(!mkdir(S_ROOT.'./data/avatar/'.$dir1.'/'.$dir2)) return ''; } $new_name = S_ROOT.'./'.getvideopic($newfilename); $tmp_name = $FILE['tmp_name']; if(@copy($tmp_name, $new_name)) { @unlink($tmp_name); } elseif((function_exists('move_uploaded_file') && @move_uploaded_file($tmp_name, $new_name))) { } elseif(@rename($tmp_name, $new_name)) { } else { return ''; } return $newfilename; } else { return ''; } }
cpmessage('no_authority_management_operation'); } $credit = 0; if ($managespacecredit) { $setarr = array('addsize' => intval($_POST['addsize']) * 1024 * 1024, 'credit' => intval($_POST['credit']), 'experience' => intval($_POST['experience'])); } else { $setarr = array('credit' => intval($member['credit']), 'experience' => intval($member['experience'])); } if ($managespaceinfo) { //视频认证照片 if ($_FILES['newvideopic']['size']) { include_once S_ROOT . './source/function_cp.php'; if ($newvideopic = videopic_upload($_FILES['newvideopic'], $uid)) { //删除原来的 if ($member['videopic']) { @unlink(S_ROOT . './' . getvideopic($member['videopic'])); } $member['videopic'] = $newvideopic; } } if (empty($member['videopic'])) { $_POST['videostatus'] = 0; } $setarr['videostatus'] = intval($_POST['videostatus']); $email = getstr($_POST['email'], 100, 1, 1); $emailcheck = intval($_POST['emailcheck']); //激活邮箱奖励积分 if ($emailcheck && $email) { $reward = getreward('realemail', 0, $uid, '', 0); if ($reward['credit']) { $setarr['credit'] += $reward['credit'];
<?php if (!defined('iBUAA')) { exit('Access Denied'); } if (empty($_SCONFIG['videophoto'])) { showmessage('no_open_videophoto'); } $videophoto = $space['videostatus'] ? getvideopic($space['videopic']) : ''; include template("cp_videophoto");
<?php /* [UCenter Home] (C) 2007-2008 Comsenz Inc. $Id: space_index.php 12256 2009-05-27 03:57:32Z liguode $ */ if(!defined('IN_UCHOME')) { exit('Access Denied'); } if(empty($_SCONFIG['videophoto'])) { showmessage('no_open_videophoto'); } //视频认证 include_once(S_ROOT.'./source/function_cp.php'); ckvideophoto('viewphoto', $space); $videophoto = getvideopic($space['videopic']); //个人头像 include_once template("space_videophoto"); ?>