Пример #1
0
        }
    } else {
        $kernel->make_notify("Klasa <i>mainContent</i> nie istnieje. Wtyczka nie zostanie wczytana", NULL, 1);
    }
} else {
    $kernel->make_notify("Aplikacja którą próbujesz uruchomić nie istnieje lub nie została zainstalowana.");
}
?>
			
		</div>
		<div id="notify"></div>
		<div id="footer">Powered by <a href="http://wojciechkrol.eu">Wojciech Król</a>. Wszelkie prawa zastrzeżone! <span style="color:#aaa;">TablicaCMS</span> w wersji: <span style="color:orange;"><?php 
echo $kernel->version();
?>
</span></div>
	</body>
</html>
<?php 
if ($kernel->get_notify(NULL, 1) > 0) {
    echo '<script type="text/javascript">
			$(document).ready(function(){
				$("#notify").show().html(\'';
    echo $kernel->get_notify(NULL, 0, "<div class=\"notify_div\">#CONTENT#</div>");
    echo '\').animate({"top":"20px"}, 500);
			setTimeout(function(){ $("#notify").fadeOut() }, 30000);
			$("#notify").click(function() { $(this).fadeOut(); });
			});
			</script>';
}
$kernel->destroy_notify();
ob_end_flush();
Пример #2
0
    function catedit()
    {
        ob_end_clean();
        echo '
			<!DOCTYPE html>
			<html>
			<head>
			<title>Edytowanie</title>
			<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
			<link rel="stylesheet" type="text/css" href="style.css" />
			<link rel="stylesheet" type="text/css" href="css/apigui.css" />
			<script type="text/javascript" src="http://code.jquery.com/jquery-latest.js"></script>
			<style type="text/css">
			* {
			margin:0;
			}
			html,body {
				width:auto;
				min-width:0;
				overflow:hidden;
			}
			body {
				background:#60d4ff;
			}
			#header {
				padding-top:5px;
				background:#FFF;
				box-shadow:0px 0px 5px #CCC;
			}
			#content {
				color:#FFF;
				margin:0;
			}
			td, th {
				padding:3px;
				font-size:16px;
				text-shadow:1px 1px 0px #4190ad;
				color:#FFF;
			}
			th { font-weight:bold; font-size:16px !important; font-family:Arial; }
			td input {
				font-size:16px !important;
			}
			#save {
				position:absolute;
				bottom:0;
				left:0;
				background:#fafafa;
				padding:20px;
				width:100%;
			}
			.notify_div, #notify {
				width:360px !important;
				text-align:center;
				color:#2c2c2c;
				text-shadow:#fffc7d;
			}
			#notify {
				background:#fffec4;
				border-color:#fffc80;
				margin-left:-180px;
			}
			</style>
			</head>
			<body>
			<div id="apigui">
			';
        if (isset($_GET['id']) && is_numeric($_GET['id'])) {
            if (isset($_POST['save'])) {
                mysql_query("UPDATE `tentego_img_cat` SET `name`='" . $_POST['name'] . "' WHERE `id`=" . $_GET['id']) ? kernel::make_notify("Zapisano.") : kernel::make_notify("Wystąpił błąd podczas zapisywania.");
            }
            $cat = mysql_fetch_array(mysql_query("SELECT * FROM `tentego_img_cat` WHERE `id`=" . $_GET['id']));
            echo '<form method="post" action="?go=manager&amp;feature=catedit&amp;id=' . $cat['id'] . '">';
            echo '
					<div id="content">
						<table>
						<tr>
							<th>Nazwa:</th>
							<td><input type="text" name="name" value="' . htmlspecialchars($cat['name'], ENT_QUOTES) . '" /></td>
						</tr>
						</table>
						<div id="save"><input type="submit" name="save" value="Zapisz zmiany" /></div>
					</div>
				';
            echo '</form>';
        }
        echo '
			</div>
			<div id="notify"></div>
			</body>
			</html>
			';
        if (kernel::get_notify(NULL, 1) > 0) {
            echo '<script type="text/javascript">
					$(document).ready(function(){
						$("#notify").show().html(\'';
            echo kernel::get_notify(NULL, 0, "<div class=\"notify_div\">#CONTENT#</div>");
            echo '\').animate({"top":"-15px"}, 500);
					setTimeout(function(){ $("#notify").fadeOut() }, 30000);
					$("#notify").click(function() { $(this).fadeOut(); });
					});
					</script>';
        }
        kernel::destroy_notify();
        exit;
    }
