diff --git a/robocze/admin/gallery_item_add.php b/robocze/admin/gallery_item_add.php
new file mode 100644
index 0000000..617a44c
--- /dev/null
+++ b/robocze/admin/gallery_item_add.php
@@ -0,0 +1,8 @@
+
\ No newline at end of file
diff --git a/robocze/admin/gallery_item_delete.php b/robocze/admin/gallery_item_delete.php
new file mode 100644
index 0000000..545975d
--- /dev/null
+++ b/robocze/admin/gallery_item_delete.php
@@ -0,0 +1,8 @@
+
\ No newline at end of file
diff --git a/robocze/admin/gallery_item_edit.php b/robocze/admin/gallery_item_edit.php
new file mode 100644
index 0000000..8eb8a48
--- /dev/null
+++ b/robocze/admin/gallery_item_edit.php
@@ -0,0 +1,8 @@
+
\ No newline at end of file
diff --git a/robocze/admin/gallery_view.php b/robocze/admin/gallery_view.php
new file mode 100644
index 0000000..edfdc48
--- /dev/null
+++ b/robocze/admin/gallery_view.php
@@ -0,0 +1,8 @@
+
\ No newline at end of file
diff --git a/robocze/admin/index.php b/robocze/admin/index.php
new file mode 100644
index 0000000..35474bb
--- /dev/null
+++ b/robocze/admin/index.php
@@ -0,0 +1,147 @@
+
\ No newline at end of file
diff --git a/robocze/admin/login.php b/robocze/admin/login.php
new file mode 100644
index 0000000..a2ef64d
--- /dev/null
+++ b/robocze/admin/login.php
@@ -0,0 +1,8 @@
+
\ No newline at end of file
diff --git a/robocze/admin/user_add.php b/robocze/admin/user_add.php
new file mode 100644
index 0000000..72d31c5
--- /dev/null
+++ b/robocze/admin/user_add.php
@@ -0,0 +1,8 @@
+
\ No newline at end of file
diff --git a/robocze/admin/user_delete.php b/robocze/admin/user_delete.php
new file mode 100644
index 0000000..cc35486
--- /dev/null
+++ b/robocze/admin/user_delete.php
@@ -0,0 +1,8 @@
+
\ No newline at end of file
diff --git a/robocze/admin/user_edit.php b/robocze/admin/user_edit.php
new file mode 100644
index 0000000..fcf0641
--- /dev/null
+++ b/robocze/admin/user_edit.php
@@ -0,0 +1,8 @@
+
\ No newline at end of file
diff --git a/robocze/admin/users_list.php b/robocze/admin/users_list.php
new file mode 100644
index 0000000..4e3b9f9
--- /dev/null
+++ b/robocze/admin/users_list.php
@@ -0,0 +1,8 @@
+
\ No newline at end of file
diff --git a/robocze/functions.php b/robocze/functions.php
index 43b886c..3ace72f 100644
--- a/robocze/functions.php
+++ b/robocze/functions.php
@@ -1,81 +1,96 @@
-
-* @link 	http://suczawa.ath.cx/
-**/
+
+* @link 	http://suczawa.ath.cx/
+**/
 
 $xhtml=true;
