示例#1
0
 function FetchAttachmentRow($file)
 {
     include_once "inc/classes/class_gd.php";
     $gd = new gd();
     $FileEnding = strtolower(substr($file, strrpos($file, '.'), 5));
     if ($FileEnding == '.png' or $FileEnding == '.gif' or $FileEnding == '.jpg' or $FileEnding == '.jpeg') {
         $FileNamePath = strtolower(substr($file, 0, strrpos($file, '.')));
         $FileThumb = $FileNamePath . '_thumb' . $FileEnding;
         $gd->CreateThumb($file, $FileThumb, '300', '300');
         return HTML_NEWLINE . HTML_NEWLINE . '<a href="' . $file . '" target="_blank"><img src="' . $FileThumb . '" border="0" /></a>';
     } else {
         return HTML_NEWLINE . HTML_NEWLINE . $this->FetchIcon($file, 'download') . ' (' . t('Angehängte Datei herunterladen') . ')';
     }
 }
示例#2
0
 } elseif ($score_team1 == $score_team2 && $tournament["mode"] == "liga" && $score_team1 == 0) {
     $func->information(t('Ein Spiel darf nicht 0:0 enden! Das würde bedeuten, es wäre nicht gespielt worden. Für Unentschieden bitte mindestens 1:1 eintragen.'), "index.php?mod=tournament2&action=submit_result&step=1&tournamentid={$tournamentid}&gameid1={$gameid1}&gameid2={$gameid2}");
 } elseif (!$berechtigt) {
     if ($cfg["t_only_loser_submit"]) {
         $func->information(t('Nur der Teamleiter des Verliererteams und Turnieradmins dürfen ein Ergebnis eintragen'), "index.php?mod=tournament2&action=submit_result&step=1&tournamentid={$tournamentid}&gameid1={$gameid1}&gameid2={$gameid2}");
     } else {
         $func->information(t('Nur Teilnehmer des Aktuellen Spiels und Turnieradmins dürfen ein Ergebnis eintragen'), "index.php?mod=tournament2&action=submit_result&step=1&tournamentid={$tournamentid}&gameid1={$gameid1}&gameid2={$gameid2}");
     }
 } elseif ($not_new && $auth["type"] <= 1) {
     $func->information(t('Es wurde bereits ein Ergebnis für diese Partie eingetragen. Das Ergebnis kann nur noch von Turnieradmins editiert werden. Melden dich daher für Änderungen bei diesen.'), "index.php?mod=tournament2&action=submit_result&step=1&tournamentid={$tournamentid}&gameid1={$gameid1}&gameid2={$gameid2}");
 } else {
     // Upload Screenshot
     $old_file = $func->FileUpload('screenshot', 'ext_inc/tournament_screenshots/');
     if ($old_file) {
         unlink('ext_inc/tournament_screenshots/' . $_GET['gameid1'] . '.png');
         $gd->CreateThumb($old_file, 'ext_inc/tournament_screenshots/' . $_GET['gameid1'] . '.png', 800, 600);
     }
     if ($not_new && $qacc != 1) {
         $func->question(t('ACHTUNG: Zu diesem Turnier wurde bereits ein Ergebnis eingetragen. Wurde noch keine der Folgepartien dieses Spieles gespielt, so kann ohne Probleme fortgefahren werden. Wurden diese hingegen bereits gespielt, so solltest du dir im Klaren darüber sein, dass die beiden Folgepartien dadurch teilweise überschrieben werden und das Ergebnis dort auf 0 (noch nicht gespielt) gesetzt wird, sodass du alle aus dieser Partie resultierenden Partien erneut eintragen musst!'), "index.php?mod=tournament2&action=submit_result&step=2&gameid1={$gameid1}&gameid2={$gameid2}&tournamentid={$tournamentid}&qacc=1&score_team1={$score_team1}&score_team2={$score_team2}&score_comment={$score_comment}", "index.php?mod=tournament2&action=submit_result&step=1&gameid1={$gameid1}&gameid2={$gameid2}&tournamentid={$tournamentid}");
     } else {
         $_SESSION["tournament_submit_result_blocker"] = TRUE;
         $tfunc->SubmitResult($tournamentid, $gameid1, $gameid2, $score_team1, $score_team2, $score_comment);
         $func->confirmation(t('Danke! Das Ergebnis wurde erfolgreich gemeldet.'), "index.php?mod=tournament2&action=submit_result&step=1&tournamentid={$tournamentid}&gameid1={$gameid1}&gameid2={$gameid2}");
         /*
         					$cronjob->load_job("cron_tmod");
         					if($tournament['mode'] == "groups"){
         						$cronjob->loaded_class->add_job($_GET["tournamentid"],$team1["group_nr"]);
         					}else{
         						$cronjob->loaded_class->add_job($_GET["tournamentid"],"");
         					}
         */
示例#3
0
文件: show.php 项目: eistr2n/lansuite
 $buttons = $dsp->FetchIcon("index.php?mod=picgallery&file={$akt_dir}{$file}&page={$_GET["page"]}", "next", t('Bild anzeigen'));
 if ($auth["type"] > 1) {
     $buttons .= " " . $dsp->FetchIcon("index.php?mod=picgallery&action=delete&file={$akt_dir}{$file}&page={$_GET["page"]}", "delete", t('Bild löschen'));
 }
 $smarty->assign('buttons', $buttons);
 // Videos
 if (IsSupportedVideo($extension)) {
     $smarty->assign('pic_width', $cfg["picgallery_max_width"]);
     $smarty->assign('pic_height', $cfg["picgallery_max_height"]);
     $smarty->assign('pic_src', $root_dir . $file);
     $cols .= $smarty->fetch('modules/picgallery/templates/ls_row_gallery_spalte_vid.htm');
     // Pics
 } else {
     // Wenn Thumb noch nicht generiert wurde, generieren versuchen
     if (!file_exists($thumb_path)) {
         $gd->CreateThumb($root_dir . $file, $thumb_path, $cfg["picgallery_max_width"], $cfg["picgallery_max_height"]);
     }
     // Size HTML
     if (file_exists($thumb_path)) {
         $pic_dimensions = GetImageSize($thumb_path);
     }
     if (!$pic_dimensions) {
         $pic_dimensions[0] = $cfg["picgallery_max_width"];
         $pic_dimensions[1] = $cfg["picgallery_max_height"];
     }
     $smarty->assign('pic_width', $pic_dimensions[0]);
     $smarty->assign('pic_height', $pic_dimensions[1]);
     $smarty->assign('pic_src', $thumb_path);
     $cols .= $smarty->fetch('modules/picgallery/templates/ls_row_gallery_spalte.htm');
 }
 if ($z % $cfg["picgallery_items_per_row"] == 0) {