本文整理汇总了PHP中BigTree::globalizePOSTVars方法的典型用法代码示例。如果您正苦于以下问题:PHP BigTree::globalizePOSTVars方法的具体用法?PHP BigTree::globalizePOSTVars怎么用?PHP BigTree::globalizePOSTVars使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BigTree
的用法示例。
在下文中一共展示了BigTree::globalizePOSTVars方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
<?php
BigTree::globalizePOSTVars();
$p =& $_SESSION["bigtree_admin"]["developer"]["package"];
$p["module_groups"] = array();
$p["modules"] = $modules;
$p["templates"] = $templates;
$p["callouts"] = $callouts;
$p["settings"] = $settings;
$p["feeds"] = $feeds;
$p["field_types"] = $field_types;
// Get a list of custom field types so we can auto include any that modules rely on
$ft = $admin->getFieldTypes();
foreach ($ft as $type) {
$custom_field_types[$type["id"]] = true;
}
// Infer tables/files to include from the modules
foreach ((array) $modules as $module_id) {
if ($module_id) {
$module = $admin->getModule($module_id);
$actions = $admin->getModuleActions($module_id);
// Get all the tables of the module's actions.
foreach ($actions as $action) {
if ($action["form"] || $action["view"] || $action["report"]) {
if ($action["form"]) {
$auto = BigTreeAutoModule::getForm($action["form"]);
// Figure out what tables and field types the form uses and automatically add them.
foreach ($auto["fields"] as $field) {
// Database populated list? Include the table it pulls from.
if ($field["type"] == "list" && $field["options"]["list_type"] == "db") {
if (!in_array($field["options"]["pop-table"] . "#structure", $p["tables"]) && substr($field["options"]["pop-table"], 0, 8) != "bigtree_") {
示例2: date
<?php
BigTree::globalizePOSTVars("htmlspecialchars");
// Get cleaned up prices, dates, and entries
if ($early_bird) {
$early_bird_date = "'" . date("Y-m-d H:i:s", strtotime(str_replace("@", "", $_POST["early_bird_date"]))) . "'";
$early_bird_base_price = floatval(str_replace(array('$', ',', ' '), '', $_POST["early_bird_base_price"]));
} else {
$early_bird_date = "NULL";
}
$base_price = floatval(str_replace(array('$', ',', ' '), '', $_POST["base_price"]));
$max_entries = intval($max_entries);
// Create the form.
$form = BigTreeAutoModule::createItem("btx_form_builder_forms", array("title" => $title, "paid" => $paid, "base_price" => $base_price, "early_bird_base_price" => $early_bird_base_price, "early_bird_date" => $early_bird_date, "limit_entries" => $limit_entries, "max_entries" => $max_entries));
// Setup the default column, sort position, alignment inside columns.
$position = count($_POST["type"]);
$column = 0;
$alignment = "";
foreach ($_POST["type"] as $key => $type) {
if ($type == "column_start") {
// If we're starting a set of columns and don't have an alignment it's a new set.
if (!$alignment) {
$column = BigTreeAutoModule::createItem("btx_form_builder_fields", array("form" => $form, "type" => "column", "position" => $position));
$alignment = "left";
// Otherwise we're starting the second column of the set, just change the alignment.
} elseif ($alignment == "left") {
$alignment = "right";
}
} elseif ($type == "column_end") {
if ($alignment == "right") {
$column = 0;