17 require_once dirname(__FILE__).
'/../../../../../core/include/init.inc';
18 require_once dirname(__FILE__).
'/../../../../../core/lib/html_form/html_form.inc';
19 if (!isset($_GET[
'assetid']))
return FALSE;
21 assert_valid_assetid($_GET[
'assetid']);
22 $asset = $GLOBALS[
'SQ_SYSTEM']->am->getAsset($_GET[
'assetid']);
23 if (!($asset instanceof
Form)) {
24 trigger_localised_error(
'CMS0002', E_USER_ERROR, $asset);
31 <title>
'<?php echo $asset->attr('name
') ?>' Page Contents Keyword Replacements</title>
34 background-color: #FFFFFF;
37 body, p, td, ul, li, input, select, textarea{
39 font-family: Arial, Verdana Helvetica, sans-serif;
44 padding: 0px 10px 5px 5px;
45 border: 1px solid #E0E0E0;
56 require_once dirname(__FILE__).
'/../../../../../core/include/backend_outputter.inc';
60 $o->openSection(
'Keyword List for \''.$asset->attr(
'name').
'\' (#
'.$asset->id.')
');
61 $o->openField('
');
63 $questions = $asset->getQuestions();
64 $sections = $asset->getSections();
66 <p>These keywords are available for use in Complex Formatting for insertion into the 'Page Contents
' bodycopy, if it is enabled. The <b>'Question Field
'</b> keywords (%question_field_*%) are replaced with the appropriate input field for that question. The <b>'Section Title
'</b> keywords (%section_title_*%) will be replaced with the name of the section.</p>
70 <legend><b>Unattached Questions</b></legend>
71 <table border="0" width="100%">
73 foreach ($questions as $q_id => $question) {
74 $q_asset = $GLOBALS['SQ_SYSTEM
']->am->getAsset($asset->id.':q
'.$q_id);
75 $q_name = $q_asset->attr('name
');
76 ?> <tr><td valign="top" width="200"><b>%question_field_<?php echo $asset->id.'_q
'.$q_id ?>%</b></td><td valign="top"><?php echo get_asset_tag_line($asset->id.':q
'.$q_id); ?></td></tr><?php
84 foreach ($sections as $section) {
88 <legend><b><?php echo get_asset_tag_line($section->id); ?></b></legend>
89 <table border="0" width="100%">
90 <tr><td valign="top" width="200"><b>%section_title_<?php echo $section->id ?>%</b></td><td valign="top">Section Title</td></tr>
92 $replacements['section_title_
'.$section->id] = $section->attr('name
');
93 $questions = $section->getQuestions();
94 foreach ($questions as $q_id => $question) {
95 $q_asset = $GLOBALS['SQ_SYSTEM
']->am->getAsset($section->id.':q
'.$q_id);
96 $q_name = $section->attr('name
').':
'.$q_asset->attr('name
');
98 <tr><td valign="top" width="200"><b>%question_field_<?php echo $section->id.'_q
'.$q_id; ?>%</b></td><td valign="top"><?php echo get_asset_tag_line($section->id.':q
'.$q_id); ?></td></tr>
115 $o->openField('', 'commit
');
116 normal_button('cancel
', 'Close Window
', 'window.close()
');