-
-#wyświetl błąd
-function blad($msg)
-{
-	die('
-	
Blad Galerii Zdjec Suczawa 2009!
-	'.$msg.'');
-}
-
-function NaglowekXHTML()
+
+#wyświetl błąd
+function blad($msg)
+{
+	die('
+	Blad Galerii Zdjec Suczawa 2009!
+	'.$msg.'');
+}
+
+function NaglowekXHTML()
+{
+	global $xhtml;
+	$xhtml = preg_match('/application\/xhtml\+xml(?![+a-z])(;q=(0\.\d{1,3}|[01]))?/i', 
+	$_SERVER['HTTP_ACCEPT'], $xhtml) && (isset($xhtml[2])?$xhtml[2]:1) > 0 || 
+	strpos($_SERVER["HTTP_USER_AGENT"], "W3C_Validator")!==false || 
+	strpos($_SERVER["HTTP_USER_AGENT"], "WebKit")!==false;
+	
+	header('Content-Type: '.($xhtml?'application/xhtml+x':'text/ht').'ml; charset="utf-8"'); #IE doesn't support application/xhtml+xml - workaround
+	
+	echo ''; 
+}
+ 
+function GenerujListeStron()
+{
+   	global $cnt;
+   	global $page;
+   	$content = '';
+   	
+	if ($page>1)
+	{
+		$content .= '«';
+		$content .= '  < ';
+	}
+	
+	#wygeneruj strony
+	for ($i=1;$i<=$cnt;$i++)
+   	{
+     		if ($i==$page)
+     		{
+			if ($i == $cnt)
+			{
+				$content .= ''.$i.'';
+			}
+			else
+			{
+	    			$content .= ''.$i.''.' | ';
+			}
+		}
+		else
+		{
+			if ($i == $cnt)
+			{
+				$content .= ''.$i.' ';
+			}
+			else
+			{
+	    			$content .= ''.$i.' | ';
+			}
+		}
+     	}
+     	#dodaj linka "+1 strona" oraz do ostatniej
+	if ($page<$cnt)
+     	{
+    		$content .= '>';
+    		$content .= '  »';
+	}
+	
+	#dodaj linka do ostatniej strony
+     	echo $content;
+}
+
+function Przekieruj($url='index.php', $tresc='')
 {
-	global $xhtml;
-	$xhtml = preg_match('/application\/xhtml\+xml(?![+a-z])(;q=(0\.\d{1,3}|[01]))?/i', 
-	$_SERVER['HTTP_ACCEPT'], $xhtml) && (isset($xhtml[2])?$xhtml[2]:1) > 0 || 
-	strpos($_SERVER["HTTP_USER_AGENT"], "W3C_Validator")!==false || 
-	strpos($_SERVER["HTTP_USER_AGENT"], "WebKit")!==false;
-	
-	header('Content-Type: '.($xhtml?'application/xhtml+x':'text/ht').'ml; charset="utf-8"'); #IE doesn't support application/xhtml+xml - workaround
-	
-	echo ''; 
-}
- 
-function GenerujListeStron()
-{
-   	global $cnt;
-   	global $page;
-   	$content = '';
-   	
-	if ($page>1)
-	{
-		$content .= '«';
-		$content .= '  < ';
-	}
-	
-	#wygeneruj strony
-	for ($i=1;$i<=$cnt;$i++)
-   	{
-     		if ($i==$page)
-     		{
-			if ($i == $cnt)
-			{
-				$content .= ''.$i.'';
-			}
-			else
-			{
-	    			$content .= ''.$i.''.' | ';
-			}
-		}
-		else
-		{
-			if ($i == $cnt)
-			{
-				$content .= ''.$i.' ';
-			}
-			else
-			{
-	    			$content .= ''.$i.' | ';
-			}
-		}
-     	}
-     	#dodaj linka "+1 strona" oraz do ostatniej
-	if ($page<$cnt)
-     	{
-    		$content .= '>';
-    		$content .= '  »';
-	}
-	
-	#dodaj linka do ostatniej strony
-     	echo $content;
-}
-?>
+	if ($tresc!='')
+	{
+		die('
+		
+		
+		'.$tresc);
+	}
+	else
+	{
+		die('');
+	}
+}
+?>
diff --git a/robocze/init.php b/robocze/init.php
index 8c6be3b..46c4cc0 100644
--- a/robocze/init.php
+++ b/robocze/init.php
@@ -6,8 +6,16 @@
 **/
 
 #dołącz plik konfiguracyjny oraz funkcje
-require_once('./config.php');
-require_once('./functions.php');
+if (defined('IN_ACP'))
+{
+	require_once('./../config.php');
+	require_once('./../functions.php');
+}
+else
+{
+	require_once('./config.php');
+	require_once('./functions.php');
+}
 
 #sprawdź, czy jest wyłączone register globals oraz magic quotes?
 if (ini_get('register_globals') == 1)
@@ -24,6 +32,14 @@ if (get_magic_quotes_gpc())
 	blad('Prosze wylaczyc magic_quotes_gpc w php.ini!');
 }
 
+ini_set('session.cookie_lifetime', 259200); #expire time - 1 month
+
+session_start(); #starting session
+if (empty($_SESSION['logged']))
+{
+	$_SESSSION['logged'] = false;
+}
+
 $DB = new mysqli(DB_HOST, DB_USER, DB_PASS, DB_NAME); #connect with the database
 
 if ($DB->connect_error)