/** * returns a URL which javascript can connect to to accesss FireStats resources. * browser security prevents JavaScript from accessing hosts other than the one * it was downloaded from. */ function fs_js_url($file, $suffix = "") { // This is a work around browsers restricting javascript from accessing different hosts. // in wordpress, the Ajax url may be on a different host than the url of the blog. // so the browsers prevent javascript from accessing the ajax handler. // what happens here is that we redirect the ajax call through the origin page global $FS_CONTEXT; if (isset($FS_CONTEXT['JAVASCRIPT_URL'])) { return $FS_CONTEXT['JAVASCRIPT_URL'] . $file . "&" . fs_get_request_suffix($suffix, false); } else { return fs_url($file) . fs_get_request_suffix($suffix); } }
function fs_output_head() { ?> <link rel="stylesheet" href="<?php echo fs_url('css/base.css'); ?> " type="text/css"/> <link rel="stylesheet" href="<?php echo fs_url('css/mktree.css.php'); ?> " type="text/css" /> <link rel="stylesheet" href="<?php echo fs_url('lib/jscalendar-1.0/skins/aqua/theme.css'); ?> " type="text/css" /> <link rel="stylesheet" href="<?php echo fs_url('lib/dhtml-windows/css/floating-window.css'); ?> " media="screen" type="text/css"/> <?php // AND HOW CAN WE GO WITHOUT SOME I.E SPECIFIC HACKS?! ?> <!--[if lt IE 7]> <link rel="stylesheet" href="<?php echo fs_url('css/ie6-hacks.css'); ?> " type="text/css" /> <![endif]--> <!--[if IE]> <link rel="stylesheet" href="<?php echo fs_url('css/ie-hacks.css'); ?> " type="text/css" /> <![endif]--> <script type="text/javascript"> <!-- <?php // Configure window buttons ?> var conf = new Object(); conf.img_top_left = '<?php echo fs_url('lib/dhtml-windows/images/top_left.gif'); ?> '; conf.img_top_center = '<?php echo fs_url('lib/dhtml-windows/images/top_center.gif'); ?> '; conf.img_minimize = '<?php echo fs_url('lib/dhtml-windows/images/minimize.gif'); ?> '; conf.img_close = '<?php echo fs_url('lib/dhtml-windows/images/close.gif'); ?> '; conf.img_top_right = '<?php echo fs_url('lib/dhtml-windows/images/top_right.gif'); ?> '; conf.img_buttom_right = '<?php echo fs_url('lib/dhtml-windows/images/bottom_right.gif'); ?> '; conf.root = 'firestats'; //--> </script> <script type="text/javascript" src='<?php echo fs_url('lib/dhtml-windows/js/ajax.js'); ?> '></script> <script type="text/javascript" src='<?php echo fs_url('lib/dhtml-windows/js/floating-window.js'); ?> '></script> <script type="text/javascript" src='<?php echo fs_url('js/prototype.js'); ?> '></script> <script type="text/javascript" src='<?php echo fs_url('js/firestats.js.php') . fs_get_request_suffix(); ?> '></script> <script type="text/javascript" src='<?php echo fs_url('js/mktree.js'); ?> '></script> <script type="text/javascript" src="<?php echo fs_url('lib/jscalendar-1.0/calendar_stripped.js'); ?> "></script> <script type="text/javascript" src="<?php echo fs_url('lib/jscalendar-1.0/lang/calendar-en.js'); ?> "></script> <script type="text/javascript" src="<?php echo fs_url('lib/jscalendar-1.0/calendar-setup_stripped.js'); ?> "></script> <?php }
function changeLanguage() { sendRequest('action=changeLanguage&language=' + $F('language_code')); } function changeTimeZone() { saveOption('firestats_user_timezone','firestats_user_timezone','string','records_table'); } function toggleArchiveOldData() { if (!FS.archivingOldData) { FS.archiveOldData(); } else { FS.archiveCleanup(); } } function openImportBots() { openWindow('<?php echo fs_url('bridge.php') . fs_get_request_suffix("file_id=import_bots"); ?> ',300,300); }
require_once FS_ABS_PATH . '/php/utils.php'; require_once FS_ABS_PATH . '/php/db-sql.php'; require_once FS_ABS_PATH . '/php/html-utils.php'; ?> <!-- if the javascript for this page was not already loaded, load it now --> <script type="text/javascript"> //<![CDATA[ if (typeof(FS.newUserDialog) != "function") { FS.loadJavaScript("<?php echo fs_url('js/page-users.js.php') . fs_get_request_suffix(); ?> "); FS.loadCSS("<?php echo fs_url('css/page-users.css.php') . fs_get_request_suffix(); ?> "); } //]]> </script> <div id="fs_users_div"> <!-- Use table for base layout --> <table> <tr> <td> <div id="fs_users_table_holder" class="fwrap"> <h2><?php fs_e('Manage users'); ?>
<body id="firestats"> <div class="fs_body width_margin <?php echo fs_lang_dir(); ?> "> <h3><?php fs_e('Import bots list'); ?> </h3> <?php if (!(isset($_FILES['bots_list']['tmp_name']) && is_uploaded_file($_FILES['bots_list']['tmp_name']))) { ?> <!-- The data encoding type, enctype, MUST be specified as below --> <form enctype="multipart/form-data" action="bridge.php<?php echo fs_get_request_suffix("file_id=import_bots"); ?> " method="post"> <!-- MAX_FILE_SIZE must precede the file input field --> <input type="hidden" name="MAX_FILE_SIZE" value="100000" /> <!-- Name of input element determines name in $_FILES array --> <?php fs_e('Select bot-list file'); ?> <input name="bots_list" type="file" /><br/> <?php fs_e('Import type'); ?> : <select name="import_type"> <option value="append"><?php