Initial Commit
This commit is contained in:
17
html/ajax/edit.php
Normal file
17
html/ajax/edit.php
Normal file
@@ -0,0 +1,17 @@
|
||||
<?php
|
||||
if (!defined('AJAX')) die('Invalid invocation');
|
||||
$rules = new HtRule_List();
|
||||
|
||||
$rule = $rules->GetAtIndex($params['id']);
|
||||
|
||||
/* @var $rule HtRule */
|
||||
|
||||
$params = $rule->GetParams();
|
||||
|
||||
if (count($params) == 0)
|
||||
return;
|
||||
|
||||
$form = new HtRule_Form($rule);
|
||||
?>
|
||||
|
||||
<?php $form->ShowForm(); ?>
|
||||
46
html/ajax/rules.php
Normal file
46
html/ajax/rules.php
Normal file
@@ -0,0 +1,46 @@
|
||||
<?php
|
||||
if (!defined('AJAX')) die('Invalid invocation');
|
||||
|
||||
$rules = new HtRule_List();
|
||||
$ruleList = $rules->GetRules();
|
||||
|
||||
echo_pre($rules->GetHeaderText());
|
||||
|
||||
echo '<div id="rule-list">';
|
||||
|
||||
foreach($ruleList as $index => $rule)
|
||||
{
|
||||
echo_rule($index, $rule);
|
||||
}
|
||||
|
||||
echo '</div>';
|
||||
|
||||
echo_pre($rules->GetFooterText());
|
||||
|
||||
function echo_rule($index, HtRule $rule)
|
||||
{
|
||||
$text = (string)$rule;
|
||||
$class = ($index % 2 == 0) ? 'even' : 'odd';
|
||||
echo <<<EOT
|
||||
<div class="rule $class" data-rule-id="$index">
|
||||
<div class="rule-actions">
|
||||
<a href="javascript:rules.editRule($index);" class="action-edit">Edit</a>
|
||||
<a href="javascript:rules.deleteRule($index);" class="action-delete">Delete</a>
|
||||
</div>
|
||||
<pre>
|
||||
$text
|
||||
</pre>
|
||||
</div>
|
||||
EOT;
|
||||
}
|
||||
|
||||
function echo_pre($text)
|
||||
{
|
||||
$text = htmlentities($text, ENT_IGNORE, 'UTF-8');
|
||||
echo <<<EOT
|
||||
<pre>
|
||||
$text
|
||||
</pre>
|
||||
EOT;
|
||||
}
|
||||
?>
|
||||
26
html/bottom.php
Normal file
26
html/bottom.php
Normal file
@@ -0,0 +1,26 @@
|
||||
<div style="clear: both;"> </div>
|
||||
</div> <!-- / content -->
|
||||
|
||||
|
||||
<?php if (isset($sidebar) && $sidebar == True) include('sidebar.php'); ?>
|
||||
</div><!-- / page-content -->
|
||||
</div><!-- / page-bgbtm -->
|
||||
</div><!-- / page-bgtop -->
|
||||
</div><!-- / page -->
|
||||
</div><!-- / wrapper -->
|
||||
<?php include('footer.php'); ?>
|
||||
|
||||
<div style="clear: both;"> </div>
|
||||
<script type="text/javascript">
|
||||
var uvOptions = {};
|
||||
(function() {
|
||||
var uv = document.createElement('script'); uv.type = 'text/javascript'; uv.async = true;
|
||||
uv.src = ('https:' == document.location.protocol ? 'https://' : 'http://') + 'widget.uservoice.com/3Kr8ahaGdYLcNwpTEtA7fQ.js';
|
||||
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(uv, s);
|
||||
})();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
<!--
|
||||
GentleBreeze Design by Free CSS Templates
|
||||
-->
|
||||
34
html/creator.php
Normal file
34
html/creator.php
Normal file
@@ -0,0 +1,34 @@
|
||||
<div id="design">
|
||||
<h2>Create</h2>
|
||||
<div id="add-rule">
|
||||
<form action="" method="POST" id="form-add-rule">
|
||||
<select id="field-rule-select" name="rule-select">
|
||||
<option value="">-- Add New --</option>
|
||||
<?php
|
||||
foreach(HtRule_List::ListRules() as $class => $name)
|
||||
{
|
||||
?>
|
||||
<option value="<?php echo $class;?>"><?php echo $name;?></option>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</form>
|
||||
</div>
|
||||
<div style="clear:both;"></div>
|
||||
<div id="rule-edit">
|
||||
</div>
|
||||
</div>
|
||||
<div id="preview">
|
||||
<h2>Preview</h2>
|
||||
<div class="actions">
|
||||
<a href="javascript:rules.showListing()" class="first">Listing</a><a href="save.php" class="middle" id="save">Save</a><a href="download.php" id="save-as" class="middle">Download</a><a href="index.php?delete" id="delete" class="last">Delete</a>
|
||||
</div>
|
||||
<div id="listing-code" style="display:none;">
|
||||
<input type="button" class="button" onclick="javascript:rules.hideListing()" value="Close" id="listing-code-close"/>
|
||||
<textarea readonly wrap="off">
|
||||
</textarea>
|
||||
</div>
|
||||
<div id="preview-code">
|
||||
</div>
|
||||
</div>
|
||||
7
html/footer.php
Normal file
7
html/footer.php
Normal file
@@ -0,0 +1,7 @@
|
||||
<div id="footer">
|
||||
<p>
|
||||
© 2012
|
||||
<a href="http://sam.xnet.tk/">Sam Stevens</a><br/>
|
||||
All generated content is public domain
|
||||
</p>
|
||||
</div>
|
||||
12
html/messages.php
Normal file
12
html/messages.php
Normal file
@@ -0,0 +1,12 @@
|
||||
<?php
|
||||
|
||||
if (isset($_SESSION['error']))
|
||||
{
|
||||
echo "<p class=\"error\">Error: ".$_SESSION['error']."</p>";
|
||||
unset($_SESSION['error']);
|
||||
}
|
||||
if (isset($_SESSION['message']))
|
||||
{
|
||||
echo "<p class=\"message\">".$_SESSION['message']."</p>";
|
||||
unset($_SESSION['message']);
|
||||
}
|
||||
41
html/sidebar.php
Normal file
41
html/sidebar.php
Normal file
@@ -0,0 +1,41 @@
|
||||
<div id="sidebar">
|
||||
<ul>
|
||||
<li>
|
||||
<h2>Aliquam tempus</h2>
|
||||
<p>Mauris vitae nisl nec metus placerat perdiet est. Phasellus dapibus semper consectetuer hendrerit.</p>
|
||||
</li>
|
||||
<li>
|
||||
<h2>Categories</h2>
|
||||
<ul>
|
||||
<li><a href="#">Aliquam libero</a></li>
|
||||
<li><a href="#">Consectetuer adipiscing elit</a></li>
|
||||
<li><a href="#">Metus aliquam pellentesque</a></li>
|
||||
<li><a href="#">Suspendisse iaculis mauris</a></li>
|
||||
<li><a href="#">Urnanet non molestie semper</a></li>
|
||||
<li><a href="#">Proin gravida orci porttitor</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
<h2>Blogroll</h2>
|
||||
<ul>
|
||||
<li><a href="#">Aliquam libero</a></li>
|
||||
<li><a href="#">Consectetuer adipiscing elit</a></li>
|
||||
<li><a href="#">Metus aliquam pellentesque</a></li>
|
||||
<li><a href="#">Suspendisse iaculis mauris</a></li>
|
||||
<li><a href="#">Urnanet non molestie semper</a></li>
|
||||
<li><a href="#">Proin gravida orci porttitor</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
<h2>Archives</h2>
|
||||
<ul>
|
||||
<li><a href="#">Aliquam libero</a></li>
|
||||
<li><a href="#">Consectetuer adipiscing elit</a></li>
|
||||
<li><a href="#">Metus aliquam pellentesque</a></li>
|
||||
<li><a href="#">Suspendisse iaculis mauris</a></li>
|
||||
<li><a href="#">Urnanet non molestie semper</a></li>
|
||||
<li><a href="#">Proin gravida orci porttitor</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
93
html/top.php
Normal file
93
html/top.php
Normal file
@@ -0,0 +1,93 @@
|
||||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8"/>
|
||||
<meta name="keywords" content="htaccess, htaccess builder, htaccess generator, apache, apache rewrite, rewrite" />
|
||||
<meta name="description" content="Build htaccess rules for apache 2 easily." />
|
||||
<title>Htaccess Builder</title>
|
||||
<base href="<?php echo System::Config()->BasePath; ?>"/>
|
||||
<link href="Media/style.css" rel="stylesheet" type="text/css"/>
|
||||
<link href='http://fonts.googleapis.com/css?family=Oswald|Arvo|Telex' rel='stylesheet' type='text/css'/>
|
||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js" type="text/javascript"></script>
|
||||
<script type="text/javascript">
|
||||
if(typeof jQuery == 'undefined'){document.write("<scr"+"ipt src=\"Media/jquery.min.js\" type=\"text/javascript\"><\/scr"+"ipt>");}
|
||||
</script>
|
||||
<?php if (defined('CREATOR')): ?>
|
||||
<script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.18/jquery-ui.min.js" type="text/javascript"></script>
|
||||
<link href="Media/impromptu.css" rel="stylesheet" type="text/css"/>
|
||||
<script src="Media/jquery-impromptu.3.2.min.js" type="text/javascript"></script>
|
||||
<link href="Media/tooltipster-1.2/css/tooltipster.css" rel="stylesheet" type="text/css"/>
|
||||
<script src="Media/tooltipster-1.2/js/jquery.tooltipster.min.js" charset="UTF-8" type="text/javascript"></script>
|
||||
<script src="Media/index.js" type="text/javascript"></script>
|
||||
<script src="Media/rules.js" type="text/javascript"></script>
|
||||
<?php endif; ?>
|
||||
<?php if (System::Config()->Debug): ?>
|
||||
<style type="text/css">
|
||||
body {
|
||||
background-color: #700000;
|
||||
}
|
||||
</style>
|
||||
<?php endif; ?>
|
||||
<script type="text/javascript">
|
||||
|
||||
var _gaq = _gaq || [];
|
||||
_gaq.push(['_setAccount', 'UA-32779476-1']);
|
||||
_gaq.push(['_trackPageview']);
|
||||
|
||||
(function() {
|
||||
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
|
||||
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
|
||||
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
|
||||
})();
|
||||
|
||||
</script>
|
||||
<?php if (isset($head)) echo $head; ?>
|
||||
</head>
|
||||
<body id="<?php if (isset($pageid)) echo $pageid; ?>">
|
||||
<div id="wrapper">
|
||||
<div id="header-wrapper">
|
||||
<div id="header">
|
||||
<div id="logo">
|
||||
<h1><a href="#">Htaccess Builder</a></h1>
|
||||
<p>
|
||||
Beta!
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="menu-wrapper">
|
||||
<div id="menu">
|
||||
<ul>
|
||||
<li class="page-builder"><a href="">Builder</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<!--<div id="donate">
|
||||
Find this useful? <br/>
|
||||
<div>
|
||||
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
|
||||
<input type="hidden" name="cmd" value="_s-xclick"/>
|
||||
<input type="hidden" name="hosted_button_id" value="N7V2ZSKNXCGW8"/>
|
||||
<input type="image" src="https://www.paypalobjects.com/en_GB/i/btn/btn_donate_SM.gif" class="image" border="0" name="submit" alt="£1" title="£1"/>
|
||||
<img alt="" border="0" src="https://www.paypalobjects.com/en_GB/i/scr/pixel.gif" width="1" height="1"/>
|
||||
</form>
|
||||
</div>
|
||||
</div>-->
|
||||
<?php $class = ''; if (!isset($sidebar) || $sidebar == False) $class = 'class="fullwidth"'?>
|
||||
<div id="page" <?=$class?>>
|
||||
<div id="page-bgtop" <?=$class?>>
|
||||
<div id="page-bgbtm" <?=$class?>>
|
||||
<div id="page-content" <?=$class?>>
|
||||
<?php if (isset($sidebar) && $sidebar == True): ?>
|
||||
<div id="content">
|
||||
<?php else: ?>
|
||||
<div id="content-fullwidth">
|
||||
<?php endif; ?>
|
||||
|
||||
<noscript>
|
||||
<div id="js-notice">
|
||||
Javascript is required to use this website :(
|
||||
</div>
|
||||
</noscript>
|
||||
|
||||
<img id="loading" src="Media/Images/loading.gif" alt="[*]" style="display: none;"/>
|
||||
Reference in New Issue
Block a user