} include_once S_ROOT . './source/function_cp.php'; $op = empty($_GET['op']) ? '' : $_GET['op']; $isupload = empty($_GET['cam']) ? true : false; if (!empty($_POST['uid'])) { $_SGLOBAL['supe_uid'] = intval($_POST['uid']); if (empty($_SGLOBAL['supe_uid']) || $_POST['hash'] != md5($_SGLOBAL['supe_uid'] . UC_KEY)) { exit; } } elseif (empty($_SGLOBAL['supe_uid'])) { showmessage('to_login', 'do.php?ac=' . $_SCONFIG['login_action']); } if ($op == "finish") { $albumid = intval($_GET['albumid']); //feed album_feed($albumid); exit; } elseif ($op == 'config') { $hash = md5($_SGLOBAL['supe_uid'] . UC_KEY); if ($isupload && !checkperm('allowupload')) { $hash = ''; } else { $directory = sreaddir(S_ROOT . './image/foreground'); foreach ($directory as $key => $value) { $dirstr = S_ROOT . './image/foreground/' . $value; if (is_dir($dirstr)) { $filearr = sreaddir($dirstr, array('jpg', 'jpeg', 'gif', 'png')); if (!empty($filearr)) { if (is_file($dirstr . '/categories.txt')) { $catfile = @file($dirstr . '/categories.txt'); $dirarr[$key][0] = trim($catfile[0]);
$albumid = $uploadfiles['albumid']; $picid = $uploadfiles['picid']; $uploadStat = 1; } else { $uploadStat = $uploadfiles; } echo "<script>"; echo "parent.albumid = {$albumid};"; echo "parent.uploadStat = '{$uploadStat}';"; echo "parent.picid = {$picid};"; echo "parent.upload();"; echo "</script>"; exit; } elseif (submitcheck('viewAlbumid')) { //上传完成发送feed album_feed($_POST['opalbumid']); showmessage('upload_images_completed', "space.php?uid={$_SGLOBAL['supe_uid']}&do=album&id=" . (empty($_POST['opalbumid']) ? -1 : $_POST['opalbumid']), 0); } if (!checkperm('allowupload')) { showmessage('no_privilege'); } //实名认证 ckrealname('album'); //新用户见习 cknewuser(); $siteurl = getsiteurl(); //获取相册 $albums = getalbums($_SGLOBAL['supe_uid']); //激活 $actives = $_GET['op'] == 'flash' || $_GET['op'] == 'cam' ? array($_GET['op'] => ' class="active"') : array('js' => ' class="active"'); //空间大小