예제 #1
0
파일: PDebug.php 프로젝트: nickeo/Dolphin
$topicId = ($postId != 0) ? $postId : $articleId;
$parentId = ($postId == 0) ? $postId : $articleId;

// db -table and stored procedure
$tblTopic = DBT_Topic;
$spGetTopicAndAttachment = DBSP_PGetTopicAndAttachment;
// path to javascript
$javaPath = WS_JAVASCRIPT;

$attachedFile = "";
//---------------------------------------------------------------------------------------------
//
//   creating necessary objects
//

$artNav = new CNavigation();
$articleNav = $artNav->CreateLinksToArticles();
$pc = new CPageController();


//---------------------------------------------------------------------------------------------
//
//	preparing and performing query
//


//checking if quering is needed
if($newtopic == 'newtopic') {
	$parentId = $articleId;
	$articleId = 0;
	$topicId = 0;
예제 #2
0
//---------------------------------------------------------------------------------------------
//
//	taking care of get variables
//

$articleId = isset($_GET['articleId']) ? $_GET['articleId'] : 0;
$idUser = isset($_SESSION['idUser']) ? $_SESSION['idUser'] : '';

$spPDisplayArticle = DBSP_PDisplayArticle;

//---------------------------------------------------------------------------------------------
//
//   creating necessary objects
//

$artNav = new CNavigation();
$db = new CDatabaseController();
$queryObject = new CSQL();
$pc = new CPageController();

//---------------------------------------------------------------------------------------------
//
//   preparing and performing query
//


$result = ARRAY();
$query = "call {$spPDisplayArticle}(@pGrantRights, {$articleId}, {$idUser}); SELECT @pGrantRights AS editArticle;";
$mysqli = $db->connectToDatabase();
$res = $db->performDirectMultiQuery($query);
$db->getAndStoreResults($result);
예제 #3
0
if(!$frontDoor) 
	die('No direct access to pagecontroller allowed!');

$iFilter = new CInterceptionFilter();
$iFilter->FrontControllerIsVisited();
$iFilter->UserLoginStatus();
//$iFilter->UserGroupStatus();

//---------------------------------------------------------------------------------------------
//
//	creating objects
//

$pc = new CPageController();
$nav = new CNavigation();

//---------------------------------------------------------------------------------------------
//
//	taking care of variables
//

$accountUser = $pc->SESSIONIsSetOrSetDefault('accountUser');
$idUser = $pc->SESSIONIsSetOrSetDefault('idUser');
$uniqueName = $pc->GETIsSetOrSetDefault('uniquename');
$navSet = $pc->GETIsSetOrSetDefault('p');
$spGetFileDetails = DBSP_PGetFileDetails;

global $gModule;

// -------------------------------------------------------------------------------------------
예제 #4
0
파일: config.php 프로젝트: Hannesalm/oophp
include "./../src/CNavigation.php";
/**
 * Start the session.
 *
 */
session_name(preg_replace('/[^a-z\\d]/i', '', __DIR__));
session_start();
/**
 * Create the Orange variable.
 *
 */
$Orange = array();
$Orange['lang'] = 'sv';
$Orange['title_append'] = ' | Orange min webbtemplate';
$menu = array('startsida' => array('text' => 'Startsida', 'url' => 'me.php'), 'redovisning' => array('text' => 'Redovisning', 'url' => 'redovisning.php'), 'kallkod' => array('text' => 'Källkod', 'url' => 'scource.php'), 'calender' => array('text' => 'Kalender', 'url' => 'calender.php'), 'movie' => array('text' => 'Movie', 'url' => 'movie.php'));
$Orange['navbar'] = CNavigation::generateMenu($menu);
$Orange['header'] = <<<EOD
<img class='sitelogo' src='./../img/orangeLogo.png' alt='Orange Logo'/>
<span class='sitetitle'>Orange webbtemplate</span>
<span class='siteslogan'>Återanvändbar modul för webbutveckling med PHP</span>
EOD;
$Orange['footer'] = <<<EOD
<footer>
    <span class='sitefooter'>Copyright (c) Hannes Alm (hannes@almar.se)</span>
    <div class='icons'>
    <a href='http://validator.w3.org/check/referer'><img title='HTML5' src='./../img/html5Flat.png' alt='HTML5'/></a>
    <a href='http://jigsaw.w3.org/css-validator/check/referer'><img title='CSS3'src='./../img/cssFlat.png' alt='CSS'/></a>
    <a href='http://validator.w3.org/unicorn/check?ucn_uri=referer&ucn_task=conformance'><img title='UNICORN' src='./../img/w3Flat.png' alt='UNICORN'/></a>
    <a href='#'><img title='Facebookpage' src='./../img/facebookFlat.png' alt='FACEBOOK'/></a>
    <a href='#'><img title='GITHUB' src='./../img/gitFlat.png' alt='GITHUB'/></a>
<div>
예제 #5
0
$user = isset($_SESSION['accountUser']) ? $_SESSION['accountUser'] : '';
$idUser = isset($_SESSION['idUser']) ? $_SESSION['idUser'] : '';

if($articleList == "all") {
	$headline = "Artiklar i Dolphins arkiv";
} else {
	$headline = "Mina artiklar";
}

//---------------------------------------------------------------------------------------------
//
//   creating necessary objects
//

$artNav = new CNavigation();
$articleNav = $artNav->articleNavigation();
$db = new CDatabaseController();
$queryObject = new CSQL();


//---------------------------------------------------------------------------------------------
//
//   preparing and performing query
//

$query = "call PListArticles({$idUser}, '{$articleList}');";
$mysqli = $db->connectToDatabase();
$res = $db->performDirectQuery($query);

//---------------------------------------------------------------------------------------------
예제 #6
0
파일: PHome.php 프로젝트: nickeo/Dolphin
if(!$frontDoor) 
	die('No direct access to pagecontroller allowed!');

$iFilter = new CInterceptionFilter();
$iFilter->FrontControllerIsVisited();
//$iFilter->UserLoginStatus();
//$iFilter->UserGroupStatus();

//---------------------------------------------------------------------------------------------
//
//	creating objects
//

$pc = new CPageController();
$nav = new CNavigation();

//---------------------------------------------------------------------------------------------
//
//    the content of the page
//

$subHeadline ="Undermeny";

$subNavigation = ARRAY (
	'Länk 1' => '?p=home',
	'Länk 2' => '?p=hom',
	'Länk 3' => '?p=home',
	'Länk 4' => '?p=home'
	);
예제 #7
0
}
?>
    

