Skip to content

Commit

Permalink
db insert admin
Browse files Browse the repository at this point in the history
  • Loading branch information
povilasb committed Dec 20, 2011
1 parent f8cff7f commit 0e556ca
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
7 changes: 4 additions & 3 deletions ContentManager/Managers/ManageHome.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@ class ManageHome {
public function __construct($method, $checkType = true){
if($checkType == true){
if(isset($GLOBALS['login']->user)){
if($GLOBALS['login']->user->isAdmin()){
header("location: index.php?info=admin/".$method);
}
if ($GLOBALS['login']->isLogedin())
if($GLOBALS['login']->user->isAdmin()){
header("location: index.php?info=admin/".$method);
}
}
}
}
Expand Down
9 changes: 9 additions & 0 deletions PPOS.sql
Original file line number Diff line number Diff line change
Expand Up @@ -204,3 +204,12 @@ SELECT PadaliniuValanduKiekis.Nuo, `IS`.Kodas, `IS`.Pavadinimas, SUM(PadaliniuVa
SET SQL_MODE=@OLD_SQL_MODE;
SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS;
SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS;

-- -----------------------------------------------------
-- Data for table `PPOS`.`User`
-- -----------------------------------------------------
START TRANSACTION;
USE `PPOS`;
INSERT INTO `PPOS`.`User` (`idUser`, `Username`, `Password`, `Admin`) VALUES (0, 'admin', 'admin', 1);

COMMIT;

0 comments on commit 0e556ca

Please sign in to comment.