17 require_once SQ_INCLUDE_PATH.
'/backend_outputter.inc';
60 return parent::addFormActionGetVar($name, $value, TRUE);
75 if ($this->_raw_opened) $this->
closeRaw();
77 while (!empty($this->_section_stack)) {
81 ?><div
id=
"sq_backend_sections"><?php
99 if ((!$this->_buffering) && SQ_IN_LIMBO) {
100 parent::openSection(
' ');
117 if ((!$this->_buffering) && SQ_IN_LIMBO) {
118 parent::closeSection();
134 for ($i = 0; $i < count($this->_contents); $i++) {
150 if (!headers_sent()) {
151 if ($this->_charset) {
152 header(
"Content-type: text/html; charset=$this->_charset");
154 $default_charset = SQ_CONF_DEFAULT_CHARACTER_SET;
155 header(
"Content-type: text/html; charset=$default_charset");
161 $lm = $GLOBALS[
'SQ_SYSTEM']->am->getSystemAsset(
'layout_manager');
162 if ($lm->attr(
'edit_css')) {
166 foreach ($this->_css_includes as $file) {
171 foreach ($GLOBALS[
'SQ_SYSTEM']->lm->getJavascriptIncludes() as $js_include) {
176 $this->
addJsInclude(sq_web_path(
'lib').
'/html_form/html_form.js');
177 $this->
addJsInclude(sq_web_path(
'lib').
'/js/general.js');
180 $this->
addJsInclude(sq_web_path(
'lib').
'/js/translation.js');
181 $this->
addJsInclude(sq_web_path(
'lib').
'/js/tooltip.js');
183 list($lang, $country, $variant) = $GLOBALS[
'SQ_SYSTEM']->lm->getLocaleParts($GLOBALS[
'SQ_SYSTEM']->lm->getCurrentLocale());
185 if (file_exists(SQ_DATA_PATH.
'/public/system/core/js_strings.'.$lang.
'.js')) {
186 $this->
addJsInclude(sq_web_path(
'data').
'/system/core/js_strings.'.$lang.
'.js');
189 if (!empty($country)) {
190 if (file_exists(SQ_DATA_PATH.
'/public/system/core/js_strings.'.$lang.
'_'.$country.
'.js')) {
191 $this->
addJsInclude(sq_web_path(
'data').
'/system/core/js_strings.'.$lang.
'_'.$country.
'.js');
194 if (!empty($variant)) {
195 if (file_exists(SQ_DATA_PATH.
'/public/system/core/js_strings.'.$lang.
'_'.$country.
'@'.$variant.
'.js')) {
196 $this->
addJsInclude(sq_web_path(
'data').
'/system/core/js_strings.'.$lang.
'_'.$country.
'@'.$variant.
'.js');
201 foreach ($this->_js_includes as $file) {
209 foreach ($this->_preload_imgs as $file) {
210 echo
"\t\tpreload_image('".$file.
"');\n";
225 if (!empty($this->_css_includes)) {
227 <style type=
"text/css">
229 foreach ($this->_css_includes as $file) {
230 echo
"\t\t@import url($file)\n";
238 $this->
addJsInclude(sq_web_path(
'lib').
'/html_form/html_form.js');
239 $this->
addJsInclude(sq_web_path(
'lib').
'/js/general.js');
242 $this->
addJsInclude(sq_web_path(
'lib').
'/js/translation.js');
244 list($lang, $country, $variant) = $GLOBALS[
'SQ_SYSTEM']->lm->getLocaleParts($GLOBALS[
'SQ_SYSTEM']->lm->getCurrentLocale());
246 if (file_exists(SQ_DATA_PATH.
'/public/system/core/js_strings.'.$lang.
'.js')) {
247 $this->
addJsInclude(sq_web_path(
'data').
'/system/core/js_strings.'.$lang.
'.js');
250 if (!empty($country)) {
251 if (file_exists(SQ_DATA_PATH.
'/public/system/core/js_strings.'.$lang.
'_'.$country.
'.js')) {
252 $this->
addJsInclude(sq_web_path(
'data').
'/system/core/js_strings.'.$lang.
'_'.$country.
'.js');
255 if (!empty($variant)) {
256 if (file_exists(SQ_DATA_PATH.
'/public/system/core/js_strings.'.$lang.
'_'.$country.
'@'.$variant.
'.js')) {
257 $this->
addJsInclude(sq_web_path(
'data').
'/system/core/js_strings.'.$lang.
'_'.$country.
'@'.$variant.
'.js');
262 foreach ($this->_js_includes as $file) {
273 foreach ($this->_preload_imgs as $file) {
274 echo
"\t\tpreload_image('".$file.
"');\n";
289 <script type=
"text/javascript"><!--
293 var SQ_DOCUMENT_LOADED =
false;
295 function page_on_load()
298 foreach ($this->_on_load_calls as $call) {
304 SQ_DOCUMENT_LOADED =
true;
308 function print_tooltip()
310 if (window.self.name ==
'sq_main') {
315 var SQ_FORM_SUBMITTED =
false;
317 function form_on_submit()
319 if (SQ_FORM_SUBMITTED) {
320 alert(js_translate(
'form_already_submitted'));
325 foreach ($this->_on_submit_calls as $call) {
331 SQ_FORM_SUBMITTED =
true;
356 if ($this->_is_open_field) $this->
closeField();
357 $this->_is_open_field = TRUE;
360 $this->_current_field_type = $format;
361 $this->_current_field_note = $note;
366 <tr <?php
if ($hidden) echo
'style="display: none"'; ?>>
367 <td
class=
"sq-limbo-field" colspan=
"2">
368 <a name=
"field_<?php echo $this->_field_count; ?>"></a>
372 <tr <?php
if ($hidden) echo
'style="display: none"'; ?>>
373 <td
class=
"sq-backend-data sq-backend-data-newline" colspan=
"2">
381 <td
class=
"sq-backend-data sq-backend-commit" colspan=
"2">
391 <tr <?php
if ($hidden) echo
'style="display: none"'; ?>>
392 <td
class=
"sq-limbo-field">
393 <a name=
"field_<?php echo $this->_field_count; ?>"></a>
396 <td
class=
"sq-backend-data">
413 if ($this->_nb_section_count > 0) echo
'<tr><td>';
414 $this->_nb_section_count++;
417 <a name=
"section_<?php echo $this->_nb_section_count; ?>"></a>
418 <table
class=
"sq-backend-section-table">
420 if ($section[
'heading']) {
421 if ($this->_is_open_section) {
425 <td
class=
"sq-limbo-section-subheading" colspan=
"2"><?php echo $section[
'heading'];?></td>
429 $this->_is_open_section = TRUE;
433 <td
class=
"sq-limbo-section-heading" colspan=
"2"><?php echo $section[
'heading'];?></td>
443 <table
class=
"sq-backend-section-table-inner">
461 if ($section[
'type'] ==
'raw') {
462 echo $section[
'contents'];
465 <a name=
"section_<?php echo $section['section_count']; ?>"></a>
466 <table
class=
"sq-backend-section-table">
468 if ($section[
'heading']) {
473 <td
class=
"sq-limbo-section-subheading"><?php echo $section[
'heading'];?></td>
480 <td
class=
"sq-limbo-section-heading" style=
"border-bottom: 1px solid #000000"><?php echo $section[
'heading'];?></td>
490 <table
class=
"sq-backend-section-table-inner">
493 for ($j = 0; $j < count($section[
'areas']); $j++) {
494 switch ($section[
'areas'][$j][
'area_type']) {
509 $field =& $section[
'areas'][$j];
510 switch ($field[
'format']) {
513 <tr <?php
if ($field[
'hidden']) echo
'style="display: none"'; ?>>
514 <td
class=
"sq-limbo-field" colspan=
"2">
515 <a name=
"field_<?php echo $field['field_count']; ?>"></a>
516 <?php echo $field[
'name'];?>
519 <tr <?php
if ($field[
'hidden']) echo
'style="display: none"'; ?>>
520 <td
class=
"sq-backend-data sq-backend-data-newline" colspan=
"2">
522 echo $field[
'contents'];
523 if ($field[
'note']) $this->
note($field[
'note']);
532 <tr <?php
if ($field[
'hidden']) echo
'style="display: none"'; ?>>
533 <td
class=
"sq-backend-data sq-limbo-data sq-backend-commit" colspan=
"2">
535 echo $field[
'contents'];
536 if ($field[
'note']) $this->
note($field[
'note']);
549 <tr <?php
if ($field[
'hidden']) echo
'style="display: none"'; ?>>
550 <td
class=
"sq-limbo-field">
551 <a name=
"field_<?php echo $field['field_count']; ?>"></a>
552 <?php echo $field[
'name'];?>
554 <td
class=
"sq-backend-data">
556 echo $field[
'contents'];
557 if ($field[
'note']) $this->
note($field[
'note']);
567 trigger_localised_error(
'SYS0257', E_USER_ERROR, $section[
'areas'][$j][
'area_type']);
595 <script type=
"text/javascript"><!--
598 if ($this->_redirect) {
599 echo $this->_redirect_target.
'.location = "'.addslashes($this->_redirect).
'";';
602 current_onload = (window.onload) ? window.onload : new Function;
603 window.onload = new Function ("page_on_load(); current_onload(); print_tooltip();")';
611 <form action=
"<?php echo $this->_action.$this->_anchor;?>" id=
"main_form" name=
"main_form" method=
"post" enctype=
"multipart/form-data" onsubmit=
"return form_on_submit();">
614 hidden_field(
'process_form',
'1');
616 hidden_field(
'token', get_unique_token());
630 foreach ($this->_hidden_fields as $name => $value) {
631 hidden_field($name, $value);