</head>
<body>
  <div id='wrapper'>
    <div id='header'><?php 
echo $header;
?>
</div>
        <?php 
if (isset($navbar)) {
    ?>
        <?php 
    echo CNavigation::GenerateMenu($navbar, 'navbar');
}
?>

    <div id='main'><?php 
echo $main;
?>
</div>
    <div id='footer'><?php 
echo $footer;
?>
</div>

  </div>
</body>
</html>
예제 #8
0
파일: index.php 프로젝트: eddietaube/Elf
<?php

include __DIR__ . '/config.php';
$elf['title'] = "Hello World";
$elf['header'] = "<img class='sitelogo' src='img/elf.png' alt='elf Logo'/>" . CNavigation::GenerateMenu($menu);
$elf['main'] = "";
$elf['header'] .= <<<EOD
\t<hr /> 
\t 
\t
\t<span class='sitetitle'>Elf webbtemplate</span>
\t<span class='siteslogan'>Återanvändbara moduler för webbutveckling med PHP</span>
\t 
EOD;
if (isset($_GET["p"])) {
    $page = $_GET["p"];
    switch ($page) {
        case 'your page':
            include "yourpage.php";
            break;
        default:
            include "example.php";
            break;
    }
} else {
    include "example.php";
}
$elf['footer'] = <<<EOD
 <footer>
<div class="container">
<span class='sitefooter'> <a href='https://github.com/edtau/Elf.git'>ELF på github</a> | <a href='http://validator.w3.org/unicorn/check?ucn_uri=referer&amp;ucn_task=conformance'>Unicorn</a></span>
예제 #9
0
파일: new.php 프로젝트: blaizeliebs/synx
<?php

