$ucavatar = str_replace('\\', '/', $ucavatar); if (!file_exists($ucavatar)) { $create = FALSE; $img = new Image_Lite($avatar, $ucavatar); if ($img->imagecreatefromfunc && $img->imagefunc) { if ($img->Thumb(120, 120)) { $create = TRUE; $total++; } } if ($create) { $ucavatar = UCENTER_ROOT . 'data/avatar/' . get_avatar($data['uid'], 'small'); $ucavatar = str_replace('\\', '/', $ucavatar); $img = new Image_Lite($avatar, $ucavatar); if ($img->imagecreatefromfunc && $img->imagefunc) { $img->Thumb(48, 48); } $ucavatar = UCENTER_ROOT . 'data/avatar/' . get_avatar($data['uid'], 'big'); $ucavatar = str_replace('\\', '/', $ucavatar); @copy($avatar, $ucavatar); //echo '<img src="'.$ucavatar.'" />'; } //DB::query("UPDATE ".DB::table('common_member')." SET avatarstatus='1' WHERE uid='{$data['uid']}'"); } } } } if ($nextid) { showmessage("继续转换主题分类数据表,uid={$nextid}", "index.php?a={$action}&total={$total}&source={$source}&prg={$curprg}&start={$nextid}"); } else { echo "<br /><br /><br />导入完毕,共导入 {$total} 个头像!";
require_once './include/common.inc.php'; list($daid, $dw, $dh) = explode("\t", authcode($_GET['key'], 'DECODE', $_DCACHE['settings']['authkey'])); if($daid != $aid || $dw != $w || $dh != $h) { dheader('location: '.$boardurl.'images/common/none.gif'); } if($attach = $db->fetch_array($db->query("SELECT remote, attachment FROM {$tablepre}attachments WHERE aid='$aid' AND isimage IN ('1', '-1')"))) { if($attach['remote']) { $filename = $ftp['attachurl'].'/'.$attach['attachment']; } else { $filename = $attachdir.'/'.$attach['attachment']; } $img = new Image_Lite($filename, !$nocache ? $thumbfile : ''); if($img->attachinfo === FALSE || $img->Thumb($w, $h) && !$nocache) { dheader('location: '.($thumbfile ? $boardurl.$thumbfile : $filename)); } @readfile($filename); } class Image_Lite { var $attachinfo = ''; var $srcfile = ''; var $targetfile = ''; var $imagecreatefromfunc = ''; var $imagefunc = ''; var $attach = array(); var $animatedgif = 0; var $smallimg = 0; var $img_w = 0;