Skip to content

Commit

Permalink
Lalala
Browse files Browse the repository at this point in the history
  • Loading branch information
jfeedas committed Dec 6, 2011
1 parent 8edd29d commit 24e2130
Show file tree
Hide file tree
Showing 11 changed files with 253 additions and 3 deletions.
36 changes: 36 additions & 0 deletions AjaxActions/User/PadaliniuIrIsTavarkymas.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<?php

session_start();
include("../../Includes.php");

if(ErrorMessages::isErrors()){
p(ErrorMessages::getErrors());
}

$login = new Session();

if(!$login->isLogedin()){
die("You must loged in!");
}

if(isset($_GET['tipas']) && !empty($_GET['tipas'])){
$tipas = $_GET['tipas'];
}else{
die("Nepaskirtas tipas!!");
}

if(isset($_GET['id']) && !empty($_GET['id'])){
$id = $_GET['id'];
}else{
die("Nepaskirtas ID!!");
}

$men = OrganizacijosPrognozes::getPrognozuojamiMenesiai();

if($tipas == "IS"){
echo "Tinkamiausia atnaujinti IS: ".$men[OrganizacijosPrognozes::getTinkamiausiasLaikasIsAtnaujimui($id)];
}else{
echo "Tinkamiausias laikas padalinio kvalifikacijai kelti: ".$men[OrganizacijosPrognozes::getTinkamiausiasLaikasPadalinioKvalifikacijai($id)]; //."\nTinkamiausias laikas padaliniui remontuoti: ".$men[OrganizacijosPrognozes::getTinkamiausiasLaikasPadalinioRemontui($id)];
}

?>
9 changes: 9 additions & 0 deletions ContentManager/Managers/ManageAdmin.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,10 @@ public function prognozes(){
$page = new AdminPage();
$panel = new Prognozes();
$panel1 = new Lenteles();
$panel2 = new TvarkymoPrognozavimas();
$page->addToContainer(1, $panel1->getHtml());
$page->addToContainer(2, $panel->getHTML());
$page->addToContainer(2, $panel2->getHtml());
$page->pagePrint();
}

Expand All @@ -60,6 +62,13 @@ public function add_var(){
$page->pagePrint();
}

public function laikas(){
$page = new AdminPage();
$panel = new TvarkymoPrognozavimas();
$page->addToContainer(2, $panel->getHtml());
$page->pagePrint();
}

