foreach ($db_sellset['type'] as $key => $value) { $selltype .= "<option value=\"{$value}\">" . $credit->cType[$value] . "</option>"; $sellCredit[$value] = $credit->cType[$value]; } if (is_array($db_enhideset['type'])) { foreach ($db_enhideset['type'] as $key => $value) { $enhidetype .= "<option value=\"{$value}\">" . $credit->cType[$value] . "</option>"; $enhideCredit[$value] = $credit->cType[$value]; } } list($sellCredit, $enhideCredit) = array(pwJsonEncode($sellCredit), pwJsonEncode($enhideCredit)); require_once R_P . 'require/showimg.php'; list($postFaceUrl) = showfacedesign($winddb['icon'], 1, 'm'); $icondb = array(); if ($db_threademotion) { $emotion = @opendir(S::escapeDir("{$imgdir}/post/emotion")); while (($emotionimg = @readdir($emotion)) !== false) { if ($emotionimg != "." && $emotionimg != ".." && $emotionimg != "" && preg_match("/^(\\d+)\\.(gif|jpg|png|bmp)\$/i", $emotionimg, $emotionMatch)) { $icondb[$emotionMatch[1]] = $emotionimg; } } ksort($icondb); @closedir($emotion); } //multiple post types if ($foruminfo['allowtype'] && ($foruminfo['allowtype'] & 1 || $foruminfo['allowtype'] & 2 && $_G['allownewvote'] || $foruminfo['allowtype'] & 4 && $_G['allowactive'] || $foruminfo['allowtype'] & 8 && $_G['allowreward'] || $foruminfo['allowtype'] & 16 || $foruminfo['allowtype'] & 32 && $_G['allowdebate'])) { $N_allowtypeopen = true; } else { $N_allowtypeopen = false; } } else {
/** * 过滤目录路径危险字符 * * @param string $dir 目录路径 * @return string */ function pwDirCv($dir) { return S::escapeDir($dir); }
pwFtpClose($ftp); $userService->update($winduid, array('icon' => $usericon)); initJob($winduid, 'doUpdateAvatar'); $jobService = L::loadclass('job', 'job'); $jobs = $jobService->getJobByJobName('doUpdateAvatar'); foreach ($jobs as $value) { if (isset($value['isuserguide']) && !$value['isuserguide']) { continue; } $job['id'] = $value['id']; } $jobService->jobGainController($winduid, $job['id']); ObHeader("{$db_registerfile}?step=finish&option=2&verify={$verifyhash}"); } //系统头像 $img = @opendir(S::escapeDir("{$imgdir}/face")); while ($imgname = @readdir($img)) { if ($imgname != "." && $imgname != ".." && $imgname != "" && eregi("\\.(gif|jpg|png|bmp)\$", $imgname)) { $num++; if ($num <= 10) { $imgname_array[] = $imgname; } else { break; } } } @closedir($img); //flash头像上传参数 $icon_encode_url = ''; list($db_ifupload, $db_imgheight, $db_imgwidth, $db_imgsize) = explode("\t", $GLOBALS['db_upload']); if ($db_ifupload && $_G['upload']) {
function mkdir($dir) { $dir = explode('/', S::escapeDir($dir)); $dirs = ''; $result = false; $base777 = base_convert(0777, 10, 8); for ($i = 0, $count = count($dir); $i < $count; $i++) { if (strpos($dir[$i], '.') === 0) { continue; } $result = $this->sendcmd('MKD', $dir[$i]); $this->sendcmd('SITE CHMOD', "{$base777} {$dir[$i]}"); $this->chdir($this->rootpath . $dirs . $dir[$i]); $dirs .= "{$dir[$i]}/"; } $this->chdir($this->rootpath); return $result; }