コード例 #1
0
ファイル: edit.php プロジェクト: harrylongworth/tv-bb
                                                                                                                                            if ($dirfile == "") {
                                                                                                                                                BB_PropertyFormError("Invalid 'Page Name'.");
                                                                                                                                            }
                                                                                                                                            if (is_dir($dirfile)) {
                                                                                                                                                BB_PropertyFormError("The subdirectory already exists.");
                                                                                                                                            }
                                                                                                                                            if (!BB_CreatePage($dirfile, "index")) {
                                                                                                                                                BB_PropertyFormError("Page creation failed.");
                                                                                                                                            }
                                                                                                                                        } else {
                                                                                                                                            if ($_REQUEST["type"] == "file") {
                                                                                                                                                $dir = BB_GetRealPath($_REQUEST["dir"]);
                                                                                                                                                if (file_exists(($dir == "" ? "." : $dir) . "/" . $dirfile . ".php")) {
                                                                                                                                                    BB_PropertyFormError("The page already exists.");
                                                                                                                                                }
                                                                                                                                                if (!BB_CreatePage($dir, $dirfile)) {
                                                                                                                                                    BB_PropertyFormError("Page creation failed.");
                                                                                                                                                }
                                                                                                                                            }
                                                                                                                                        }
                                                                                                                                        ?>
<div class="success"><?php 
                                                                                                                                        echo htmlspecialchars(BB_Translate("Page created."));
                                                                                                                                        ?>
</div>
<script type="text/javascript">
LoadProperties(<?php 
                                                                                                                                        echo BB_CreatePropertiesJS("bb_main_edit_site_opt_file_explorer", array("dir" => $_REQUEST["dir"]));
                                                                                                                                        ?>
);
</script>
コード例 #2
0
ファイル: install.php プロジェクト: harrylongworth/tv-bb
 InstallSuccess("Successfully set up the developer login account.");
 if (trim($_REQUEST["design_user"]) != "" && trim($_REQUEST["design_pass"]) != "") {
     if (!BB_CreateUser("design", $_REQUEST["design_user"], $_REQUEST["design_pass"])) {
         InstallError("Unable to create the web designer account.  Possible cause:  Duplicate usernames.  Usernames must be unique.");
     }
     InstallSuccess("Successfully set up the web designer login account.");
 }
 if (trim($_REQUEST["content_group"]) != "" && trim($_REQUEST["content_user"]) != "" && trim($_REQUEST["content_pass"]) != "") {
     if (!BB_CreateUser("content", $_REQUEST["content_user"], $_REQUEST["content_pass"], $_REQUEST["content_group"])) {
         InstallError("Unable to create the content author account.  Possible cause:  Duplicate usernames.  Usernames must be unique.");
     }
     InstallSuccess("Successfully set up the content author login account.");
 }
 InstallSuccess("Successfully set up the basic login account(s).");
 // Set up the root page.
 if (!BB_CreatePage("", "index")) {
     InstallError("Unable to create the root page.");
 }
 InstallSuccess("Successfully created the root page.");
 // Set up the main configuration file.
 function GetTimeoutInSeconds($timeout)
 {
     $timeout = explode(":", trim($timeout));
     if (count($timeout) > 3) {
         $timeout = array_slice($timeout, -3);
     }
     switch (count($timeout)) {
         case 1:
             $timeout = (int) $timeout[0] * 60;
             break;
         case 2: