[0] | 1 | <?php |
---|
| 2 | # -- BEGIN LICENSE BLOCK --------------------------------------- |
---|
| 3 | # |
---|
| 4 | # This file is part of Dotclear 2. |
---|
| 5 | # |
---|
[1179] | 6 | # Copyright (c) 2003-2013 Olivier Meunier & Association Dotclear |
---|
[0] | 7 | # Licensed under the GPL version 2.0 license. |
---|
| 8 | # See LICENSE file or |
---|
| 9 | # http://www.gnu.org/licenses/old-licenses/gpl-2.0.html |
---|
| 10 | # |
---|
| 11 | # -- END LICENSE BLOCK ----------------------------------------- |
---|
| 12 | if (!defined('DC_RC_PATH')) { return; } |
---|
| 13 | |
---|
| 14 | define('DC_AUTH_PAGE','auth.php'); |
---|
| 15 | |
---|
| 16 | class dcPage |
---|
| 17 | { |
---|
[342] | 18 | private static $loaded_js=array(); |
---|
| 19 | |
---|
[0] | 20 | # Auth check |
---|
| 21 | public static function check($permissions) |
---|
| 22 | { |
---|
| 23 | global $core; |
---|
[1187] | 24 | |
---|
[0] | 25 | if ($core->blog && $core->auth->check($permissions,$core->blog->id)) |
---|
| 26 | { |
---|
| 27 | return; |
---|
| 28 | } |
---|
[1187] | 29 | |
---|
[0] | 30 | if (session_id()) { |
---|
| 31 | $core->session->destroy(); |
---|
| 32 | } |
---|
| 33 | http::redirect(DC_AUTH_PAGE); |
---|
| 34 | } |
---|
[1187] | 35 | |
---|
[0] | 36 | # Check super admin |
---|
| 37 | public static function checkSuper() |
---|
| 38 | { |
---|
| 39 | global $core; |
---|
[1187] | 40 | |
---|
[0] | 41 | if (!$core->auth->isSuperAdmin()) |
---|
| 42 | { |
---|
| 43 | if (session_id()) { |
---|
| 44 | $core->session->destroy(); |
---|
| 45 | } |
---|
| 46 | http::redirect(DC_AUTH_PAGE); |
---|
| 47 | } |
---|
| 48 | } |
---|
[1187] | 49 | |
---|
[0] | 50 | # Top of admin page |
---|
| 51 | public static function open($title='', $head='') |
---|
| 52 | { |
---|
| 53 | global $core; |
---|
[1144] | 54 | |
---|
[0] | 55 | # List of user's blogs |
---|
| 56 | if ($core->auth->blog_count == 1 || $core->auth->blog_count > 20) |
---|
| 57 | { |
---|
| 58 | $blog_box = |
---|
[999] | 59 | '<p>'.__('Blog:').' <strong title="'.html::escapeHTML($core->blog->url).'">'. |
---|
[0] | 60 | html::escapeHTML($core->blog->name).'</strong>'; |
---|
[1187] | 61 | |
---|
[0] | 62 | if ($core->auth->blog_count > 20) { |
---|
| 63 | $blog_box .= ' - <a href="blogs.php">'.__('Change blog').'</a>'; |
---|
| 64 | } |
---|
[999] | 65 | $blog_box .= '</p>'; |
---|
[0] | 66 | } |
---|
| 67 | else |
---|
| 68 | { |
---|
| 69 | $rs_blogs = $core->getBlogs(array('order'=>'LOWER(blog_name)','limit'=>20)); |
---|
| 70 | $blogs = array(); |
---|
| 71 | while ($rs_blogs->fetch()) { |
---|
| 72 | $blogs[html::escapeHTML($rs_blogs->blog_name.' - '.$rs_blogs->blog_url)] = $rs_blogs->blog_id; |
---|
| 73 | } |
---|
| 74 | $blog_box = |
---|
[999] | 75 | '<p><label for="switchblog" class="classic">'. |
---|
[0] | 76 | __('Blogs:').' '. |
---|
| 77 | $core->formNonce(). |
---|
[454] | 78 | form::combo('switchblog',$blogs,$core->blog->id). |
---|
[999] | 79 | '</label></p>'. |
---|
| 80 | '<noscript><p><input type="submit" value="'.__('ok').'" /></p></noscript>'; |
---|
[0] | 81 | } |
---|
[1187] | 82 | |
---|
[36] | 83 | $safe_mode = isset($_SESSION['sess_safe_mode']) && $_SESSION['sess_safe_mode']; |
---|
[1187] | 84 | |
---|
[0] | 85 | # Display |
---|
| 86 | header('Content-Type: text/html; charset=UTF-8'); |
---|
| 87 | echo |
---|
| 88 | '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" '. |
---|
| 89 | ' "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">'."\n". |
---|
| 90 | '<html xmlns="http://www.w3.org/1999/xhtml" '. |
---|
| 91 | 'xml:lang="'.$core->auth->getInfo('user_lang').'" '. |
---|
| 92 | 'lang="'.$core->auth->getInfo('user_lang').'">'."\n". |
---|
| 93 | "<head>\n". |
---|
| 94 | ' <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />'."\n". |
---|
| 95 | ' <title>'.$title.' - '.html::escapeHTML($core->blog->name).' - '.html::escapeHTML(DC_VENDOR_NAME).' - '.DC_VERSION.'</title>'."\n". |
---|
[1187] | 96 | |
---|
[0] | 97 | ' <meta name="ROBOTS" content="NOARCHIVE,NOINDEX,NOFOLLOW" />'."\n". |
---|
| 98 | ' <meta name="GOOGLEBOT" content="NOSNIPPET" />'."\n". |
---|
[1187] | 99 | |
---|
[0] | 100 | self::jsLoadIE7(). |
---|
[1187] | 101 | ' <link rel="stylesheet" href="style/default.css" type="text/css" media="screen" />'."\n"; |
---|
[0] | 102 | if (l10n::getTextDirection($GLOBALS['_lang']) == 'rtl') { |
---|
[473] | 103 | echo |
---|
[1187] | 104 | ' <link rel="stylesheet" href="style/default-rtl.css" type="text/css" media="screen" />'."\n"; |
---|
[0] | 105 | } |
---|
[237] | 106 | |
---|
[244] | 107 | $core->auth->user_prefs->addWorkspace('interface'); |
---|
| 108 | $user_ui_hide_std_favicon = $core->auth->user_prefs->interface->hide_std_favicon; |
---|
| 109 | if (!$user_ui_hide_std_favicon) { |
---|
| 110 | echo '<link rel="icon" type="image/png" href="images/favicon.png" />'; |
---|
| 111 | } |
---|
[1187] | 112 | |
---|
[0] | 113 | echo |
---|
| 114 | self::jsCommon(). |
---|
| 115 | $head; |
---|
[1187] | 116 | |
---|
[0] | 117 | # --BEHAVIOR-- adminPageHTMLHead |
---|
| 118 | $core->callBehavior('adminPageHTMLHead'); |
---|
[1187] | 119 | |
---|
[0] | 120 | echo |
---|
| 121 | "</head>\n". |
---|
[36] | 122 | '<body id="dotclear-admin'. |
---|
| 123 | ($safe_mode ? ' safe-mode' : ''). |
---|
| 124 | '">'."\n". |
---|
[1187] | 125 | |
---|
[647] | 126 | '<div id="header">'. |
---|
[812] | 127 | '<ul id="prelude"><li><a href="#content">'.__('Go to the content').'</a></li><li><a href="#main-menu">'.__('Go to the menu').'</a></li></ul>'."\n". |
---|
[1187] | 128 | '<div id="top"><h1><a href="index.php">'.DC_VENDOR_NAME.'</a></h1></div>'."\n"; |
---|
| 129 | |
---|
[0] | 130 | echo |
---|
[489] | 131 | '<div id="info-boxes">'. |
---|
| 132 | '<div id="info-box1">'. |
---|
| 133 | '<form action="index.php" method="post">'. |
---|
[0] | 134 | $blog_box. |
---|
[999] | 135 | '<p><a href="'.$core->blog->url.'" onclick="window.open(this.href);return false;" title="'.__('Go to site').' ('.__('new window').')'.'">'.__('Go to site').' <img src="images/outgoing.png" alt="" /></a>'. |
---|
| 136 | '</p></form>'. |
---|
[3] | 137 | '</div>'. |
---|
[489] | 138 | '<div id="info-box2">'. |
---|
| 139 | '<a'.(preg_match('/index.php$/',$_SERVER['REQUEST_URI']) ? ' class="active"' : '').' href="index.php">'.__('My dashboard').'</a>'. |
---|
| 140 | '<span> | </span><a'.(preg_match('/preferences.php(\?.*)?$/',$_SERVER['REQUEST_URI']) ? ' class="active"' : '').' href="preferences.php">'.__('My preferences').'</a>'. |
---|
| 141 | '<span> | </span><a href="index.php?logout=1" class="logout">'.sprintf(__('Logout %s'),$core->auth->userID()).' <img src="images/logout.png" alt="" /></a>'. |
---|
| 142 | '</div>'. |
---|
[118] | 143 | '</div>'. |
---|
[0] | 144 | '</div>'; |
---|
[1187] | 145 | |
---|
[0] | 146 | echo |
---|
| 147 | '<div id="wrapper">'."\n". |
---|
| 148 | '<div id="main">'."\n". |
---|
| 149 | '<div id="content">'."\n"; |
---|
[1187] | 150 | |
---|
[36] | 151 | # Safe mode |
---|
| 152 | if ($safe_mode) |
---|
[0] | 153 | { |
---|
| 154 | echo |
---|
[36] | 155 | '<div class="error"><h3>'.__('Safe mode').'</h3>'. |
---|
[37] | 156 | '<p>'.__('You are in safe mode. All plugins have been temporarily disabled. Remind to log out then log in again normally to get back all functionalities').'</p>'. |
---|
[0] | 157 | '</div>'; |
---|
| 158 | } |
---|
[1187] | 159 | |
---|
[0] | 160 | if ($core->error->flag()) { |
---|
| 161 | echo |
---|
[973] | 162 | '<div class="error"><p><strong>'.(count($core->error->getErrors()) > 1 ? __('Errors:') : __('Error:')).'</p></strong>'. |
---|
[0] | 163 | $core->error->toHTML(). |
---|
| 164 | '</div>'; |
---|
| 165 | } |
---|
| 166 | } |
---|
[1187] | 167 | |
---|
[0] | 168 | public static function close() |
---|
| 169 | { |
---|
[942] | 170 | global $core; |
---|
| 171 | |
---|
[0] | 172 | $menu =& $GLOBALS['_menu']; |
---|
[1187] | 173 | |
---|
[0] | 174 | echo |
---|
| 175 | "</div>\n". // End of #content |
---|
| 176 | "</div>\n". // End of #main |
---|
[1187] | 177 | |
---|
[0] | 178 | '<div id="main-menu">'."\n"; |
---|
[1187] | 179 | |
---|
[0] | 180 | foreach ($menu as $k => $v) { |
---|
| 181 | echo $menu[$k]->draw(); |
---|
| 182 | } |
---|
[1187] | 183 | |
---|
[1140] | 184 | $text = sprintf(__('Thank you for using %s.'),'Dotclear '.DC_VERSION); |
---|
[942] | 185 | |
---|
| 186 | # --BEHAVIOR-- adminPageFooter |
---|
[946] | 187 | $textAlt = $core->callBehavior('adminPageFooter',$core,$text); |
---|
[1140] | 188 | if ($textAlt != '') { |
---|
| 189 | $text = $textAlt; |
---|
| 190 | } |
---|
[1142] | 191 | $text = html::escapeHTML($text); |
---|
[942] | 192 | |
---|
[0] | 193 | echo |
---|
| 194 | '</div>'."\n". // End of #main-menu |
---|
[1140] | 195 | '<div id="footer"><a href="http://dotclear.org/" title="'.$text.'"><img src="style/dc_logo_footer.png" alt="'.$text.'" /></a></div>'."\n". |
---|
[0] | 196 | "</div>\n"; // End of #wrapper |
---|
[1187] | 197 | |
---|
[0] | 198 | if (defined('DC_DEV') && DC_DEV === true) { |
---|
| 199 | echo self::debugInfo(); |
---|
| 200 | } |
---|
[1187] | 201 | |
---|
[0] | 202 | echo |
---|
| 203 | '</body></html>'; |
---|
| 204 | } |
---|
[1187] | 205 | |
---|
[0] | 206 | public static function openPopup($title='', $head='') |
---|
| 207 | { |
---|
| 208 | global $core; |
---|
[1187] | 209 | |
---|
[0] | 210 | # Display |
---|
| 211 | header('Content-Type: text/html; charset=UTF-8'); |
---|
| 212 | echo |
---|
| 213 | '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" '. |
---|
| 214 | ' "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">'."\n". |
---|
| 215 | '<html xmlns="http://www.w3.org/1999/xhtml" '. |
---|
| 216 | 'xml:lang="'.$core->auth->getInfo('user_lang').'" '. |
---|
| 217 | 'lang="'.$core->auth->getInfo('user_lang').'">'."\n". |
---|
| 218 | "<head>\n". |
---|
| 219 | ' <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />'."\n". |
---|
| 220 | ' <title>'.$title.' - '.html::escapeHTML($core->blog->name).' - '.html::escapeHTML(DC_VENDOR_NAME).' - '.DC_VERSION.'</title>'."\n". |
---|
[1187] | 221 | |
---|
[0] | 222 | ' <meta name="ROBOTS" content="NOARCHIVE,NOINDEX,NOFOLLOW" />'."\n". |
---|
| 223 | ' <meta name="GOOGLEBOT" content="NOSNIPPET" />'."\n". |
---|
[1187] | 224 | |
---|
[0] | 225 | self::jsLoadIE7(). |
---|
[1187] | 226 | ' <link rel="stylesheet" href="style/default.css" type="text/css" media="screen" />'."\n"; |
---|
[0] | 227 | if (l10n::getTextDirection($GLOBALS['_lang']) == 'rtl') { |
---|
[473] | 228 | echo |
---|
[1187] | 229 | ' <link rel="stylesheet" href="style/default-rtl.css" type="text/css" media="screen" />'."\n"; |
---|
[0] | 230 | } |
---|
[1187] | 231 | |
---|
[0] | 232 | echo |
---|
| 233 | self::jsCommon(). |
---|
| 234 | $head; |
---|
[1187] | 235 | |
---|
[0] | 236 | # --BEHAVIOR-- adminPageHTMLHead |
---|
| 237 | $core->callBehavior('adminPageHTMLHead'); |
---|
[1187] | 238 | |
---|
[0] | 239 | echo |
---|
| 240 | "</head>\n". |
---|
| 241 | '<body id="dotclear-admin" class="popup">'."\n". |
---|
[1187] | 242 | |
---|
[0] | 243 | '<div id="top"><h1>'.DC_VENDOR_NAME.'</h1></div>'."\n"; |
---|
[1187] | 244 | |
---|
[0] | 245 | echo |
---|
| 246 | '<div id="wrapper">'."\n". |
---|
| 247 | '<div id="main">'."\n". |
---|
| 248 | '<div id="content">'."\n"; |
---|
[1187] | 249 | |
---|
[0] | 250 | if ($core->error->flag()) { |
---|
| 251 | echo |
---|
| 252 | '<div class="error"><strong>'.__('Errors:').'</strong>'. |
---|
| 253 | $core->error->toHTML(). |
---|
| 254 | '</div>'; |
---|
| 255 | } |
---|
| 256 | } |
---|
[1187] | 257 | |
---|
[0] | 258 | public static function closePopup() |
---|
| 259 | { |
---|
| 260 | echo |
---|
| 261 | "</div>\n". // End of #content |
---|
| 262 | "</div>\n". // End of #main |
---|
| 263 | '<div id="footer"><p> </p></div>'."\n". |
---|
| 264 | "</div>\n". // End of #wrapper |
---|
| 265 | '</body></html>'; |
---|
| 266 | } |
---|
[907] | 267 | |
---|
| 268 | public static function message($msg,$timestamp=true,$div=false,$echo=true) |
---|
| 269 | { |
---|
[910] | 270 | global $core; |
---|
[1187] | 271 | |
---|
[907] | 272 | $res = ''; |
---|
| 273 | if ($msg != '') { |
---|
| 274 | $res = ($div ? '<div class="message">' : '').'<p'.($div ? '' : ' class="message"').'>'. |
---|
[1161] | 275 | ($timestamp ? dt::str(__('%H:%M:%S:'),null,$core->auth->getInfo('user_tz')).' ' : '').$msg. |
---|
| 276 | '</p>'.($div ? '</div>' : ''); |
---|
[907] | 277 | if ($echo) { |
---|
| 278 | echo $res; |
---|
| 279 | } |
---|
| 280 | } |
---|
| 281 | return $res; |
---|
| 282 | } |
---|
[1187] | 283 | |
---|
[0] | 284 | private static function debugInfo() |
---|
| 285 | { |
---|
| 286 | $global_vars = implode(', ',array_keys($GLOBALS)); |
---|
[1187] | 287 | |
---|
[0] | 288 | $res = |
---|
| 289 | '<div id="debug"><div>'. |
---|
| 290 | '<p>memory usage: '.memory_get_usage().' ('.files::size(memory_get_usage()).')</p>'; |
---|
[1187] | 291 | |
---|
[0] | 292 | if (function_exists('xdebug_get_profiler_filename')) |
---|
| 293 | { |
---|
| 294 | $res .= '<p>Elapsed time: '.xdebug_time_index().' seconds</p>'; |
---|
[1187] | 295 | |
---|
[0] | 296 | $prof_file = xdebug_get_profiler_filename(); |
---|
| 297 | if ($prof_file) { |
---|
| 298 | $res .= '<p>Profiler file : '.xdebug_get_profiler_filename().'</p>'; |
---|
| 299 | } else { |
---|
| 300 | $prof_url = http::getSelfURI(); |
---|
[321] | 301 | $prof_url .= (strpos($prof_url,'?') === false) ? '?' : '&'; |
---|
[0] | 302 | $prof_url .= 'XDEBUG_PROFILE'; |
---|
[321] | 303 | $res .= '<p><a href="'.html::escapeURL($prof_url).'">Trigger profiler</a></p>'; |
---|
[0] | 304 | } |
---|
[1187] | 305 | |
---|
[0] | 306 | /* xdebug configuration: |
---|
| 307 | zend_extension = /.../xdebug.so |
---|
| 308 | xdebug.auto_trace = On |
---|
| 309 | xdebug.trace_format = 0 |
---|
| 310 | xdebug.trace_options = 1 |
---|
| 311 | xdebug.show_mem_delta = On |
---|
| 312 | xdebug.profiler_enable = 0 |
---|
| 313 | xdebug.profiler_enable_trigger = 1 |
---|
| 314 | xdebug.profiler_output_dir = /tmp |
---|
| 315 | xdebug.profiler_append = 0 |
---|
| 316 | xdebug.profiler_output_name = timestamp |
---|
| 317 | */ |
---|
| 318 | } |
---|
[1187] | 319 | |
---|
[0] | 320 | $res .= |
---|
| 321 | '<p>Global vars: '.$global_vars.'</p>'. |
---|
| 322 | '</div></div>'; |
---|
[1187] | 323 | |
---|
[0] | 324 | return $res; |
---|
| 325 | } |
---|
[1187] | 326 | |
---|
[0] | 327 | public static function help($page,$index='') |
---|
| 328 | { |
---|
| 329 | # Deprecated but we keep this for plugins. |
---|
| 330 | } |
---|
[1187] | 331 | |
---|
[0] | 332 | public static function helpBlock() |
---|
| 333 | { |
---|
| 334 | $args = func_get_args(); |
---|
| 335 | if (empty($args)) { |
---|
| 336 | return; |
---|
| 337 | }; |
---|
[1187] | 338 | |
---|
[0] | 339 | global $__resources; |
---|
| 340 | if (empty($__resources['help'])) { |
---|
| 341 | return; |
---|
| 342 | } |
---|
[1187] | 343 | |
---|
[0] | 344 | $content = ''; |
---|
| 345 | foreach ($args as $v) |
---|
| 346 | { |
---|
| 347 | if (is_object($v) && isset($v->content)) { |
---|
| 348 | $content .= $v->content; |
---|
| 349 | continue; |
---|
| 350 | } |
---|
[1187] | 351 | |
---|
[0] | 352 | if (!isset($__resources['help'][$v])) { |
---|
| 353 | continue; |
---|
| 354 | } |
---|
| 355 | $f = $__resources['help'][$v]; |
---|
| 356 | if (!file_exists($f) || !is_readable($f)) { |
---|
| 357 | continue; |
---|
| 358 | } |
---|
[1187] | 359 | |
---|
[0] | 360 | $fc = file_get_contents($f); |
---|
| 361 | if (preg_match('|<body[^>]*?>(.*?)</body>|ms',$fc,$matches)) { |
---|
| 362 | $content .= $matches[1]; |
---|
| 363 | } else { |
---|
| 364 | $content .= $fc; |
---|
| 365 | } |
---|
| 366 | } |
---|
[1187] | 367 | |
---|
[0] | 368 | if (trim($content) == '') { |
---|
| 369 | return; |
---|
| 370 | } |
---|
[1187] | 371 | |
---|
[0] | 372 | echo |
---|
[3] | 373 | '<div id="help"><hr /><div class="help-content clear"><h2>'.__('Help').'</h2>'. |
---|
[0] | 374 | $content. |
---|
| 375 | '</div></div>'; |
---|
| 376 | } |
---|
[1187] | 377 | |
---|
[0] | 378 | public static function jsLoad($src) |
---|
| 379 | { |
---|
[342] | 380 | $escaped_src = html::escapeHTML($src); |
---|
| 381 | if (!isset(self::$loaded_js[$escaped_src])) { |
---|
| 382 | self::$loaded_js[$escaped_src]=true; |
---|
| 383 | return '<script type="text/javascript" src="'.$escaped_src.'"></script>'."\n"; |
---|
| 384 | } |
---|
[0] | 385 | } |
---|
[1187] | 386 | |
---|
[0] | 387 | public static function jsVar($n,$v) |
---|
| 388 | { |
---|
| 389 | return $n." = '".html::escapeJS($v)."';\n"; |
---|
| 390 | } |
---|
[1187] | 391 | |
---|
[0] | 392 | public static function jsCommon() |
---|
| 393 | { |
---|
| 394 | return |
---|
| 395 | self::jsLoad('js/jquery/jquery.js'). |
---|
| 396 | self::jsLoad('js/jquery/jquery.biscuit.js'). |
---|
| 397 | self::jsLoad('js/jquery/jquery.bgFade.js'). |
---|
| 398 | self::jsLoad('js/common.js'). |
---|
[447] | 399 | self::jsLoad('js/prelude.js'). |
---|
[1187] | 400 | |
---|
[0] | 401 | '<script type="text/javascript">'."\n". |
---|
| 402 | "//<![CDATA[\n". |
---|
| 403 | self::jsVar('dotclear.nonce',$GLOBALS['core']->getNonce()). |
---|
[1187] | 404 | |
---|
[1019] | 405 | self::jsVar('dotclear.img_plus_src','images/expand.png'). |
---|
[0] | 406 | self::jsVar('dotclear.img_plus_alt',__('uncover')). |
---|
[1019] | 407 | self::jsVar('dotclear.img_minus_src','images/hide.png'). |
---|
[0] | 408 | self::jsVar('dotclear.img_minus_alt',__('hide')). |
---|
| 409 | self::jsVar('dotclear.img_menu_on','images/menu_on.png'). |
---|
| 410 | self::jsVar('dotclear.img_menu_off','images/menu_off.png'). |
---|
[1187] | 411 | |
---|
[0] | 412 | self::jsVar('dotclear.msg.help', |
---|
| 413 | __('help')). |
---|
| 414 | self::jsVar('dotclear.msg.no_selection', |
---|
| 415 | __('no selection')). |
---|
| 416 | self::jsVar('dotclear.msg.select_all', |
---|
| 417 | __('select all')). |
---|
| 418 | self::jsVar('dotclear.msg.invert_sel', |
---|
| 419 | __('invert selection')). |
---|
| 420 | self::jsVar('dotclear.msg.website', |
---|
| 421 | __('Web site:')). |
---|
| 422 | self::jsVar('dotclear.msg.email', |
---|
| 423 | __('Email:')). |
---|
| 424 | self::jsVar('dotclear.msg.ip_address', |
---|
| 425 | __('IP address:')). |
---|
| 426 | self::jsVar('dotclear.msg.error', |
---|
| 427 | __('Error:')). |
---|
| 428 | self::jsVar('dotclear.msg.entry_created', |
---|
| 429 | __('Entry has been successfully created.')). |
---|
| 430 | self::jsVar('dotclear.msg.edit_entry', |
---|
| 431 | __('Edit entry')). |
---|
| 432 | self::jsVar('dotclear.msg.view_entry', |
---|
| 433 | __('view entry')). |
---|
| 434 | self::jsVar('dotclear.msg.confirm_delete_posts', |
---|
| 435 | __("Are you sure you want to delete selected entries (%s)?")). |
---|
| 436 | self::jsVar('dotclear.msg.confirm_delete_post', |
---|
| 437 | __("Are you sure you want to delete this entry?")). |
---|
[1049] | 438 | self::jsVar('dotclear.msg.confirm_spam_delete', |
---|
| 439 | __('Are you sure you want to delete all spams?')). |
---|
[0] | 440 | self::jsVar('dotclear.msg.confirm_delete_comments', |
---|
| 441 | __('Are you sure you want to delete selected comments (%s)?')). |
---|
| 442 | self::jsVar('dotclear.msg.confirm_delete_comment', |
---|
| 443 | __('Are you sure you want to delete this comment?')). |
---|
| 444 | self::jsVar('dotclear.msg.cannot_delete_users', |
---|
| 445 | __('Users with posts cannot be deleted.')). |
---|
| 446 | self::jsVar('dotclear.msg.confirm_delete_user', |
---|
| 447 | __('Are you sure you want to delete selected users (%s)?')). |
---|
| 448 | self::jsVar('dotclear.msg.confirm_delete_category', |
---|
| 449 | __('Are you sure you want to delete category "%s"?')). |
---|
| 450 | self::jsVar('dotclear.msg.confirm_reorder_categories', |
---|
| 451 | __('Are you sure you want to reorder all categories?')). |
---|
| 452 | self::jsVar('dotclear.msg.confirm_delete_media', |
---|
| 453 | __('Are you sure you want to remove media "%s"?')). |
---|
| 454 | self::jsVar('dotclear.msg.confirm_extract_current', |
---|
| 455 | __('Are you sure you want to extract archive in current directory?')). |
---|
| 456 | self::jsVar('dotclear.msg.confirm_remove_attachment', |
---|
| 457 | __('Are you sure you want to remove attachment "%s"?')). |
---|
| 458 | self::jsVar('dotclear.msg.confirm_delete_lang', |
---|
| 459 | __('Are you sure you want to delete "%s" language?')). |
---|
| 460 | self::jsVar('dotclear.msg.confirm_delete_plugin', |
---|
| 461 | __('Are you sure you want to delete "%s" plugin?')). |
---|
| 462 | self::jsVar('dotclear.msg.use_this_theme', |
---|
| 463 | __('Use this theme')). |
---|
| 464 | self::jsVar('dotclear.msg.remove_this_theme', |
---|
| 465 | __('Remove this theme')). |
---|
| 466 | self::jsVar('dotclear.msg.confirm_delete_theme', |
---|
| 467 | __('Are you sure you want to delete "%s" theme?')). |
---|
| 468 | self::jsVar('dotclear.msg.zip_file_content', |
---|
| 469 | __('Zip file content')). |
---|
| 470 | self::jsVar('dotclear.msg.xhtml_validator', |
---|
| 471 | __('XHTML markup validator')). |
---|
| 472 | self::jsVar('dotclear.msg.xhtml_valid', |
---|
| 473 | __('XHTML content is valid.')). |
---|
| 474 | self::jsVar('dotclear.msg.xhtml_not_valid', |
---|
| 475 | __('There are XHTML markup errors.')). |
---|
| 476 | self::jsVar('dotclear.msg.confirm_change_post_format', |
---|
| 477 | __('You have unsaved changes. Switch post format will loose these changes. Proceed anyway?')). |
---|
[224] | 478 | self::jsVar('dotclear.msg.load_enhanced_uploader', |
---|
| 479 | __('Loading enhanced uploader, please wait.')). |
---|
[0] | 480 | "\n//]]>\n". |
---|
| 481 | "</script>\n"; |
---|
| 482 | } |
---|
[1187] | 483 | |
---|
[0] | 484 | public static function jsLoadIE7() |
---|
| 485 | { |
---|
| 486 | return |
---|
| 487 | '<!--[if lt IE 8]>'."\n". |
---|
| 488 | self::jsLoad('js/ie7/IE8.js'). |
---|
| 489 | '<link rel="stylesheet" type="text/css" href="style/iesucks.css" />'."\n". |
---|
| 490 | '<![endif]-->'."\n"; |
---|
| 491 | } |
---|
[1187] | 492 | |
---|
[0] | 493 | public static function jsConfirmClose() |
---|
| 494 | { |
---|
| 495 | $args = func_get_args(); |
---|
| 496 | if (count($args) > 0) { |
---|
| 497 | foreach ($args as $k => $v) { |
---|
| 498 | $args[$k] = "'".html::escapeJS($v)."'"; |
---|
| 499 | } |
---|
| 500 | $args = implode(',',$args); |
---|
| 501 | } else { |
---|
| 502 | $args = ''; |
---|
| 503 | } |
---|
[1187] | 504 | |
---|
[0] | 505 | return |
---|
| 506 | self::jsLoad('js/confirm-close.js'). |
---|
| 507 | '<script type="text/javascript">'."\n". |
---|
| 508 | "//<![CDATA[\n". |
---|
| 509 | "confirmClosePage = new confirmClose(".$args."); ". |
---|
| 510 | "confirmClose.prototype.prompt = '".html::escapeJS(__('You have unsaved changes.'))."'; ". |
---|
| 511 | "\n//]]>\n". |
---|
| 512 | "</script>\n"; |
---|
| 513 | } |
---|
[1187] | 514 | |
---|
[0] | 515 | public static function jsPageTabs($default=null) |
---|
| 516 | { |
---|
| 517 | if ($default) { |
---|
| 518 | $default = "'".html::escapeJS($default)."'"; |
---|
| 519 | } |
---|
[1187] | 520 | |
---|
[0] | 521 | return |
---|
| 522 | self::jsLoad('js/jquery/jquery.pageTabs.js'). |
---|
| 523 | '<script type="text/javascript">'."\n". |
---|
| 524 | "//<![CDATA[\n". |
---|
| 525 | "\$(function() {\n". |
---|
[1161] | 526 | " \$.pageTabs(".$default.");\n". |
---|
| 527 | "});\n". |
---|
| 528 | "\n//]]>\n". |
---|
| 529 | "</script>\n"; |
---|
| 530 | } |
---|
| 531 | |
---|
| 532 | public static function jsModal() |
---|
| 533 | { |
---|
| 534 | return |
---|
| 535 | '<link rel="stylesheet" type="text/css" href="style/modal/modal.css" />'."\n". |
---|
| 536 | self::jsLoad('js/jquery/jquery.modal.js'). |
---|
| 537 | '<script type="text/javascript">'."\n". |
---|
| 538 | "//<![CDATA[\n". |
---|
| 539 | self::jsVar('$.modal.prototype.params.loader_img','style/modal/loader.gif'). |
---|
| 540 | self::jsVar('$.modal.prototype.params.close_img','style/modal/close.png'). |
---|
| 541 | "\n//]]>\n". |
---|
| 542 | "</script>\n"; |
---|
| 543 | } |
---|
| 544 | |
---|
| 545 | public static function jsColorPicker() |
---|
| 546 | { |
---|
| 547 | return |
---|
| 548 | '<link rel="stylesheet" type="text/css" href="style/farbtastic/farbtastic.css" />'."\n". |
---|
| 549 | self::jsLoad('js/jquery/jquery.farbtastic.js'). |
---|
| 550 | self::jsLoad('js/color-picker.js'); |
---|
| 551 | } |
---|
| 552 | |
---|
| 553 | public static function jsDatePicker() |
---|
| 554 | { |
---|
| 555 | return |
---|
| 556 | '<link rel="stylesheet" type="text/css" href="style/date-picker.css" />'."\n". |
---|
| 557 | self::jsLoad('js/date-picker.js'). |
---|
| 558 | '<script type="text/javascript">'."\n". |
---|
| 559 | "//<![CDATA[\n". |
---|
[1187] | 560 | |
---|
[1161] | 561 | "datePicker.prototype.months[0] = '".html::escapeJS(__('January'))."'; ". |
---|
| 562 | "datePicker.prototype.months[1] = '".html::escapeJS(__('February'))."'; ". |
---|
| 563 | "datePicker.prototype.months[2] = '".html::escapeJS(__('March'))."'; ". |
---|
| 564 | "datePicker.prototype.months[3] = '".html::escapeJS(__('April'))."'; ". |
---|
| 565 | "datePicker.prototype.months[4] = '".html::escapeJS(__('May'))."'; ". |
---|
| 566 | "datePicker.prototype.months[5] = '".html::escapeJS(__('June'))."'; ". |
---|
| 567 | "datePicker.prototype.months[6] = '".html::escapeJS(__('July'))."'; ". |
---|
| 568 | "datePicker.prototype.months[7] = '".html::escapeJS(__('August'))."'; ". |
---|
| 569 | "datePicker.prototype.months[8] = '".html::escapeJS(__('September'))."'; ". |
---|
| 570 | "datePicker.prototype.months[9] = '".html::escapeJS(__('October'))."'; ". |
---|
| 571 | "datePicker.prototype.months[10] = '".html::escapeJS(__('November'))."'; ". |
---|
| 572 | "datePicker.prototype.months[11] = '".html::escapeJS(__('December'))."'; ". |
---|
[1187] | 573 | |
---|
[1161] | 574 | "datePicker.prototype.days[0] = '".html::escapeJS(__('Monday'))."'; ". |
---|
| 575 | "datePicker.prototype.days[1] = '".html::escapeJS(__('Tuesday'))."'; ". |
---|
| 576 | "datePicker.prototype.days[2] = '".html::escapeJS(__('Wednesday'))."'; ". |
---|
| 577 | "datePicker.prototype.days[3] = '".html::escapeJS(__('Thursday'))."'; ". |
---|
| 578 | "datePicker.prototype.days[4] = '".html::escapeJS(__('Friday'))."'; ". |
---|
| 579 | "datePicker.prototype.days[5] = '".html::escapeJS(__('Saturday'))."'; ". |
---|
| 580 | "datePicker.prototype.days[6] = '".html::escapeJS(__('Sunday'))."'; ". |
---|
[1187] | 581 | |
---|
[1161] | 582 | "datePicker.prototype.img_src = 'images/date-picker.png'; ". |
---|
[1187] | 583 | |
---|
[1161] | 584 | "datePicker.prototype.close_msg = '".html::escapeJS(__('close'))."'; ". |
---|
| 585 | "datePicker.prototype.now_msg = '".html::escapeJS(__('now'))."'; ". |
---|
[1187] | 586 | |
---|
[1161] | 587 | "\n//]]>\n". |
---|
| 588 | "</script>\n"; |
---|
| 589 | } |
---|
| 590 | |
---|
| 591 | public static function jsToolBar() |
---|
| 592 | { |
---|
| 593 | $res = |
---|
| 594 | '<link rel="stylesheet" type="text/css" href="style/jsToolBar/jsToolBar.css" />'. |
---|
| 595 | '<script type="text/javascript" src="js/jsToolBar/jsToolBar.js"></script>'; |
---|
[1187] | 596 | |
---|
[1161] | 597 | if (isset($GLOBALS['core']->auth) && $GLOBALS['core']->auth->getOption('enable_wysiwyg')) { |
---|
| 598 | $res .= '<script type="text/javascript" src="js/jsToolBar/jsToolBar.wysiwyg.js"></script>'; |
---|
[0] | 599 | } |
---|
[1187] | 600 | |
---|
[1161] | 601 | $res .= |
---|
| 602 | '<script type="text/javascript" src="js/jsToolBar/jsToolBar.dotclear.js"></script>'. |
---|
| 603 | '<script type="text/javascript">'."\n". |
---|
| 604 | "//<![CDATA[\n". |
---|
| 605 | "jsToolBar.prototype.dialog_url = 'popup.php'; ". |
---|
| 606 | "jsToolBar.prototype.iframe_css = '". |
---|
| 607 | 'body{'. |
---|
| 608 | 'font: 12px "DejaVu Sans","Lucida Grande","Lucida Sans Unicode",Arial,sans-serif;'. |
---|
| 609 | 'color : #000;'. |
---|
| 610 | 'background: #f9f9f9;'. |
---|
| 611 | 'margin: 0;'. |
---|
| 612 | 'padding : 2px;'. |
---|
| 613 | 'border: none;'. |
---|
| 614 | (l10n::getTextDirection($GLOBALS['_lang']) == 'rtl' ? 'direction:rtl;' : ''). |
---|
| 615 | '}'. |
---|
| 616 | 'pre, code, kbd, samp {'. |
---|
| 617 | 'font-family:"Courier New",Courier,monospace;'. |
---|
| 618 | 'font-size : 1.1em;'. |
---|
| 619 | '}'. |
---|
| 620 | 'code {'. |
---|
| 621 | 'color : #666;'. |
---|
| 622 | 'font-weight : bold;'. |
---|
| 623 | '}'. |
---|
| 624 | 'body > p:first-child {'. |
---|
| 625 | 'margin-top: 0;'. |
---|
| 626 | '}'. |
---|
| 627 | "'; ". |
---|
| 628 | "jsToolBar.prototype.base_url = '".html::escapeJS($GLOBALS['core']->blog->host)."'; ". |
---|
| 629 | "jsToolBar.prototype.switcher_visual_title = '".html::escapeJS(__('visual'))."'; ". |
---|
| 630 | "jsToolBar.prototype.switcher_source_title = '".html::escapeJS(__('source'))."'; ". |
---|
| 631 | "jsToolBar.prototype.legend_msg = '". |
---|
| 632 | html::escapeJS(__('You can use the following shortcuts to format your text.'))."'; ". |
---|
| 633 | "jsToolBar.prototype.elements.blocks.options.none = '".html::escapeJS(__('-- none --'))."'; ". |
---|
| 634 | "jsToolBar.prototype.elements.blocks.options.nonebis = '".html::escapeJS(__('-- block format --'))."'; ". |
---|
| 635 | "jsToolBar.prototype.elements.blocks.options.p = '".html::escapeJS(__('Paragraph'))."'; ". |
---|
| 636 | "jsToolBar.prototype.elements.blocks.options.h1 = '".html::escapeJS(__('Level 1 header'))."'; ". |
---|
| 637 | "jsToolBar.prototype.elements.blocks.options.h2 = '".html::escapeJS(__('Level 2 header'))."'; ". |
---|
| 638 | "jsToolBar.prototype.elements.blocks.options.h3 = '".html::escapeJS(__('Level 3 header'))."'; ". |
---|
| 639 | "jsToolBar.prototype.elements.blocks.options.h4 = '".html::escapeJS(__('Level 4 header'))."'; ". |
---|
| 640 | "jsToolBar.prototype.elements.blocks.options.h5 = '".html::escapeJS(__('Level 5 header'))."'; ". |
---|
| 641 | "jsToolBar.prototype.elements.blocks.options.h6 = '".html::escapeJS(__('Level 6 header'))."'; ". |
---|
| 642 | "jsToolBar.prototype.elements.strong.title = '".html::escapeJS(__('Strong emphasis'))."'; ". |
---|
| 643 | "jsToolBar.prototype.elements.em.title = '".html::escapeJS(__('Emphasis'))."'; ". |
---|
| 644 | "jsToolBar.prototype.elements.ins.title = '".html::escapeJS(__('Inserted'))."'; ". |
---|
| 645 | "jsToolBar.prototype.elements.del.title = '".html::escapeJS(__('Deleted'))."'; ". |
---|
| 646 | "jsToolBar.prototype.elements.quote.title = '".html::escapeJS(__('Inline quote'))."'; ". |
---|
| 647 | "jsToolBar.prototype.elements.code.title = '".html::escapeJS(__('Code'))."'; ". |
---|
| 648 | "jsToolBar.prototype.elements.br.title = '".html::escapeJS(__('Line break'))."'; ". |
---|
| 649 | "jsToolBar.prototype.elements.blockquote.title = '".html::escapeJS(__('Blockquote'))."'; ". |
---|
| 650 | "jsToolBar.prototype.elements.pre.title = '".html::escapeJS(__('Preformated text'))."'; ". |
---|
| 651 | "jsToolBar.prototype.elements.ul.title = '".html::escapeJS(__('Unordered list'))."'; ". |
---|
| 652 | "jsToolBar.prototype.elements.ol.title = '".html::escapeJS(__('Ordered list'))."'; ". |
---|
[1187] | 653 | |
---|
[1161] | 654 | "jsToolBar.prototype.elements.link.title = '".html::escapeJS(__('Link'))."'; ". |
---|
| 655 | "jsToolBar.prototype.elements.link.href_prompt = '".html::escapeJS(__('URL?'))."'; ". |
---|
| 656 | "jsToolBar.prototype.elements.link.hreflang_prompt = '".html::escapeJS(__('Language?'))."'; ". |
---|
[1187] | 657 | |
---|
[1161] | 658 | "jsToolBar.prototype.elements.img.title = '".html::escapeJS(__('External image'))."'; ". |
---|
| 659 | "jsToolBar.prototype.elements.img.src_prompt = '".html::escapeJS(__('URL?'))."'; ". |
---|
[1187] | 660 | |
---|
[1161] | 661 | "jsToolBar.prototype.elements.img_select.title = '".html::escapeJS(__('Media chooser'))."'; ". |
---|
| 662 | "jsToolBar.prototype.elements.post_link.title = '".html::escapeJS(__('Link to an entry'))."'; "; |
---|
[1187] | 663 | |
---|
[1161] | 664 | if (!$GLOBALS['core']->auth->check('media,media_admin',$GLOBALS['core']->blog->id)) { |
---|
| 665 | $res .= "jsToolBar.prototype.elements.img_select.disabled = true;\n"; |
---|
[0] | 666 | } |
---|
[1187] | 667 | |
---|
[1161] | 668 | $res .= |
---|
| 669 | "\n//]]>\n". |
---|
| 670 | "</script>\n"; |
---|
[1187] | 671 | |
---|
[1161] | 672 | return $res; |
---|
| 673 | } |
---|
| 674 | |
---|
| 675 | public static function jsUpload($params=array(),$base_url=null) |
---|
| 676 | { |
---|
| 677 | if (!$base_url) { |
---|
| 678 | $base_url = path::clean(dirname(preg_replace('/(\?.*$)?/','',$_SERVER['REQUEST_URI']))).'/'; |
---|
[0] | 679 | } |
---|
[1187] | 680 | |
---|
[1161] | 681 | $params = array_merge($params,array( |
---|
| 682 | 'sess_id='.session_id(), |
---|
| 683 | 'sess_uid='.$_SESSION['sess_browser_uid'], |
---|
| 684 | 'xd_check='.$GLOBALS['core']->getNonce() |
---|
| 685 | )); |
---|
[1187] | 686 | |
---|
[1161] | 687 | return |
---|
| 688 | '<link rel="stylesheet" type="text/css" href="style/jsUpload/style.css" />'."\n". |
---|
| 689 | |
---|
| 690 | '<script id="template-upload" type="text/x-tmpl"> |
---|
| 691 | {% for (var i=0, file; file=o.files[i]; i++) { %} |
---|
[1162] | 692 | <div class="template-upload fade"> |
---|
| 693 | <div class="upload-file"> |
---|
| 694 | <div class="upload-fileinfo"> |
---|
| 695 | <span class="upload-filename">{%=file.name%}</span> |
---|
| 696 | <span class="upload-filesize">({%=o.formatFileSize(file.size)%})</span> |
---|
| 697 | <span class="upload-filecancel cancel">'.__('Cancel').'</span> |
---|
| 698 | {% if (!o.files.error && !i && !o.options.autoUpload) { %} |
---|
[1187] | 699 | <input type="submit" style="visibility: hidden;" class="button start" value="'.__('Send').'"/> |
---|
[1162] | 700 | {% } %} |
---|
| 701 | <span class="upload-filemsg"></span> |
---|
| 702 | </div> |
---|
| 703 | {% if (!o.files.error) { %} |
---|
| 704 | <div class="upload-progress progress progress-success progress-striped active"><div class="bar" style="width:0%;"></div></div> |
---|
[1161] | 705 | {% } %} |
---|
[1162] | 706 | </div> |
---|
[1161] | 707 | {% } %} |
---|
| 708 | </script> |
---|
| 709 | <!-- The template to display files available for download --> |
---|
| 710 | <script id="template-download" type="text/x-tmpl"> |
---|
| 711 | {% for (var i=0, file; file=o.files[i]; i++) { %} |
---|
[1162] | 712 | <div class="template-download fade"> |
---|
| 713 | <div class="upload-file"> |
---|
| 714 | <div class="upload-fileinfo"> |
---|
| 715 | <span class="upload-filename">{%=file.name%}</span> |
---|
| 716 | <span class="upload-filesize">({%=o.formatFileSize(file.size)%})</span> |
---|
| 717 | <span class="upload-filemsg{% if (file.error) { %} upload-error{% } %}"> |
---|
| 718 | {% if (file.error) { %} |
---|
[1175] | 719 | '.__('Error:').' {%=file.error%} |
---|
[1162] | 720 | {% } else { %} |
---|
| 721 | '.__('File successfully uploaded.').' |
---|
| 722 | {% } %} |
---|
| 723 | </span> |
---|
| 724 | </div> |
---|
| 725 | <div class="upload-progress"> |
---|
| 726 | {% if (!file.error) { %} |
---|
| 727 | <div class="bar" style="width:100%;">100%</div> |
---|
| 728 | {% } %} |
---|
| 729 | </div> |
---|
| 730 | </div> |
---|
[1161] | 731 | {% } %} |
---|
| 732 | </script>'. |
---|
| 733 | |
---|
| 734 | self::jsLoad('js/jsUpload/vendor/jquery.ui.widget.js'). |
---|
| 735 | self::jsLoad('js/jsUpload/tmpl.js'). |
---|
| 736 | self::jsLoad('js/jsUpload/load-image.js'). |
---|
| 737 | self::jsLoad('js/jsUpload/jquery.iframe-transport.js'). |
---|
| 738 | self::jsLoad('js/jsUpload/jquery.fileupload.js'). |
---|
| 739 | self::jsLoad('js/jsUpload/jquery.fileupload-process.js'). |
---|
| 740 | self::jsLoad('js/jsUpload/jquery.fileupload-resize.js'). |
---|
| 741 | self::jsLoad('js/jsUpload/jquery.fileupload-ui.js'). |
---|
[1187] | 742 | |
---|
[1161] | 743 | '<script type="text/javascript">'."\n". |
---|
| 744 | "//<![CDATA[\n". |
---|
| 745 | "dotclear.jsUpload = {};\n". |
---|
| 746 | "dotclear.jsUpload.msg = {};\n". |
---|
| 747 | self::jsVar('dotclear.msg.enhanced_uploader_activate',__('Temporarily activate enhanced uploader')). |
---|
| 748 | self::jsVar('dotclear.msg.enhanced_uploader_disable',__('Temporarily disable enhanced uploader')). |
---|
| 749 | self::jsVar('dotclear.jsUpload.msg.limit_exceeded',__('Limit exceeded.')). |
---|
| 750 | self::jsVar('dotclear.jsUpload.msg.size_limit_exceeded',__('File size exceeds allowed limit.')). |
---|
| 751 | self::jsVar('dotclear.jsUpload.msg.canceled',__('Canceled.')). |
---|
| 752 | self::jsVar('dotclear.jsUpload.msg.http_error',__('HTTP Error:')). |
---|
| 753 | self::jsVar('dotclear.jsUpload.msg.error',__('Error:')). |
---|
| 754 | self::jsVar('dotclear.jsUpload.msg.choose_file',__('Choose file')). |
---|
| 755 | self::jsVar('dotclear.jsUpload.msg.choose_files',__('Choose files')). |
---|
| 756 | self::jsVar('dotclear.jsUpload.msg.cancel',__('Cancel')). |
---|
| 757 | self::jsVar('dotclear.jsUpload.msg.clean',__('Clean')). |
---|
| 758 | self::jsVar('dotclear.jsUpload.msg.upload',__('Upload')). |
---|
| 759 | self::jsVar('dotclear.jsUpload.msg.no_file_in_queue',__('No file in queue.')). |
---|
| 760 | self::jsVar('dotclear.jsUpload.msg.file_in_queue',__('1 file in queue.')). |
---|
| 761 | self::jsVar('dotclear.jsUpload.msg.files_in_queue',__('%d files in queue.')). |
---|
| 762 | self::jsVar('dotclear.jsUpload.msg.queue_error',__('Queue error:')). |
---|
| 763 | self::jsVar('dotclear.jsUpload.base_url',$base_url). |
---|
| 764 | "\n//]]>\n". |
---|
| 765 | "</script>\n"; |
---|
| 766 | } |
---|
[1144] | 767 | |
---|
[1161] | 768 | public static function jsToolMan() |
---|
| 769 | { |
---|
| 770 | return |
---|
| 771 | '<script type="text/javascript" src="js/tool-man/core.js"></script>'. |
---|
| 772 | '<script type="text/javascript" src="js/tool-man/events.js"></script>'. |
---|
| 773 | '<script type="text/javascript" src="js/tool-man/css.js"></script>'. |
---|
| 774 | '<script type="text/javascript" src="js/tool-man/coordinates.js"></script>'. |
---|
| 775 | '<script type="text/javascript" src="js/tool-man/drag.js"></script>'. |
---|
| 776 | '<script type="text/javascript" src="js/tool-man/dragsort.js"></script>'. |
---|
| 777 | '<script type="text/javascript" src="js/dragsort-tablerows.js"></script>'; |
---|
| 778 | } |
---|
[1144] | 779 | |
---|
[1161] | 780 | public static function jsMetaEditor() |
---|
| 781 | { |
---|
| 782 | return |
---|
| 783 | '<script type="text/javascript" src="js/meta-editor.js"></script>'; |
---|
| 784 | } |
---|
[0] | 785 | } |
---|
[1187] | 786 | ?> |
---|