Пример #3
0
	<body>
		<script type="text/javascript">
			$(document).ready(function() {
				$("#hello, #box").hide();
				$("#hello, #box").fadeIn(1200);
				$("#login input:first").focus();
			});
		</script>
		<div id="hello">
			<h1><img src="img/welcome.png" alt="Witaj w TenTego2 - TablicaCMS!" /></h1>
		</div>
		<div id="box">
			<div id="in-box">
				<div id="login">
				<?php 
echo $kernel->get_notify(NULL, 0, '<div id="notify">#CONTENT#</div>');
?>
				<form method="post" action="index.php">
					<input type="text" name="post_user" style="padding-left:35px; background:url(img/administrator.png) center left no-repeat;" />
					<input type="password" name="post_pass" style="padding-left:35px; background:url(img/key.png) center left no-repeat;" /><br />
					<input type="submit" name="submit_login" value="Zaloguj" />
				</form>
				</div>
			</div>
		</div>
		<div id="footer">Powered by <a href="http://wojciechkrol.eu">Wojciech Król</a> [2012]</div>
	</body>
</html>
<?php 
$kernel->destroy_notify();
ob_end_flush();
Пример #4
0
    function edit_ad()
    {
        ob_end_clean();
        echo '
			<!DOCTYPE html>
			<html>
			<head>
			<title>Edytowanie</title>
			<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
			<link rel="stylesheet" type="text/css" href="style.css" />
			<link rel="stylesheet" type="text/css" href="css/apigui.css" />
			<script type="text/javascript" src="http://code.jquery.com/jquery-latest.js"></script>
			<style type="text/css">
			* {
			margin:0;
			}
			html,body {
				width:auto;
				min-width:0;
				overflow:hidden;
			}
			body {
				background:#60d4ff;
			}
			#header {
				padding-top:5px;
				background:#FFF;
				box-shadow:0px 0px 5px #CCC;
			}
			#content {
				color:#FFF;
				margin:0;
			}
			#image {
				position:absolute;
				z-index:-2;
				opacity:0.05;
				width:100%;
			}
			td, th {
				padding:3px;
				font-size:16px;
				text-shadow:1px 1px 0px #4190ad;
				color:#FFF;
			}
			th { font-weight:bold; font-size:16px !important; font-family:Arial; }
			td input {
				font-size:16px !important;
			}
			#save {
				position:absolute;
				bottom:0;
				left:0;
				background:#fafafa;
				padding:20px;
				width:100%;
			}
			.notify_div, #notify {
				width:360px !important;
				text-align:center;
				color:#2c2c2c;
				text-shadow:#fffc7d;
			}
			#notify {
				background:#fffec4;
				border-color:#fffc80;
				margin-left:-180px;
			}
			.description {
				padding-top:4px;
				padding-left:3px;
				font-size:12px;
			}
			textarea {
				width: 95% !important;
				height: 100px;
			}
			</style>
			</head>
			<body>
			<div id="apigui">';
        $query = mysql_query("SELECT * FROM `{$this->table}` WHERE `id`=" . $_GET['id']);
        if (mysql_num_rows($query)) {
            if (isset($_POST['save'])) {
                $date = $_POST['year'] . '-' . $_POST['month'] . '-' . $_POST['day'];
                if (mysql_query("UPDATE `{$this->table}` SET `title`='" . $_POST['title'] . "', `date`='" . $date . "', `code`='" . mysql_real_escape_string($_POST['code']) . "', `place`='" . $_POST['place'] . "', `object_nr`='" . $_POST['object_nr'] . "', `active`='" . $_POST['active'] . "' WHERE `id`=" . $_GET['id'])) {
                    $query = mysql_query("SELECT * FROM `{$this->table}` WHERE `id`=" . $_GET['id']);
                    kernel::make_notify("Zapisano.");
                } else {
                    kernel::make_notify("Bład podczas zapisu.");
                }
            }
            $ad = mysql_fetch_array($query);
            $date_from_db = strtotime($ad['date']);
            echo '<script type="text/javascript">
				$(document).ready(function(){
				$(\'select[name="place"]\').change( 
					function() { 
						if ($(\'select[name="place"] option[value="2"]\').is(":selected")) {
							$(\'span[class$="number"]\').attr(\'style\', \'display:block;\');
						} else {
							$(\'span[class$="number"]\').attr(\'style\', \'display:none;\');
						}
				})
					if ($(\'select[name="place"] option[value="2"]\').is(":selected")) {
						$(\'span[class$="number"]\').attr(\'style\', \'display:block;\');
					}
				});
				</script>';
            echo '<form method="post" action="?go=ads&amp;feature=edit&amp;id=' . $ad['id'] . '">';
            echo '
					<div id="content">
						<table>
						<tr>
							<th>Nazwa:</th>
							<td><input type="text" name="title" value="' . $ad['title'] . '" /></td>
						</tr>
						<tr>
							<th>Aktywna:</th>
							<td>
								<select name="active">
									<option value="1" ' . ($ad["active"] == 1 ? 'selected="selected"' : '') . '>tak</option>
									<option value="0" ' . ($ad["active"] == 0 ? 'selected="selected"' : '') . '>nie</option>
								</select>
							</td>
						</tr>
						<tr>
							<th>Położenie:</th>
							<td>
								<select name="place">
								';
            if ($this->check_place(1, $ad['id'])) {
                echo '<option value="1" ' . ($ad["place"] == 1 ? 'selected="selected"' : '') . '>lewa strona</option>';
            } elseif (!$this->check_place(1)) {
                echo '<option value="1" ' . ($ad["place"] == 1 ? 'selected="selected"' : '') . '>lewa strona</option>';
            }
            echo '<option value="2" ' . ($ad["place"] == 2 ? 'selected="selected"' : '') . '>pod obiektem</option>';
            if ($this->check_place(3, $ad['id'])) {
                echo '<option value="3" ' . ($ad["place"] == 3 ? 'selected="selected"' : '') . '>prawa strona</option>';
            } elseif (!$this->check_place(3)) {
                echo '<option value="3" ' . ($ad["place"] == 3 ? 'selected="selected"' : '') . '>prawa strona</option>';
            }
            /* echo '<option value="1" '.($ad["place"]==1?'selected="selected"':'').'>lewa strona</option>
            					<option value="2" '.($ad["place"]==2?'selected="selected"':'').'>pod obiektem</option>
            			<option value="3" '.($ad["place"]==3?'selected="selected"':'').'>prawa strona</option>'; */
            echo '</select>
								<span class="number" style="display: none;">
									<span class="description">Numer obiektu, pod którym będzie wyświetlana:</span>
									<input type="text" name="object_nr" value="' . $ad["object_nr"] . '" />
								</span>
							</td>
						</tr>
						<tr>
							<th>Wyświetlana do:</th>
							<td>' . $this->years(date("Y", $date_from_db)) . $this->months(date("m", $date_from_db)) . $this->days(date("d", $date_from_db)) . '</td>
						</tr>
						<tr>
							<th>Kod:</th>
							<td>
								<textarea name="code">' . htmlspecialchars($ad['code']) . '</textarea>
							</td>
						</tr>
						</table>
						<div id="save"><input type="submit" name="save" value="Zapisz zmiany" /></div>
					</div>
				';
            echo '</form>';
        }
        echo '
			</div>
			<div id="notify"></div>
			</body>
			</html>
			';
        if (kernel::get_notify(NULL, 1) > 0) {
            echo '<script type="text/javascript">
					$(document).ready(function(){
						$("#notify").show().html(\'';
            echo kernel::get_notify(NULL, 0, "<div class=\"notify_div\">#CONTENT#</div>");
            echo '\').animate({"top":"-15px"}, 500);
					setTimeout(function(){ $("#notify").fadeOut() }, 3000);
					$("#notify").click(function() { $(this).fadeOut(); });
					});
					</script>';
        }
        kernel::destroy_notify();
        exit;
    }
Пример #5
0
    function edit()
    {
        ob_end_clean();
        echo '
			<!DOCTYPE html>
			<html>
			<head>
			<title>Edytowanie</title>
			<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
			<link rel="stylesheet" type="text/css" href="style.css" />
			<link rel="stylesheet" type="text/css" href="css/apigui.css" />
			<script type="text/javascript" src="http://code.jquery.com/jquery-latest.js"></script>
			<style type="text/css">
			* {
			margin:0;
			}
			html,body {
				width:auto;
				min-width:0;
				overflow:hidden;
			}
			body {
				background:#60d4ff;
			}
			#header {
				padding-top:5px;
				background:#FFF;
				box-shadow:0px 0px 5px #CCC;
			}
			#content {
				color:#FFF;
				margin:0;
			}
			#image {
				position:absolute;
				z-index:-2;
				opacity:0.05;
				width:100%;
			}
			td, th {
				padding:3px;
				font-size:16px;
				text-shadow:1px 1px 0px #4190ad;
				color:#FFF;
			}
			th { font-weight:bold; font-size:16px !important; font-family:Arial; }
			td input {
				font-size:16px !important;
			}
			#save {
				position:absolute;
				bottom:0;
				left:0;
				background:#fafafa;
				padding:20px;
				width:100%;
			}
			.notify_div, #notify {
				width:360px !important;
				text-align:center;
				color:#2c2c2c;
				text-shadow:#fffc7d;
			}
			#notify {
				background:#fffec4;
				border-color:#fffc80;
				margin-left:-180px;
			}
			.description {
				padding-top:4px;
				padding-left:3px;
				font-size:12px;
			}
			textarea {
				width: 95% !important;
				height: 100px;
			}
			</style>
			</head>
			<body>
			<div id="apigui">';
        $query = mysql_query("SELECT * FROM `{$this->table}` WHERE `id`=" . $_GET['id']);
        if (mysql_num_rows($query)) {
            if (isset($_POST['save'])) {
                if (!empty($_POST['password'])) {
                    if (mysql_query("UPDATE `{$this->table}` SET `user`='" . $_POST['login'] . "', `pass`='" . md5($_POST['password']) . "', `email`='" . $_POST['email'] . "', `active`='" . $_POST['active'] . "', `rank`='" . $_POST['status'] . "' WHERE `id`=" . $_GET['id'])) {
                        $query = mysql_query("SELECT * FROM `{$this->table}` WHERE `id`=" . $_GET['id']);
                        kernel::make_notify("Zapisano");
                    } else {
                        kernel::make_notify("Bład podczas zapisu.");
                    }
                } else {
                    if (mysql_query("UPDATE `{$this->table}` SET `user`='" . $_POST['login'] . "', `email`='" . $_POST['email'] . "', `active`='" . $_POST['active'] . "', `rank`='" . $_POST['status'] . "' WHERE `id`=" . $_GET['id'])) {
                        $query = mysql_query("SELECT * FROM `{$this->table}` WHERE `id`=" . $_GET['id']);
                        kernel::make_notify("Zapisano");
                    } else {
                        kernel::make_notify("Bład podczas zapisu.");
                    }
                }
            }
            $user = mysql_fetch_array($query);
            $date_from_db = strtotime($ad['date']);
            echo '<form method="post" action="?go=users&amp;feature=edit&amp;id=' . $user['id'] . '">';
            echo '
					<div id="content">
						<table>
						<tr>
							<th>Login:</th>
							<td><input type="text" name="login" value="' . $user['user'] . '" /></td>
						</tr>
						<tr>
							<th>Nowe hasło:</th>
							<td><input type="password" name="password" /></td>
						</tr>
						<tr>
							<th>E-Mail:</th>
							<td><input type="text" name="email" value="' . $user['email'] . '" /></td>
						</tr>
						<tr>
							<th>Status:</th>
							<td>
								<select name="status">
									<option value="3" ' . ($user["rank"] == 3 ? 'selected="selected"' : '') . '>zbanowany</option>
									<option value="2" ' . ($user["rank"] == 2 ? 'selected="selected"' : '') . '>użytkownik</option>
									<option value="1" ' . ($user["rank"] == 1 ? 'selected="selected"' : '') . '>moderator</option>
									<option value="0" ' . ($user["rank"] == 0 ? 'selected="selected"' : '') . '>administrator</option>
								</select>
							</td>
						</tr>
						<tr>
							<th>Aktywny:</th>
							<td>
								<select name="active">
									<option value="1" ' . ($user["active"] == 1 ? 'selected="selected"' : '') . '>tak</option>
									<option value="0" ' . ($user["active"] == 0 ? 'selected="selected"' : '') . '>nie</option>
								</select>
							</td>
						</tr>
						</table>
						<div id="save"><input type="submit" name="save" value="Zapisz zmiany" /></div>
					</div>
				';
            echo '</form>';
        }
        echo '
			</div>
			<div id="notify"></div>
			</body>
			</html>
			';
        if (kernel::get_notify(NULL, 1) > 0) {
            echo '<script type="text/javascript">
					$(document).ready(function(){
						$("#notify").show().html(\'';
            echo kernel::get_notify(NULL, 0, "<div class=\"notify_div\">#CONTENT#</div>");
            echo '\').animate({"top":"-15px"}, 500);
					setTimeout(function(){ $("#notify").fadeOut() }, 3000);
					$("#notify").click(function() { $(this).fadeOut(); });
					});
					</script>';
        }
        kernel::destroy_notify();
        exit;
    }