-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
18 changed files
with
276 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
<?php | ||
|
||
session_start(); | ||
include("../../Includes.php"); | ||
|
||
function redirect(){ | ||
header("location: ../../index.php?info=admin/vartotojai"); | ||
} | ||
|
||
$login = new Session(1); | ||
|
||
if(!$login->isLogedin()){ | ||
die("You must loged in!"); | ||
} | ||
|
||
if(isset($_POST['pass']) && !empty($_POST['pass'])){ | ||
$pass = $_POST['pass']; | ||
}else{ | ||
Message::setMessage("Nepaskirtas slaptažodis!"); | ||
redirect(); | ||
exit; | ||
} | ||
|
||
if(isset($_POST['pass1']) && !empty($_POST['pass1'])){ | ||
$pass1 = $_POST['pass1']; | ||
}else{ | ||
Message::setMessage("Nepaskirtas antras slaptažodis!"); | ||
redirect(); | ||
exit; | ||
} | ||
|
||
if(isset($_POST['nick']) && !empty($_POST['nick'])){ | ||
if(!User::isExist("User", "Username", $_POST['nick'])){ | ||
$nick = $_POST['nick']; | ||
}else{ | ||
Message::setMessage("Vartotojas vardu ".$_POST['nick']." jau egzistuoja!"); | ||
redirect(); | ||
exit; | ||
} | ||
}else{ | ||
Message::setMessage("Vartotojas nepaskirtas!"); | ||
redirect(); | ||
exit; | ||
} | ||
|
||
if(isset($_POST['isAdmin'])){ | ||
$isAdmin = (int)$_POST['isAdmin']; | ||
}else{ | ||
Message::setMessage("Nepaskirtas vartotojo tipas!"); | ||
redirect(); | ||
exit; | ||
} | ||
|
||
if($pass == $pass1){ | ||
if(User::insertToDB($nick, $pass, $isAdmin)){ | ||
Message::setMessage("Vartotojas įtrauktas sėkmingai!"); | ||
}else{ | ||
Message::setMessage("Nepavyko įtraukti vartotojos! ".User::$error); | ||
} | ||
redirect(); | ||
exit; | ||
}else{ | ||
Message::setMessage("Slaptažodžiai nesutampa!"); | ||
redirect(); | ||
exit; | ||
} | ||
|
||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<?php | ||
|
||
session_start(); | ||
include("../../Includes.php"); | ||
|
||
function redirect(){ | ||
header("location: ../../index.php?info=admin/vartotojai"); | ||
} | ||
|
||
$login = new Session(1); | ||
|
||
if(!$login->isLogedin()){ | ||
die("false:::You must loged in!"); | ||
} | ||
|
||
if(isset($_GET['id']) && !empty($_GET['id'])){ | ||
$id = $_GET['id']; | ||
}else{ | ||
die("false:::Nepaskirtas id!"); | ||
} | ||
|
||
if(User::delete($id)){ | ||
die("true:::Vartotojas ištrintas sėkmingai."); | ||
}else{ | ||
die("false:::Vartotojo istrinti nepavyko! ".User::$error); | ||
} | ||
|
||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,8 +24,6 @@ | |
$prog = array(); | ||
} | ||
|
||
|
||
|
||
$panel = new PadalyniuPrieDiagramosMygtukai($prog); | ||
echo $panel->getHtml(); | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
<!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>Plain & Clean by Free CSS Templates</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="#">Importuoti duomenys</a></li> | ||
<li><a href="#">Vartotojai</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="entry"> | ||
<p>Prideti vartotoja</p> | ||
<table> | ||
<tr> | ||
<td>Vartotojo vardas: </td> | ||
<td><input type="text" /></td> | ||
</tr> | ||
<tr> | ||
<td>Slaptazodis: </td> | ||
<td><input type="text" /></td> | ||
</tr> | ||
<tr> | ||
<td>Pakartoti slaptazodi: </td> | ||
<td><input type="text" /></td> | ||
</tr> | ||
<tr> | ||
<td>User</td> | ||
<td><input type="radio" name="isAdmin" checked="true" /></td> | ||
</tr> | ||
<tr> | ||
<td>Admin</td> | ||
<td><input type="radio" name="isAdmin" /></td> | ||
</tr> | ||
</table> | ||
<p><input type="button" class="more" value="Prideti" /></p> | ||
</div> | ||
</div> | ||
<div style="clear: both;"> </div> | ||
</div> | ||
<!-- end #content --> | ||
<div id="sidebar"> | ||
<ul></ul> | ||
</div> | ||
<!-- end #sidebar --> | ||
<div style="clear: both;"> </div> | ||
</div> | ||
<!-- end #page --> | ||
</div> | ||
<div id="footer"> | ||
<p>Copyright (c) 2011 Sitename.com. All rights reserved. Design by <a href="http://www.freecsstemplates.org/">Free CSS Templates</a>.</p> | ||
</div> | ||
<!-- end #footer --> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -601,4 +601,9 @@ a:hover { | |
width:565px; | ||
height:215px; | ||
overflow:auto; | ||
} | ||
|
||
span.delUser{ | ||
color:#CA4C44; | ||
cursor:pointer; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
<?php | ||
|
||
class AddUser extends MainPanel{ | ||
|
||
protected function htmlContent(){ | ||
$this->content = <<<FFF | ||
<div class="post"> | ||
<div class="entry"> | ||
<p>Pridėti vartotoją</p> | ||
<form method="post" action="AjaxActions/Admin/AddUser.php"> | ||
<table> | ||
<tr> | ||
<td>Vartotojo vardas: </td> | ||
<td><input type="text" name="nick" /></td> | ||
</tr> | ||
<tr> | ||
<td>Slaptažodis: </td> | ||
<td><input type="text" name="pass" /></td> | ||
</tr> | ||
<tr> | ||
<td>Pakartoti slaptažodį: </td> | ||
<td><input type="text" name="pass1" /></td> | ||
</tr> | ||
<tr> | ||
<td>Vartotojas</td> | ||
<td><input type="radio" name="isAdmin" value="0" checked="true" /></td> | ||
</tr> | ||
<tr> | ||
<td>Administratorius</td> | ||
<td><input type="radio" name="isAdmin" value="1" /></td> | ||
</tr> | ||
</table> | ||
<p><input type="submit" class="more" value="Pridėti" /></p> | ||
</form> | ||
</div> | ||
</div> | ||
FFF; | ||
} | ||
|
||
} | ||
|
||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.