diff options
Diffstat (limited to 'views/failsafe')
23 files changed, 106 insertions, 815 deletions
diff --git a/views/failsafe/canvas/default.php b/views/failsafe/canvas/default.php deleted file mode 100644 index ef6d6b41d..000000000 --- a/views/failsafe/canvas/default.php +++ /dev/null @@ -1,21 +0,0 @@ -<?php
-
- /**
- * Elgg default layout
- *
- * @package Elgg
- * @subpackage Core
- * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
- * @author Curverider Ltd
- * @copyright Curverider Ltd 2008-2009
- * @link http://elgg.org/
- */
-
- for ($i = 1; $i < 8; $i++) {
-
- if (isset($vars["area{$i}"]))
- echo $vars["area{$i}"];
-
- }
-
-?>
\ No newline at end of file diff --git a/views/failsafe/input/button.php b/views/failsafe/input/button.php deleted file mode 100644 index ac1bfe784..000000000 --- a/views/failsafe/input/button.php +++ /dev/null @@ -1,41 +0,0 @@ -<?php - /** - * Create a input button - * Use this view for forms rather than creating a submit/reset button tag in the wild as it provides - * extra security which help prevent CSRF attacks. - * - * @package Elgg - * @subpackage Core - * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2 - * @author Curverider Ltd - * @copyright Curverider Ltd 2008-2009 - * @link http://elgg.org/ - * - * @uses $vars['value'] The current value, if any - * @uses $vars['js'] Any Javascript to enter into the input tag - * @uses $vars['internalname'] The name of the input field - * @uses $vars['type'] Submit or reset, defaults to submit. - * @uses $vars['src'] Src of an image - * - */ - - global $CONFIG; - - $class = $vars['class']; - if (!$class) $class = "submit_button"; - - if (isset($vars['type'])) { $type = strtolower($vars['type']); } else { $type = 'submit'; } - switch ($type) - { - case 'button' : $type='button'; break; - case 'reset' : $type='reset'; break; - case 'submit': - default: $type = 'submit'; - } - - $value = htmlentities($vars['value'], null, 'UTF-8'); - $name = $vars['internalname']; - $src = $vars['src']; - if (strpos($src,$CONFIG->wwwroot)===false) $src = ""; // blank src if trying to access an offsite image. -?> -<input type="<?php echo $type; ?>" class="<?php echo $type; ?>_button" <?php echo $vars['js']; ?> value="<?php echo $value; ?>" src="<?php echo $src; ?>" class="<?php echo $class; ?>" />
\ No newline at end of file diff --git a/views/failsafe/input/checkboxes.php b/views/failsafe/input/checkboxes.php deleted file mode 100644 index ccfa17982..000000000 --- a/views/failsafe/input/checkboxes.php +++ /dev/null @@ -1,49 +0,0 @@ -<?php
-
- /**
- * Elgg checkbox input
- * Displays a checkbox input field
- *
- * @package Elgg
- * @subpackage Core
- * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
- * @author Curverider Ltd
- * @copyright Curverider Ltd 2008-2009
- * @link http://elgg.org/
- *
- * @uses $vars['value'] The current value, if any
- * @uses $vars['js'] Any Javascript to enter into the input tag
- * @uses $vars['internalname'] The name of the input field
- * @uses $vars['options'] An array of strings representing the options for the checkbox field
- *
- */
- - $class = $vars['class']; - if (!$class) $class = "input-checkboxes"; -
- foreach($vars['options'] as $label => $option) {
- //if (!in_array($option,$vars['value'])) {
- if (is_array($vars['value'])) {
- if (!in_array($option,$vars['value'])) {
- $selected = "";
- } else {
- $selected = "checked = \"checked\"";
- }
- } else { - if ($option != $vars['value']) {
- $selected = "";
- } else {
- $selected = "checked = \"checked\"";
- }
- }
- $labelint = (int) $label;
- if ("{$label}" == "{$labelint}") {
- $label = $option;
- } - - $disabled = ""; - if ($vars['disabled']) $disabled = ' disabled="yes" ';
- echo "<label><input type=\"checkbox\" $disabled {$vars['js']} name=\"{$vars['internalname']}[]\" {$selected} value=\"".htmlentities($option, null, 'UTF-8')."\" {$selected} class=\"$class\" />{$label}</label><br />";
- }
-
-?>
\ No newline at end of file diff --git a/views/failsafe/input/form.php b/views/failsafe/input/form.php deleted file mode 100644 index f02b97dfa..000000000 --- a/views/failsafe/input/form.php +++ /dev/null @@ -1,31 +0,0 @@ -<?php - /** - * Create a form for data submission. - * Use this view for forms rather than creating a form tag in the wild as it provides - * extra security which help prevent CSRF attacks. - * - * @package Elgg - * @subpackage Core - * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2 - * @author Curverider Ltd - * @copyright Curverider Ltd 2008-2009 - * @link http://elgg.org/ - * - * @uses $vars['body'] The body of the form (made up of other input/xxx views and html - * @uses $vars['method'] Method (default POST) - * @uses $vars['enctype'] How the form is encoded, default blank - * @uses $vars['action'] URL of the action being called - * - */ - - if (isset($vars['internalid'])) { $id = $vars['internalid']; } else { $id = ''; } - if (isset($vars['internalname'])) { $name = $vars['internalname']; } else { $name = ''; } - $body = $vars['body']; - $action = $vars['action']; - if (isset($vars['enctype'])) { $enctype = $vars['enctype']; } else { $enctype = ''; } - if (isset($vars['method'])) { $method = $vars['method']; } else { $method = 'POST'; } - -?> -<form <?php if ($id) { ?>id="<?php echo $id; ?>" <?php } ?> <?php if ($name) { ?>name="<?php echo $name; ?>" <?php } ?> action="<?php echo $action; ?>" method="<?php echo $method; ?>" <?php if ($enctype!="") echo "enctype=\"$enctype\""; ?>> -<?php echo $body; ?> -</form>
\ No newline at end of file diff --git a/views/failsafe/input/hidden.php b/views/failsafe/input/hidden.php deleted file mode 100644 index 5d3015414..000000000 --- a/views/failsafe/input/hidden.php +++ /dev/null @@ -1,20 +0,0 @@ -<?php - /** - * Create a hidden data field - * Use this view for forms rather than creating a hidden tag in the wild as it provides - * extra security which help prevent CSRF attacks. - * - * @package Elgg - * @subpackage Core - * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2 - * @author Curverider Ltd - * @copyright Curverider Ltd 2008-2009 - * @link http://elgg.org/ - * - * @uses $vars['value'] The current value, if any - * @uses $vars['js'] Any Javascript to enter into the input tag - * @uses $vars['internalname'] The name of the input field - * - */ -?> -<input type="hidden" <?php echo $vars['js']; ?> name="<?php echo $vars['internalname']; ?>" value="<?php echo htmlentities($vars['value'], null, 'UTF-8'); ?>" />
\ No newline at end of file diff --git a/views/failsafe/input/longtext.php b/views/failsafe/input/longtext.php deleted file mode 100644 index c28028217..000000000 --- a/views/failsafe/input/longtext.php +++ /dev/null @@ -1,25 +0,0 @@ -<?php
-
- /**
- * Elgg long text input
- * Displays a long text input field
- *
- * @package Elgg
- * @subpackage Core
- * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
- * @author Curverider Ltd
- * @copyright Curverider Ltd 2008-2009
- * @link http://elgg.org/
- *
- * @uses $vars['value'] The current value, if any
- * @uses $vars['js'] Any Javascript to enter into the input tag
- * @uses $vars['internalname'] The name of the input field
- *
- */
- - $class = $vars['class']; - if (!$class) $class = "input-textarea"; -
-?>
-
-<textarea class="<?php echo $class; ?>" name="<?php echo $vars['internalname']; ?>" <?php if ($vars['disabled']) echo ' disabled="yes" '; ?> <?php echo $vars['js']; ?>><?php echo $vars['value']; ?></textarea>
\ No newline at end of file diff --git a/views/failsafe/input/pulldown.php b/views/failsafe/input/pulldown.php deleted file mode 100644 index fcd13a6b3..000000000 --- a/views/failsafe/input/pulldown.php +++ /dev/null @@ -1,52 +0,0 @@ -<?php
-
- /**
- * Elgg pulldown input
- * Displays a pulldown input field
- *
- * @package Elgg
- * @subpackage Core
- * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
- * @author Curverider Ltd
- * @copyright Curverider Ltd 2008-2009
- * @link http://elgg.org/
- *
- * @uses $vars['value'] The current value, if any
- * @uses $vars['js'] Any Javascript to enter into the input tag
- * @uses $vars['internalname'] The name of the input field
- * @uses $vars['options'] An array of strings representing the options for the pulldown field
- * @uses $vars['options_values'] An associative array of "value" => "option" where "value" is an internal name and "option" is - * the value displayed on the button. Replaces $vars['options'] when defined.
- */
- - - $class = $vars['class']; - if (!$class) $class = "input-pulldown"; -
-?>
-
-
-<select name="<?php echo $vars['internalname']; ?>" <?php echo $vars['js']; ?> <?php if ($vars['disabled']) echo ' disabled="yes" '; ?> class="<?php echo $class; ?>">
-<?php
- if ($vars['options_values']) - { - foreach($vars['options_values'] as $value => $option) { - if ($value != $vars['value']) { - echo "<option value=\"$value\">{$option}</option>"; - } else { - echo "<option value=\"$value\" selected=\"selected\">{$option}</option>"; - } - } - } - else - {
- foreach($vars['options'] as $option) {
- if ($option != $vars['value']) {
- echo "<option>{$option}</option>";
- } else {
- echo "<option selected=\"selected\">{$option}</option>";
- }
- }
- }
-?>
-</select>
\ No newline at end of file diff --git a/views/failsafe/input/reset.php b/views/failsafe/input/reset.php deleted file mode 100644 index c2e77670f..000000000 --- a/views/failsafe/input/reset.php +++ /dev/null @@ -1,27 +0,0 @@ -<?php - /** - * Create a reset input button - * Use this view for forms rather than creating a submit/reset button tag in the wild as it provides - * extra security which help prevent CSRF attacks. - * - * @package Elgg - * @subpackage Core - * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2 - * @author Curverider Ltd - * @copyright Curverider Ltd 2008-2009 - * @link http://elgg.org/ - * - * @uses $vars['value'] The current value, if any - * @uses $vars['js'] Any Javascript to enter into the input tag - * @uses $vars['internalname'] The name of the input field - * @uses $vars['type'] Submit or reset, defaults to submit. - * - */ - - $vars['type'] = 'reset'; - $class = $vars['class']; - if (!$class) $class = "submit_button"; - $vars['class'] = $class; - - echo elgg_view('input/button', $vars); -?>
\ No newline at end of file diff --git a/views/failsafe/input/submit.php b/views/failsafe/input/submit.php deleted file mode 100644 index f87600e63..000000000 --- a/views/failsafe/input/submit.php +++ /dev/null @@ -1,27 +0,0 @@ -<?php - /** - * Create a submit input button - * Use this view for forms rather than creating a submit/reset button tag in the wild as it provides - * extra security which help prevent CSRF attacks. - * - * @package Elgg - * @subpackage Core - * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2 - * @author Curverider Ltd - * @copyright Curverider Ltd 2008-2009 - * @link http://elgg.org/ - * - * @uses $vars['value'] The current value, if any - * @uses $vars['js'] Any Javascript to enter into the input tag - * @uses $vars['internalname'] The name of the input field - * @uses $vars['type'] Submit or reset, defaults to submit. - * - */ - - $vars['type'] = 'submit'; - $class = $vars['class']; - if (!$class) $class = "submit_button"; - $vars['class'] = $class; - - echo elgg_view('input/button', $vars); -?>
\ No newline at end of file diff --git a/views/failsafe/input/text.php b/views/failsafe/input/text.php deleted file mode 100644 index 9f8ab79f7..000000000 --- a/views/failsafe/input/text.php +++ /dev/null @@ -1,27 +0,0 @@ -<?php
-
- /**
- * Elgg text input
- * Displays a text input field
- *
- * @package Elgg
- * @subpackage Core
- * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
- * @author Curverider Ltd
- * @copyright Curverider Ltd 2008-2009
- * @link http://elgg.org/
- *
- * @uses $vars['value'] The current value, if any
- * @uses $vars['js'] Any Javascript to enter into the input tag
- * @uses $vars['internalname'] The name of the input field
- * @uses $vars['disabled'] If true then control is read-only - * @uses $vars['class'] Class override
- */
- - - $class = $vars['class']; - if (!$class) $class = "input-text"; -
-?>
-
-<input type="text" <?php if ($vars['disabled']) echo ' disabled="yes" '; ?> <?php echo $vars['js']; ?> name="<?php echo $vars['internalname']; ?>" value="<?php echo htmlentities($vars['value'], null, 'UTF-8'); ?>" class="<?php echo $class ?>"/>
\ No newline at end of file diff --git a/views/failsafe/messages/errors/error.php b/views/failsafe/messages/errors/error.php deleted file mode 100644 index ca45a936a..000000000 --- a/views/failsafe/messages/errors/error.php +++ /dev/null @@ -1,20 +0,0 @@ -<?php
-
- /**
- * Elgg error message
- * Displays a single error message
- *
- * @package Elgg
- * @subpackage Core
- * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
- * @author Curverider Ltd
- * @copyright Curverider Ltd 2008-2009
- * @link http://elgg.org/
- *
- * @uses $vars['object'] An error message (string)
- */
-?>
-
- <p>
- <?php echo $vars['object']; ?>
- </p>
\ No newline at end of file diff --git a/views/failsafe/messages/errors/list.php b/views/failsafe/messages/errors/list.php deleted file mode 100644 index 41f2ad406..000000000 --- a/views/failsafe/messages/errors/list.php +++ /dev/null @@ -1,48 +0,0 @@ -<?php
-
- /**
- * Elgg list errors
- * Lists error messages
- *
- * @package Elgg
- * @subpackage Core
- * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
- * @author Curverider Ltd
- * @copyright Curverider Ltd 2008-2009
- * @link http://elgg.org/
- *
- * @uses $vars['object'] An array of error messages
- */
-
- if (!empty($vars['object']) && is_array($vars['object'])) {
-
-?>
-<style type="text/css">
-.messages_error {
- border:1px solid #D3322A;
- background:#F7DAD8;
- color:#000000;
- padding:3px 10px 3px 10px;
- margin:20px 0px 0px 0px;
- z-index: 9999;
- position:relative;
- width:95%;
-}
-</style>
- <div class="database_settings">
- <div class="messages_errors">
-
-<?php
- foreach($vars['object'] as $error) {
- echo elgg_view('messages/errors/error',array('object' => $error));
- //echo "<hr />";
- }
-?>
- </div>
- </div>
-<?php
- }
-
-
-
-?>
\ No newline at end of file diff --git a/views/failsafe/messages/exceptions/admin_exception.php b/views/failsafe/messages/exceptions/admin_exception.php new file mode 100644 index 000000000..57665d9c0 --- /dev/null +++ b/views/failsafe/messages/exceptions/admin_exception.php @@ -0,0 +1,30 @@ +<?php +/** + * Elgg exception (failsafe mode) + * Displays a single exception + * + * @package Elgg + * @subpackage Core + * + * @uses $vars['object'] An exception + */ + +?> + +<p class="elgg-messages-exception"> + <span title="<?php echo get_class($vars['object']); ?>"> + <?php + + echo nl2br($vars['object']->getMessage()); + + ?> + </span> +</p> + +<p class="elgg-messages-exception"> + <?php + + echo nl2br(htmlentities(print_r($vars['object'], true), ENT_QUOTES, 'UTF-8')); + + ?> +</p>
\ No newline at end of file diff --git a/views/failsafe/messages/exceptions/exception.php b/views/failsafe/messages/exceptions/exception.php index c36be0baa..1873ca0d9 100644 --- a/views/failsafe/messages/exceptions/exception.php +++ b/views/failsafe/messages/exceptions/exception.php @@ -1,39 +1,20 @@ <?php +/** + * Elgg exception (failsafe mode) + * Displays a single exception + * + * @package Elgg + * @subpackage Core + * + * @uses $vars['object'] An exception + */ - /** - * Elgg exception (fallback mode) - * Displays a single exception - * - * @package Elgg - * @subpackage Core - * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2 - * @author Curverider Ltd - * @copyright Curverider Ltd 2008-2009 - * @link http://elgg.org/ - * - * @uses $vars['object'] An exception - */ - - global $CONFIG; ?> - <p class="messages-exception" style="background:#FDFFC3;display:block;padding:10px;"> - <span title="<?php echo get_class($vars['object']); ?>"> - <?php - - echo nl2br($vars['object']->getMessage()); - - ?> - </span> - </p> - - <?php if ($CONFIG->debug) { ?> - - <p class="messages-exception-detail" style="background:#FDFFC3;display:block;padding:10px;"> - <?php - - echo nl2br(htmlentities(print_r($vars['object'], true), null, 'UTF-8')); - - ?> - </p> - <?php } ?>
\ No newline at end of file +<p class="elgg-messages-exception"> + <span title="Unrecoverable Error"> + <?php echo elgg_echo('exception:contact_admin'); ?> + <br /><br /> + Exception #<?php echo $vars['ts']; ?>. + </span> +</p> diff --git a/views/failsafe/messages/list.php b/views/failsafe/messages/list.php deleted file mode 100644 index 1af190215..000000000 --- a/views/failsafe/messages/list.php +++ /dev/null @@ -1,25 +0,0 @@ -<?php
-
- /**
- * Elgg global system message list
- * Lists all system messages
- *
- * @package Elgg
- * @subpackage Core
- * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
- * @author Curverider Ltd
- * @copyright Curverider Ltd 2008-2009
- * @link http://elgg.org/
- *
- * @uses $vars['object'] The array of message registers
- */
-
- if (!empty($vars['object']) && is_array($vars['object']) && sizeof($vars['object']) > 0) {
-
- foreach($vars['object'] as $register => $list ) {
- echo elgg_view("messages/{$register}/list", array('object' => $list));
- }
-
- }
-
-?>
\ No newline at end of file diff --git a/views/failsafe/messages/messages/list.php b/views/failsafe/messages/messages/list.php deleted file mode 100644 index 19e0f1f70..000000000 --- a/views/failsafe/messages/messages/list.php +++ /dev/null @@ -1,51 +0,0 @@ -<?php
-
- /**
- * Elgg list system messages
- * Lists system messages
- *
- * @package Elgg
- * @subpackage Core
- * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
- * @author Curverider Ltd
- * @copyright Curverider Ltd 2008-2009
- * @link http://elgg.org/
- *
- * @uses $vars['object'] An array of system messages
- */
-
- if (!empty($vars['object']) && is_array($vars['object'])) {
-
-?>
-
-<style type="text/css">
-.messages {
- border:1px solid #00cc00;
- background:#ccffcc;
- color:#000000;
- padding:3px 10px 3px 10px;
- margin:20px 0px 0px 0px;
- z-index: 9999;
- position:relative;
- width:95%;
-}
-</style>
-
- <div class="messages">
-
-<?php
-
-
- foreach($vars['object'] as $message) {
- echo elgg_view('messages/messages/message',array('object' => $message));
- }
-
-?>
-
- </div>
-
-<?php
-
- }
-
-?>
\ No newline at end of file diff --git a/views/failsafe/messages/messages/message.php b/views/failsafe/messages/messages/message.php deleted file mode 100644 index 20416cd07..000000000 --- a/views/failsafe/messages/messages/message.php +++ /dev/null @@ -1,20 +0,0 @@ -<?php
-
- /**
- * Elgg standard message
- * Displays a single Elgg system message
- *
- * @package Elgg
- * @subpackage Core
- * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
- * @author Curverider Ltd
- * @copyright Curverider Ltd 2008-2009
- * @link http://elgg.org/
- *
- * @uses $vars['object'] A system message (string)
- */
-?>
-
- <p>
- <?php echo nl2br($vars['object']); ?>
- </p>
\ No newline at end of file diff --git a/views/failsafe/messages/sanitisation/htaccess.php b/views/failsafe/messages/sanitisation/htaccess.php deleted file mode 100644 index db5824453..000000000 --- a/views/failsafe/messages/sanitisation/htaccess.php +++ /dev/null @@ -1,17 +0,0 @@ -<?php
-
- /**
- * Elgg .htaccess not found message
- * Is saved to the errors register when the main .htaccess cannot be found
- *
- * @package Elgg
- * @subpackage Core
- * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
- * @author Curverider Ltd
- * @copyright Curverider Ltd 2008-2009
- * @link http://elgg.org/
- */ - - echo autop(elgg_echo('installation:error:htaccess'));
-?> -<textarea cols="120" rows="30"><?php echo $vars['.htaccess']; ?></textarea>
\ No newline at end of file diff --git a/views/failsafe/messages/sanitisation/settings.php b/views/failsafe/messages/sanitisation/settings.php deleted file mode 100644 index 23641118b..000000000 --- a/views/failsafe/messages/sanitisation/settings.php +++ /dev/null @@ -1,43 +0,0 @@ -<?php - - /** - * Elgg settings not found message - * Is saved to the errors register when settings.php cannot be found - * - * @package Elgg - * @subpackage Core - * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2 - * @author Curverider Ltd - * @copyright Curverider Ltd 2008-2009 - * @link http://elgg.org/ - */ - - if ($vars['settings.php']) - { - echo elgg_echo('installation:settings:dbwizard:savefail'); -?> -<div> - <textarea rows="50" cols="120"><?php echo $vars['settings.php']; ?></textarea> -</div> -<?php - } - else - { - - echo autop(elgg_echo('installation:error:settings')); -?> -<div> - <h2><?php echo elgg_echo('installation:settings:dbwizard:prompt'); ?></h2> - <form method="POST"> - <table cellpadding="0" cellspacing="10" style="background:#f1f1f1;"> - <tr><td valign="top"><?php echo elgg_echo('installation:settings:dbwizard:label:user'); ?></td><td valign="top"> <input type="text" name="db_install_vars[CONFIG_DBUSER]" /></td></tr> - <tr><td valign="top"><?php echo elgg_echo('installation:settings:dbwizard:label:pass'); ?></td><td valign="top"> <input type="password" name="db_install_vars[CONFIG_DBPASS]" /></td></tr> - <tr><td valign="top"><?php echo elgg_echo('installation:settings:dbwizard:label:dbname'); ?></td><td valign="top"> <input type="text" name="db_install_vars[CONFIG_DBNAME]" /></td></tr> - <tr><td valign="top"><?php echo elgg_echo('installation:settings:dbwizard:label:host'); ?></td><td valign="top"> <input type="text" name="db_install_vars[CONFIG_DBHOST]" value="localhost" /></td></tr> - <tr><td valign="top"><?php echo elgg_echo('installation:settings:dbwizard:label:prefix'); ?></td><td valign="top"> <input type="text" name="db_install_vars[CONFIG_DBPREFIX]" value="elgg" /></td></tr> - </table> - - <input type="submit" name="<?php echo elgg_echo('save'); ?>" value="<?php echo elgg_echo('save'); ?>" /> - </form> -</div> -<?php } ?>
\ No newline at end of file diff --git a/views/failsafe/page/default.php b/views/failsafe/page/default.php new file mode 100644 index 000000000..6d628ebbb --- /dev/null +++ b/views/failsafe/page/default.php @@ -0,0 +1,60 @@ +<?php +/** + * Elgg failsafe pageshell + * Special viewtype for rendering exceptions. Includes minimal code so as not to + * create a "Exception thrown without a stack frame in Unknown on line 0" error + * + * @package Elgg + * @subpackage Core + * + * @uses $vars['title'] The page title + * @uses $vars['body'] The main content of the page + */ + +// we won't trust server configuration but specify utf-8 +header('Content-type: text/html; charset=utf-8'); + +?> +<html> + <head> + <title><?php echo $vars['title']; ?></title> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> + + <style type="text/css"> + + body { + text-align:left; + margin:0; + padding:0; + background: #4690d6; + font: 80%/1.5 "Lucida Grande", Verdana, sans-serif; + color: #333333; + } + p { + margin: 0px 0px 15px 0; + } + #elgg-wrapper { + background:white; + width:570px; + margin:auto; + padding:10px 40px; + margin-bottom:40px; + margin-top:20px; + border-right: 1px solid #666666; + border-bottom: 1px solid #666666; + } + .elgg-messages-exception { + background:#FDFFC3; + display:block; + padding:10px; + } + </style> + + </head> + <body> + <div id="elgg-wrapper"> + <h1><?php echo $vars['title']; ?></h1> + <?php echo $vars['body']; ?> + </div> + </body> +</html> diff --git a/views/failsafe/pageshells/pageshell.php b/views/failsafe/pageshells/pageshell.php deleted file mode 100644 index e95bc3139..000000000 --- a/views/failsafe/pageshells/pageshell.php +++ /dev/null @@ -1,153 +0,0 @@ -<?php - /** - * Elgg fallback pageshell - * Render a few things (like the installation process) in a fallback mode, text only with minimal use - * of functions. - * - * @package Elgg - * @subpackage Core - * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2 - * @author Curverider Ltd - * @copyright Curverider Ltd 2008-2009 - * @link http://elgg.org/ - * - * @uses $vars['config'] The site configuration settings, imported - * @uses $vars['title'] The page title - * @uses $vars['body'] The main content of the page - * @uses $vars['messages'] A 2d array of various message registers, passed from system_messages() - */ - - -?> -<html> - <head> - <title><?php echo $vars['title']; ?></title> - - <style type="text/css"> - - body { - text-align:left; - margin:0; - padding:0; - background: #4690d6; - font: 80%/1.5 "Lucida Grande", Verdana, sans-serif; - color: #333333; - } - a { - color: #4690d6; - text-decoration: none; - -moz-outline-style: none; - outline: none; - } - a:visited { - color: #0054a7; - } - a:hover { - color: #0054a7; - text-decoration: underline; - } - p { - margin: 0px 0px 15px 0; - } - img { - border: none; - } - #startpage_wrapper { - background:white; - width:570px; - margin:auto; - padding:10px 40px; - margin-bottom:40px; - margin-top:20px; - border-right: 1px solid #666666; - border-bottom: 1px solid #666666; - } - - label { - font-weight: bold; - color:#333333; - font-size: 140%; - } - input[type="text"], - input[type="password"] { - font: 120% Arial, Helvetica, sans-serif; - padding: 5px; - border: 1px solid #cccccc; - color:#666666; - width:566px; - } - .database_settings input[type="text"], - .database_settings input[type="password"] { - width:220px; - } - textarea { - font: 120% Arial, Helvetica, sans-serif; - border: solid 1px #cccccc; - padding: 5px; - color:#666666; - } - textarea:focus, input[type="password"]:focus, input[type="text"]:focus { - border: solid 1px #4690d6; - background: #e4ecf5; - color:#333333; - } - - input[type="submit"]:hover { - background: #0054a7; - border: 4px solid #0054a7; - } - - input[type="submit"] { - font: 16px/100% Arial, Helvetica, sans-serif; - font-weight: bold; - color: #ffffff; - background:#4690d6; - border: 4px solid #4690d6; - -webkit-border-radius: 4px; - -moz-border-radius: 4px; - width: auto; - height: 35px; - padding: 2px 6px 2px 6px; - margin:10px 0 10px 0; - cursor: pointer; - } - #startpage_wrapper hr { - border:0; - border-bottom:1px solid #333333; - } - #startpage_wrapper td { - text-align: left; - vertical-align: middle; - } - - .messages { - border:1px solid #00cc00; - background:#ccffcc; - color:#000000; - padding:3px 10px 3px 10px; - } - .messages_error { - border:1px solid #D3322A; - background:#F7DAD8; - color:#000000; - padding:3px 10px 3px 10px; - - } - </style> - - - - </head> - <body> - <div id="startpage_wrapper"> - <h1><?php echo $vars['title']; ?></h1> - - <!-- display any system messages --> - <?php echo elgg_view('messages/list', array('object' => $vars['sysmessages'])); ?> - - <p> - <?php echo $vars['body']; ?> - </p> - </div> - </body> -</html>
\ No newline at end of file diff --git a/views/failsafe/settings/install.php b/views/failsafe/settings/install.php deleted file mode 100644 index 4167c8375..000000000 --- a/views/failsafe/settings/install.php +++ /dev/null @@ -1,19 +0,0 @@ -<?php
-
- /**
- * Elgg system settings on initial installation
- *
- * @package Elgg
- * @subpackage Core
- * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
- * @author Curverider Ltd
- * @copyright Curverider Ltd 2008-2009
- * @link http://elgg.org/
- *
- */
-
- echo "<p>" . autop(elgg_echo("installation:settings:description")) . "</p>";
-
- echo elgg_view("settings/system",array("action" => "action/systemsettings/install"));
-
-?>
\ No newline at end of file diff --git a/views/failsafe/settings/system.php b/views/failsafe/settings/system.php deleted file mode 100644 index 18e43eac1..000000000 --- a/views/failsafe/settings/system.php +++ /dev/null @@ -1,64 +0,0 @@ -<?php
-
- /**
- * Elgg system settings form
- * The form to change system settings
- *
- * @package Elgg
- * @subpackage Core
- * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
- * @author Curverider Ltd
- * @copyright Curverider Ltd 2008-2009
- * @link http://elgg.org/
- *
- * @uses $vars['action'] If set, the place to forward the form to (usually action/systemsettings/save)
- */
-
- // Set action appropriately
- if (!isset($vars['action'])) {
- $action = $vars['url'] . "action/systemsettings/save";
- } else {
- $action = $vars['action'];
- }
-
- $form_body = "";
- foreach(array('sitename','sitedescription', 'siteemail', 'wwwroot','path','dataroot', 'view') as $field) {
- $form_body .= "<p>";
- $form_body .= elgg_echo('installation:' . $field) . "<br />";
- $warning = elgg_echo('installation:warning:' . $field);
- if ($warning != 'installation:warning:' . $field) echo "<b>" . $warning . "</b><br />";
- $value = $vars['config']->$field;
- if ($field == 'view') $value = 'default';
- $form_body .= elgg_view("input/text",array('internalname' => $field, 'value' => $value));
- $form_body .= "</p>";
- }
-
- $languages = get_installed_translations();
- $form_body .= "<p>" . elgg_echo('installation:language') . elgg_view("input/pulldown", array('internalname' => 'language', 'value' => $vars['config']->language, 'options_values' => $languages)) . "</p>";
-
- $form_body .= "<p class=\"admin_debug\">" . elgg_echo('installation:debug') . "<br />" .elgg_view("input/checkboxes", array('options' => array(elgg_echo('installation:debug:label')), 'internalname' => 'debug', 'value' => ($vars['config']->debug ? elgg_echo('installation:debug:label') : "") )) . "</p>"; - - $form_body .= "<p class=\"admin_debug\">" . elgg_echo('installation:httpslogin') . "<br />" .elgg_view("input/checkboxes", array('options' => array(elgg_echo('installation:httpslogin:label')), 'internalname' => 'https_login', 'value' => ($vars['config']->https_login ? elgg_echo('installation:httpslogin:label') : "") )) . "</p>";
- - $form_body .= "<p class=\"admin_debug\">" . elgg_echo('installation:disableapi') . "<br />"; - $on = elgg_echo('installation:disableapi:label'); - if ((isset($CONFIG->disable_api)) && ($CONFIG->disable_api == true)) - $on = ($vars['config']->disable_api ? "" : elgg_echo('installation:disableapi:label')); - $form_body .= elgg_view("input/checkboxes", array('options' => array(elgg_echo('installation:disableapi:label')), 'internalname' => 'api', 'value' => $on )); - $form_body .= "</p>"; -
- $form_body .= "<p class=\"admin_usage\">" . elgg_echo('installation:usage') . "<br />";
- $on = elgg_echo('installation:usage:label');
-
- if (isset($CONFIG->ping_home))
- $on = ($vars['config']->ping_home!='disabled' ? elgg_echo('installation:usage:label') : "");
- $form_body .= elgg_view("input/checkboxes", array('options' => array(elgg_echo('installation:usage:label')), 'internalname' => 'usage', 'value' => $on ));
- $form_body .= "</p>"; -
- $form_body .= elgg_view('input/hidden', array('internalname' => 'settings', 'value' => 'go'));
-
- $form_body .= elgg_view('input/submit', array('value' => elgg_echo("save")));
-
- echo elgg_view('input/form', array('action' => $action, 'body' => $form_body));
-
-?>
\ No newline at end of file |
