Example #1
0
 function details()
 {
     global $smarty;
     $item = new dogma($this->typeID);
     if (!$item->isValid()) {
         $this->page->setTitle('Error');
         return 'This ID is not a valid dogma ID.';
     }
     $this->page->setTitle('Item details - ' . $item->get('typeName'));
     $this->page->addHeader('<meta name="robots" content="noindex, nofollow" />');
     $smarty->assignByRef('item', $item);
     if ($item->get('itt_cat') == 6) {
         //we have a ship, so get it from the db
         $ship = Ship::getByID($item->get('typeID'));
         $smarty->assign('shipImage', $ship->getImage(64));
         $smarty->assign('armour', array('armorHP', 'armorEmDamageResonance', 'armorExplosiveDamageResonance', 'armorKineticDamageResonance', 'armorThermalDamageResonance'));
         $smarty->assign('shield', array('shieldCapacity', 'shieldRechargeRate', 'shieldEmDamageResonance', 'shieldExplosiveDamageResonance', 'shieldKineticDamageResonance', 'shieldThermalDamageResonance'));
         $smarty->assign('propulsion', array('maxVelocity', 'agility', 'droneCapacity', 'capacitorCapacity', 'rechargeRate'));
         $smarty->assign('fitting', array('hiSlots', 'medSlots', 'lowSlots', 'rigSlots', 'upgradeCapacity', 'droneBandwidth', 'launcherSlotsLeft', 'turretSlotsLeft', 'powerOutput', 'cpuOutput'));
         $smarty->assign('targetting', array('maxTargetRange', 'scanResolution', 'maxLockedTargets', 'scanRadarStrength', 'scanLadarStrength', 'scanMagnetometricStrength', 'scanGravimetricStrength', 'signatureRadius'));
         $smarty->assign('miscellaneous', array('techLevel', 'propulsionFusionStrength', 'propulsionIonStrength', 'propulsionMagpulseStrength', 'propulsionPlasmaStrength'));
         $html = $smarty->fetch(get_tpl('invtype_ship'));
     } else {
         $i = new Item($this->typeID);
         $smarty->assign('itemImage', $i->getIcon(64, false));
         $smarty->assign('akey', session::isAdmin() ? session::makeKey() : false);
         $html = $smarty->fetch(get_tpl('invtype_item'));
     }
     return $html;
 }
Example #2
0
 /**
  * Start constructing the page.
  * Prepare all the shared variables such as dates and check alliance ID.
  *
  */
 function start()
 {
     $this->page = new Page();
     $this->plt_id = (int) edkURI::getArg('plt_id');
     if (!$this->plt_id) {
         $this->plt_external_id = (int) edkURI::getArg('plt_ext_id');
         if (!$this->plt_external_id) {
             $id = (int) edkURI::getArg('id', 1);
             // Arbitrary number bigger than we expect to reach locally
             if ($id > 1000000) {
                 $this->plt_external_id = $id;
             } else {
                 $this->plt_id = $id;
             }
         }
     }
     $this->view = preg_replace('/[^a-zA-Z0-9_-]/', '', edkURI::getArg('view', 2));
     if ($this->view) {
         $this->page->addHeader('<meta name="robots" content="noindex, nofollow" />');
     }
     if (!$this->plt_id) {
         if ($this->plt_external_id) {
             $this->pilot = new Pilot(0, $this->plt_external_id);
             $this->plt_id = $this->pilot->getID();
         } else {
             $html = 'That pilot doesn\'t exist.';
             $this->page->generate($html);
             exit;
         }
     } else {
         $this->pilot = Cacheable::factory('Pilot', $this->plt_id);
         $this->plt_external_id = $this->pilot->getExternalID();
     }
     $this->page->setTitle('Pilot details - ' . $this->pilot->getName());
     if (!$this->pilot->exists()) {
         $html = 'That pilot doesn\'t exist.';
         $this->page->setContent($html);
         $this->page->generate();
         exit;
     }
     if ($this->plt_external_id) {
         $this->page->addHeader("<link rel='canonical' href='" . edkURI::page('pilot_detail', $this->plt_external_id, 'plt_ext_id') . "' />");
     } else {
         $this->page->addHeader("<link rel='canonical' href='" . edkURI::page('pilot_detail', $this->plt_id, 'plt_id') . "' />");
     }
     $this->corp = $this->pilot->getCorp();
     $this->alliance = $this->corp->getAlliance();
 }
