示例#1
0
function makePage($pageName)
{
    global $pages;
    foreach ($pages as $page) {
        if ($page["name"] == $pageName) {
            makeHead($page);
            if ($page["name"] != "intro") {
                echo '
						<body>
						<div class="mainBlock">
					';
                makeHeader($page);
                makeMenu($page);
                makeNavigation($page);
                echo '
						</div>
						</body>
					';
            } else {
                makeNavigation($page);
            }
            makeScripts($page);
        }
    }
}
示例#2
0
 public static function getMenusList()
 {
     if (ipGetOption('AsdMenuWidget.multilanguage') == 'Yes') {
         $multilanguage = null;
     } else {
         $languageCode = ipContent()->getCurrentLanguage()->code;
         $multilanguage = "`languageCode` = '{$languageCode}' AND";
     }
     $table = ipTable('page');
     $sql = "SELECT `title`, `alias`, `languageCode`, `parentId`, `id` FROM {$table} WHERE {$multilanguage} `isVisible` = 1 AND `isDeleted` = 0 ORDER BY `languageCode` ASC, `title` ASC";
     $results = ipDb()->fetchAll($sql);
     foreach ($results as $result) {
         $allPages[$result['parentId']][$result['id']] = $result;
     }
     $returnData = makeMenu(0, $allPages, 0, $multilanguage);
     return $returnData;
 }
示例#3
0
<?php

require 'header.part.php';
?>
<!-- on inclue notre header pour ne pas avoir à le remodifier sur chaque page,
pareil plus bas avec le footer -->
<h1>G font dummy switcher</h1>

<menu>
	<!-- la fonction qui génère notre menu -->
	<?php 
makeMenu();
?>
</menu>


<div class="copy">
	<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. 
	A consequatur soluta, officiis provident ab nobis maxime
	aperiam dignissimos laudantium maiores dicta quo temporibus 
	asperiores, vitae iure? Eveniet maxime earum, voluptas.</p>
</div>

