Ejemplo n.º 1
0
<?php

$autoModule = new BigTreeAutoModule();
// Grab View Data
if (isset($_GET["view"])) {
    $bigtree["view"] = BigTreeAutoModule::getView(sqlescape($_GET["view"]));
}
if (isset($_GET["module"])) {
    $bigtree["module"] = $admin->getModuleByRoute($_GET["module"]);
}
BigTree::globalizeArray($bigtree["view"]);
$search = isset($_GET["search"]) ? $_GET["search"] : "";
$page = isset($_GET["page"]) ? intval($_GET["page"]) : 1;
if (isset($_GET["sort"])) {
    $sort = $_GET["sort"] . " " . $_GET["sort_direction"];
    // Append information to the end of an edit string so that we can return to the same set of search results after submitting a form.
    $edit_append = "?view_data=" . base64_encode(serialize(array("view" => $bigtree["view"]["id"], "sort" => $_GET["sort"], "sort_direction" => $_GET["sort_direction"], "search" => $search, "page" => $page)));
} else {
    if (isset($options["sort_column"])) {
        $sort = $options["sort_column"] . " " . $options["sort_direction"];
    } elseif (isset($options["sort"])) {
        $sort = $options["sort"];
    } else {
        $sort = "id DESC";
    }
    // Same thing we were going to do above but omit the sort stuff.
    $edit_append = "?view_data=" . base64_encode(serialize(array("view" => $bigtree["view"]["id"], "search" => $search, "page" => $page)));
}
$module_page = ADMIN_ROOT . $bigtree["module"]["route"] . "/";
// Setup the preview action if we have a preview URL and field.
if ($bigtree["view"]["preview_url"]) {
Ejemplo n.º 2
0
<?php

$item = $cms->getFeed(end($bigtree["commands"]));
BigTree::globalizeArray($item);
?>
<div class="container">
	<form method="post" action="<?php 
echo DEVELOPER_ROOT;
?>
feeds/update/<?php 
echo $id;
?>
/" class="module">
		<?php 
include BigTree::path("admin/modules/developer/feeds/_form-content.php");
?>
		<footer>
			<input type="submit" class="button blue" value="Update" />
		</footer>
	</form>
</div>

<?php 
include BigTree::path("admin/modules/developer/feeds/_common-js.php");
Ejemplo n.º 3
0
<?php

$type = $admin->getFieldType(end($bigtree["commands"]));
BigTree::globalizeArray($type, array("htmlspecialchars"));
?>
<div class="container">
	<form method="post" action="<?php 
echo DEVELOPER_ROOT;
?>
field-types/update/" enctype="multipart/form-data" class="module">
		<input type="hidden" name="id" value="<?php 
echo $id;
?>
" />
		<section>
			<fieldset>
				<label class="required">Name</label>
				<input type="text" class="required" name="name" value="<?php 
echo $name;
?>
" />
			</fieldset>
			<fieldset>
				<label class="required">Use Cases</label>
				<ul class="developer_field_types_usage">
					<li><input type="checkbox" name="use_cases[templates]"<?php 
if ($use_cases["templates"]) {
    ?>
 checked="checked"<?php 
}
?>
Ejemplo n.º 4
0
<?php

$item = $admin->getSetting(end($bigtree["path"]));
BigTree::globalizeArray($item, array("htmlspecialchars"));
if (isset($_SESSION["bigtree_admin"]["developer"]["setting_data"])) {
    BigTree::globalizeArray($_SESSION["bigtree_admin"]["developer"]["setting_data"]);
    unset($_SESSION["bigtree_admin"]["developer"]["setting_data"]);
}
if (isset($_SESSION["bigtree_admin"]["developer"]["error"])) {
    $e = $_SESSION["bigtree_admin"]["developer"]["error"];
    unset($_SESSION["bigtree_admin"]["developer"]["error"]);
} else {
    $e = false;
}
?>
<div class="container">
	<form class="module" method="post" action="<?php 
echo DEVELOPER_ROOT;
?>
settings/update/<?php 
echo $item["id"];
?>
/">
		<?php 
include BigTree::path("admin/modules/developer/settings/_form-content.php");
?>
		<footer>
			<input type="submit" class="button blue" value="Update" />
		</footer>
	</form>
</div>
Ejemplo n.º 5
0
<?php

BigTree::globalizeArray($_SESSION["bigtree_admin"]["form_data"]);
?>
<div class="container">
	<section>
		<div class="alert">
			<span></span>
			<p>Your submission had <?php 
echo count($errors);
?>
 error<?php 
if (count($errors) != 1) {
    ?>
s<?php 
}
?>
.</p>
		</div>
		<div class="table error_table">
			<header>
				<span class="view_column field">Field</span>
				<span class="view_column error">Error</span>
			</header>
			<ul>
				<?php 
foreach ($errors as $error) {
    ?>
				<li>
					<section class="view_column field"><?php 
    echo $error["field"];
Ejemplo n.º 6
0
<?php

$security_policy = $cms->getSetting("bigtree-internal-security-policy");
BigTree::globalizeArray($security_policy, "htmlspecialchars");
?>
<div class="container" id="security_settings">
	<form method="post" action="<?php 
echo DEVELOPER_ROOT;
?>
security/update/">
		<section>
			<div class="contain">
				<div class="left">
					<h3>Failed Logins</h3>
					<p>Rules to prevent brute forcing of passwords.</p>
					<fieldset class="rule">
						<input type="text" name="user_fails[count]" value="<?php 
echo $user_fails["count"];
?>
" /> failed logins for a given <strong>user</strong> over <br />
						<input type="text" name="user_fails[time]" value="<?php 
echo $user_fails["time"];
?>
" /> minutes leads to a ban of the <strong>user</strong> for <br />
						<input type="text" name="user_fails[ban]" value="<?php 
echo $user_fails["ban"];
?>
" /> <strong>minutes</strong> or until a password reset
					</fieldset>
					<fieldset class="rule">
						<input type="text" name="ip_fails[count]" value="<?php 
Ejemplo n.º 7
0
<?php

$template = $cms->getTemplate(end($bigtree["path"]));
BigTree::globalizeArray($template);
$show_error = false;
?>
<div class="container">
	<form method="post" action="<?php 
echo DEVELOPER_ROOT;
?>
templates/update/" enctype="multipart/form-data" class="module">
		<input type="hidden" name="id" value="<?php 
echo $template["id"];
?>
" />
		<?php 
include BigTree::path("admin/modules/developer/templates/_form-content.php");
?>
		<footer>
			<input type="submit" class="button blue" value="Update" />
		</footer>
	</form>
</div>

<?php 
include BigTree::path("admin/modules/developer/templates/_common-js.php");
?>
<script>
	BigTree.localResourceCount = <?php 
echo $x;
?>
Ejemplo n.º 8
0
<?php

// Clear out notices
$name = $description = $callouts_enabled = $level = $module = $image = "";
$resources = array();
$show_error = false;
if ($_SESSION["bigtree_admin"]["error"]) {
    BigTree::globalizeArray($_SESSION["bigtree_admin"]["saved"]);
    $show_error = $_SESSION["bigtree_admin"]["error"];
    unset($_SESSION["bigtree_admin"]["error"]);
    unset($_SESSION["bigtree_admin"]["saved"]);
}
?>
<div class="container">
	<form method="post" action="<?php 
echo DEVELOPER_ROOT;
?>
templates/create/" enctype="multipart/form-data" class="module">
		<?php 
include BigTree::path("admin/modules/developer/templates/_form-content.php");
?>
		<footer>
			<input type="submit" class="button blue" value="Create" />
		</footer>
	</form>
</div>
<?php 
include BigTree::path("admin/modules/developer/templates/_common-js.php");
Ejemplo n.º 9
0
<?php

$error = "";
if (isset($_SESSION["bigtree_admin"]["create_user"])) {
    BigTree::globalizeArray($_SESSION["bigtree_admin"]["create_user"], array("htmlspecialchars"));
    $daily_digest = isset($daily_digest) ? $daily_digest : false;
    unset($_SESSION["bigtree_admin"]["create_user"]);
} else {
    $email = "";
    $name = "";
    $company = "";
    $daily_digest = "on";
    $level = 0;
}
?>
<div class="container">
	<form class="module" action="<?php 
echo ADMIN_ROOT;
?>
users/create/" method="post">	
		<section>
			<p class="error_message"<?php 
if (!$error) {
    ?>
 style="display: none;"<?php 
}
?>
>Errors found! Please fix the highlighted fields before submitting.</p>
			<div class="left">
				<fieldset<?php 
if ($error == "email") {
Ejemplo n.º 10
0
<?php

$bigtree["edit_id"] = $bigtree["commands"][0];
$item = BigTreeAutoModule::getItem("btx_social_feed_queries", $bigtree["edit_id"]);
BigTree::globalizeArray($item["item"]);
$action = "update-query/" . $bigtree["edit_id"] . "/";
$button_value = "Update";
include "_form.php";
Ejemplo n.º 11
0
<?php

$user = $admin->getUser($admin->ID);
$bigtree["gravatar"] = $user["email"];
BigTree::globalizeArray($user, array("htmlspecialchars"));
?>
<div class="container">
	<form class="module" action="<?php 
echo ADMIN_ROOT;
?>
users/profile/update/" method="post">
		<section>
			<div class="left">
				<fieldset>
					<label>Name</label>
					<input type="text" name="name" value="<?php 
echo $name;
?>
" tabindex="1" />
				</fieldset>
				<fieldset>
					<label>Password <small>(leave blank to remain unchanged)</small></label>
					<input type="password" name="password" value="" tabindex="3" autocomplete="off" />
				</fieldset>
			</div>
			<div class="right">
				<fieldset>
					<label>Company</label>
					<input type="text" name="company" value="<?php 
echo $company;
?>
Ejemplo n.º 12
0
<?php

if (isset($cloud->Settings["amazon"])) {
    BigTree::globalizeArray($cloud->Settings["amazon"], "htmlspecialchars");
} else {
    $key = $secret = "";
}
?>
<div class="container">
	<form method="post" action="<?php 
echo DEVELOPER_ROOT;
?>
cloud-storage/amazon/update/" class="module">
		<section>
			<div class="alert">
				<p>To enable usage of Amazon S3 for all BigTree uploads enter your access keys below.<br />Please note that this change is not retroactive -- only future uploads will be stored on Amazon S3.</p>
			</div>	
			<fieldset>
				<label>Access Key ID</label>
				<input type="text" name="key" value="<?php 
echo $key;
?>
" />
			</fieldset>
			<fieldset>
				<label>Secret Access Key</label>
				<input type="text" name="secret" value="<?php 
echo $secret;
?>
" />
			</fieldset>
Ejemplo n.º 13
0
<?php

$regions = array("ORD" => "Chicago, IL (USA)", "DFW" => "Dallas/Ft. Worth, TX (USA)", "HKG" => "Hong Kong", "LON" => "London (UK)", "IAD" => "Northern Virginia (USA)", "SYD" => "Sydney (Australia)");
if (isset($cloud->Settings["rackspace"])) {
    BigTree::globalizeArray($cloud->Settings["rackspace"], "htmlspecialchars");
} else {
    $api_key = $username = $region = "";
}
?>
<div class="container">
	<form method="post" action="<?php 
echo DEVELOPER_ROOT;
?>
cloud-storage/rackspace/update/" class="module">
		<section>
			<fieldset>
				<label>API Key</label>
				<input type="text" name="api_key" value="<?php 
echo $api_key;
?>
" />
			</fieldset>
			<fieldset>
				<label>Username</label>
				<input type="text" name="username" value="<?php 
echo $username;
?>
" />
			</fieldset>
			<fieldset>
				<label>Region <small>(choose the location closest to your server)</small></label>
Ejemplo n.º 14
0
<?php

$groups = $admin->getModuleGroups("name ASC");
// Stop notices
$gbp = array();
$name = $route = $group_new = $group_existing = $table = $class = "";
$icon = "gear";
if (isset($_SESSION["bigtree_admin"]["saved"])) {
    BigTree::globalizeArray($_SESSION["bigtree_admin"]["saved"], "htmlspecialchars");
    unset($_SESSION["bigtree_admin"]["saved"]);
}
?>
<div class="container">
	<form method="post" action="<?php 
echo DEVELOPER_ROOT;
?>
modules/create/" class="module">
		<section>
			<p class="error_message" style="display: none;">Errors found! Please fix the highlighted fields before submitting.</p>
			<div class="contain">
				<div class="left">
					<fieldset>
						<label class="required">Name</label>
						<input name="name" class="required" type="text" value="<?php 
echo $name;
?>
" />
					</fieldset>
				</div>
				<div class="right">
					<fieldset<?php 
Ejemplo n.º 15
0
<?php

$report = BigTreeAutoModule::getReport(end($bigtree["commands"]));
$action = $admin->getModuleActionForReport($report);
BigTree::globalizeArray($report);
// Find out available views to use
$available_views = $admin->getModuleViews("title", $action["module"]);
?>
<div class="container">
	<form method="post" action="<?php 
echo SECTION_ROOT;
?>
update/<?php 
echo $report["id"];
?>
/" class="module">
		<?php 
if ($_GET["return"] == "front") {
    ?>
		<input type="hidden" name="return_page" value="<?php 
    echo htmlspecialchars($_SERVER["HTTP_REFERER"]);
    ?>
" />
		<?php 
}
?>
		<section>
			<div class="left last">
				<fieldset>
					<label class="required">Title</label>
					<input type="text" class="required" name="title" value="<?php 
Ejemplo n.º 16
0
<?php

$callout = $admin->getCallout(end($bigtree["path"]));
BigTree::globalizeArray($callout);
$resources = $callout["resources"];
?>
<div class="container">
	<form method="post" action="<?php 
echo DEVELOPER_ROOT;
?>
callouts/update/" enctype="multipart/form-data" class="module">
		<input type="hidden" name="id" value="<?php 
echo $callout["id"];
?>
" />
		<?php 
include BigTree::path("admin/modules/developer/callouts/_form-content.php");
?>
		<footer>
			<input type="submit" class="button blue" value="Update" />
		</footer>
	</form>
</div>

<?php 
include BigTree::path("admin/modules/developer/callouts/_common-js.php");
?>
<script>
	BigTree.localResourceCount = <?php 
echo $x;
?>
Ejemplo n.º 17
0
<?php

$form = BigTreeAutoModule::getEmbedForm(end($bigtree["commands"]));
BigTree::globalizeArray($form);
$module = $admin->getModule($module);
if (!BigTree::tableExists($table)) {
    ?>
<div class="container">
	<section>
		<div class="alert">
			<span></span>
			<h3>Error</h3>
		</div>
		<p>The table for this form (<?php 
    echo $table;
    ?>
) no longer exists.</p>
	</section>
	<footer>
		<a href="javascript:history.go(-1);" class="button">Back</a>
		<a href="<?php 
    echo DEVELOPER_ROOT;
    ?>
modules/embeds/delete/<?php 
    echo $form["id"];
    ?>
/?module=<?php 
    echo $module["id"];
    ?>
" class="button red">Delete Form</a>
	</footer>
Ejemplo n.º 18
0
<?php

$mpage = ADMIN_ROOT . $module["route"] . "/";
BigTree::globalizeArray($view);
?>
<div class="table" id="" class="image_list">
	<summary><h2>Search Results</h2></summary>
	<header>
		<span class="view_column">Click an image to edit it.</span>
	</header>
	<section>
		<ul id="image_list_<?php 
echo $view["id"];
?>
" class="image_list">
			<?php 
foreach ($items as $item) {
    if ($options["preview_prefix"]) {
        $preview_image = BigTree::prefixFile($item[$options["image"]], $options["preview_prefix"]);
    } else {
        $preview_image = $item[$options["image"]];
    }
    ?>
			<li id="row_<?php 
    echo $item["id"];
    ?>
">
				<a class="image" href="<?php 
    echo $view["edit_url"] . $item["id"];
    ?>
/"><img src="<?php 
Ejemplo n.º 19
0
<?php

$id = htmlspecialchars($_GET["module"]);
$table = isset($_GET["table"]) ? $_GET["table"] : "";
$title = isset($_GET["title"]) ? htmlspecialchars($_GET["title"]) : "";
// See if we can default to positioned
$is_positioned = false;
if ($table) {
    $table_description = BigTree::describeTable($table);
    if (isset($table_description["columns"]["position"]) && $table_description["columns"]["position"]["type"] == "int") {
        $is_positioned = true;
    }
}
$module = $admin->getModule($id);
if (isset($_SESSION["bigtree_admin"]["developer"]["saved_view"])) {
    BigTree::globalizeArray($_SESSION["bigtree_admin"]["developer"]["saved_view"], array("htmlspecialchars"));
    unset($_SESSION["bigtree_admin"]["developer"]["saved_view"]);
} else {
    // Stop notices
    $description = $type = $preview_url = "";
    $options = array();
    if ($is_positioned) {
        $type = "draggable";
    }
}
?>
<div class="container">

	<form method="post" action="<?php 
echo DEVELOPER_ROOT;
?>
Ejemplo n.º 20
0
<?php

$user = $admin->getUser($admin->ID);
$bigtree["gravatar"] = $user["email"];
BigTree::globalizeArray($user, array("htmlspecialchars"));
$error = false;
if (isset($_SESSION["bigtree_admin"]["update_profile"])) {
    BigTree::globalizeArray($_SESSION["bigtree_admin"]["update_profile"], array("htmlspecialchars"));
    $daily_digest = isset($daily_digest) ? $daily_digest : false;
    unset($_SESSION["bigtree_admin"]["update_profile"]);
    $error = true;
}
?>
<div class="container">
	<form class="module" action="<?php 
echo ADMIN_ROOT;
?>
users/profile/update/" method="post">
		<section>
			<p class="error_message"<?php 
if (!$error) {
    ?>
 style="display: none;"<?php 
}
?>
>Errors found! Please fix the highlighted fields before submitting.</p>
			<div class="left">
				<fieldset>
					<label>Name</label>
					<input type="text" name="name" value="<?php 
echo $name;
Ejemplo n.º 21
0
<?php

BigTree::globalizeArray($_SESSION["bigtree_admin"]["developer"]["package"], "strip_tags", "htmlspecialchars");
$available_licenses = array("Closed Source" => array("Free For Personal Use" => "", "Proprietary" => ""), "Open Source" => array("LGPL v2.1" => "http://opensource.org/licenses/LGPL-2.1", "LGPL v3" => "http://opensource.org/licenses/LGPL-3.0", "GPL v2" => "http://opensource.org/licenses/GPL-2.0", "GPL v3" => "http://opensource.org/licenses/GPL-3.0", "MIT" => "http://opensource.org/licenses/MIT", "BSD 2-Clause" => "http://opensource.org/licenses/BSD-2-Clause", "BSD 3-Clause" => "http://opensource.org/licenses/BSD-3-Clause", "Apache 2.0" => "http://opensource.org/licenses/Apache-2.0", "MPL 2.0" => "http://opensource.org/licenses/MPL-2.0"));