Example #3
0
 /**
  *  Show the overall statistics for this corporation.
  */
 function stats()
 {
     global $smarty;
     // The summary table is also used by the stats. Whichever is called
     // first generates the table.
     $this->page->setTitle('Corporation details - ' . $this->corp->getName() . " [" . $this->corp->getShortName() . "]");
     $smarty->registerObject('Corp', $this->corp);
     $smarty->assign('portrait_url', $this->corp->getPortraitURL(128));
     if ($this->alliance->getName() == "None") {
         $smarty->assign('alliance_url', false);
     } else {
         if ($this->alliance->getExternalID()) {
             $smarty->assign('alliance_url', edkURI::build(array('a', 'alliance_detail', true), array('all_ext_id', $this->alliance->getExternalID(), true)));
         } else {
             $smarty->assign('alliance_url', edkURI::build(array('a', 'alliance_detail', true), array('all_id', $this->alliance->getID(), true)));
         }
     }
     $smarty->assign('alliance_name', $this->alliance->getName());
     $smarty->assign('kill_count', $this->kill_summary->getTotalKills());
     $smarty->assign('loss_count', $this->kill_summary->getTotalLosses());
     $smarty->assign('damage_done', number_format($this->kill_summary->getTotalKillISK() / 1000000000, 2));
     $smarty->assign('damage_received', number_format($this->kill_summary->getTotalLossISK() / 1000000000, 2));
     if ($this->kill_summary->getTotalKillISK()) {
         $smarty->assign('efficiency', number_format(100 * $this->kill_summary->getTotalKillISK() / ($this->kill_summary->getTotalKillISK() + $this->kill_summary->getTotalLossISK()), 2));
     } else {
         $smarty->assign('efficiency', 0);
     }
     $smarty->assign('ceo_url', edkURI::build(array('a', 'pilot_detail', true), array('plt_ext_id', $this->corp->getCeoID(), true)));
     $pilot = new Pilot(0, $this->corp->getCeoID());
     $smarty->assign('ceo_name', $pilot->getName());
     return $smarty->fetch(get_tpl('corp_detail_stats'));
 }
Example #4
0
/**
 *  function main is the start point of IntroNet
 *  @param boolean $debug_mode Turning on the debug mode displys system info and error messages
 */
function main($debug_mode)
{
    if ($debug_mode) {
        $start = microtime(true);
        //For testing the page speed
        echo 'Current PHP version: ' . phpversion();
        if (version_compare(phpversion(), '5.0.0', '<')) {
            die('Current PHP version is old. Please instal PHP5 or higher');
        }
    }
    session_start();
    // User Logout
    if (isset($_GET["logout"])) {
        session_destroy();
        $host = $_SERVER['HTTP_HOST'];
        $uri = rtrim(dirname($_SERVER['PHP_SELF']), '/\\');
        $extra = 'index.php?page=home';
        header("Location: http://{$host}{$uri}/{$extra}");
        exit;
        //echo 'Loged out';
    }
    require_once './classes/MainMenu.php';
    require_once './classes/PageDirectory.php';
    require_once './classes/User.php';
    require_once './classes/Planner.php';
    require_once './classes/pages/Page.php';
    $page = null;
    $main_menu = null;
    $user = null;
    Page::setTitle("IntroNet");
    // the name of the website
    if (isset($_SESSION["user"])) {
        $user = unserialize($_SESSION["user"]);
        $main_menu = new MainMenu($user->type);
    } else {
        $user = new User();
        // guest user
        $main_menu = new MainMenu();
    }
    /** @todo replace $_Get['page'] with $_SERVER['PATH_INFO']  */
    //print_r( explode('/',$_SERVER['PATH_INFO']) );
    // get the page from the PageDirectory
    if (!isset($_GET['page'])) {
        $page = PageDirectory::getPage("home", $main_menu, $user);
    } else {
        $page = PageDirectory::getPage($_GET['page'], $main_menu, $user);
    }
    if ($page != null) {
        $user->openPage($page);
        //$page->printPage("IntroNet", $user);
    } else {
        echo "Error: no page to display!";
    }
    //for testing
    if ($debug_mode) {
        $end = microtime(true);
        echo "Loading the page took " . ($end - $start) . "ms";
    }
}
Example #5
0
 public function add()
 {
     if (Page::already($_POST['baseUrl'], $_POST['uri'], $_POST['language'])) {
         throw new Exception('PAGE ALREADY EXISTS', 409);
     }
     $page = new Page();
     $page->setBaseUrl($_POST['baseUrl']);
     $page->setUri($_POST['uri']);
     $page->setLanguage($_POST['language']);
     if (array_key_exists('content', $_POST) && !empty($_POST['content'])) {
         $page->setContent($_POST['content']);
     }
     $page->setModele($_POST['modele']);
     $page->setTitle($_POST['title']);
     if (array_key_exists('languageParentId', $_POST)) {
         $page->setLanguageParentId($_POST['languageParentId']);
     }
     if (array_key_exists('ajax', $_POST)) {
         $page->setAjax($_POST['ajax']);
     }
     if (array_key_exists('published', $_POST)) {
         $page->setPublished($_POST['published']);
     }
     if (array_key_exists('metas', $_POST)) {
         $page->setMetas($_POST['metas']);
     }
     if (array_key_exists('css', $_POST)) {
         $page->setCss($_POST['css']);
     }
     if (array_key_exists('js', $_POST)) {
         $page->setJs($_POST['js']);
     }
     if (array_key_exists('action', $_POST)) {
         $page->setAction($_POST['action']);
     }
     if (array_key_exists('method', $_POST)) {
         $page->setMethod($_POST['method']);
     }
     if (array_key_exists('priority', $_POST)) {
         $page->setPriority($_POST['priority']);
     }
     if (array_key_exists('datas', $_POST)) {
         $page->setDatas($_POST['datas']);
     }
     if (!array_key_exists('blockIds', $_POST)) {
         $blkIds = array();
         foreach ($_POST['blockIds'] as $blk) {
             if (array_key_exists('id', $blk) && MongoId::isValid($blk['id'])) {
                 $blkIds[] = $blk['id'];
             }
         }
         $this->page->setBlockIds($blkIds);
     }
     $page->save();
     return array('pageId' => $page->getId());
 }
 /**
  * Adds a new Page row with specified parent Id.
  *
  * @param      int $parentId
  */
 protected function addNewChildPage($parentId)
 {
     $db = Propel::getConnection(PagePeer::DATABASE_NAME);
     //$db->beginTransaction();
     $parent = PagePeer::retrieveByPK($parentId);
     $page = new Page();
     $page->setTitle('new page ' . time());
     $page->insertAsLastChildOf($parent);
     $page->save();
     //$db->commit();
 }