<?php 
require 'footer.part.php';
示例#4
0
 public function __construct()
 {
     // Construct a different html for ingame and the out-of-game browser.
     global $IGB;
     global $VERSION;
     global $MySelf;
     global $TIDY_ENABLE;
     global $width;
     global $URL;
     global $IGB_VISUAL;
     // Enable tidy, if we want to.
     $this->useTidy = $TIDY_ENABLE;
     // In case we are not logged in, or the object does not exist yet.
     if (!is_object($MySelf)) {
         $MySelf = new user(false, false);
     }
     if ($IGB && $IGB_VISUAL) {
         // Use IGB, set header and footer.
         $this->isIGB = true;
         //			$this->header = file_get_contents('./include/ingame/igb-header.txt');
         $this->header = file_get_contents('./include/ingame/igb-header.php');
         if ($MySelf->isValid()) {
             $this->header .= makeMenu();
             $this->header = str_replace("%%RANK%%", $MySelf->getRankName(), $this->header);
             $this->header = str_replace("%%CREDITS%%", number_format(getCredits($MySelf->getID()), 2) . " ISK", $this->header);
             $this->header = str_replace("%%USERNAME%%", ucfirst($MySelf->getUsername()), $this->header);
         }
         $this->header = str_replace("%%SITENAME%%", getConfig("sitename"), $this->header);
         //			$this->footer = file_get_contents('./include/ingame/igb-footer.txt');
         $this->footer = file_get_contents('./include/ingame/igb-footer.php');
         $this->footer = str_replace("%%VERSION%%", $VERSION, $this->footer);
     } else {
         // Use normal browser.
         $this->isIGB = false;
         if ($MySelf->isValid() == 1) {
             //				$this->header = file_get_contents('./include/html/header.txt');
             $this->header = file_get_contents('./include/html/header.php');
         } else {
             //				$this->header = file_get_contents('./include/html/header-notloggedin.txt');
             $this->header = file_get_contents('./include/html/header-notloggedin.php');
         }
         //			$this->footer = file_get_contents('./include/html/footer.txt');
         $domainroot = $_SERVER['HTTP_HOST'];
         // Add page footer
         // use proper footer for sponcered sites.
         if ($domainroot == "miningbuddy.us" or $domainroot == "miningbuddy.de" or $domainroot == "miningbuddy.net") {
             $this->footer = file_get_contents('./include/html/mbh-footer.php');
         } else {
             $this->footer = file_get_contents('./include/html/footer.php');
         }
         // Generate the images.
         $mainLogo = new graphic("title");
         $mainLogo->setText(getConfig("sitename"));
         $mainLogo->setBGColor("2D2D37");
         // this is here to retain some code. Image caching seemed to be pretty useless.
         $imageCaching = false;
         if ($imageCaching) {
             $loginLogo = new graphic("standard");
             $loginLogo->setText(ucfirst($MySelf->getUsername()));
             $loginLogo->setBGColor("2D2D37");
             $loginLogo->setPrefixed(false);
             $versionLogo = new graphic("long");
             $versionLogo->setText($VERSION);
             $versionLogo->setBGColor("2D2D37");
             $versionLogo->setPrefixed(false);
             $rankLogo = new graphic("standard");
             $rankLogo->setText($MySelf->getRankName());
             $rankLogo->setBGColor("2D2D37");
             $rankLogo->setPrefixed(false);
             $moneyLogo = new graphic("standard");
             $moneyLogo->setText(number_format(getCredits($MySelf->getID()), 2) . " ISK");
             $moneyLogo->setDirect(true);
             $moneyLogo->setBGColor("2D2D37");
             $moneyLogo->setPrefixed(false);
         }
         // Replace variables in the header.
         $this->header = str_replace("%%SITENAME%%", getConfig("sitename") . " - " . $VERSION, $this->header);
         $this->header = makeMenu($this->header);
         $thisCharacterID = "";
         if ($MySelf->isValid()) {
             $api = new api($MySelf->getID());
             $thisCharacterID = $api->getCharacterID();
         }
         if ($thisCharacterID == "") {
             $this->header = str_replace("%%PILOT64%%", "", $this->header);
         } else {
             $this->header = str_replace("%%PILOT64%%", "<img width='64' height='64' align='left' src='https://image.eveonline.com/Character/" . $api->getCharacterID() . "_64.jpg' />", $this->header);
         }
         $this->header = str_replace("%%LOGO%%", $mainLogo->render(), $this->header);
         if ($imageCaching) {
             $this->header = str_replace("%%LOGGEDIN%%", $loginLogo->render(), $this->header);
             //
             $this->header = str_replace("%%RANK%%", $rankLogo->render(), $this->header);
             $this->header = str_replace("%%CREDITS%%", $moneyLogo->render(), $this->header);
             $this->footer = str_replace("%%IMG%%", $versionLogo->render(), $this->footer);
         } else {
             $this->header = str_replace("%%LOGGEDIN%%", "&nbsp;&nbsp;" . ucfirst($MySelf->getUsername()), $this->header);
             $this->header = str_replace("%%RANK%%", "&nbsp;&nbsp;" . $MySelf->getRankName(), $this->header);
             $this->header = str_replace("%%CREDITS%%", "&nbsp;&nbsp;" . number_format(getCredits($MySelf->getID()), 2) . " ISK", $this->header);
             $this->footer = str_replace("%%IMG%%", $VERSION, $this->footer);
         }
         $this->header = str_replace("%%USERNAME%%", ucfirst($MySelf->getUsername()), $this->header);
         $this->header = str_replace("%%URL%%", $URL, $this->header);
     }
     $this->header = str_replace("%%VERSION%%", $VERSION, $this->header);
     $this->header .= "<!--header ends here-->";
     $this->footer = "<!--footer starts here-->" . $this->footer;
 }
示例#5
0
}
?>
 
<html>
<head>
  <title></title>
  <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
  <meta name="GENERATOR" content="Quanta Plus">
  <link rel="stylesheet" href="libs/estilos.css" type="text/css" media="all">
   <link rel="stylesheet" href="libs/menuw.css" type="text/css" media="all">
  <SCRIPT LANGUAGE="JavaScript" SRC="libs/menuw.js"></SCRIPT>
  <script language="JavaScript" src="libs/funcoes.js"></script>
</head>
<body bgcolor="#cccccc" oncontextmenu="menu_dir(event.clientY,event.clientX,event);return false">
 <?php 
