{ $itemlist = array(); $itemlist[] = array(ucf(i18n("name"))); if (!empty($path) && $path != "/") $itemlist[] = array(cmd(img(geticon("back"))." ".ucf(i18n("parent folder")), "exec=import&view=upload&node_id=".$object->getNodeId()."&path=".urlencode(GetParentPath($path)."/"))); foreach ($subitems as $subitem) { $checkbox = "<input checked class=\"input\" type=\"checkbox\" name=\"filenames[]\" value=\"$subitem\"/>"; if (is_dir("$abspath/upload/$path$subitem")) $itemlist[] = array("$checkbox ".cmd(img(geticon("file_folder"))." ".$subitem, "exec=import&view=upload&node_id=".$object->getNodeId()."&path=".urlencode("$path$subitem/"))); else { $type = getfiletype(pathinfo("$abspath/upload/$path$subitem", PATHINFO_EXTENSION)); $itemlist[] = array("$checkbox ".img(geticon($type))." ".$subitem); } } echo compiletpl("table", array("list"=>$itemlist, "endstring"=>"% ".i18n("rows"))); ?> <input class="submit" type="button" onclick="checkUncheckAll(this)" value="<?php echo ucf(i18n("invert selection")); ?> "/> <input class="submit" id="submitButton" type="submit" value="<?php echo ucf(i18n("import")); ?> "/> <?
<? $filename = $object->getVarValue("file"); $value_id = $object->resolveVarName("file"); $type = getfiletype(pathinfo($filename, PATHINFO_EXTENSION)); $data = ""; if ($type == "image") { $maxsize = getSetting("THUMBSIZE", 150); $angle = $object->getMeta("angle", ""); $thumbnail = getThumbnail($value_id, $maxsize, $maxsize, $angle); $_SESSION['murrix']['rightcache']['thumbnail'][] = $thumbnail->id; if ($thumbnail !== false) $data = $thumbnail->Show(true); } if (!empty($data)) $img = $data; else $img = img(geticon($type, 128)); $name = $object->getName(); if ($args['disabled'] != true) { $name = cmd($name, "exec=show&node_id=".$object->getNodeId());
$match = 1; } // if there were no matches the file should not be hidden if (!$match) { $filedata = stat($newpath . '/' . $file); // get some info about the file $fileattrib[$fc][0] = $file; $fileattrib[$fc][1] = $filedata[7]; // size in bytes $fileattrib[$fc][2] = $filedata[9]; // time of last modification $fileattrib[$fc][5] = date("m/d/Y h:i:sA", $filedata[9]); if (is_dir($newpath . '/' . $file)) { $fileattrib[$fc][3] = "Folder"; } else { $ft = getfiletype($file); $fileattrib[$fc][3] = $ft[0]; // TYPE $fileattrib[$fc][4] = $ft[1]; // Download or Browse //$fileattrib[$fc][3]=getfiletype($file); } $fc++; } } } else { $patherror = "<p><center><font face=\"Verdana, Arial, Hevetica\" size=\"3\" color=red><b>directory incorrectly defined</b></font></center></p>"; } /* Sort Keys */ /* 0 = Filename
echo loadoneli($insertid, $my[user_name], $my[user_id], $my[nickname], $my[user_head], ubb($content), '刚才', '网页', 0, 0, $privacy, 0, 0, 0, $privacy); exit; } else { echo 'error'; exit; } } //上传照片 if ($action == 'uploadphoto') { tologin(); if ($_FILES['photo']['name']) { include ET_ROOT . "/include/uploadpic.func.php"; $ptname = date(YmdHms); $upname = UploadImage("photo", 1, 200, 0, ET_ROOT . "/attachments/photo/user_" . $my[user_id] . "/", ET_ROOT . "/attachments/photo/user_" . $my[user_id] . "/", $ptname, $ptname . "_thumb"); $phototitle = $phototitle ? $phototitle : "{$ptname}"; $suffix = getfiletype($upname); $content = "[img link=" . urlop($webaddr . "/attachments/photo/user_" . $my[user_id] . "/" . $ptname . "." . $suffix, 'e') . "]" . urlop($webaddr . "/attachments/photo/user_" . $my[user_id] . "/" . $upname, 'e') . "[/img]"; echo '{"ret":"success","img":"' . $webaddr . '/attachments/photo/user_' . $my[user_id] . '/' . $upname . '","name":"' . $ptname . '.' . $suffix . '","content":"' . $content . '"}'; exit; } else { echo '{"ret":"您没有选择照片"}'; exit; } } //分享 if ($action == 'share') { tologin(); $linkdata = array(); $link = htmlspecialchars(trim($_POST['link'])); $describe = clean_html($_POST['describe']); if (!preg_match("/^http\\:\\/\\/.{4,300}\$/i", $link) || !$link) {
$filename = $data['data']; $extension = pathinfo($filename, PATHINFO_EXTENSION); //if (in_array($_GET['file'], $_SESSION['murrix']['rightcache']['file'])) { if (isset($_GET['download'])) { header("Content-type: application/force-download"); header("Content-Description: File Transfer"); header("Content-Disposition: attachment; filename=\"".$data['data']."\""); } header("Content-Length: ".filesize("$abspath/files/".$_GET['file'].".$extension")); $type = getfiletype($extension); switch ($type) { case "image": header("Content-type: " . image_type_to_mime_type(IMAGETYPE_JPEG)); break; case "pdf": header("Content-type: application/pdf"); if (!isset($_GET['download'])) header("Content-Disposition: inline; filename=\"".$data['data']."\""); break; } @readfile("$abspath/files/".$_GET['file'].".$extension");
require_once '../sub/init.php'; if (!ereg("^[0-9]{1,8}\$", $cook_userid) || empty($cook_userid)) { exit; } $a = explode('px', $left); $left = $a[0]; $a = explode('px', $top); $top = $a[0]; $x = $left; $y = $top; //left,top $w = $width; $h = $height; //最终宽度,高度 $Pic = '../up/photo/' . $photo; $ext_name = getfiletype($Pic); if (empty($j)) { if ($ext_name == 'gif' || $ext_name == 'GIF') { header("Content-type:image/gif"); } else { header("Content-type:image/jpeg"); } } $PicWidth = 429; $PicHeight = 346; $end_w = 110; $end_h = 135; $end_x = 168; $end_y = 101; //画出原始大图 if ($ext_name == 'gif' || $ext_name == 'GIF') {
<? $extension = pathinfo($args['fvalue'], PATHINFO_EXTENSION); $type = getfiletype($extension); $_SESSION['murrix']['rightcache']['file'][] = $args['value_id']; ?><a href="?file=<?php echo $args['value_id']; ?> "><? if ($type == "image") { $maxsize = getSetting("THUMBSIZE", 150); $thumbnail = getThumbnail($args['value_id'], $maxsize, $maxsize); if ($thumbnail !== false) echo $thumbnail->Show(true)."<br/>"; else echo img(geticon(getfiletype($extension), 16))." "; } else echo img(geticon(getfiletype($extension), 16))." "; echo $args['value']; ?> </a>