Example #7
0
 /**
  * Start constructing the page.
  * Prepare all the shared variables such as dates and check alliance ID.
  *
  */
 function start()
 {
     $this->sys_id = (int) edkURI::getArg('sys_id', 1, true);
     $this->view = preg_replace('/[^a-zA-Z0-9_-]/', '', edkURI::getArg('view', 2, true));
     global $smarty;
     $this->smarty = $smarty;
     $this->viewList = array();
     $this->menuOptions = array();
     $this->page = new Page();
     $this->page->addHeader('<meta name="robots" content="noindex, nofollow" />');
     if (!$this->sys_id) {
         echo 'no valid id supplied<br/>';
         exit;
     }
     $this->page->addHeader("<link rel='canonical' href='" . edkURI::build($this->args) . "' />");
     $this->system = new SolarSystem($this->sys_id);
     $this->menuOptions = array();
     $this->page->setTitle('System details - ' . $this->system->getName());
     $this->smarty->assign('sys_id', $this->sys_id);
 }
Example #8
0
 function details()
 {
     global $smarty;
     if (!$this->groupID) {
         $this->page->setTitle('Error');
         return 'This ID is not a valid group ID.';
     }
     $sql = 'SELECT * FROM kb3_item_types d' . ' WHERE d.itt_id = ' . $this->groupID;
     $qry = DBFactory::getDBQuery();
     $qry->execute($sql);
     $row = $qry->getRow();
     $this->page->setTitle('Item Database - ' . $row['itt_name'] . ' Index');
     $sql = 'SELECT * FROM kb3_invtypes d' . ' WHERE d.groupID = ' . $this->groupID . ' ORDER BY d.typeName ASC';
     $qry = DBFactory::getDBQuery();
     $qry->execute($sql);
     $rows = array();
     while ($row = $qry->getRow()) {
         $rows[] = array('typeID' => $row['typeID'], 'typeName' => $row['typeName']);
     }
     $smarty->assign('rows', $rows);
     $smarty->assign('actionURL', edkURI::page('invtype'));
     return $smarty->fetch(get_tpl('groupdb'));
 }
Example #9
0
 /**
  *  Show the overall statistics for this alliance.
  *
  * @global Smarty $smarty
  * @return string
  */
 function stats()
 {
     global $smarty;
     if ($this->alliance->isFaction()) {
         $this->page->setTitle(Language::get('page_faction_det') . ' - ' . $this->alliance->getName() . " [" . $this->alliance->getshortName() . "]");
     } else {
         $this->page->setTitle(Language::get('page_all_det') . ' - ' . $this->alliance->getName() . " [" . $this->alliance->getshortName() . "]");
     }
     $sql = "select crp_id from kb3_corps WHERE crp_all_id=" . $this->alliance->getID();
     $qry = DBFactory::getDBQuery();
     $qry->execute($sql);
     while ($row = $qry->getRow()) {
         $this->allianceCorps[] = Corporation::getByID((int) $row['crp_id']);
     }
     if (!isset($this->kill_summary)) {
         $this->kill_summary = new KillSummaryTable();
         $this->kill_summary->addInvolvedAlliance($this->alliance);
         $this->kill_summary->generate();
     }
     $execcrp = Corporation::lookupByExternalID($this->alliance->GetExecutorID());
     if ($execcrp !== false) {
         $smarty->assign('ExecutorName', $execcrp->getName());
     } else {
         $smarty->assign('ExecutorName', '');
     }
     $smarty->registerObject('Alliance', $this->alliance);
     $smarty->assign('memberCorpCount', count($this->allianceCorps));
     if ($this->kill_summary->getTotalKillISK()) {
         $efficiency = round($this->kill_summary->getTotalKillISK() / ($this->kill_summary->getTotalKillISK() + $this->kill_summary->getTotalLossISK()) * 100, 2);
     } else {
         $efficiency = 0;
     }
     // The summary table is also used by the stats. Whichever is called
     // first generates the table.
     $smarty->assign('all_img', $this->alliance->getPortraitURL(128));
     $smarty->assign('totalkills', $this->kill_summary->getTotalKills());
     $smarty->assign('totallosses', $this->kill_summary->getTotalLosses());
     $smarty->assign('totalkisk', round($this->kill_summary->getTotalKillISK() / 1000000000, 2));
     $smarty->assign('totallisk', round($this->kill_summary->getTotalLossISK() / 1000000000, 2));
     if ($this->kill_summary->getTotalKillISK()) {
         $smarty->assign('efficiency', round($this->kill_summary->getTotalKillISK() / ($this->kill_summary->getTotalKillISK() + $this->kill_summary->getTotalLossISK()) * 100, 2));
     } else {
         $smarty->assign('efficiency', '0');
     }
     return $smarty->fetch(get_tpl('alliance_detail_stats'));
 }