makeMenu($_SESSION["usu_id"], $_SESSION["usu_modulo"]);
?>
  <table>
     <tr height="40"><td>&nbsp;</td></tr>
  </table>
<center>
  <form action="" method="post" name="form1" onsubmit="return chknulo(this)">
   <table>
	     <tr>
		    <td>
			   <b>Módulo:</b>
		    </td>
		    <td>
			<?php 
$sqlusu = "select mod_id,mod_nome from sis_modulos order by mod_nome;";
frm_select($sqlusu, "nnulo", "Modulo", "cbomod_id", false);
示例#6
0
            <div class="wrapper">
                <header role="banner" class="page-header__box clearfix">
                    <div class="site-title"><a href="https://github.com/MichaelvanLaar/Website-Template-Starting-Point/">Website Template Starting Point&nbsp;3.3.3</a></div>
                </header> <!-- end of .page-header__box -->
            </div> <!-- end of .wrapper -->
        </div> <!-- end of .page-header -->


        <div class="[ main-navigation  js-main-navigation ]  clearfix">
            <div class="wrapper">
                <a href="#"><img src="media/common/wtsp-logo.png" width="50" height="50" alt="WTSP" class="main-navigation__logo"></a>
                <nav id="main-navigation" class="[ main-navigation__box  js-main-navigation__box ]  clearfix">
                    <div class="main-navigation__toggle  js-main-navigation__toggle">Navigation</div>
                    <!-- PLEASE NOTE: Classes and styling of the main navigation don’t follow
                         BEM-like naming conventions – with intent to be easily applicable to
                         almost any HTML code produced by a CMS. -->
                    <?php 
$posts = dirToArray("posts");
echo makeMenu($posts, 4, "blog", true);
?>
                </nav> <!-- end of .main-navigation__box -->
            </div> <!-- end of .wrapper -->
        </div> <!-- end of .page-main-navigation -->





        <div class="main-container clearfix">
            <div class="wrapper">
示例#7
0
<?
	include("includes.inc.php");
	ob_start();
	initSession();
	$menu=makeMenu();
		
	showPage(getPageID());
