26 require_once dirname(__FILE__).
'/../../../../core/include/init.inc';
27 require_once SQ_LIB_PATH.
'/html_form/html_form.inc';
28 require_once SQ_FUDGE_PATH.
'/var_serialise/var_serialise.inc';
30 if (empty($GLOBALS[
'SQ_SYSTEM']->user) || !($GLOBALS[
'SQ_SYSTEM']->user->canAccessBackend() || $GLOBALS[
'SQ_SYSTEM']->user->type() ==
'simple_edit_user')){
34 if (!isset($_GET[
'name'])) $_GET[
'name'] =
"";
38 <html style=
"width: 400px; height: 280px;">
40 <title>Insert Anchor</title>
44 $include_list = Array(sq_web_path(
'lib').
'/js/translation.js');
46 $locales = $GLOBALS[
'SQ_SYSTEM']->lm->getCumulativeLocaleParts($GLOBALS[
'SQ_SYSTEM']->lm->getCurrentLocale());
48 foreach($locales as $locale) {
49 if (file_exists(SQ_DATA_PATH.
'/public/system/core/js_strings.'.$locale.
'.js')) {
50 $include_list[] = sq_web_path(
'data').
'/system/core/js_strings.'.$locale.
'.js';
54 foreach($include_list as $link) {
55 ?><script type=
"text/javascript" src=
"<?php echo $link; ?>"></script>
59 <script type=
"text/javascript" src=
"../../core/popup.js"></script>
60 <script type=
"text/javascript" src=
"<?php echo sq_web_path('fudge').'/var_serialise/var_serialise.js' ?>"></script>
61 <script type=
"text/javascript" src=
"<?php echo sq_web_path('lib').'/html_form/html_form.js' ?>"></script>
62 <script type=
"text/javascript" src=
"<?php echo sq_web_path('lib').'/js/general.js' ?>"></script>
64 <script type=
"text/javascript">
67 setTimeout(
'self.focus()',100);
71 __dlg_init(
"matrixInsertAnchor");
72 setTimeout(
'self.focus()',100);
76 var confirm_str =
"WARNING!\nYou are about to remove this anchor tag and can not be undone.\nAre you sure you want to remove the anchor?";
79 var fields = [
"name"];
80 var param =
new Object();
81 var f = document.main_form;
83 param[
"name"] = form_element_value(f.name);
84 param[
"remove"] = form_element_value(f.remove);
86 if (param[
"remove"] ==
"1") {
87 if (confirm(confirm_str)) {
88 __dlg_close(
"matrixInsertAnchor", param);
92 __dlg_close(
"matrixInsertAnchor", param);
99 __dlg_close(
"matrixInsertAnchor", null);
105 <style type=
"text/css">
109 font: 11px Tahoma,Verdana,sans-serif;
116 font: 11px Tahoma,Verdana,sans-serif;
127 border-bottom: 1px solid black;
133 padding: 0px 10px 5px 5px;
134 border-color: #725B7D;
137 .fl { width: 9em;
float: left; padding: 2px 5px; text-align: right; }
138 .fr { width: 7em;
float: left; padding: 2px 5px; text-align: right; }
141 form { padding: 0px; margin: 0px; }
143 select, input, button {
144 font: 11px Tahoma,Verdana,sans-serif;
152 .buttonColor, .buttonColor-hilite {
155 border-color: #9E86AA #725B7D #725B7D #9E86AA;
158 .buttonColor-hilite {
159 border-color: #402F48;
162 .buttonColor-chooser, .buttonColor-nocolor, .buttonColor-nocolor-hilite {
166 border-color: ButtonShadow ButtonHighlight ButtonHighlight ButtonShadow;
169 .buttonColor-nocolor, .buttonColor-nocolor-hilite { padding: 0px; }
170 .buttonColor-nocolor-hilite { background: #402F48; color: #FFFFFF; }
174 <body onload=
"Javascript: Init();">
175 <div
class=
"title">Insert Anchor</div>
176 <form action=
"" method=
"get" name=
"main_form">
179 <td valign=
"top" width=
"100%">
181 <legend><b>General</b></legend>
182 <table style=
"width:100%">
184 <td
class=
"label">Anchor Name:</td>
185 <td colspan=
"3"><?php text_box(
'name', $_GET[
'name'], 40, 0);?>
189 <td colspan=
"4"><hr /></td>
192 <td
class=
"label">Remove:</td>
193 <td colspan=
"3"><?php check_box(
'remove', (empty($_GET[
'name']) ?
'0' :
'1'), FALSE,
'', (empty($_GET[
'name']) ?
'disabled=true' :
'')); ?>
202 <div style=
"margin-top: 5px; margin-right: 5px; text-align: right;">
204 <button type=
"button" name=
"ok" onclick=
"return onOK();">OK</button>
205 <button type=
"button" name=
"cancel" onclick=
"return onCancel();">Cancel</button>