/** \brief Galaxien anzeigen Listet die Galaxien auf, nach Allianzen sortiert je nach Rechten des Users. */ function Galaxy_list() { #check rights $rank = $this->_getMinRightRank(array("addgala", "editgala", "deletegala")); if (!$rank) { #no permission $this->_header("", "no permission"); } $galaxylistfilter = $_SESSION['galaxylistfilter']; $page = param_num("page", 1); $rows = 12; #allianzebene & galaxieebene if ($rank > 1) { $galaxylistfilter['ally'] = $this->userdata['aid']; } if ($_REQUEST['sort'] && $_REQUEST['order'] || !$galaxylistfilter) { $sort = trim($_REQUEST['sort']); $order = trim($_REQUEST['order']); if ($sort != 'gala' && $sort != 'tag' && $sort != 'member') { $sort = 'gala'; } if ($order != "asc" && $order != "desc") { $order = "asc"; } $galaxylistfilter['sort'] = $sort; $galaxylistfilter['order'] = $order; $_SESSION['galaxylistfilter'] = $galaxylistfilter; } $this->forms['list'][$galaxylistfilter['sort']][$galaxylistfilter['order']] = '_active'; $galaxylist = listGalaxys($galaxylistfilter, &$pages, &$page, $rows); $this->forms['list']['pages'] = showPageBar($page, $pages, "admin.php?action=galaxy", "page", "menu"); $this->template->assign("galaxylist", $galaxylist); $this->show('gala_list', "Galaxien"); }
function _Comment_list() { $id = param_num("id"); if (!$id) { $this->_header("index.php"); } $newsdata = getNews($id); if (!$newsdata) { $this->_header("index.php"); } $newsdata['content'] = formatTextData($newsdata['content']); $page = param_num("page", 1); $comrows = 6; #commentlist $comlist = listNewsComments($id, &$pages, &$page, $comrows); for ($i = 0; $i < count($comlist); $i++) { $comlist[$i]['content'] = formatTextData($comlist[$i]['content']); $comlist[$i]['cdate'] = formatdate("d.m.y", $comlist[$i]['cdate']); } #admin mode if ($this->userdata['rights']['news']) { $this->template->assign('canedit', 1); } $this->forms['comlist']['pages'] = showPageBar($page, $pages, "index.php?action=comments&id=" . $id, "page", "menu"); $this->template->assign('comlist', $comlist); $this->template->assign('news', $newsdata); $this->template->assign('page', $page); $this->show('com_list', "Kommentare"); }
function Incoming_list() { $filter =& $_SESSION['incfilter']; if (!$filter) { $filter['sort'] = "koords"; $filter['order'] = "asc"; } if ($_REQUEST['sort'] && $_REQUEST['order']) { $filter['sort'] = $_REQUEST['sort']; $filter['order'] = $_REQUEST['order']; } $filter['page'] = param_num("page", 1); $allylist = getAllyList(); $formlist = array(); $formlist[] = array("title" => "Allianz", "value" => 0); foreach ($allylist as $ally) { $formlist[] = array("title" => "[" . $ally['tag'] . "] " . $ally['name'], "value" => $ally['aid']); } $form = new formContainer(); $form->add(new formSelectBox("ally", "Allianz", "numeric", $formlist, false)); $form->add(new formCheckBox("safe", "Safestatus", "numeric", 1, false)); $form->add(new formCheckBox("undertime", "unter der Deffzeit", "numeric", 1, false)); if ($_POST['send']) { $form->submit(array("ally", "safe", "undertime")); $ally = $form->get("ally"); $filter['undertime'] = $form->get("undertime"); $filter['safe'] = $form->get("safe"); if ($ally && !getAlly($ally)) { unset($ally); } if ($ally) { $galalist = getGalaListByAlly($ally, true); } else { $galalist = getGalaList(true); } if ($filter['ally'] != $ally) { $gala = 0; } else { $gala = $_POST['gala']; } $galaitems = array(array("title" => "Galaxie", "value" => 0)); $selectedgala = 0; foreach ($galalist as $item) { $galaitem = array("title" => $item, "value" => $item); if ($item == $gala) { $galaitem['selected'] = "selected"; $selectedgala = $gala; } $galaitems[] = $galaitem; } $filter['gala'] = $selectedgala; $filter['ally'] = $ally; } else { if ($filter['ally']) { $form->select("ally", $filter['ally']); $galalist = getGalaListByAlly($filter['ally'], true); } else { $galalist = getGalaList(true); } if ($filter['undertime']) { $form->select("undertime", 1); } if ($filter['safe']) { $form->select("safe", 1); } $galaitems = array(array("title" => "Galaxie", "value" => 0)); $selectedgala = 0; foreach ($galalist as $item) { $galaitem = array("title" => $item, "value" => $item); if ($filter['gala'] == $item) { $galaitem['selected'] = "selected"; $selectedgala = $filter['gala']; } $galaitems[] = $galaitem; } $filter['gala'] = $selectedgala; } $this->template->assign("galalist", $galaitems); $sort[$filter['sort']][$filter['order']] = '_active'; $list = inc_list($filter, &$pages, &$filter['page'], 10, $this->userdata); for ($i = 0; $i < count($list); $i++) { $canrecallall = 0; $_incs = inc_list_byuser($list[$i]['gala'], $list[$i]['pos']); foreach ($_incs as $inc) { if ($inc['arrival']) { if ($inc['unixeta'] < 0) { $inc['orbit'] = true; $inc['orbittime'] = $this->formattime($inc['unixeta'] + $inc['orbittime'] * 60, true); $inc['eta'] = 0; } else { $inc['eta'] = $this->formattime($inc['unixeta'], true); $inc['orbittime'] = $this->formattime($inc['orbittime'] * 60, true); } } else { $inc['eta'] = "n/a"; } if (strlen($inc['nick']) > 20) { $inc['nick'] = substr($nick['nick'], 0, 20) . ".."; } $inc['canrecall'] = 1; if ($inc['status'] == 1) { // atter $list[$i]['atterlist'][] = $inc; } else { // deffer if (!$inc['uid'] || $inc['aid'] == $this->userdata['aid']) { $inc['canedit'] = 1; } $list[$i]['defferlist'][] = $inc; } $list[$i]['canrecallall'] = $canrecallall; $list[$i]['cansetsave'] = 1; $list[$i]['backlink'] = urlencode("takscreen.php#" . $list[$i]['uid']); } /* $list[$i]['atterlist'] = atter_list($list[$i]['incid']); $list[$i]['defferlist'] = deffer_list($list[$i]['incid']); for($j=0;$j < count($list[$i]['atterlist']);$j++){ $atter = &$list[$i]['atterlist'][$j]; if ($atter['unixeta'] < 0) { $atter['orbit'] = $atter['unixeta']+75*60; if ($atter['orbit'] < 0) $atter['orbit'] = 0; $atter['orbit'] = $this->formattime($atter['orbit'],true); $atter['unixeta'] = 0; } $atter['eta'] = $this->formattime($atter['unixeta'],true); if(strlen($atter['inickname']) > 20){ $atter['inickname'] = substr($atter['inickname'],0,20).".."; } # if ($atter['ogala'] == $this->userdata['gala']) { $canrecallall=1; # } } for($j=0;$j < count($list[$i]['defferlist']);$j++){ $deffer = &$list[$i]['defferlist'][$j]; if ($deffer['unixeta'] < 0) { $deffer['orbit'] = $deffer['unixeta']+$deffer['ticks']*15*60; if ($deffer['orbit'] < 0) $deffer['orbit'] = 0; $deffer['orbit'] = $this->formattime($deffer['orbit'],true); $deffer['unixeta'] = 0; } $deffer['eta'] = $this->formattime($deffer['unixeta'],true); if($deffer['isextern']) { $deffer['nick'] = $deffer['enickname']; $deffer['gala'] = $deffer['egala']; $deffer['pos'] = $deffer['epos']; } if($deffer['aid'] == $this->userdata['aid']) { $deffer['canupdatefleet'] = 1; } if(strlen($deffer['nick']) > 15){ $deffer['nick'] = substr($deffer['nick'],0,15).".."; } # if ($deffer['uid'] == $this->userdata['uid'] || # $deffer['ogala'] == $this->userdata['gala']) { $deffer['canrecall'] = 1; # } } # if ($list[$i]['gala'] == $this->userdata['gala']) { # } $list[$i]['backlink'] = urlencode("takscreen.php#".$list[$i]['incid']); */ } $form->registerVars($this->template); $this->template->assign("pages", showPageBar($filter['page'], $pages, "takscreen.php?", "page", "menu")); $this->template->assign("allylist", $allylist); $this->template->assign("sort", $sort); $this->template->assign("list", $list); $this->show('takscreen_index', "Taktikschirm"); }
?> <br/><span style="font-size:80%;color:black;"><i class="fa fa-globe"></i><?php echo $thread->getHost()->getCampus(); ?> の公開スレ</span> <?php } ?> </a> <br/> <p class="item-descriptor"><?php echo Utils::getReadableDateTime($thread->getUpdateTimeInMillis()) . "に"; ?> <?php $author = $thread->getLastModifiedAuthor(); echo "<a class='anchor' href=\"/account/" . $author->getId() . "\">" . $author->getNickname() . "</a>"; ?> が更新</p> <?php } ?> <hr /> </li> <?php } ?> </ul> <?php showPageBar($show, $page, $len, $showPageCallback); ?> <div style="width:1px;height:30px;"></div>
に追加</p> </div> </div> </li> <?php } ?> </ul> <?php showPageBar($show, $page, count($thread->getAllPosts()), $showPageCallback); ?> <!-- bug => wrong path of image --> <script type="text/javascript"> // bug fixing var ele = document.getElementsByClassName("post"); for(var i = 0; i < ele.length ; i++){ ele[i].innerHTML = ele[i].innerHTML.replace(/\<data-image /g,"<img "); ele[i].innerHTML = ele[i].innerHTML.replace(/\<\\data-image\>/g,"</img>"); ele[i].innerHTML = ele[i].innerHTML.replace(/<img alt(.*?) src=\"uploadManager/g,"<img src=\"/common/uploadManager"); ele[i].innerHTML = ele[i].innerHTML.replace(/<img src=\"uploadManager/g,"<img src=\"/common/uploadManager");
function Attack_targets() { $attid = param_num("id"); $page = param_num("page", 1); if (!$attid) { $this->_header(); } $attplan = attack_get($attid); //rightcheck if ($this->userdata['uid'] != $attplan['owner'] && !$this->_checkUserRights("attorga")) { $this->_header(); } $gala_list = attack_get_galalist($attid, &$pages, $page); $pagebar = showPageBar($page, $pages, "attplan.php?action=targets&id={$attid}", "page", "menu"); if (count($gala_list) < 5) { $spacer['colspan'] = 5 - count($gala_list); $spacer['width'] = $spacer['colspan'] * 20; $this->template->assign("spacer", $spacer); } $list = target_list(array("attid" => $attid, "gala" => $gala_list)); $count = count($list); $gala = ""; for ($i = 0; $i < $count; $i++) { if ($list[$i]['gala'] != $gala) { $gala = $list[$i]['gala']; } $targets[$gala][] = $list[$i]; } $this->template->assign("pagebar", $pagebar); $this->template->assign("targets", $targets); $this->template->assign("attplan", $attplan); $this->show("attplan_targets", "Ziele festlegen"); }
function _listScans($option) { $gala = param_num("gala"); $pos = param_num("pos"); #scandetails if ($gala && $pos) { $this->scan_details($gala, $pos); } #scanlist $page = param_num("page", 1); $rows = 20; $link_options = array(); if ($option == "targets") { $scanlistfilter =& $_SESSION['targetlistfilter']; $this->template->assign("showtargets", 1); $this->template->assign("scantitle", "Ziele suchen"); #zielsuche if ($_REQUEST['subaction'] == 'newsearch' && $scanlistfilter) { unset($_SESSION['targetlistfilter']); unset($scanlistfilter); } /* if ($_REQUEST['subaction'] == "search") { $scanlistfilter['exen'] = param_num("exen"); $scanlistfilter['punkte'] = param_num("punkte"); } */ if (!$scanlistfilter || $_POST['subaction'] == "search") { $form = new formContainer(); $form->add(new formInput("exen", "Exenmindestanzahl", "numeric", true, 10, true)); $form->add(new formInput("macht", "Machtmindestwert", "numeric", true, 10, true)); $form->add(new formCheckbox("hideold", "Alte Scans nicht berücksichtigen", "numeric", array(1), false)); if ($_POST['send']) { $form->submit(); if (!$form->hasErrors()) { if ($form->get("macht")) { $scanlistfilter['macht'] = $form->get("macht"); } if ($form->get("exen")) { $scanlistfilter['exen'] = $form->get("exen"); } $scanlistfilter['sort'] = "exen"; $scanlistfilter['order'] = "desc"; $scanlistfilter['hassektor'] = "1"; $scanlistfilter['hideold'] = $form->get("hideold"); $scanlistfilter['except_galas'] = getGalaList(true); $this->_header("scans.php?action=targets&send"); } } else { $form->select("hideold", 1); } $form->registerVars($this->template); $this->show('scan_target_form', 'Ziele suchen'); } #sortierung if ($_REQUEST['sort'] && $_REQUEST['order'] && $scanlistfilter) { $sort = trim($_REQUEST['sort']); $order = trim($_REQUEST['order']); if ($sort != 'koords' && $sort != 'exen') { $sort = 'koords'; } if ($order != "asc" && $order != "desc") { $order = "asc"; } $scanlistfilter['sort'] = $sort; $scanlistfilter['order'] = $order; } $link_options[] = "action=targets"; $link2 = "?action=targets"; #normale Scananzeige, galaweise } else { $scanlistfilter =& $_SESSION['scanlistfilter']; $this->template->assign("scantitle", "Scans"); if (!$scanlistfilter) { $scanlistfilter['gala'] = 1; $scanlistfilter['sort'] = "koords"; $scanlistfilter['order'] = "asc"; $scanlistfilter['hideold'] = 1; } #alte einblenden/ausblenden if (isset($_REQUEST["hideold"]) && is_numeric($_REQUEST["hideold"])) { $scanlistfilter['hideold'] = $_REQUEST["hideold"]; } $hideold = $scanlistfilter["hideold"]; if ($hideold) { $title = "Alle Anzeigen"; $subtitle = "Zeigt alle Scans an"; $param = 0; } else { $title = "Alte Ausblenden"; $subtitle = "Scans die älter als 1 Tag sind werden nicht angezeigt"; $param = 1; } $this->template->assign("hideoldtitle", $title); $this->template->assign("hideoldparam", $param); $this->template->assign("hideoldsubtitle", $subtitle); #neue gala anzeigen if ($gala = param_num("gala")) { $scanlistfilter['gala'] = $gala; } else { $gala = $scanlistfilter["gala"]; } if ($this->userdata["gid"] == 1) { $hideblock = false; } else { $hideblock = true; } $next = getNextGala($gala, $hideold, $hideblock); $prev = getPrevGala($gala, $hideold, $hideblock); if ($next && $prev) { #gala suche anzeigen $this->template->assign("showform", 1); } #zeigen beide auf die selbe, -> die aktuelle if ($next == $prev && $next == $gala) { unset($prev); unset($next); } $this->template->assign("prev", $prev); $this->template->assign("next", $next); #sortierung if ($_REQUEST['sort'] && $_REQUEST['order'] && $scanlistfilter) { $sort = trim($_REQUEST['sort']); $order = trim($_REQUEST['order']); if ($sort != 'koords' && $sort != 'exen') { $sort = 'koords'; } if ($order != "asc" && $order != "desc") { $order = "asc"; } $scanlistfilter['sort'] = $sort; $scanlistfilter['order'] = $order; } $link_options[] = "gala=" . $scanlistfilter['gala']; } #mili & news ausklappen $expand = param_num("expand"); #scans holen $this->forms['scanlist'][$scanlistfilter['sort']][$scanlistfilter['order']] = '_active'; $scanlist = listScans($scanlistfilter, &$pages, &$page, $rows); for ($i = 0; $i < count($scanlist); $i++) { $scanlist[$i]['backlink'] = "&backlink=" . urlencode("scans.php?" . join("&", $link_options) . "#" . $scanlist[$i]['sid']); $scanlist[$i]['expand_backlink'] = "&backlink=" . urlencode("scans.php?" . join("&", $link_options) . "&expand=" . $scanlist[$i]['sid'] . "#" . $scanlist[$i]['sid']); #mili oder news ausklappen if ($scanlist[$i]['sid'] == $expand) { $scanlist[$i]['expand'] = 1; } if ($scanlist[$i]['uid']) { if ($scanlist[$i]['uid'] == $this->userdata['uid']) { $scanlist[$i]['atter_class'] = "green"; } else { $scanlist[$i]['atter_class'] = "red"; } } $scanlist[$i] = scan_format($scanlist[$i]); } $this->forms['scanlist']['pages'] = showPageBar($page, $pages, "scans.php" . $link2, "page", "menu"); $this->forms['scanlist']['gala'] = $scanlistfilter['gala']; $this->template->assign('scanlist', $scanlist); $this->template->assign('page', $page); $this->show('scan_list', 'Scans'); }