if (count($root_album->videos) === 0) { // echo "<script>document.getElementById('videos').visibility = hidden;</script>"; } else { foreach ($root_album->videos as $i => $v) { echo '<a class="multibox" href="' . getFileURL($v->path) . '">' . $v->name . '</a><br />'; } } ?> </div> <div id="content_flashs"> <?php if (count($root_album->flashs) === 0) { // echo "<script>document.getElementById('flashs').visibility = hidden;</script>"; } else { foreach ($root_album->flashs as $i => $f) { echo '<a class="multibox" href="' . getFileURL($f->path) . '">' . $f->name . '</a><br />'; } } ?> </div> </div> <div id="footer"> <div id="footer_l"> <a href="http://skywww.net">skywww</a> <a href="http://trevorjay.net">trevorjay</a> <a href="http://intheskywithdiamonds.net">intheskywithdiamonds</a> </div> <div id="footer_m"> delivered in <?php echo $timer->diff();
if (getFileURL($skin['screen_id']) != '') { ?> <li class="dg"><a href="getURL.php?id=<?php echo $skin['screen_id']; ?> " title="<img src='thumb.php?id=<?php echo $skin['screen_id']; ?> ' />"><strong>Screenshot</strong></a></li> <?php } else { ?> <li class="dg"><strong>No screenshot</strong></li> <?php } if (getFileURL($skin['file_id']) != '') { ?> <li class="lg"><a href="getURL.php?id=<?php echo $skin['file_id']; ?> "><strong>Download this skin</strong></a></li> <?php } else { ?> <li class="lg"><strong>Download comming soon!</strong></li> <?php } ?> </ul> <br /> <?php
if (getFileURL($plugin['screen_id']) != '') { ?> <li class="dg"><a href="getURL.php?id=<?php echo $plugin['screen_id']; ?> " title="<img src='thumb.php?id=<?php echo $plugin['screen_id']; ?> ' />"><strong>Screenshot</strong></a></li> <?php } else { ?> <li class="dg"><strong>No screenshot</strong></li> <?php } if (getFileURL($plugin['file_id']) != '') { ?> <li class="lg"><a href="getURL.php?id=<?php echo $plugin['file_id']; ?> "><strong>Download this plugin</strong></a></li> <?php } else { ?> <li class="lg"><strong>Download comming soon!</strong></li> <?php } ?> </ul> <br /> <?php
$fileurl = getFileURL($filename, $subdir); $flash['type'] = 'success'; $flash['title'] = 'Well done!'; $flash['text'] = 'The file was uploaded to <a href="' . $fileurl . '">' . $fileurl . '</a>.'; } } } } } else { if (is_array(determineFilename($filename, $_FILES['filetoupload']['tmp_name'], true))) { $flash['type'] = 'error'; $flash['title'] = 'Oh snap!'; $flash['text'] = 'This file already exists. Please change his name ;) .'; } else { if (move_uploaded_file($_FILES['filetoupload']['tmp_name'], $filename)) { $fileurl = getFileURL($filename, $subdir); $flash['type'] = 'success'; $flash['title'] = 'Well done!'; $flash['text'] = 'The file was uploaded to <a href="' . $fileurl . '">' . $fileurl . '</a>.'; } else { $flash['type'] = 'error'; $flash['title'] = 'Oh snap!'; $flash['text'] = 'There was an error uploading the file, please try again!'; } } } } } } } return $app['twig']->render('upload.html.twig', array('section' => 'upload', 'scriptname' => $scriptname, 'flash' => $flash));
<?php include 'common.php'; if (!isset($_GET['id'])) { die('ERROR! No file specified!'); } $file = getFileURL($_GET['id']); if ($file == '') { die('ERROR! Bad file specified!'); } @mysql_query("UPDATE `amsn_files` SET `count` = `count` + 1 WHERE id = '" . (int) $_GET['id'] . "' LIMIT 1"); header("Location: {$file}"); ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html> <head> <title>Redirect...</title> </head> <body> Your web browser should have redirected you automaticly. If not, please <a href="<?php echo $file; ?> ">click here</a>. </body> </html>
<?php $n = 0; $db->Query("select * from ms_news_show where 1=1 and cat_id in (7) order by news_id desc limit 9"); while ($record = $db->GetRS()) { $record['subject'] = trans_title($record['subject']); $record['style'] = $n++ % 2 ? "" : ""; $cat_info = getParaInfo("news_cat", "cat_id", $record['cat_id']); if (empty($record['link'])) { $record['link'] = getFileURL($record['news_id'], $cat_info ? $cat_info['cat_idx'] : ""); } $record['add_date'] = "Y-m-d" != "" ? date("Y-m-d", strtotime($record['add_date'])) : ""; $record['catalog'] = ""; if ("" != "") { $cat_info = getParaInfo("news_cat", "cat_id", $record['cat_id']); if ($cat_info) { $record['catalog'] = "<a href=\"" . getFileURL(0, $cat_info['cat_idx']) . "\" target=\"_blank\">[" . $cat_info['cat_name'] . "]</a>"; } } echo <<<content \t<li style="{$record['style']}"><em>{$record['catalog']}</em> <a href="{$record['link']}" target="_blank">{$record['subject']}</a> <i>{$record['add_date']}</i></li> content; echo "\n"; } $db->Free(); for (; $n <= 0; $n++) { $unit = str_replace("style=\"\"", "style=\"" . ($n % 2 ? "" : "") . "\"", "\n\t<li style=\"\"> </li>\n"); echo $unit; echo "\n"; } ?> </ul>
/** * Adds extended details to a record * Possible etail types: topLayer: Top Map Layer layers: array of Map Layers sourceURL: URL pointing somewhere description: Description of the record imageType: Image type long: Longitude lat: Latitude maxZoom: Maximum zoom minZoom: Minimum zoom Opacity: Desired opacity value Data source: Contains a record object minorSpan: The initial minor span on a map thumbnail: Record thumbnail query: Heurist query string tilingSchema: Image tiling schema kmlSnippet: KML snippet string kmlFile: A .kml file reference shapeFile: a SHP component dbfFile: a DBF component shxFile: a SHX component files: Array of files zipFile: A .zip file * * @param mixed $system System reference * @param mixed $record Record reference */ function getRecordDetails($system, $record) { global $detailQuery; //echo "Get record details of " . ($record->id); // Retrieve extended details $query = $detailQuery . $record->id; $details = $system->get_mysqli()->query($query); if ($details) { $record->bookmarks = array(); // [dtl_ID] [dtl_RecID] [dtl_DetailTypeID] [dtl_Value] [dtl_AddedByImport] [dtl_UploadedFileID] [dtl_Geo] [dtl_ValShortened] [dtl_Modified] while ($detail = $details->fetch_assoc()) { // Fields //print_r($detail); $type = $detail["dtl_DetailTypeID"]; $value = $detail["dtl_Value"]; $fileID = $detail["dtl_UploadedFileID"]; $geo_value = $detail["dtl_Geo"]; /* GENERAL */ if ($type == DT_SHORT_SUMMARY) { // Description $record->description = $value; } else { if ($type == DT_CREATOR) { // Creators if (!property_exists($record, "creators")) { $record->creators = array(); } array_push($record->creators, getRecordByID($system, $value)); /* SOURCE */ } else { if (defined('DT_SERVICE_URL') && $type == DT_SERVICE_URL) { // Source URL $record->sourceURL = $value; } else { if (defined('DT_DATA_SOURCE') && $type == DT_DATA_SOURCE) { // Data source $record->dataSource = getDetailedRecord($system, $value); /* MAP LAYERS */ } else { if (defined('DT_TOP_MAP_LAYER') && $type == DT_TOP_MAP_LAYER) { // Recursive // Top map layer $record->toplayer = getDetailedRecord($system, $value); } else { if (defined('DT_MAP_LAYER') && $type == DT_MAP_LAYER) { // Map layer if (!property_exists($record, "layers")) { // Recursive $record->layers = array(); } array_push($record->layers, getDetailedRecord($system, $value)); } else { if (defined('DT_MAP_BOOKMARK') && $type == DT_MAP_BOOKMARK) { //string in format <xmin>,<xmax>,<ymin>,<ymax>,<tmin>,<tmax> array_push($record->bookmarks, explode(',', $value)); /* LOCATION */ } else { if (defined('DT_LONGITUDE_CENTREPOINT') && $type == DT_LONGITUDE_CENTREPOINT) { // Longitude centrepoint $record->long = floatval($value); } else { if (defined('DT_LATITUDE_CENTREPOINT') && $type == DT_LATITUDE_CENTREPOINT) { // Latitude centrepoint $record->lat = floatval($value); /* ZOOM */ } else { if (defined('DT_MAXIMUM_ZOOM') && $type == DT_MAXIMUM_ZOOM) { // Maximum zoom $record->maxZoom = floatval($value); } else { if (defined('DT_MINIMUM_ZOOM') && $type == DT_MINIMUM_ZOOM) { // Minimum zoom $record->minZoom = floatval($value); } else { if (defined('DT_OPACITY') && $type == DT_OPACITY) { // Opacity $record->opacity = floatval($value); } else { if (defined('DT_COLOR') && $type == DT_COLOR) { // Color - take value from term code $color = _getTermByID($system, $value); if ($color->code) { $record->color = $color->code; } /* alas timemap understands color only as hex or rgb else{ $record->color = $color->label; }-* }else if(defined('DT_MINOR_SPAN') && $type == DT_MINOR_SPAN) { // Initial minor span $record->minorSpan = floatval($value); /* IMAGE INFO */ } else { if (defined('DT_THUMBNAIL') && $type == DT_THUMBNAIL) { // Uploaded thumbnail $record->thumbnail = getFileURL($system, $fileID); } else { if (defined('DT_MIME_TYPE') && $type == DT_MIME_TYPE) { // Mime type $record->mimeType = _getTermByID($system, $value); } else { if (defined('DT_IMAGE_TYPE') && $type == DT_IMAGE_TYPE) { // Tiled image type $record->imageType = _getTermByID($system, $value); } else { if (defined('DT_MAP_IMAGE_LAYER_SCHEMA') && $type == DT_MAP_IMAGE_LAYER_SCHEMA) { // Image tiling schema $record->tilingSchema = _getTermByID($system, $value); /* SNIPPET */ } else { if (defined('DT_QUERY_STRING') && $type == DT_QUERY_STRING) { // Heurist query string $record->query = $value; } else { if (defined('DT_KML') && $type == DT_KML) { // KML snippet $record->kmlSnippet = $value; /* FILES */ } else { if (defined('DT_FILE_RESOURCE') && $type == DT_FILE_RESOURCE) { // File(s) if (!property_exists($record, "files")) { $record->files = array(); } array_push($record->files, getFileURL($system, $fileID)); } else { if (defined('DT_SHAPE_FILE') && $type == DT_SHAPE_FILE) { // Shape file (SHP component) $record->shpFile = getFileURL($system, $fileID); } else { if (defined('DT_DBF_FILE') && $type == DT_DBF_FILE) { // DBF file (DBF component) $record->dbfFile = getFileUrl($system, $fileID); } else { if (defined('DT_SHX_FILE') && $type == DT_SHX_FILE) { // SHX file (SHX component) $record->shxFile = getFileURL($system, $fileID); } else { if (defined('DT_ZIP_FILE') && $type == DT_ZIP_FILE) { // Zip file $record->zipFile = getFileURL($system, $fileID); } else { if (defined('DT_GEO_OBJECT') && $type == DT_GEO_OBJECT) { // Zip file $record->bounds = $geo_value; } } } } } } } } } } } } } } } } } } } } } } } } } } } return $record; }