예제 #1
0
파일: admin.php 프로젝트: milan-hwj/tempGit
                    $confirm->add('Installation successful. You have added <b>' . $username . '</b> as an administrator and are now logged in.');
                    # Log in the installer
                    $user->login($username);
                } else {
                    # Add error message
                    $error->add('Installation failed. The settings file appears writable but file_put_contents() failed.');
                }
                # Redirect
                $location->redirect();
            }
        }
        # Prepare skin variables
        $output->title = 'install';
        $output->bodyTitle = 'First time use installation';
        # Add javascript
        $output->addDomReady("document.getElementById('username').focus();");
        # Is the settings file writable?
        if (!($writable = is_writable(ADMIN_GLYPE_SETTINGS))) {
            $error->add('The settings file was found at <b>' . ADMIN_GLYPE_SETTINGS . '</b> but is not writable. Please set the appropriate permissions to make the settings file writable.');
            # And disable the submit button
            $tpl->disabled = ' disabled="disabled"';
        } else {
            $confirm->add('Settings file was found and is writable. Installation can proceed. <b>Do not leave the script at this stage!</b>');
        }
        # Print form
        echo <<<OUT
\t\t<p>No administrator details were found in the settings file. Enter a username and password below to continue. The details supplied will be required on all future attempts to use this control panel.</p>

\t\t<form action="{$self}?install" method="post">
\t\t\t<table class="form_table" border="0" cellpadding="0" cellspacing="0">
\t\t\t<tr>
예제 #2
0
                    $confirm->add('Installation successful. You have added <b>' . $username . '</b> as an administrator and are now logged in.');
                    // Log in the installer
                    $user->login($username);
                } else {
                    // Add error message
                    $error->add('Installation failed. The settings file appears writable but file_put_contents() failed.');
                }
                // Redirect
                $location->redirect();
            }
        }
        // Prepare skin variables
        $output->title = 'install';
        $output->bodyTitle = 'First time use installation';
        // Add javascript
        $output->addDomReady("document.getElementById('username').focus();");
        // Is the settings file writable?
        if (!($writable = is_writable(ADMIN_GLYPE_SETTINGS))) {
            $error->add('The settings file was found at <b>' . ADMIN_GLYPE_SETTINGS . '</b> but is not writable. Please set the appropriate permissions to make the settings file writable.');
            // And disable the submit button
            $tpl->disabled = ' disabled="disabled"';
        } else {
            $confirm->add('Settings file was found and is writable. Installation can proceed. <b>Do not leave the script at this stage!</b>');
        }
        // Print form
        echo <<<OUT
      <p>No administrator details were found in the settings file. Enter a username and password below to continue. The details supplied will be required on all future attempts to use this control panel.</p>

      <form action="{$self}?install" method="post">
         <table class="form_table" border="0" cellpadding="0" cellspacing="0">
         <tr>