当前位置: 首页>>代码示例>>PHP>>正文


PHP BigTree::tableExists方法代码示例

本文整理汇总了PHP中BigTree::tableExists方法的典型用法代码示例。如果您正苦于以下问题:PHP BigTree::tableExists方法的具体用法?PHP BigTree::tableExists怎么用?PHP BigTree::tableExists使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在BigTree的用法示例。


在下文中一共展示了BigTree::tableExists方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: array

									<span class="permission_level"><input type="radio" data-category="Module" data-key="<?php 
            echo $m["id"];
            ?>
" name="permissions[module][<?php 
            echo $m["id"];
            ?>
]" value="n" <?php 
            if (!$permissions["module"][$m["id"]] || $permissions["module"][$m["id"]] == "n") {
                ?>
checked="checked" <?php 
            }
            ?>
/></span>
									<?php 
            if (isset($gbp["enabled"]) && $gbp["enabled"]) {
                if (BigTree::tableExists($gbp["other_table"])) {
                    $categories = array();
                    $ot = sqlescape($gbp["other_table"]);
                    $tf = sqlescape($gbp["title_field"]);
                    if ($tf && $ot) {
                        $q = sqlquery("SELECT id,`{$tf}` FROM `{$ot}` ORDER BY `{$tf}` ASC");
                        ?>
									<ul class="depth_2"<?php 
                        if ($closed) {
                            ?>
 style="display: none;"<?php 
                        }
                        ?>
>
										<?php 
                        while ($c = sqlfetch($q)) {
开发者ID:matthisamoto,项目名称:Graphfan,代码行数:31,代码来源:edit.php

示例2: array

<?php

$db_error = false;
$is_group_based_perm = false;
$list = array();
// Database populated list.
if ($field["options"]["list_type"] == "db") {
    $list_table = $field["options"]["pop-table"];
    $list_id = $field["options"]["pop-id"];
    $list_title = $field["options"]["pop-description"];
    $list_sort = $field["options"]["pop-sort"];
    // If debug is on we're going to check if the tables exists...
    if ($bigtree["config"]["debug"] && !BigTree::tableExists($list_table)) {
        $db_error = true;
    } else {
        $q = sqlquery("SELECT `id`,`{$list_title}` FROM `{$list_table}` ORDER BY {$list_sort}");
        // Check if we're doing module based permissions on this table.
        if ($bigtree["module"] && $bigtree["module"]["gbp"]["enabled"] && $form["table"] == $bigtree["module"]["gbp"]["table"] && $key == $bigtree["module"]["gbp"]["group_field"]) {
            $is_group_based_perm = true;
            while ($f = sqlfetch($q)) {
                // Find out whether the logged in user can access a given group, and if so, specify the access level.
                $access_level = $admin->canAccessGroup($bigtree["module"], $f["id"]);
                if ($access_level) {
                    $list[] = array("value" => $f["id"], "description" => $f[$list_title], "access_level" => $access_level);
                }
            }
            // We're not doing module group based permissions, get a regular list.
        } else {
            while ($f = sqlfetch($q)) {
                $list[] = array("value" => $f["id"], "description" => $f[$list_title]);
            }
开发者ID:kalle0045,项目名称:BigTree-CMS,代码行数:31,代码来源:list.php

示例3: array

<?php

BigTree::globalizePOSTVars();
$errors = array();
// Check if the table exists
if (BigTree::tableExists($table)) {
    $errors["table"] = "The table you chose already exists.";
}
// Check if the class name exists
if (class_exists($class)) {
    $errors["class"] = "The class name you chose already exists.";
}
if (count($errors)) {
    $_SESSION["developer"]["designer_errors"] = $errors;
    $_SESSION["developer"]["saved_module"] = $_POST;
    BigTree::redirect(DEVELOPER_ROOT . "modules/designer/");
}
if ($group_new) {
    $group = $admin->createModuleGroup($group_new, "on");
} else {
    $group = $group_existing;
}
$id = $admin->createModule($name, $group, $class, $table, $gbp, $icon);
// Create the table.
sqlquery("CREATE TABLE `{$table}` (`id` int(11) UNSIGNED NOT NULL auto_increment, PRIMARY KEY (`id`)) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci");
BigTree::redirect(DEVELOPER_ROOT . "modules/designer/form/?table=" . urlencode($table) . "&module={$id}");
开发者ID:kurt-planet,项目名称:BigTree-CMS,代码行数:26,代码来源:create.php


注:本文中的BigTree::tableExists方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。