$html .= '<form id=add_target name=add_target method=post action="' . edkuri::build(array(array('ctr_id', $ctrID, false), array('op', 'edit', false))) . '">'; $html .= "<tr><td></td></tr>"; $html .= "<tr><td><input type=text id=add_name name=add_name size=30 maxlength=30></td><td align=center><input type=radio name=add_type id=add_type value=0 checked></td><td align=center><input type=radio name=add_type id=add_type value=1></td><td align=center><input type=radio name=add_type id=add_type value=2></td><td align=center><input type=radio name=add_type id=add_type value=3></td><td align=center><input type=submit id=submit name=submit value=Add></td></tr>"; } $html .= "</table>"; $html .= "</form>"; } } // add if (edkURI::getArg('op') == "add") { if ($_POST['detail_submit']) { $contract = new Contract(); $contract->add($_POST['ctr_name'], $_POST['ctr_started'], $_POST['ctr_ended'], $_POST['ctr_comment']); header("Location: " . htmlspecialchars_decode(edkuri::build(array(array('ctr_id', $contract->getID(), false), array('op', 'edit', false))))); } $page->setTitle("Administration - Add Campaign"); $html .= "<div class=block-header2>Details</div>"; $html .= '<form id=detail_edit name=detail_edit method=post action="' . edkuri::build(array(array('ctr_id', $ctrID, false), array('op', 'add', false))) . '">'; $html .= "<table class=kb-table width=98%>"; $html .= "<tr><td width=80><b>Name:</b></td><td><input type=text name=ctr_name id=ctr_name size=40 maxlength=40></td></tr>"; $html .= "<tr><td width=80><b>Start date:</b></td><td><input type=text name=ctr_started id=ctr_started size=10 maxlength=10 value=\"" . kbdate("Y-m-d") . "\"> (yyyy-mm-dd)</td></tr>"; $html .= "<tr><td width-80><b>End date:</b></td><td><input type=text name=ctr_ended id=ctr_ended size=10 maxlength=10> (yyyy-mm-dd or blank)</td></tr>"; $html .= "<tr><td><b>Comment:</b></td><td><input type='text' name='ctr_comment' size='100'/></td></tr>"; $html .= "<tr><td></td></tr>"; $html .= "<tr><td></td><td><input type=submit name=detail_submit value=\"Save\"></td></tr>"; $html .= "</table>"; $html .= "</form>"; } $page->addContext($menubox->generate()); $page->setContent($html); $page->generate();
/** * Return HTML to describe the victim's ship * * @global Smarty $smarty * @return string HTML to describe the victim's ship */ function victimShip() { global $smarty; // Ship details $ship = $this->kill->getVictimShip(); $shipclass = $ship->getClass(); $smarty->assign('victimShipImage', $ship->getImage(64)); $smarty->assign('victimShipTechLevel', $ship->getTechLevel()); $smarty->assign('victimShipIsFaction', $ship->isFaction()); $smarty->assign('victimShipName', $ship->getName()); $smarty->assign('victimShipID', $ship->getID()); $smarty->assign('victimShipURL', edkURI::page('invtype', $ship->getID())); $smarty->assign('victimShipClassName', $shipclass->getName()); if ($this->page->isAdmin()) { $smarty->assign('ship', $ship); } $ssc = new dogma($ship->getID()); $smarty->assignByRef('ssc', $ssc); if ($this->kill->isClassified()) { //Admin is able to see classified Systems if ($this->page->isAdmin()) { $smarty->assign('systemID', $this->kill->getSystem()->getID()); $smarty->assign('system', $this->kill->getSystem()->getName() . ' (Classified)'); $smarty->assign('systemURL', edkuri::build(array(array('a', 'system_detail', true), array('sys_id', $this->kill->getSystem()->getID(), true)))); $smarty->assign('systemSecurity', $this->kill->getSystem()->getSecurity(true)); } else { $smarty->assign('system', 'Classified'); $smarty->assign('systemURL', ""); $smarty->assign('systemSecurity', '0.0'); } } else { $smarty->assign('systemID', $this->kill->getSystem()->getID()); $smarty->assign('system', $this->kill->getSystem()->getName()); $smarty->assign('systemURL', edkuri::build(array(array('a', 'system_detail', true), array('sys_id', $this->kill->getSystem()->getID(), true)))); $smarty->assign('systemSecurity', $this->kill->getSystem()->getSecurity(true)); } $smarty->assign('timeStamp', $this->kill->getTimeStamp()); $smarty->assign('victimShipImg', $ship->getImage(64)); $smarty->assign('totalLoss', number_format($this->kill->getISKLoss())); return $smarty->fetch(get_tpl('kill_detail_victim_ship')); }
function showactivityoverview() { $week = $this->getWeek(); $month = $this->getMonth(); $year = $this->getYear(); if (config::get('show_activity_overview')) { if (!config::get('show_monthly')) { $weekly = 1; } else { $weekly = 0; } $row_counter = 0; $html .= '<table class=kb-table width="100%" border=0 cellspacing="1">'; if ($weekly == 1) { $html .= '<tr ><td colspan="3" class=kb-table-header>Activity Map for Week ' . $week . '</td></tr>'; } else { $html .= '<tr ><td colspan="3" class=kb-table-header>Activity Map for ' . date('F', mktime(0, 1, 0, $month, 1, $year)) . '</td></tr>'; } $html .= '<tr>'; $sql2 = "select reg.reg_id, count(distinct kll.kll_id) as kills\n\t\t\t\t\t\tfrom kb3_systems sys, kb3_kills kll, kb3_inv_detail inv, kb3_constellations con, kb3_regions reg\n\t\t\t\t\t\twhere kll.kll_system_id = sys.sys_id\n\t\t\t\t\t\tand inv.ind_kll_id = kll.kll_id"; if (count(config::get('cfg_allianceid'))) { $orargs[] = 'inv.ind_all_id IN (' . implode(",", config::get('cfg_allianceid')) . ") "; } if (count(config::get('cfg_corpid'))) { $orargs[] = 'inv.ind_crp_id IN (' . implode(",", config::get('cfg_corpid')) . ") "; } if (count(config::get('cfg_pilotid'))) { $orargs[] = 'inv.ind_plt_id IN (' . implode(",", config::get('cfg_pilotid')) . ") "; } $sql2 .= " AND (" . implode(" OR ", $orargs) . ")"; if ($weekly == 1) { $sql2 .= "\t\tand date_format( kll.kll_timestamp, \"%u\" ) = " . $week . " "; } else { $sql2 .= "\t\tand date_format( kll.kll_timestamp, \"%m\" ) = " . $month . " "; } $sql2 .= "\t\tand date_format( kll.kll_timestamp, \"%Y\" ) = " . $year . "\n\t\t\t\t\t\tand con.con_id = sys.sys_con_id\n\t\t\t\t\t\tand reg.reg_id = con.con_reg_id\n\t\t\t\t\t\tgroup by reg.reg_id\n\t\t\t\t\t\torder by kills desc\n\t\t\t\t\t\tLIMIT 0,3;"; $qry2 = new DBQuery(); $qry2->execute($sql2) or die($qry2->getErrorMsg()); while ($row2 = $qry2->getRow()) { $row_counter++; $link = edkuri::build(array(array('a', 'detail_view', true), array('region_id', $row2['reg_id'], true))); if ($weekly == 1) { $html .= '<td align="center"><a href="' . $link . '"><img src="?a=map&mode=activity&size=250®ion_id=' . $row2['reg_id'] . '&week=' . $week . '&year=' . $year . '" border=0 /></a></td>'; } else { $html .= '<td align="center"><a href="' . $link . '"><img src="?a=map&mode=activity&size=250®ion_id=' . $row2['reg_id'] . '&month=' . $month . '&year=' . kbdate("Y") . '" border=0 /></a></td>'; } } while ($row_counter < 3) { $row_counter++; $html .= '<td align="center"><img width="250" height="250" src="?a=map&mode=na&size=250"></td>'; } $html .= '</tr></table><br />'; } return $html; }
<?php /** * @package EDK */ $index = array('A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'); $page = new Page("Item Database - '" . $id . "' Group Index"); $sql = 'SELECT * FROM kb3_item_types d WHERE d.itt_name LIKE CONVERT( _utf8 "' . $id . '%" USING latin1 ) COLLATE latin1_swedish_ci ORDER BY d.itt_name ASC'; $html .= "<table class=kb-table-header cellspacing=0><tr><td width=400 colspan=27 align=center>INDEX</td></tr><tr class=kb-table-row-odd>"; foreach ($index as $il) { $html .= '<td><a href="' . edkuri::build(array(array('a', 'itemdb', true), array('id', $il, true))) . '">' . $il . '</a></td>'; } $html .= "</tr></table><br><br>"; $qry = DBFactory::getDBQuery(); $qry->execute($sql); $html .= "<table class=kb-table cellspacing=1>"; $html .= "<tr class=kb-table-header><td width=400>Group Name</td></tr>"; while ($row = $qry->getRow()) { $html .= '<tr class=kb-table-row-odd><td><a href="' . edkuri::build(array(array('a', 'groupdb', true), array('id', $row['itt_id'], true))) . '">' . $row['itt_name'] . '</a></td></tr>'; } $html .= "</table>"; $page->setContent($html); $page->generate();