當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。