public function login(){
$manager = new ManageHome("login", false);
$manager->login();
Expand Down
5 changes: 5 additions & 0 deletions ContentManager/Managers/ManageHome.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,11 @@ public function prognozes(){
$page->pagePrint();
}

public function laikas(){
$page = new Page();
$page->pagePrint();
}

public function login(){
$page = new Login();
$page->pagePrint();
Expand Down
59 changes: 59 additions & 0 deletions Design/Laikas.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta name="keywords" content="" />
<meta name="description" content="" />
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>Ataskaita 1</title>
<link href="style.css" rel="stylesheet" type="text/css" media="screen" />
</head>
<body>
<div id="wrapper">
<div id="header" class="container">
<div id="menu">
<ul>
<li class="current_page_item"><a href="#">Duomenų analizė</a></li>
<li><a href="#">Prognozės</a></li>
<li><a href="#">Atsijungti</a></li>
<li><a href="#">Pagalba</a></li>
</ul>
</div>
</div>
<!-- end #header -->
<div id="page" class="container">
<div id="content">
<div class="post">
<div class="dropDownMenu">
<p class="dropDownVisualButton">Param Priemone</p>
<ul class="dropDownButtons">
<li>Paramos priemones 1</li>
<li>Paramos priemones 2</li>
<li>Paramos priemones 3</li>
</ul>
</div>
</div>
<div style="clear: both;">&nbsp;</div>
</div>
<!-- end #content -->
<div id="sidebar">
<ul>
<li>
<h2>Ataskaitą pagal:</h2>
<ul style="font-size:10px;">
<li><a href="#">Informacine sistema</a></li>
<li><a href="#">padalini</a></li>
</ul>
</li>
</ul>
</div>
<!-- end #sidebar -->
<div style="clear: both;">&nbsp;</div>
</div>
<!-- end #page -->
</div>
<div id="footer">
<p>Copyright (c) 2011. All rights reserved.</p>
</div>
<!-- end #footer -->
</body>
</html>
2 changes: 1 addition & 1 deletion Design/Login.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
</head>
<body>
<div id="wrapper">
<div id="header" class="container" style="padding-bottom:50px">
<div id="header" class="container" style="padding-bottom:50px; height:200px;">
<div id="logo">
<h1><a href="#">PPOS</a></h1>
<p>Paramos priemonių organizavimo sistema</p>
Expand Down
51 changes: 50 additions & 1 deletion Design/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,6 @@ a:hover {
#sidebar li li {
line-height: 35px;
border-bottom: 1px dotted #E7E2DC;
background: url(images/img02.jpg) no-repeat left 15px;
margin: 0px 30px;
border-left: none;
}
Expand Down Expand Up @@ -627,4 +626,54 @@ div.hintPanel{
font-size: 12px;
line-height: 10px;

}

.dropDownMenu{
border-style: solid;
border-color: black;
border-width: 1px;
width:200px;
position:static;
background-color:white;
padding-left: 10px;
padding-right: 10px;
padding-top: 5px;
padding-bottom: 5px;
margin-left: 20px;
}

.dropDownButtons{
display: none;
list-style-type:none !important;
padding-left: 0px;
padding-bottom: 0px !important;
}

.dropDownButtons > li{
margin-left: 0px !important;
margin-right: 0px !important;
border:none !important;
line-height: 25px !important;
font-size: 11px;
}

.dropDownButtons > li:hover{
background-color:#CA4C44 !important;
color:white !important;
cursor:pointer !important;
}

.dropDownVisualButton{
text-align:center !important;
margin-bottom: 0px;
padding-bottom: 0px !important;
padding-top: 0px !important;
padding-left: 0px !important;
padding-right: 0px !important;
}

#messageTvarkymui{
font-size:10px;
margin-top:15px !important;
padding-left: 20px !important;
}
30 changes: 30 additions & 0 deletions JS/functions.js
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,36 @@ function zoomOut(chartType){

function ready() {

$(".dropDownMenu").live("mouseover", function(){
$(this).css("position", "absolute");
var kids = $(this).children();
$(kids[1]).css("display", "block");
});

$(".dropDownMenu").live("mouseout", function(){
var kids = $(this).children();
$(kids[1]).css("display", "none");
$(this).css("position", "static");
});

$(".dropDownButtons > li").click(function(){
var text = $(this).text();
var dropbox = $(this).parent().parent();
var kids = $(dropbox).children();
var tipas = $(dropbox).attr("tipas");
var id = $(this).attr("objectid");
$(kids[0]).text(text);
$(kids[1]).css("display", "none");
$(dropbox).css("position", "static");
$("#messageTvarkymui").text("Prašome palaukti...");
$.ajax({
url: "AjaxActions/User/PadaliniuIrIsTavarkymas.php?tipas=" + tipas + "&id=" + id,
success: function(data){
$("#messageTvarkymui").text(data);
}
});
});

$("#menu a").live("mouseenter", function(){
var hintas = $(this).attr("hintas");
$("#hint").text(hintas);
Expand Down
2 changes: 1 addition & 1 deletion WebObjects/Login.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public function pagePrint(){
</head>
<body>
<div id="wrapper">
<div id="header" class="container" style="padding-bottom:50px">
<div id="header" class="container" style="padding-bottom:50px; height:200px;">
<div id="logo">
<h1><a href="#">PPOS</a></h1>
<p>Paramos priemonių organizavimo sistema</p>
Expand Down
56 changes: 56 additions & 0 deletions WebObjects/Panels/Left/TvarkymoPrognozavimas.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
<?php

class TvarkymoPrognozavimas extends MainPanel{

private $padaliniai = "";
private $infSystemos = "";

public function __construct(){
$this->getPadaliniai();
$this->getInfSystemos();
}

public function getPadaliniai(){
$padaliniai = Padaliniai::select("1");
foreach($padaliniai as $padId){
$padalinys = new Padaliniai($padId);
$this->padaliniai .= "<li objectid='".$padalinys->getId()."'>".$padalinys->getPavadinimas()."</li>";
}
}

public function getInfSystemos(){
$infSystemos = IS::select("1");
foreach($infSystemos as $infSysId){
$IS = new IS($infSysId);
$this->infSystemos .= "<li objectid='".$IS->getId()."'>".$IS->getPavadinimas()."</li>";

}
}

protected function htmlContent(){
$this->content = <<<FFF
<li style="padding-top:20px;">
<div style="height:40px;">
<div tipas="padaliniai" class="dropDownMenu">
<p class="dropDownVisualButton">Padalinys</p>
<ul class="dropDownButtons">
{$this->padaliniai}
</ul>
</div>
</div>
<div style="height:40px;">
<div tipas="IS" class="dropDownMenu">
<p class="dropDownVisualButton">Informacinė sistema</p>
<ul class="dropDownButtons">
{$this->infSystemos}
</ul>
</div>
</div>
<p id="messageTvarkymui"></p>
</li>
FFF;
}

}

?>
5 changes: 5 additions & 0 deletions WebObjects/Panels/Right/Import.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ protected function htmlContent(){
<iframe id="uploadTarget" src="" style="width:500px; height:100px; border:0px solid #fff;"></iframe>
</div>
</div>
<div class="post">
<div class="entry">
</div>
</div>
FFF;
}

Expand Down
1 change: 1 addition & 0 deletions index.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
include("WebObjects/Panels/Left/Prognozes.php");
include("WebObjects/Panels/Left/Filters.php");
include("WebObjects/Panels/Left/UserManage.php");
include("WebObjects/Panels/Left/TvarkymoPrognozavimas.php");
include("WebObjects/Panels/Right/Lenteles.php");
include("WebObjects/Panels/Right/Import.php");
include("WebObjects/Panels/Right/Users.php");
Expand Down

0 comments on commit 24e2130

Please sign in to comment.