public function export_results_action() { $sem_browse_obj = new SemBrowse(); $tmpfile = basename($sem_browse_obj->create_result_xls()); if ($tmpfile) { $this->redirect(getDownloadLink($tmpfile, _("ErgebnisVeranstaltungssuche.xls"), 4)); } else { $this->render_nothing(); } }
function getContent($args = null, $raw = false) { global $SEM_TYPE, $SEM_CLASS; $this->group_by_fields = array(array('name' => _("Semester"), 'group_field' => 'sem_number'), array('name' => _("Bereich"), 'group_field' => 'bereich'), array('name' => _("Lehrende"), 'group_field' => 'fullname', 'unique_field' => 'username'), array('name' => _("Typ"), 'group_field' => 'status'), array('name' => _("Einrichtung"), 'group_field' => 'Institut', 'unique_field' => 'Institut_id')); // initialise data $this->sem_browse_data = array('start_item_id' => $this->getRootStartItemId(), 'do_search' => '0', 'type' => 'all', 'sem' => 'all', 'withkids' => '0', 'show_result' => '0'); // Daten aus config übernehmen $this->sem_browse_data['group_by'] = $this->config->getValue('Main', 'grouping'); $level_change = $args['start_item_id']; $this->search_obj = new StudipSemSearchHelper(null, true); $semester = new SemesterData(); $all_semester = $semester->getAllSemesterData(); array_unshift($all_semester, 0); $switch_time = mktime(0, 0, 0, date('m'), date('d') + 7 * $this->config->getValue('Main', 'semswitch'), date('Y')); // get current semester $current_sem = get_sem_num($switch_time) + 1; switch ($this->config->getValue('Main', 'semstart')) { case 'previous': if (isset($all_semester[$current_sem - 1])) { $current_sem--; } break; case 'next': if (isset($all_semester[$current_sem + 1])) { $current_sem++; } break; case 'current': break; default: if (isset($all_semester[$this->config->getValue('Main', 'semstart')])) { $current_sem = $this->config->getValue('Main', 'semstart'); } } $this->sem_number = array($current_sem); $this->sem_browse_data['sem'] = $current_sem; $sem_classes = (array) $this->config->getValue('Main', 'semclasses'); $sem_types_order = (array) $this->config->getValue('ReplaceTextSemType', 'order'); $sem_types_visbility = (array) $this->config->getValue('ReplaceTextSemType', 'visibility'); foreach ($sem_types_order as $type_id) { if ($sem_types_visbility[$type_id] && in_array($GLOBALS['SEM_TYPE'][$type_id]['class'], $sem_classes)) { $this->sem_browse_data['sem_status'][] = $type_id; } } $this->module_params = $this->getModuleParams($this->approved_params); if (!$this->module_params['reset_search']) { $this->sem_browse_data = array_merge($this->sem_browse_data, $this->module_params); } $sem_status = is_array($this->sem_browse_data['sem_status']) ? $this->sem_browse_data['sem_status'] : false; $params = $this->sem_browse_data; // delete array of semester data from the search object's parameters $params['sem_status'] = false; if ($this->config->getValue('Main', 'mode') == 'show_sem_range') { $params['scope_choose'] = $this->sem_browse_data['start_item_id']; } else { $params['range_choose'] = $this->sem_browse_data['start_item_id']; } if ($this->sem_browse_data['sem'] == 'all') { $this->sem_number = array_keys($all_semester); } else { if (isset($this->sem_browse_data['sem'])) { $this->sem_number = array((int) $this->sem_browse_data['sem']); } } // set params for search object $this->search_obj->setParams($params, true); if ($this->sem_browse_data['do_search'] == 1) { $this->search_obj->doSearch(); $search_result = $this->search_obj->getSearchResultAsArray(); if (count($search_result)) { $this->sem_browse_data['search_result'] = array_flip($search_result); } else { $this->sem_browse_data['search_result'] = array(); } $this->sem_browse_data['show_result'] = '1'; $this->sem_browse_data['show_entries'] = false; } else { if ($this->config->getValue('Main', 'mode') == 'show_sem_range') { $this->get_sem_range($this->sem_browse_data['start_item_id'], $this->sem_browse_data['withkids'] == 1); } else { //($this->config->getValue('Main', 'mode') == 'show_sem_range_tree') { $this->get_sem_range_tree($this->sem_browse_data['start_item_id'], $this->sem_browse_data['withkids'] == 1); } } $this->sem_dates = $all_semester; $this->sem_dates[0] = array('name' => sprintf(_("vor dem %s"), $this->sem_dates[1]['name'])); // reorganize the $SEM_TYPE-array foreach ($GLOBALS['SEM_CLASS'] as $key_class => $class) { $i = 0; foreach ($GLOBALS['SEM_TYPE'] as $key_type => $type) { if ($type['class'] == $key_class) { $i++; $this->sem_types_position[$key_type] = $i; } } } if ($this->sem_browse_data['xls_export']) { $tmp_file = basename($this->createResultXls()); if ($tmp_file) { ob_end_clean(); header('Location: ' . getDownloadLink($tmp_file, _("ErgebnisVeranstaltungssuche.xls"), 4)); page_close(); die; } } $this->global_markers['URL_SEARCH_PARAMS'] = ''; $search_params = $this->module_params; $param_key = 'ext_' . strtolower($this->name); foreach ($search_params as $key => $value) { $this->global_markers['URL_SEARCH_PARAMS'] .= "&{$param_key}[{$key}]=" . urlencode($value); } $this->global_markers['URL_PERSONDETAILS'] = $this->getLinkToModule('LinkInternPersondetails'); $this->global_markers['URL_LECTUREDETAILS'] = $this->getLinkToModule('LinkInternLecturedetails'); $this->global_markers['URL_LEVEL_NO_COURSES'] = $this->getLinkToModule('LinkInternTree'); $this->global_markers['URL_LEVEL_COURSES'] = $this->getLinkToModule('LinkInternShowCourses'); $this->global_markers['CURRENT_SEMESTER'] = ExternModule::ExtHtmlReady($all_semester[$this->sem_number[0]]['name']); if (trim($this->config->getValue('TemplateSimpleSearch', 'template'))) { $content['SEM_BROWSER']['SIMPLE_SEARCH'] = $this->elements['TemplateSimpleSearch']->toString(array('content' => $this->getContentSimpleSearch(), 'subpart' => 'SIMPLE_SEARCH')); } if (trim($this->config->getValue('TemplateExtendedSearch', 'template'))) { $content['SEM_BROWSER']['EXTENDED_SEARCH'] = $this->elements['TemplateExtendedSearch']->toString(array('content' => $this->getContentExtendedSearch(), 'subpart' => 'EXTENDED_SEARCH')); } if (trim($this->config->getValue('TemplateTree', 'template'))) { $content['SEM_BROWSER']['TREE'] = $this->elements['TemplateTree']->toString(array('content' => $this->getContentTree(), 'subpart' => 'TREE')); } if (trim($this->config->getValue('TemplateResult', 'template')) && $this->sem_browse_data['show_result'] == '1') { $content['SEM_BROWSER']['RESULT'] = $this->elements['TemplateResult']->toString(array('content' => $this->getContentResult(), 'subpart' => 'RESULT')); } // set super global markers $content['__GLOBAL__'] = $this->global_markers; return $content; }
?> <style type="text/css"> <!-- .style1 {font-weight: bold} --> </style> <table width="100%" border="0" bgcolor="#EFEFEF" class=main_text> <tr> <td valign="middle"> <table class="Box" width="530" align="center"> <tr align="center" bgcolor="#D0E2CD"> <td width="196"><strong><?php echo "<a href='" . getDownloadLink(array('type' => 'kml_wpt', 'wptID' => $waypointIDview)) . "'>" . _Navigate_with_Google_Earth . "</a>"; ?> </strong> <div align="center"></div></td> <td width="218"><strong><?php echo "<a href='http://maps.google.com/maps?q=" . $wpName . "&ll=" . $wpInfo->lat . "," . -$wpInfo->lon . "&spn=1.535440,2.885834&t=h&hl=en' target='_blank'>" . _See_it_in_Google_Maps . "</a>"; ?> </strong> <div align="center"></div></td> <td width="170"><strong><?php echo "<a href='http://www.mapquest.com/maps/map.adp?searchtype=address&formtype=address&latlongtype=decimal&latitude=" . $wpInfo->lat . "&longitude=" . -$wpInfo->lon . "' target='_blank'>" . _See_it_in_MapQuest . "</a>"; ?> </strong> <div align="center"></div></td> </tr> </table>
$query = "SELECT seminar_inst.seminar_id\n FROM seminar_inst\n LEFT JOIN seminare AS s ON (seminar_inst.seminar_id = s.Seminar_id)\n WHERE seminar_inst.Institut_id = ?"; } if (!$GLOBALS['perm']->have_perm(get_config('SEM_VISIBILITY_PERM'))) { $query .= " AND s.visible = 1"; } $statement = DBManager::get()->prepare($query); $statement->execute($parameters); $seminar_ids = $statement->fetchAll(PDO::FETCH_COLUMN); $sem_browse_obj->sem_browse_data['search_result'] = array_flip($seminar_ids); $sem_browse_obj->show_result = true; break; } if (Request::int('send_excel')) { $tmpfile = basename($sem_browse_obj->create_result_xls($excel_text)); if ($tmpfile) { header('Location: ' . getDownloadLink($tmpfile, _("Veranstaltungsübersicht.xls"), 4)); page_close(); die; } } PageLayout::setHelpKeyword("Basis.Informationsseite"); PageLayout::setTitle(($level == "s" ? $SessSemName["header_line"] . " - " : "") . $head_text); if ($level == "s" && $SessSemName[1] && $SessSemName["class"] == "inst") { Navigation::activateItem('/course/main/courses'); } $sidebar = Sidebar::get(); $sidebar->setImage('sidebar/seminar-sidebar.png'); $semester = new SelectWidget(_("Semester:"), URLHelper::getURL(), 'select_sem'); foreach (array_reverse(Semester::getAll()) as $one) { $semester->addElement(new SelectElement($one->id, $one->name, $one->id == $show_semester)); }
/** * Prints a download link for a file, depending on the plugin options including the downloadcount and filesize * @param string $file the path to a file to print a download link. * @param string $linktext Optionally how you wish to call the link. Set/leave to NULL to use the filename. */ function printDownloadLink($file, $linktext = NULL) { $filesize = ''; if (getOption('downloadList_showfilesize')) { $filesize = filesize($file); $filesize = ' (' . printdownloadList_formatBytes($filesize) . ')'; } if (getOption('downloadList_showdownloadcounter')) { $downloaditem = getdownloadListItemFromDB($file); if ($downloaditem) { $downloadcount = ' - ' . sprintf(ngettext('%u download', '%u downloads', $downloaditem['data']), $downloaditem['data']); } else { $downloadcount = ' - 0 downloads'; } $filesize .= $downloadcount; } if (empty($linktext)) { $filename = html_encode(basename($file)); } else { $filename = $linktext; } echo '<a href="' . getDownloadLink($file) . '" rel="nofollow">' . $filename . '</a><small>' . $filesize . '</small>'; }
<?php include_once '../common.php'; session_start(); print_header('下载文件'); if (!isset($_SERVER['QUERY_STRING']) || !isset($_SESSION['bds_token']) || !isset($_SESSION['cookie'])) { alert_error('找不到文件', false); } $link = getDownloadLink(urldecode($_SERVER['QUERY_STRING']), $_SESSION['bds_token'], $_SESSION['cookie']); if (!$link) { alert_error('找不到文件', false); } echo '下载地址:'; foreach ($link as $v) { echo '<br /><a target="_blank" rel="noreferrer" href="' . $v . '">' . $v . '</a><br />'; } ?> </body> </html>
return; } //debug //$mapUrl=$flight->createStaticMap(1); $flight->incViews(); //show limited info to non friends if ($flight->private == 4 && !$flight->flightIsViewableByUser($userID)) { require dirname(__FILE__) . '/GUI_flight_show_ext.php'; return; } if ($flight->externalFlightType & SYNC_INSERT_FLIGHT_LINK) { require dirname(__FILE__) . '/GUI_flight_show_ext.php'; return; } $Ltemplate->set_filenames(array('body' => 'flight_show.html')); $geUrl = getDownloadLink(array('type' => 'kml_trk', 'flightID' => $flightID, 'lang' => $lng)); // $moduleRelPath."/download.php?lang=$lng&type=kml_trk"; $clientIP = getClientIpAddr(); $directIGCLink = 1; if ($flight->belongsToUser($userID) || L_auth::isModerator($userID) || L_auth::canDownloadIGC($clientIP)) { $directIGCLink = 1; $base_name = md5(basename($flight->getIGCRelPath())); $_SESSION['di' . $base_name] = 1; // echo 'downloadigc'+$base_name; $igcLink = "<a href='" . $flight->getIGCRelPath() . "' >IGC</a>"; } else { $directIGCLink = 0; $igcLink = " <a href='javascript:nop()' onClick='toggleIgcDownload();return false;' id='IgcDownloadPos'>IGC</a>"; } //experiment with google static maps if (0) {
function makeTakeoffPopup($ext = 0, $userID = 0) { global $moduleRelPath; ob_start(); ?> <script language="javascript"> var takeoffTip = new TipObj('takeoffTip'); with (takeoffTip) { template = '<table bgcolor="#000000" cellpadding="0" cellspacing="0" width="%3%" border="0">' + '<tr><td class="infoBoxHeader">%5%</td></tr>'+ '<tr><td class="infoBox">'+ "<img src='<?php echo $moduleRelPath; ?> /img/icon_magnify_small.gif' align='absmiddle' border=0> <a href='<?php echo getLeonardoLink(array('op' => 'list_flights', 'takeoffID' => '%4%')); ?> '><?php echo _See_flights_near_this_point . ' (' . _MENU_FILTER . ')'; ?> </a>"+ '</td></tr>'+ '<tr><td class="infoBox">'+ "<img src='<?php echo $moduleRelPath; ?> /img/icon_magnify_small.gif' align='absmiddle' border=0> <a href='<?php echo getLeonardoLink(array('op' => 'list_flights', 'takeoffID' => '%4%', 'year' => '0', 'month' => '0', 'pilotID' => '0', 'country' => '0', 'cat' => '0')); ?> '><?php echo _See_flights_near_this_point . ' (' . _ALL . ')'; ?> </a>"+ '</td></tr>'+ '<tr><td class="infoBox">'+ "<img src='<?php echo $moduleRelPath; ?> /img/icon_pin.png' align='absmiddle' border=0> <a href='<?php echo getLeonardoLink(array('op' => 'show_waypoint', 'waypointIDview' => '%4%')); ?> '><?php echo _SITE_INFO; ?> </a>"+ '</td></tr>'+ '<tr><td class="infoBox">'+ "<img src='<?php echo $moduleRelPath; ?> /img/gearth_icon.png' align='absmiddle' border=0> <a href='<?php echo getDownloadLink(array('type' => 'kml_wpt', 'wptID' => '%4%')); ?> '><?php echo _Navigate_with_Google_Earth; ?> </a>"+ <?php if ($ext && L_auth::isAdmin($userID)) { ?> '</td></tr><tr><td class="infoBox adminBox">'+ "<img src='<?php echo $moduleRelPath; ?> /img/icon_add.png' align='absmiddle' border=0> <a href='javascript:add_takeoff(%6%,%7%,%4%)'><?php echo _ADD_WAYPOINT; ?> </a>"+ '</td></tr><tr><td class="infoBox adminBox">'+ "<img src='<?php echo $moduleRelPath; ?> /img/change_icon.png' align='absmiddle' border=0> <a href='javascript:edit_takeoff(%4%)'><?php echo _EDIT_WAYPOINT; ?> </a>"+ '</td></tr><tr><td class="infoBox adminBox">'+ "<img src='<?php echo $moduleRelPath; ?> /img/x_icon.gif' align='absmiddle' border=0> <a href='javascript:delete_takeoff(%4%)'><?php echo _DELETE_WAYPOINT; ?> </a>"+ <?php } ?> '</td></tr></table>'; tipStick = 0; showDelay = 0; hideDelay = 0; doFades = false; } </script> <div id="takeoffTipLayer" class="shadowBox" style="position: absolute; z-index: 10000; visibility: hidden; left: 0px; top: 0px; width: 10px"> </div> <?php $c = ob_get_contents(); ob_end_clean(); return $c; }
function getFlightGPX() { return "http://" . $_SERVER['SERVER_NAME'] . getDownloadLink(array('type' => 'gpx_trk', 'flightID' => $this->flightID)); //getRelMainDir()."download.php?type=gpx_trk&flightID=".$this->flightID; }
$_SESSION['_user_activities']['details'] = Request::option('details'); } if (Request::get('open')) { $_SESSION['_user_activities']['open'][Request::get('open')] = time(); } if (Request::get('close')) { unset($_SESSION['_user_activities']['open'][Request::get('close')]); } $user_id = get_userid($_SESSION['_user_activities']['username']); arsort($_SESSION['_user_activities']['open'], SORT_NUMERIC); if (Request::get('download_as_zip')) { $download_ids = Request::quoted('download_as_zip') == 'all' ? get_user_documents($user_id) : get_user_documents($user_id, Request::quoted('download_as_zip')); if (is_array($download_ids) && count($download_ids)) { $zip_file_id = createSelectedZip($download_ids, false); $zip_name = prepareFilename($_SESSION['_user_activities']['username'] . '-' . _("Dokumente") . '.zip'); header('Location: ' . getDownloadLink($zip_file_id, $zip_name, 4)); page_close(); die; } } reset($_SESSION['_user_activities']['open']); $ank = key($_SESSION['_user_activities']['open']); // Define structure of displayed information $queries[] = array('desc' => _('Eingetragen in Veranstaltungen (dozent / tutor / autor / user)'), 'query' => "SELECT CONCAT_WS(' / ', SUM(status = 'dozent'), SUM(status = 'tutor'),\n SUM(status = 'autor'), SUM(status = 'user'))\n FROM seminar_user\n WHERE user_id = ?\n GROUP BY user_id", 'details' => "details=seminar"); $queries[] = array('desc' => _('Eingetragen in geschlossenen Veranstaltungen (dozent / tutor / autor / user)'), 'query' => "SELECT CONCAT_WS(' / ', SUM(su.status = 'dozent'), SUM(su.status = 'tutor'),\n SUM(su.status = 'autor'), SUM(su.status = 'user'))\n FROM seminar_user AS su\n INNER JOIN seminar_courseset sc USING (seminar_id)\n INNER JOIN courseset_rule cr ON cr.set_id=sc.set_id AND cr.type='ParticipantRestrictedAdmission'\n WHERE user_id = ?\n GROUP BY user_id", 'details' => "details=seminar_closed"); $queries[] = array('desc' => _("Eingetragen in Wartelisten (wartend / vorläufig akzeptiert)"), 'query' => "SELECT CONCAT_WS(' / ', SUM(status = 'awaiting'), SUM(status = 'accepted'))\n FROM admission_seminar_user\n WHERE user_id = ?\n GROUP BY user_id", 'details' => "details=seminar_wait"); $queries[] = array('desc' => _("Eingetragen in Anmeldelisten"), 'query' => "SELECT COUNT(*)\n FROM priorities\n WHERE user_id = ?\n GROUP BY user_id", 'details' => "details=seminar_claiming"); $queries[] = array('desc' => _("Eingetragen in Einrichtungen (admin / dozent / tutor / autor)"), 'query' => "SELECT CONCAT_WS(' / ', SUM(inst_perms = 'admin'), SUM(inst_perms = 'dozent'),\n SUM(inst_perms = 'tutor'), SUM(inst_perms = 'autor'))\n FROM user_inst\n WHERE user_id = ?\n GROUP BY user_id"); $queries[] = array('desc' => _("Anzahl der Ankündigungen"), 'query' => "SELECT COUNT(*) FROM news WHERE user_id = ? GROUP BY user_id"); $queries[] = array('desc' => _("Anzahl der Wikiseiten"), 'query' => "SELECT COUNT(*) FROM wiki WHERE user_id = ? GROUP BY user_id"); $queries[] = array('desc' => _("Anzahl der Umfragen"), 'query' => "SELECT COUNT(*) FROM vote WHERE author_id = ? GROUP BY author_id");
$res = $res->fetch(); if (empty($res)) { echo '<h1>错误:找不到编号为' . $_SERVER['QUERY_STRING'] . '的记录</h1>'; die; } $token = getBaiduToken($res['cookie'], $res['username']); $md5 = getFileMeta($res['name'], $token, $res['cookie']); if ($md5 === false) { echo '<h1>文件不存在QuQ</h1>'; die; } else { if (!isset($_GET['nodirectdownload']) && ($is_https || $https_redirecter)) { if (isset($md5['info'][0]['dlink'])) { echo '若要转存文件,<a href="jump.php?' . $id . '&nodirectdownload=1">前往提取页</a> (提取密码:' . $res['pass'] . ')<br /><br /><br />'; echo '下载链接已为您准备好,点击或将其复制到下载工具中开始下载。若一个链接不走,请多试几个。'; $link = getDownloadLink($res['name'], $token, $res['cookie']); $link[] = $md5['info'][0]['dlink']; foreach ($link as $k => $v) { if ($k == count($link) - 1) { echo '<br />最后一个链接会随机重定向到不同的服务器,但是此链接封杀下载工具的几率也最高。'; } echo '<br /><a target="_blank" href="'; //隐藏referrer if (!$is_https) { echo $https_redirecter . $v; } else { echo $v; } echo '">' . $v . '</a><br />'; } die;
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta name="generator" content= "HTML Tidy for Linux (vers 25 March 2009), see www.w3.org" /> <title>C++ Boilerplate Generator - Download Page</title> </head> <body> <ul> <li><?php echo getDownloadLink("cpp"); ?> </li> <li><?php echo getDownloadLink("h"); ?> </li> <li><?php echo getDownloadLink("ch"); ?> </li> </ul> </body> </html>
} */ if ( !file_exists($localMap) ) { $desc .= "Map not created yet or no access."; $enclosure = ""; } else { $enclosure = $enclosure_gus; $desc .= $imageMap; } // MANOLIS official way to get the download link $langArray=array("lng">=$currentlang); $kmlLink="http://".$_SERVER['SERVER_NAME'].getDownloadLink(array('type'=>'kml_trk','flightID'=>$row['flightID'])+$langArray) ; $desc .= "<br><a href='$kmlLink'>See flight in Google Earth</a><br>"; //$desc .= "<br><a href=\"$url_root/flight/".$row['flightID']."/kml/&lang=english&w=2&c=FFFFFF&an=1\">See flight in Google Earth</a><br>"; // //$desc=htmlspecialchars ($desc); //$desc=htmlentities( $desc , ENT_QUOTES ); $desc=str_replace(" "," ",$desc); //$desc=str_replace("kkenoo"," ",$desc); $RSS_str.="<item> <title><![CDATA[$title]]></title> <guid isPermaLink=\"false\">".$row['flightID']."</guid> <category>".formatOLCScoreType($row['BEST_FLIGHT_TYPE'],false)."</category>
//echo $query; $res = $db->sql_query($query); if ($res <= 0) { echo "<H3> Error in query! {$query} </H3>\n"; exit; } require_once dirname(__FILE__) . '/CL_flightPhotos.php'; require_once dirname(__FILE__) . '/FN_output.php'; $i = 0; $photoStr = ''; while ($row = mysql_fetch_assoc($res)) { $imgTarget = $moduleRelPath . '/' . flightPhotos::getPath($row['path']) . '/' . $row['name']; $imgTarget = "http://" . $_SERVER['SERVER_NAME'] . $baseInstallationPath . "/" . $imgTarget; $lineColor = "ff0000"; $lineWidth = 2; $getFlightKML = "http://" . $_SERVER['SERVER_NAME'] . getDownloadLink(array('type' => 'kml_trk', 'flightID' => $row['flightID'])) . "&c={$lineColor}&w={$lineWidth}&an=0"; $photoStr .= "<Placemark>\n\t\t <name>Photo</name>\n\t\t\t<styleUrl>#marker_photo</styleUrl>\n\t\t\t<Snippet maxLines='0' ></Snippet>\n\t\t\t<description><![CDATA[<a href='{$imgTarget}'><img src='{$imgTarget}' width='" . $CONF['photos']['mid']['max_width'] . "' border='0'>\t\t\t\n\t\t\t</a><BR><BR>\n\t\t\t<strong><a href='{$getFlightKML}'>Load Track of this Photo</a></strong>\n]]></description>\n\t\t\t<Point>\n\t\t\t\t<altitudeMode>{$altitudeMode}</altitudeMode> \t \n\t\t\t\t<coordinates>" . $row['lon'] . "," . $row['lat'] . "," . $row['alt'] . "</coordinates>\n\t\t\t</Point>\n\t\t\t</Placemark>"; $i++; } $photoNum = $i; $xml = '<?xml version="1.0" encoding="UTF-8"?> <kml xmlns="http://www.opengis.net/kml/2.2"> <Folder> <Folder> ' . $styleTrack . ' <name>Leonardo Tracks (' . $trackNum . ')</name> <Snippet maxLines="0"></Snippet> <visibility>1</visibility> <open>1</open> <description><![CDATA[Leonardo Tracks (' . $trackNum . ')]]></description> ' . $str . '
Usuario: <?php echo $archivo->usuario; ?> </span> <div class="ico-size pull-right"> <div class="file-historial"> <div class="icon"><i class="<?php echo file_ico($archivo->nombre); ?> "></i></div></div> <input type="checkbox" class="checkbox-option" value="<?php echo $archivo->id_archivo; ?> " /> <a href="<?php echo getDownloadLink($archivo->ruta, $archivo->nombre_random); ?> " class="btn btn-sm <?php echo $i == 0 ? 'btn-primary' : 'btn-warning'; ?> " download="<?php echo $archivo->nombre; ?> " target="_blank">Descargar</a> </div> </div> </div> <?php $i++; } ?>
$res['usermd5'] = json_decode($res['usermd5']); foreach ($res['usermd5'] as $k => $v) { $current_md5_key = $k; $current_md5 = $v; if (array_search($v, $md5) !== false) { break; } } $md5[] = $current_md5; if (count($md5) < 1024) { change_md5: $ret = request('http://pcs.baidu.com/rest/2.0/pcs/file?method=createsuperfile&app_id=250528&path=' . $newfullpath . '&ondup=overwrite', $ua, $res['cookie'], 'param=' . json_encode(array('block_list' => $md5))); $json = json_decode($ret['body']); if (isset($json->error_code) && $json->error_code !== 0) { //如果没有启用直链功能,在这里检测是不是温馨提示 if (!$enable_direct_link && $res['failed'] != 2 && getDownloadLink($res['name'], $token, $res['cookie']) === false) { $res['failed'] = 2; } if ($res['failed'] == 2) { //温馨提示 if ($current_md5_key == count($res['usermd5']) - 1) { if (!isset($change_md5)) { wlog('记录ID ' . $_SERVER['QUERY_STRING'] . '被温馨提示,备用MD5不够', 2); echo '<h1>这个文件被温馨提示了……自动补档没能救活qwq请联系上传者!<br />如果您是上传者,请在后台添加一个新的补档MD5,说不定能救活。</h1>'; } else { wlog('记录ID ' . $_SERVER['QUERY_STRING'] . '被温馨提示,更换补档MD5仍补档失败', 2); echo '<h1>这个文件被温馨提示了……自动补档用了专救温馨提示的方法仍然没能救活qwq请联系上传者!</h1>'; } die; } else { $change_md5 = true;
if (do_template("show_total_stats")) { fputs($fo_file, " <fo:block text-align=\"start\" space-before.optimum=\"10pt\" line-height=\"10pt\" font-size=\"8pt\">\n"); fputs($fo_file, " " . xml_escape($number_of_votes . " " . _("Teilnehmer insgesamt")) . ".\n"); fputs($fo_file, " " . xml_escape(_("Die Teilnahme war") . " " . ($evaluation['anonymous'] == 0 ? _("nicht") : "") . " " . _("anonym")) . ".\n"); fputs($fo_file, " " . xml_escape(_("Eigentümer") . ": " . $db_owner . ". " . _("Erzeugt am") . ": " . date("d.m.Y H:i:s")) . "\n"); fputs($fo_file, " </fo:block>\n"); } // ----- ENDE HEADER ----- groups($evaluation['eval_id']); // ----- START FOOTER ----- fputs($fo_file, " </fo:flow>\n"); fputs($fo_file, " </fo:page-sequence>\n"); fputs($fo_file, "</fo:root>\n"); // ----- ENDE FOOTER ----- fclose($fo_file); $pdffile = "{$tmp_path_export}/" . md5($evaluation['eval_id'] . $auth->auth["uid"]); $str = $FOP_SH_CALL . " {$tmp_path_export}/evalsum" . $evaluation['eval_id'] . $auth->auth["uid"] . ".fo {$pdffile}"; $err = exec($str); if (file_exists($pdffile) && filesize($pdffile)) { header('Location: ' . getDownloadLink(basename($pdffile), "evaluation.pdf", 2, 'force')); unlink($tmp_path_export . "/evalsum" . $evaluation['eval_id'] . $auth->auth["uid"] . ".fo"); } else { echo "Fehler beim PDF-Export!<BR>" . $err; echo "<BR>\n" . $str; } } else { // Evaluation existiert nicht... echo _("Evaluation NICHT vorhanden oder keine Rechte!"); } // Save data back to database. page_close();