Example #10
0
<?php

/**
 * @package EDK
 */
@set_time_limit(0);
$page = new Page();
$page->setAdmin();
$page->setTitle('Administration - Killmail Importer');
if (!$_POST['dir']) {
    $dir = getcwd();
}
if (!$_POST['ext']) {
    $ext = '.txt';
} else {
    $ext = $_POST['ext'];
}
if ($_GET['submit'] == 'Reset') {
    unset($_SESSION['kill_import']);
    unset($_POST);
}
$html .= '<form id="options" name="options" method="post" action="' . edkURI::page("admin_kill_import") . '">';
if ($_POST) {
    $dir = $_POST['dir'];
    if (!$dir && $_SESSION['kill_import']) {
        $dir = $_SESSION['kill_import']['dir'];
        $ext = $_SESSION['kill_import']['ext'];
    }
    if (!strstr($dir, getcwd())) {
        $dir = getcwd() . $dir;
    }
Example #11
0
<?php

/**
 * @package EDK
 */
$page = new Page();
$page->setAdmin();
$kll_id = (int) edkURI::getArg('kll_id', 1);
$page->setTitle('Administration - Deletion of Kill ID "' . $kll_id . '"');
if (isset($_GET['confirm'])) {
    $kill = Kill::getByID($kll_id);
    $kill->remove(true, false);
    $html .= "Kill ID \"" . $kll_id . "\" deleted!";
    $html .= "<br><br><a href=\"javascript:window.close();\">[close]</a>";
} else {
    if (isset($_GET['permanent'])) {
        $kill = Kill::getByID($kll_id);
        $kill->remove(true, true);
        $html .= "Kill ID \"" . $kll_id . "\" deleted!";
        $html .= "<br><br><a href=\"javascript:window.close();\">[close]</a>";
    } else {
        $cargs = array();
        $cargs[] = array("a", "admin_kill_delete", true);
        $cargs[] = array("kll_id", $kll_id, true);
        $pargs = $cargs;
        $cargs[] = array("confirm", "yes", false);
        $pargs[] = array("permanent", "yes", false);
        $html .= "Delete Kill ID \"" . $kll_id . "\": ";
        $html .= "<button onClick=\"window.location.href='" . edkURI::build($cargs) . "'\">Yes</button><br />";
        $html .= "Delete and prevent reposting: ";
        $html .= "<button onClick=\"window.location.href='" . edkURI::build($pargs) . "'\">Yes</button><br />";
Example #12
0
<?php

/**
 * @package EDK
 */
require_once 'common/admin/admin_menu.php';
$page = new Page();
$page->setAdmin();
$page->setTitle('Administration - Post Permissions');
if ($_POST['searchphrase'] != "" && strlen($_POST['searchphrase']) >= 3) {
    switch ($_POST['searchtype']) {
        case "pilot":
            $sql = "select plt.plt_id, plt.plt_name, crp.crp_name\n                    from kb3_pilots plt, kb3_corps crp\n                    where lower( plt.plt_name ) like lower( '%" . slashfix($_POST['searchphrase']) . "%' )\n                    and plt.plt_crp_id = crp.crp_id\n                    order by plt.plt_name";
            break;
        case "corp":
            $sql = "select crp.crp_id, crp.crp_name, ali.all_name\n                    from kb3_corps crp, kb3_alliances ali\n                    where lower( crp.crp_name ) like lower( '%" . slashfix($_POST['searchphrase']) . "%' )\n                    and crp.crp_all_id = ali.all_id\n                    order by crp.crp_name";
            break;
        case "alliance":
            $sql = "select ali.all_id, ali.all_name\n                    from kb3_alliances ali\n                    where lower( ali.all_name ) like lower( '%" . slashfix($_POST['searchphrase']) . "%' )\n                    order by ali.all_name";
            break;
    }
    $qry = DBFactory::getDBQuery();
    if (!$qry->execute($sql)) {
        die($qry->getErrorMsg());
    }
    while ($row = $qry->getRow()) {
        switch ($_POST['searchtype']) {
            case 'pilot':
                $link = KB_HOST . '/?a=admin_postperm&amp;add=p' . $row['plt_id'] . '&amp;akey=' . session::makeKey();
                $descr = 'Pilot ' . $row['plt_name'] . ' from ' . $row['crp_name'];
                break;
Example #13
0
File: events.php Project: qb90/www
<?php

require_once 'lib/page.php';
$page = new Page();
$page->setTitle('Events');
$page->setImage('cr-m.jpg');
$page->startBody();
?>

<blockquote>
Eleven events are included on the provisional calendar although it is the intention to increase to 12 once all agreements for a new season-opening round have been reached. 
Providing it goes ahead, that would mean 24 races, 12 DHL pole position shootouts and 12 MAC3 contests.
</blockquote>

François Ribeiro, Head of Eurosport Events, the WTCC promoter, said: 
<blockquote>
“The intention is for the calendar to have 12 events but the agreement with the potential new venue is not there yet. Providing all elements of the deal fall into place we hope to announce the final calendar with 12 weekends prior to the Christmas break. Otherwise, we have kept the same venues in a number of key markets that provide the challenge and prestige we crave, plus the variety.”
</blockquote>

<?php 
$page->endBody();
echo $page->render('templ/template.php');
Example #14
0
    public static function js($js, $head = false)
    {
        $path = Config::get('JS_DIR') . '/' . $js . '.js';
        if (!$head) {
            self::$_js[] = $path;
        } else {
            array_unshift(self::$_js, $path);
        }
    }
    public static function setTitle($title)
    {
        self::$_pageTitle = $title;
    }
    public static function send($template = null)
    {
        $base = substr($_SERVER['PHP_SELF'], strlen(Config::get('BASE')));
        $base = str_repeat('../', count(split('/', $base)) - 1);
        if ($base && substr($base, -1) !== '/') {
            $base .= '/';
        }
        self::$_body = ob_get_clean();
        if (!$template) {
            $template = Config::get('SITE_TEMPLATE');
        }
        require __DIR__ . '/templates/' . $template . '.php';
        exit;
    }
}
ob_start();
Page::setTitle(Config::get('DEFAULT_PAGE_TITLE'));
Example #15
0
<?php

$page = new Page("Search Results", $SessionPerson);
$page->getModule("blogPost");
$page->showHeader();
$page->getModule("categories");
if (isset($_POST["search_submit"])) {
    $value = $_POST["search"];
    unset($_POST);
    $emptyString = empty($value);
    $noResults = "No Results Found.";
    $title = "Showing Results for " . $value . ".";
    if ($emptyString) {
        $title = $noResults;
    }
    $page->setTitle($title);
    ?>
    <div class="container col-md-12">
        <div class="panel-body text-center">
            <?php 
    echo "<h2>{$title}</h2>";
    ?>
        </div>
    </div>
    <?php 
    ListCategories($Categories, $SessionPerson->id());
    ?>
    <div class="container col-md-6">
    <?php 
    if (!$emptyString) {
        $r1 = null;
Example #16
0
<?php

/**
 * @package EDK
 */
// admin menu now loads all admin pages with options
require_once 'common/admin/admin_menu.php';
$page = new Page();
$page->setAdmin();
if ($_POST) {
    options::handlePost();
}
$page->setContent(options::genOptionsPage());
$page->addContext(options::genAdminMenu());
if (!edkURI::getArg('field', 1) || !edkURI::getArg('sub', 1) || edkURI::getArg('field', 1) == 'Advanced' && edkURI::getArg('sub', 2) == 'Configuration') {
    $page->setTitle('Administration - Board Configuration (Current version: ' . KB_VERSION . ' ' . KB_RELEASE . ')');
}
$page->generate();
Example #17
0
        $whereSql = "WHERE " . implode(" AND ", $filterArguments);
    }
    $sql = "SELECT COUNT( bop.battle_id ) AS cnt, bop.plt_id\n                        FROM kb3_battles_owner_pilots bop\n                        INNER JOIN kb3_pilots plt ON ( plt.plt_id = bop.plt_id ) \n                        INNER JOIN kb3_battles_cache bc ON bc.battle_id = bop.battle_id\n                        INNER JOIN kb3_systems sys ON sys.sys_name = bc.system\n                        INNER JOIN kb3_constellations con ON con.con_id = sys.sys_con_id\n                        INNER JOIN kb3_regions reg ON reg.reg_id = con.con_reg_id\n                        {$whereSql}\n                        GROUP BY bop.plt_id ORDER BY 1 DESC LIMIT 15";
    $query = DBFactory::getDBQuery();
    $query->execute($sql);
    $tkbox = new AwardBoxLong($query, "Top Fleet Attendees", "Fleet attendances", "fleets", "eagle", $query->recordCount());
    return $html = $tkbox->generate();
}
// add filter toggling script
$jsDir = config::get("cfg_kbhost") . '/mods/' . basename(dirname(__FILE__)) . '/js/';
$page->addHeader("<script type=\"text/javascript\" src=\"" . $jsDir . "toggleFilter.js\"></script>");
switch ($_GET['view']) {
    case '':
        echo "<!-- MOD VERSION -->\n";
        $battlelist = new BattleList();
        $page->setTitle('Fleet Battles');
        $table = new BattleListTable($battlelist);
        // pagination only available for cached battles and non-filtered results
        if (config::get('fleet_battles_mod_cache') && !isset($_POST["filter"])) {
            $table->setPageSplit(config::get('killcount') * 2);
            $pagesplitter = new PageSplitter($table->getCount(), config::get('killcount') * 2);
            $pagesplit = $pagesplitter->generate();
            $html .= $pagesplit . $table->generate() . $pagesplit . $table->getStatsHtml();
        } else {
            $html .= $table->generate() . $table->getStatsHtml();
        }
        break;
}
$menubox = new box('Menu');
$menubox->setIcon('menu-item.gif');
$menubox->addOption('link', 'Fleet Battles', edkURI::page('battles'));
Example #18
0
    if (!isset($_SESSION["token"]) || $_SESSION["token"] != $decrypted) {
        $fail = true;
    } else {
        $fail = false;
    }
}
if ($fail) {
    require_once './helper/Utils.php';
    $_SESSION['showModalLogin'] = true;
    $url = "index.php";
    Utils::Redirect($url);
} else {
    require_once './helper/Page.php';
    require_once './helper/Context.php';
    $page = new Page();
    $page->setTitle('Thông Tin Cá Nhân');
    $page->addCSS("assets/css/profile.css");
    $page->addJavascript("assets/js/jquery.inputmask.bundle.min.js");
    $page->startBody();
    $update = null;
    //update PassWord
    $updatePW = true;
    date_default_timezone_set('Asia/Bangkok');
    $User = new User();
    if (isset($_POST["btnUpdate"])) {
        $User->setUserID($_POST["txtUserID"]);
        $User->setUserName($_POST["txtUserName"]);
        $User->setEmail($_POST["txtEmail"]);
        $dateOfBirth = new DateTime(str_replace('/', '-', $_POST["txtBirthDay"]));
        //d-m-Y
        $User->setDateOfBirth($dateOfBirth);
Example #19
0
<?php

if (!isset($_SESSION)) {
    session_start();
}
require_once './helper/Page.php';
require_once 'entities/Product.php';
require_once './entities/Cart.php';
require_once './helper/Context.php';
$p = new Product();
$ListProMostViewed = $p->loadLimit(10, 0, "View", "DESC");
$ListProNew = $p->loadLimit(10, 0, "ProCreated", "DESC");
$ListProBestSell = $p->loadLimit(10, 0, "OnOrder", "DESC");
$page = new Page();
$page->setTitle('Trang Chủ');
$page->startBody();
//SLIDE-SHOW
include './slideshow.php';
?>

    <!--/SLIDE-SHOW-->
    <form id="addToCart-form" method="post" action=""><input type="hidden" id="txtProID" name="txtProID"/></form>
    <!--LATEST-->
    <div class="latest box clearfix" id="proLatest">
        <div class="box-top">
            <p>Mới nhất</p>
        </div>
        <div id="proLatestBody">
            <?php 
Product::printListProduct($ListProNew);
?>
Example #20
0
<?php

$sec_color = array("10" => '#4cfeff', "9" => '#12f38d', "8" => '#29ee46', "7" => '#5cda2e', "6" => '#5ad717', "5" => '#fffb23', "4" => '#d9670f', "3" => '#ea5511', "2" => '#ec3a16', "1" => '#d1230b', "0" => '#FF0000');
$page = new Page('TEST');
$page->setTitle('Region detail view');
$regionID = (int) edkURI::getArg('region_id');
if (isset($_GET['big_view'])) {
    $html = '<table width="700" border="0" cellspacing="1" cellpadding="1" class="kb-table">
			<tr>
				<td align="center"><a href="' . edkURI::build(array('region_id', $regionID, true)) . '">[Back]</a></td>
			</tr>
			<tr>
				<td align="center">
					<img src="?a=map&region_id=' . $regionID . '&size=700&mode=' . preg_replace('/[^a-zA-Z0-9_-]/', '', edkURI::getArg('mode')) . '" width="700" height="700">
				</td>
			</tr>
		</table>';
} elseif (isset($_GET['search'])) {
    $html .= '<form id="form1" name="form1" method="post" action="' . edkURI::build(array('search', true, false)) . '">
				<input type="text" name="search_string" />
				<select name="selector">
					<option value="reg"';
    if ($_POST['selector'] == 'reg') {
        $html .= " selected";
    }
    $html .= '>Region</option>
					<option value="con"';
    if ($_POST['selector'] == 'con') {
        $html .= " selected";
    }
    $html .= '>Constellation</option>
Example #21
0
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 */
include "Page.class.php";
$page = new Page();
$page->setTitle("Barcode generator");
$page->printHeader();
?>
<style type="text/css">
th {
    text-align: right;
    white-space: nowrap;
}
#advanced {
    padding: 0.3em;
    cursor: pointer;
    font-style: italic;
    text-decoration: underline;
    color: blue;
}
#advancedBlock {
Example #22
0
 public function providerCorrectPage()
 {
     $page1 = new Page();
     $page1->setKey('catalog-product-edit');
     $page1->setTitle('Catalog product edit page');
     $page1->setUrl('admin/catalog_product/edit/id/(\\d+)');
     $tabGeneral = $page1->createTab('general', "//div=[@id='product_info_tabs_group_7_content']");
     $tabGeneral->appendChild($page1->createField('name', "//input[@id='name']"));
     $tabGeneral->appendChild($page1->createField('description', "//input[@id='description']"));
     $tabGeneral->appendChild($page1->createSelect('status', "//input[@id='status']"));
     $page1->documentElement->appendChild($tabGeneral);
     $page1->documentElement->appendChild($page1->createButton('save', "//div[@class='content-buttons-placeholder']//button[contains(@class,'save')]"));
     $page1->documentElement->appendChild($page1->createButton('back', "//div[@class='content-buttons-placeholder']//button[contains(@class,'back')]"));
     $page2 = new Page();
     $page2->setKey('customer-edit');
     $page2->setTitle('Cutomer edit page');
     $page2->setUrl('admin/customer/edit/id/(\\d+)');
     $fieldsetAccountInformation = $page2->createFieldset('account-information', "//div[@id='_accountbase_fieldset']");
     $fieldsetAccountInformation->appendChild($page2->createField('firstname', "//input[@id='_accountfirstname']"));
     $fieldsetAccountInformation->appendChild($page2->createField('lastname', "//input[@id='_accountlastname']"));
     $fieldsetAccountInformation->appendChild($page2->createSelect('gender', "//input[@id='_accountgender']"));
     $fieldsetFormButtons = $page2->createFieldset('form-buttons', "//p[@class='form-buttons']");
     $fieldsetFormButtons->appendChild($page2->createButton('save', "//div[@class='content-buttons-placeholder']//button[contains(@class,'save')]"));
     $fieldsetFormButtons->appendChild($page2->createButton('back', "//div[@class='content-buttons-placeholder']//button[contains(@class,'back')]"));
     $tabAccountInformation = $page2->createTab('account-information', "//div[@id='_accountbase_fieldset']");
     $tabAccountInformation->appendChild($fieldsetAccountInformation);
     $page2->documentElement->appendChild($tabAccountInformation);
     $page2->documentElement->appendChild($fieldsetFormButtons);
     return array(array($page1), array($page2));
 }
Example #23
0
<?php

$allowGuest = $install = $ignoreDataBase = true;
require '../framework/inc.php';
Page::setTitle('Install Wizard');
$hideDefaultView = true;
?>

<?php 
$base = $_SERVER['PHP_SELF'];
$base = substr($base, 0, strlen($base) - strlen('/install/index.php')) . '/';
Config::write('BASE', $base);
Page::css('inspinia/plugins/iCheck/custom');
Page::css('inspinia/plugins/steps/jquery.steps');
Page::js('inspinia/plugins/steps/jquery.steps.min');
Page::js('inspinia/plugins/validate/jquery.validate.min');
Page::js('../install/wizard');
?>

<div class="ibox-content">
<h2>
    Skyer configuration
</h2>
<p>
    This wizard will help you to configure Skyer
</p>

<form id="form" action="form-submit.php" method="POST" class="wizard-big">
    <h1>DataBase</h1>
    <fieldset>
        <h2>DataBase Settings</h2>
Example #24
0
<?php

require_once "../inc/config.inc.php";
session_start();
$token = Gestionnaire::getInstance()->randomString(40);
$_SESSION["token"] = $token;
$p = new Page("Gestion des stages :: Offre");
$p->appendCssUrl("../inc/style/offre.css");
$p->appendToHead("<script>var token = \"{$token}\";</script>");
if (isset($_GET["id"])) {
    $p->setTitle("Gestion des stages :: Offre n°" . $_GET["id"]);
    $offre = Gestionnaire::getInstance()->offre($_GET["id"]);
    if ($offre == null) {
        header("Location: index.php");
    }
    if (isset($_SESSION["membre"]) && $_SESSION["membre"] instanceof Etudiant && $_SESSION["membre"]->aCandidateOffre(Gestionnaire::getInstance()->offre($_GET["id"]))) {
        $s = $_SESSION["membre"]->getStatus($_GET["id"])[2];
        $p->appendContent("<header><h1>Vous avez déjà postulé à l'offre n°{$_GET["id"]}. <br> Statut : <i>\" {$s} \"</i></h1></header>");
        $p->appendToHead("<style>.cliqPostul{display:none;}</style>");
    } else {
        if (isset($_SESSION["membre"]) && ($_SESSION["membre"] instanceof Entreprise || $_SESSION["membre"] instanceof Enseignant)) {
            $p->appendToHead("<style>.cliqPostul{display:none;}</style>");
            $p->appendContent("<header><h1>Offre n°{$_GET["id"]}</h1></header>");
        } else {
            $p->appendContent("<header><h1>Offre n°{$_GET["id"]}</h1></header>");
        }
    }
    $p->appendContent(<<<HTML
    {$offre->getDescription()}
HTML
);
Example #25
0
<?php

require_once '../core/init.php';
$page = new Page();
$page->setTitle('Test');
$page->startBody();
?>

<!-- BODY CONTENT -->
<?php 
if (Input::exists()) {
    if (Token::check(Input::get('token'))) {
        $validate = new Validate();
        $validation = $validate->check($_POST, array('username' => array('displayName' => 'Username', 'required' => true, 'min' => 2, 'max' => 20, 'unique' => 'users'), 'password' => array('displayName' => 'Password', 'required' => true, 'min' => 6), 'password_again' => array('displayName' => 'Repeat password', 'required' => true, 'matches' => 'password'), 'name' => array('displayName' => 'Full name', 'required' => true, 'min' => 2, 'max' => 50)));
        if ($validation->passed()) {
            $user = new User();
            $salt = Hash::salt(32);
            try {
                $user->create(array('username' => Input::get('username'), 'password' => Hash::make(Input::get('password'), $salt), 'salt' => $salt, 'name' => Input::get('name'), 'joined' => date('Y-m-d H:i:s'), 'group' => 1));
                Session::flash('home', 'You have been registered and can now login!');
                Redirect::to('index.php');
            } catch (Exception $e) {
                die($e->getMessage());
            }
        } else {
            foreach ($validation->errors() as $error) {
                echo $error, '<br>';
            }
        }
    }
}
Example #26
0
$title = null;
function __autoload($name)
{
    include "methods/{$name}.class.php";
}
include_once "methods/functions.php";
$data = new Page();
if (isset($_GET['page']) && $_GET['page']) {
    $getPage = $_GET['page'];
} else {
    $getPage = "home";
}
$data->setNavigation(include_once "controllers/admin/navigation.php");
if ($getPage == "home") {
    $data->setHeader("<div id='header_home'><div><h1>Biatlon v srdci České Kanady</h1></div></div><div id='headerbox'>\n                      <h1>Klub biatlonu<br>Staré Město pod Landštejnem</h1>\n                      <h2>klub ze srdce České Kanady</h2>\n                      <div id='photoBoxAll'></div>\n                      </div>");
} else {
    $data->setHeader("<div id='header_all'>Staré Město pod Landštejnem</div>");
}
if (!isset($_SESSION['StMpL']) || $_SESSION['StMpL'] !== md5('StMpL2015')) {
    $data->setContent(include_once "controllers/admin/login.php");
} else {
    if (!file_exists("controllers/admin/{$getPage}.php")) {
        $data->setContent(include_once "controllers/noPage.php");
    } else {
        $data->setContent(include_once "controllers/admin/{$getPage}.php");
    }
}
$data->setTitle($title);
$data->setFooter(include_once "views/footer.php");
$page = (include_once "views/admin/page.php");
print $page;
Example #27
0
<?php

/**
 * @package EDK
 */
require_once 'common/admin/admin_menu.php';
$page = new Page();
$page->setAdmin();
$ctrID = (int) edkURI::getArg('ctr_id');
if (edkURI::getArg('op') == 'view') {
    $page->setTitle('Administration - Campaigns');
    $list = new ContractList();
    $html = '[<a href="' . edkuri::build(array('op', 'add', false)) . '">Add</a>]<br />';
    if ($list->getCount() > 0) {
        $html .= '<table class="kb-table" cellspacing="1">';
        $html .= "<tr class='kb-table-header'><td class='kb-table-cell' width='160'>Name</td><td class='kb-table-cell' width='80'>Startdate</td><td class='kb-table-cell' width='80'>Enddate</td><td class='kb-table-cell' width='140' colspan='2' align='center'>Action</td></tr>";
    }
    while ($contract = $list->getContract()) {
        $html .= "<tr class='kb-table-row-odd'>";
        $html .= "<td class='kb-table-cell'>" . $contract->getName() . "</td>";
        $html .= "<td class='kb-table-cell'>" . substr($contract->getStartDate(), 0, 10) . "</td>";
        $html .= "<td class='kb-table-cell'>" . substr($contract->getEndDate(), 0, 10) . "</td>";
        $html .= '<td class="kb-table-cell" align="center" width="70"><a href="' . edkuri::build(array(array('ctr_id', $contract->getID(), false), array('op', 'edit', false))) . '">Edit</a></td><td align="center"><a href="' . edkuri::build(array(array('ctr_id', $contract->getID(), false), array('op', 'del', false))) . '">Delete</a></td>';
        $html .= "</tr>";
    }
    if ($list->getCount() > 0) {
        $html .= "</table><br />";
    }
    if ($list->getCount() > 10) {
        $html .= '[<a href="' . edkuri::build(array('op', 'add', false)) . '">Add</a>]';
    }
Example #28
0
<?php

// index.php
require $_SERVER['DOCUMENT_ROOT'] . '/hangee/m/lib/__core.php';
$page = new Page();
$page->setTitle('HanGEE::Study');
$page->setMaster('m');
$page->setScript('/hangee/m/study.js');
ob_start();
?>


<?php 
$page->setContent(ob_get_contents());
ob_clean();
$page->render();
Example #29
0
<?php

require 'framework/inc.php';
Page::setTitle('Mailbox');
Page::css('inspinia/plugins/summernote/summernote');
Page::css('inspinia/plugins/summernote/summernote-bs3');
Page::css('inspinia/plugins/chosen/chosen');
Page::js('inspinia/angular.min');
Page::js('inspinia/angular-route.min');
Page::js('inspinia/plugins/summernote/summernote.min');
Page::js('inspinia/plugins/chosen/chosen.jquery');
Page::js('inspinia/jquery-ui-1.10.4.min');
Page::js('mailbox');
?>

<br />
<div id="mailbox" ng-app="mailbox">
	<div class="sk-spinner sk-spinner-three-bounce" ng-hide="loaded">
        <div class="sk-bounce1"></div>
        <div class="sk-bounce2"></div>
        <div class="sk-bounce3"></div>
    </div>

    <div class="col-lg-3">
        <div class="ibox float-e-margins">
            <div class="ibox-content mailbox-content">
                <div class="file-manager">
                    <a class="btn btn-block btn-primary compose-mail" href="#/compose"><i class="fa fa-paper-plane-o"></i> Compose Mail</a>
                    <div class="space-25"></div>
                    <h5>Folders</h5>
                    <ul class="folder-list m-b-md" style="padding: 0">
Example #30
0
<?php

require_once '../core/init.php';
$page = new Page();
$page->setTitle('Dashboard');
$page->startBody();
?>

  <!-- BODY CONTENT -->
  <?php 
if (Session::exists('home')) {
    echo '<p>' . Session::flash('home') . '</p>';
}
$user = new User();
if ($user->isLoggedIn()) {
    $data = $user->data();
    ?>

  <div class="page-header">
    <h1>Dashboard <small>Welcome, <a href="profile.php?user=<?php 
    echo escape($user->data()->username);
    ?>
"><?php 
    echo escape($user->data()->username);
    ?>
</a>!</small></h1>
  </div>
  <p>Welcome, <a href="profile.php?user=<?php 
    echo escape($user->data()->username);
    ?>
"><?php