示例#1
0
 public function prepareStatements()
 {
     //Prepare Statements using the new system
     parent::prepareStatements();
     $this->preparedStatements['getElementByID'] = $this->con->prepare("/*" . MYSQLND_QC_ENABLE_SWITCH . "*/ SELECT `name`, `html` FROM `elements` WHERE `site` = ? AND `id` = ?;");
     $this->preparedStatements['getElements'] = $this->con->prepare("/*" . MYSQLND_QC_ENABLE_SWITCH . "*/ SELECT `id`, `name` FROM `elements` WHERE `site` = ?;");
     $this->preparedStatements['deleteElement'] = $this->con->prepare("DELETE FROM `elements` WHERE `name` = ? AND `site` = ?;");
     $this->preparedStatements['newElement'] = $this->con->prepare("INSERT INTO `elements` (`name`, `html`, `site`) VALUES (?, ?, ?);");
     $this->preparedStatements['updateElement'] = $this->con->prepare("UPDATE `elements` SET `name`=?, `html`=? WHERE `id` = ?;");
     $this->preparedStatements['getSites'] = $this->con->prepare("/*" . MYSQLND_QC_ENABLE_SWITCH . "*/ SELECT `name` FROM `sites` WHERE 1;");
     $this->preparedStatements['newSite'] = $this->con->prepare("INSERT INTO `sites` (`name`) VALUES (?);");
     $this->preparedStatements['deleteSite'] = $this->con->prepare("DELETE FROM `sites` WHERE `name` = ?;");
     $this->preparedStatements['getBlogs'] = $this->con->prepare("/*" . MYSQLND_QC_ENABLE_SWITCH . "*/ SELECT `name` FROM `blogs` WHERE 1;");
     $this->preparedStatements['newBlog'] = $this->con->prepare("INSERT INTO `blogs` (`name`) VALUES (?);");
     $this->preparedStatements['deleteBlog'] = $this->con->prepare("DELETE FROM `blogs` WHERE `name` = ?;");
     $this->preparedStatements['deletePost'] = $this->con->prepare("DELETE FROM `blog_posts` WHERE `title` = ? AND `blog` = ?;");
     $this->preparedStatements['newPost'] = $this->con->prepare("INSERT INTO `blog_posts` (`title`, `html`, `blog`) VALUES (?, ?, ?);");
     $this->preparedStatements['updatePost'] = $this->con->prepare("UPDATE `blog_posts` SET `title`=?, `html`=? WHERE `id` = ?;");
     return;
 }
示例#2
0
文件: about.php 项目: NickGeek/Fancy
<?php

require_once 'FancyConnector.php';
$fancyConnector = new FancyConnector('demo');
?>
<!DOCTYPE html>
<!-- Website template by freewebsitetemplates.com -->
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
		<title>About - Fancy Demo</title>
		<link rel="stylesheet" href="css/style.css" type="text/css" />
		<!--[if IE 7]>
			<link rel="stylesheet" href="css/ie7.css" type="text/css" />
		<![endif]-->
	</head>
	<body>
		<div class="page">
			<div class="header">
				<a href="." id="logo"><img src="images/logo.png" alt=""/></a>
				<ul>
					<li><a href=".">Home</a></li>
					<li class="selected"><a href="about.php">About</a></li>
					<li><a href="blog.php">Blog</a></li>
				</ul>
			</div>
			<div class="body">
				
				<h3>The power of Fancy</h3>
				<p>This part of the page is static, however note the three boxes below. They are from the homepage. I can update these featured products from the Fancy Dashboard and it will directly feed into the boxes on the homepage as well as this page. No duplication of code for duplication of stuff!</p>
				<p>Also note the 'Coming soon to Fancy' section. Just the text under that heading is dynamic. This means you don't have to go into the code to edit that section.</p>
示例#3
0
文件: index.php 项目: NickGeek/Fancy
<?php

require_once 'FancyConnector.php';
$fancyConnector = new FancyConnector('demo');
?>
<!DOCTYPE html>
<!-- Website template by freewebsitetemplates.com -->
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
		<title>Fancy Demo</title>
		<link rel="stylesheet" href="css/style.css" type="text/css" />
		<!--[if IE 7]>
			<link rel="stylesheet" href="css/ie7.css" type="text/css" />
		<![endif]-->
	</head>
	<body>
		<div class="page">
			<div class="header">
				<a href="." id="logo"><img src="images/logo.png" alt=""/></a>
				<ul>
					<li class="selected"><a href=".">Home</a></li>
					<li><a href="about.php">About</a></li>
					<li><a href="blog.php">Blog</a></li>
				</ul>
			</div>
			<div class="body">
				<div id="featured">
					<h3>This page is very <a href="http://fancyxht.ml" target="_blank"><em>Fancy</em></a></h3>
					<p>This website has dynamic content all throughout it using Fancy. This entire website took next to no time to class it up and make it <em>fancy</em>! Have a look around and see how this website has no CMS junk; just simple HTML, CSS, and a little bit of fanciness. Once you're done here consider saving yourself time and hassle by putting Fancy in your website.</p>
					<input type="button" value="Read more" onClick="parent.location='about.php'"/>