Exemplo n.º 1
0
                                                                                                                                                                                    if ($_REQUEST["bb_action"] == "bb_main_edit_site_opt_profile") {
                                                                                                                                                                                        BB_RunPluginAction("pre_bb_main_edit_site_opt_profile");
                                                                                                                                                                                        $options = array("title" => "Edit Profile", "desc" => "View and make changes to your global user profile.  Changing profile information will change your login session and reload the page.  Save your work before proceeding.", "fields" => array(array("title" => "Username", "type" => "static", "value" => $bb_account["user"], "desc" => "Your username."), array("title" => "Profile Type", "type" => "static", "value" => BB_Translate($bb_account["type"] == "dev" ? "Developer/Programmer" : ($bb_account["type"] == "design" ? "Web Designer" : "Content Author")), "desc" => "Your profile type."), array("title" => "Group", "type" => "static", "value" => $bb_account["group"] == "" ? "[N/A]" : $bb_account["group"], "desc" => "Your profile group."), array("title" => "Current Password", "type" => "password", "name" => "oldpass", "value" => "", "desc" => "To change your password, enter your current password and then enter a new password below."), array("title" => "New Password", "type" => "password", "name" => "newpass", "value" => "", "desc" => "Enter a new password."), array("title" => "Repeat New Password", "type" => "password", "name" => "newpass2", "value" => "", "desc" => "Enter the new password again.")), "submit" => "Save", "focus" => true);
                                                                                                                                                                                        BB_RunPluginAction("bb_main_edit_site_opt_profile_options");
                                                                                                                                                                                        BB_PropertyForm($options);
                                                                                                                                                                                        BB_RunPluginAction("post_bb_main_edit_site_opt_profile");
                                                                                                                                                                                    } else {
                                                                                                                                                                                        if ($bb_account["type"] == "dev" && $_REQUEST["bb_action"] == "bb_main_edit_site_opt_create_account_submit") {
                                                                                                                                                                                            BB_RunPluginAction("pre_bb_main_edit_site_opt_create_account_submit");
                                                                                                                                                                                            if ($_REQUEST["user"] == "") {
                                                                                                                                                                                                BB_PropertyFormError("The 'Username' field is empty.");
                                                                                                                                                                                            }
                                                                                                                                                                                            if ($_REQUEST["pass"] == "") {
                                                                                                                                                                                                BB_PropertyFormError("The 'Password' field is empty.");
                                                                                                                                                                                            }
                                                                                                                                                                                            if (!BB_CreateUser($_REQUEST["type"], $_REQUEST["user"], $_REQUEST["pass"], $_REQUEST["group"])) {
                                                                                                                                                                                                BB_PropertyFormError("Unable to create the account.  An account with that username already exists.");
                                                                                                                                                                                            }
                                                                                                                                                                                            ?>
<div class="success"><?php 
                                                                                                                                                                                            echo htmlspecialchars(BB_Translate("Account Created."));
                                                                                                                                                                                            ?>
</div>
<script type="text/javascript">
ReloadMenu();
CloseProperties();
</script>
<?php 
                                                                                                                                                                                            BB_RunPluginAction("post_bb_main_edit_site_opt_create_account_submit");
                                                                                                                                                                                        } else {
                                                                                                                                                                                            if ($bb_account["type"] == "dev" && $_REQUEST["bb_action"] == "bb_main_edit_site_opt_create_account") {
Exemplo n.º 2
0
 $bb_accounts = array("users" => array(), "sessions" => array());
 if (trim($_REQUEST["dev_user"]) == "" || trim($_REQUEST["dev_pass"]) == "") {
     InstallError("The developer username and password fields must be filled in.");
 }
 if (!BB_CreateUser("dev", $_REQUEST["dev_user"], $_REQUEST["dev_pass"])) {
     InstallError("Unable to create the developer account.");
 }
 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) {