?>
示例#8
0
function anmelden()
{
    ini_set("gc_maxlifetime", "3600");
    global $ERPNAME;
    // ! das funzt nicht mit $_SESSION[ERPNAME] weil die Session in loginok.php zerstört wird...
    global $erpConfigFile;
    //Konfigurationsfile der ERP einlesen
    $deep = is_dir("../" . $ERPNAME) ? "../" : "../../";
    // anmelden() aus einem Unterverzeichnis
    if (file_exists($deep . $ERPNAME . "/config/" . $erpConfigFile . ".conf")) {
        $lxo = fopen($deep . $ERPNAME . "/config/" . $erpConfigFile . ".conf", "r");
    } else {
        if (file_exists($deep . $ERPNAME . "/config/" . $erpConfigFile . ".conf.default")) {
            $lxo = fopen($deep . $ERPNAME . "/config/" . $erpConfigFile . ".conf.default", "r");
        } else {
            return false;
        }
    }
    $dbsec = false;
    $tmp = fgets($lxo, 512);
    //Parameter für die Auth-DB in der ERP-Konfiguration finden
    while (!feof($lxo)) {
        if (preg_match("/^[\\s]*#/", $tmp) || $tmp == "\n") {
            //Kommentar, ueberlesen
            $tmp = fgets($lxo, 512);
            continue;
        }
        if ($dbsec && preg_match("!\\[.+]!", $tmp)) {
            $dbsec = false;
        }
        if ($dbsec) {
            if (preg_match("/db[ ]*=[ ]*(.+)/", $tmp, $hits)) {
                $dbname = $hits[1];
            }
            if (preg_match("/password[ ]*=[ ]*(.+)/", $tmp, $hits)) {
                $dbpasswd = $hits[1];
            }
            if (preg_match("/user[ ]*=[ ]*(.+)/", $tmp, $hits)) {
                $dbuser = $hits[1];
            }
            if (preg_match("/host[ ]*=[ ]*(.+)/", $tmp, $hits)) {
                $dbhost = $hits[1] ? $hits[1] : "localhost";
            }
            if (preg_match("/port[ ]*=[ ]*([0-9]+)/", $tmp, $hits)) {
                $dbport = $hits[1] ? $hits[1] : "5432";
            }
            if (preg_match("/\\[[a-z]+/", $tmp)) {
                $dbsec = false;
            }
            $tmp = fgets($lxo, 512);
            continue;
        }
        if (preg_match("/cookie_name[ ]*=[ ]*(.+)/", $tmp, $hits)) {
            $cookiename = $hits[1];
        }
        //if ( preg_match("/dbcharset[ ]*=[ ]*(.+)/",$tmp,$hits) )   $dbcharset = $hits[1];
        if (preg_match("/session_timeout[ ]*=[ ]*(.+)/", $tmp, $hits)) {
            $sesstime = $hits[1];
        }
        if (preg_match("!\\[authentication/database\\]!", $tmp)) {
            $dbsec = true;
        }
        $tmp = fgets($lxo, 512);
    }
    if (!$cookiename) {
        $cookiename = $_SESSION['erpConfigFile'] . '_session_id';
    }
    if (!$sesstime) {
        $sesstime = 480;
    }
    fclose($lxo);
    $cookie = $_COOKIE[$cookiename];
    if (!$cookie) {
        header("location: ups.html");
    }
    // Benutzer anmelden
    error_log("!{$ERPNAME}!{$dbhost},{$dbport},{$dbuser},{$dbpasswd},{$dbname},{$cookie}!", 0);
    $auth = authuser($dbhost, $dbport, $dbuser, $dbpasswd, $dbname, $cookie);
    if (!$auth) {
        return false;
    }
    // Anmeldung des Users fehlgeschlagen
    chkdir($auth["dbname"]);
    // gibt es unter dokumente ein Verzeichnis mit dem Instanznamen
    chkdir($auth["dbname"] . '/tmp/');
    foreach ($auth as $key => $val) {
        $_SESSION[$key] = $val;
    }
    // Mandanten + Userdaten in Session speichern
    $_SESSION["sessid"] = $cookie;
    $_SESSION["cookie"] = $cookiename;
    $_SESSION["sesstime"] = $sesstime;
    // Mit der Mandanten-DB verbinden
    $_SESSION["db"] = new myDB($_SESSION["dbhost"], $_SESSION["dbuser"], $_SESSION["dbpasswd"], $_SESSION["dbname"], $_SESSION["dbport"]);
    if (!$_SESSION["db"]) {
        return false;
    } else {
        $_SESSION['CRMTL'] = $auth['CRMTL'];
        $charset = ini_get("default_charset");
        //if ( $charset == "" ) $charset = $dbcharset;
        if ($charset == "") {
            $charset = 'UTF8';
        }
        $_SESSION["charset"] = $charset;
        include_once "inc/UserLib.php";
        $user_data = getUserStamm(0, $_SESSION["login"]);
        $BaseUrl = empty($_SERVER['HTTPS']) ? 'http://' : 'https://';
        $BaseUrl .= $_SERVER['HTTP_HOST'];
        $BaseUrl .= preg_replace("^crm/.*^", "", $_SERVER['REQUEST_URI']);
        if ($user_data) {
            foreach ($user_data as $key => $val) {
                $_SESSION[$key] = $val;
            }
        }
        if (isset($_SESSION['sql_error']) && $_SESSION['sql_error']) {
            $_SESSION['db']->setShowError(true);
        } else {
            $_SESSION['db']->setShowError(false);
        }
        $_SESSION['dir_mode'] = $user_data['dir_mode'] != '' ? octdec($user_data['dir_mode']) : 493;
        // 0755
        $_SESSION["loginCRM"] = $user_data["id"];
        $_SESSION['theme'] = $user_data['theme'] == '' || $user_data['theme'] == 'base' ? '' : $user_data['theme'];
        $sql = "SELECT  * from schema_info where tag like 'relea%' order by itime desc limit 1";
        $rs = $_SESSION["db"]->getOne($sql);
        $tmp = substr($rs['tag'], 8);
        $_SESSION["ERPver"] = strtr($tmp, '_', '.');
        $_SESSION["menu"] = makeMenu($_SESSION["sessid"], $_SESSION["token"]);
        $_SESSION["basepath"] = $BaseUrl;
        $_SESSION['token'] = False;
        return true;
    }
}