include 'inc/upconfig.php';
include 'inc/functions.php';
include 'nav.php';
echo CNavigation::GenerateMenu($menu);
// Create connection
$link = mysqli_connect($db_host, $db_user, $db_pass, $db_name);
// Check connection
if (!$link) {
    die("Connection failed: " . mysqli_connect_error());
}
$servername = mysqli_real_escape_string($link, $_REQUEST['servername']);
$ip = mysqli_real_escape_string($link, $_REQUEST['ip']);
$company = mysqli_real_escape_string($link, $_REQUEST['company']);
$pass = mysqli_real_escape_string($link, $_REQUEST['pass']);
//$OS = mysqli_real_escape_string($link, $_POST['OS']);
//$lsbresult   = array();
//$lsbcmd    = exec("ssh root@$ip 'lsb_release -as'",$lsbresult );
//print_r(exec("ssh root@$ip 'lsb_release -as'",$lsbresult ));
//$response = array();
//print_r($lsbresult);
@(list($OS, $version, $releasever) = getOS($pass));
//if(!empty($lsbresult)) {
//	$OS        = $lsbresult[0];
//	$version  = $lsbresult[3];
//	$releasever = $lsbresult[2];
//}
//$version = mysqli_real_escape_string($link, $_POST['version']);
$description = mysqli_real_escape_string($link, $_POST['description']);
$sql = "INSERT INTO servers (servername,ip,company,OS,version,description,releasever) VALUES ('{$servername}','{$ip}','{$company}','{$OS}','{$version}','{$description}','{$releasever}')";
예제 #10
0
<?php

function setActive($items)
{
    $ref = isset($_GET['p']) && isset($items[$_GET['p']]) ? $_GET['p'] : null;
    if ($ref) {
        $items[$ref]['class'] .= 'activeNav';
    }
    return $items;
}
$menu = array('callback' => 'setActive', 'items' => array('about' => array('text' => 'Om mig', 'url' => '?p=about', 'class' => null), 'dice' => array('text' => 'Tärningar', 'url' => '?p=dice', 'class' => null), 'slideshow' => array('text' => 'Bildspel', 'url' => '?p=slideshow', 'class' => null), 'code' => array('text' => 'Källkod', 'url' => '?p=code', 'class' => null), 'desc' => array('text' => 'Redovisningar', 'url' => '?p=desc', 'class' => null)));
//menu to display
$nav = CNavigation::GenerateMenu("navmenu", $menu);
$urbax['nav'] = $nav;
//content to show
if (!isset($_GET['p'])) {
    header("location:?p=about");
} else {
    switch ($_GET['p']) {
        case "about":
            $file = "aboutme.php";
            $urbax['title'] = "Om mig";
            break;
        case "dice":
            $file = "dice.php";
            $urbax['title'] = "Kasta tärning";
            break;
        case "slideshow":
            $file = "slideshow.php";
            $urbax['title'] = "Visa bildspel";
            break;
예제 #11
0
//
//    error reporting on
//
error_reporting(E_ALL);

//---------------------------------------------------------------------------------------------
//
//	creating object
//
//$redirect = isset($_SESSION['redirect']) ? $_SESSION['redirect'] : '';

//$pc = newCPageController;
// $redirect = $pc->SESSIONIsSetOrSetDefault('history2');

$pc = new CPageController();
$nav = new CNavigation();
//---------------------------------------------------------------------------------------------
//
//    taking care of variables
//

$userId = $_SESSION['idUser'];

$errorMessage = isset($_SESSION['errorMessage']) ? $_SESSION['errorMessage'] : "";

//---------------------------------------------------------------------------------------------
//
//    preparing and performing query
//

$result = ARRAY();
예제 #12
0
foreach ($stylesheets as $val) {
    ?>
<link rel='stylesheet' type='text/css' href='<?php 
    echo $val;
    ?>
'/>
<?php 
}
?>
</head>
<body>
    <div id='wrapper'>
        <div id='header'><?php 
echo $header;
?>
</div>
        <?php 
echo CNavigation::GenerateMenu($menu, "navbar");
?>
        <div id='main'><?php 
echo $main;
?>
</div>
        <div id='footer'><?php 
echo $footer;
?>
</div>
    </div>
</body>
</html>