This repository has been archived by the owner on Mar 3, 2021. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit a9089b0
Showing
38 changed files
with
5,130 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
DirectoryIndex index.php | ||
|
||
# disable directory browsing | ||
Options -Indexes | ||
|
||
#Rewrites, also handles error pages | ||
<IfModule mod_rewrite.c> | ||
RewriteEngine On | ||
RewriteCond %{REQUEST_FILENAME} !-f | ||
RewriteCond %{REQUEST_FILENAME} !-d | ||
RewriteRule ^([a-zA-Z0-9\/\-\_\.\:]+) index.php?p=$1 [L] | ||
</IfModule> |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
<?php | ||
/* | ||
BasicPages | ||
Author: Ben Merrill <ben@basicpages.org> | ||
This file is part of BasicPages. | ||
BasicPages is free software: you can redistribute it and/or modify | ||
it under the terms of the GNU General Public License as published by | ||
the Free Software Foundation, either version 3 of the License, or | ||
(at your option) any later version. | ||
Foobar is distributed in the hope that it will be useful, | ||
but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
GNU General Public License for more details. | ||
You should have received a copy of the GNU General Public License | ||
along with BasicPages. If not, see <http://www.gnu.org/licenses/>. | ||
BasicPages and associated trademarks are property of their respective owners. | ||
*/ | ||
|
||
define('BP_START', true); | ||
|
||
//load up libraries | ||
require_once('../bp_config.php'); | ||
require_once(PATH.'/bp_lib/bp_functions.php'); | ||
require_once(PATH.'/bp_lib/bp_content.php'); | ||
|
||
//see if we have permissions to be here | ||
if (false === bp_admin_check_auth()) { | ||
die(json_encode(array('success' => 0, 'msg' => 'Unauthorized Access'))); | ||
} | ||
|
||
//make sure we're using POST | ||
if (false === isset($_POST)) { | ||
die(json_encode(array('success' => 0, 'msg' => 'POST method is required'))); | ||
} | ||
|
||
//figure out what we're doing | ||
switch ($_POST['m']) { | ||
case 'auto_save': | ||
//make sure we have what we need | ||
if (false === isset($_POST['p']) || false === isset($_POST['content'])) { | ||
die(json_encode(array('success' => 0, 'msg' => 'Missing some data'))); | ||
} | ||
//load up the page object | ||
$bp = new bp_Content($_POST['p'], 'unpublished'); | ||
$options = array( | ||
'publish' => 0, | ||
'theme' => $_POST['theme'], | ||
'style' => $_POST['style'], | ||
'nav' => intval($_POST['nav']), | ||
'sitemap' => intval($_POST['sitemap']), | ||
'keywords' => (($_POST['keywords'] == 'keyword, another keyword, etc') ? '' : $_POST['keywords']), | ||
'description' => (($_POST['description'] == 'a description of what this page has to offer; shown in search engine listings') ? '' : $_POST['description']), | ||
); | ||
//save the contents and report | ||
if (false !== $bp->save($_POST['p'], $_POST['content'], $options)) { | ||
die(json_encode(array('success' => 1, 'msg' => 'Saved <abbr class="timeago" title="'.date(DATE_ATOM).'">'.date(DATE_ATOM).'</abbr> '))); | ||
} | ||
else { | ||
die(json_encode(array('success' => 0, 'msg' => 'Auto Save Failed.'))); | ||
} | ||
break; | ||
case 'upload_image': | ||
//process the upload | ||
if (false === ($filename = @bp_admin_upload_image())) { | ||
die(json_encode(array('success' => 0, 'msg' => 'Upload Failed.'))); | ||
} | ||
else { | ||
die(json_encode(array('success' => 1, 'msg' => $filename))); | ||
} | ||
break; | ||
default: | ||
die(json_encode(array('success' => 0, 'msg' => 'Nothing to do'))); | ||
break; | ||
} | ||
?> |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<?php | ||
/* | ||
BasicPages | ||
Author: Ben Merrill <ben@basicpages.org> | ||
This file is part of BasicPages. | ||
BasicPages is free software: you can redistribute it and/or modify | ||
it under the terms of the GNU General Public License as published by | ||
the Free Software Foundation, either version 3 of the License, or | ||
(at your option) any later version. | ||
Foobar is distributed in the hope that it will be useful, | ||
but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
GNU General Public License for more details. | ||
You should have received a copy of the GNU General Public License | ||
along with BasicPages. If not, see <http://www.gnu.org/licenses/>. | ||
BasicPages and associated trademarks are property of their respective owners. | ||
*/ | ||
?> | ||
|
||
<div class="clear"></div> | ||
</div> | ||
<div class="credits">© <?php print date("Y");?> <a href="http://www.basicpages.org">BasicPages</a> <?php print bp_version();?></div> | ||
</div> | ||
|
||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
<?php | ||
/* | ||
BasicPages | ||
Author: Ben Merrill <ben@basicpages.org> | ||
This file is part of BasicPages. | ||
BasicPages is free software: you can redistribute it and/or modify | ||
it under the terms of the GNU General Public License as published by | ||
the Free Software Foundation, either version 3 of the License, or | ||
(at your option) any later version. | ||
Foobar is distributed in the hope that it will be useful, | ||
but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
GNU General Public License for more details. | ||
You should have received a copy of the GNU General Public License | ||
along with BasicPages. If not, see <http://www.gnu.org/licenses/>. | ||
BasicPages and associated trademarks are property of their respective owners. | ||
*/ | ||
?> | ||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | ||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> | ||
<head profile="http://gmpg.org/xfn/11"> | ||
<meta http-equiv="content-type" content="text/html; charset=UTF-8" /> | ||
<meta http-equiv="content-style-type" content="text/css" /> | ||
<meta name="resource-type" content="document" /> | ||
<meta name="language" content="en-gb" /> | ||
<meta name="distribution" content="global" /> | ||
<meta name="copyright" content="<?php print date('Y').' Basic Info Site';?>" /> | ||
<meta name="keywords" content="" /> | ||
<meta name="description" content="" /> | ||
<meta name="generator" content="BasicPages" /> | ||
|
||
<title>Site Administration</title> | ||
<link rel="stylesheet" type="text/css" href="<?php print bp_url('bp_themes/basic/blue-grey.css');?>" /> | ||
<script type="text/javascript" src="<?php print bp_url('bp_lib/js/jquery-1.5.min.js');?>"></script> | ||
</head> | ||
|
||
<body> | ||
<div align="center"> | ||
<?php if (isset($msg)) { print $msg; } ?> | ||
<div class="corners" id="body_container" align="left" style="padding-top:10px;"> |
Oops, something went wrong.