1
0
mirror of https://github.com/Mibew/mibew.git synced 2025-03-05 03:13:38 +03:00

Use MIBEW_WEB_ROOT constant

Replace $mibewroot global variable with MIBEW_WEB_ROOT constant
This commit is contained in:
Dmitriy Simushev 2014-01-15 12:40:35 +00:00
parent 12f5b7dbd3
commit 24f7bb5a66
76 changed files with 348 additions and 343 deletions

View File

@ -175,7 +175,7 @@ if( !isset($_GET['token']) || !isset($_GET['thread']) ) {
$threadid = $thread->id; $threadid = $thread->id;
$token = $thread->lastToken; $token = $thread->lastToken;
$chatstyle = verifyparam( "style", "/^\w+$/", ""); $chatstyle = verifyparam( "style", "/^\w+$/", "");
header("Location: $mibewroot/client.php?thread=" . intval($threadid) . "&token=" . urlencode($token) . ($chatstyle ? "&style=" . urlencode($chatstyle) : "")); header("Location: " . MIBEW_WEB_ROOT . "/client.php?thread=" . intval($threadid) . "&token=" . urlencode($token) . ($chatstyle ? "&style=" . urlencode($chatstyle) : ""));
exit; exit;
} }

View File

@ -288,10 +288,10 @@ $dbtables_can_update = array(
function show_install_err($text) function show_install_err($text)
{ {
global $page, $version, $errors, $mibewroot; global $page, $version, $errors;
$page = array( $page = array(
'version' => $version, 'version' => $version,
'localeLinks' => get_locale_links("$mibewroot/install/index.php"), 'localeLinks' => get_locale_links(MIBEW_WEB_ROOT . "/install/index.php"),
'title' => getlocal("install.err.title"), 'title' => getlocal("install.err.title"),
'no_right_menu' => true, 'no_right_menu' => true,
'fixedwrap' => true, 'fixedwrap' => true,

View File

@ -29,6 +29,11 @@ session_start();
require_once(MIBEW_FS_ROOT.'/libs/config.php'); require_once(MIBEW_FS_ROOT.'/libs/config.php');
/**
* Base URL of the Mibew installation
*/
define('MIBEW_WEB_ROOT', $mibewroot);
// Include common functions // Include common functions
require_once(MIBEW_FS_ROOT.'/libs/common/constants.php'); require_once(MIBEW_FS_ROOT.'/libs/common/constants.php');
require_once(MIBEW_FS_ROOT.'/libs/common/locale.php'); require_once(MIBEW_FS_ROOT.'/libs/common/locale.php');
@ -324,6 +329,6 @@ if ($act == "silentcreateall") {
} }
mysql_close($link); mysql_close($link);
header("Location: $mibewroot/install/index.php"); header("Location: " . MIBEW_WEB_ROOT . "/install/index.php");
exit; exit;
?> ?>

View File

@ -29,6 +29,23 @@ session_start();
require_once(MIBEW_FS_ROOT.'/libs/config.php'); require_once(MIBEW_FS_ROOT.'/libs/config.php');
/**
* Value of $mibewroot varaible from config.php
*/
define('MIBEW_CONFIG_WEB_ROOT', $mibewroot);
// Try to get actual base URL of the Mibew
$requestUri = $_SERVER["REQUEST_URI"];
if (!preg_match('/^(.*)\\/install(\\/[^\\/\\\\]*)?$/', $requestUri, $matches)) {
die("Cannot detect application location: $requestUri");
}
$base_url = $matches[1];
/**
* Base URL of the Mibew installation
*/
define('MIBEW_WEB_ROOT', $base_url);
// Include common functions // Include common functions
require_once(MIBEW_FS_ROOT.'/libs/common/constants.php'); require_once(MIBEW_FS_ROOT.'/libs/common/constants.php');
require_once(MIBEW_FS_ROOT.'/libs/common/locale.php'); require_once(MIBEW_FS_ROOT.'/libs/common/locale.php');
@ -43,7 +60,7 @@ require_once(MIBEW_FS_ROOT.'/install/dbinfo.php');
$page = array( $page = array(
'version' => $version, 'version' => $version,
'localeLinks' => get_locale_links("$mibewroot/install/index.php") 'localeLinks' => get_locale_links(MIBEW_WEB_ROOT . "/install/index.php")
); );
$page['done'] = array(); $page['done'] = array();
@ -54,21 +71,14 @@ $errors = array();
function check_mibewroot() function check_mibewroot()
{ {
global $page, $errors, $mibewroot; global $page, $errors;
$requestUri = $_SERVER["REQUEST_URI"];
if (!preg_match('/^(.*)\\/install(\\/[^\\/\\\\]*)?$/', $requestUri, $matches)) {
$errors[] = "Cannot detect application location: $requestUri";
return false;
}
$applocation = $matches[1];
if ($applocation != $mibewroot) { if (MIBEW_CONFIG_WEB_ROOT != MIBEW_WEB_ROOT) {
$errors[] = "Please, check file ${applocation}/libs/config.php<br/>Wrong value of \$mibewroot variable, should be \"$applocation\""; $errors[] = "Please, check file " . MIBEW_WEB_ROOT . "/libs/config.php<br/>Wrong value of \$mibewroot variable, should be \"" . MIBEW_WEB_ROOT . "\"";
$mibewroot = $applocation;
return false; return false;
} }
$page['done'][] = getlocal2("install.0.app", array($applocation)); $page['done'][] = getlocal2("install.0.app", array(MIBEW_WEB_ROOT));
return true; return true;
} }
@ -109,12 +119,12 @@ function fpermissions($file)
function check_files() function check_files()
{ {
global $page, $errors, $mibewroot; global $page, $errors;
$packageFile = MIBEW_FS_ROOT . "/install/package"; $packageFile = MIBEW_FS_ROOT . "/install/package";
$fp = @fopen($packageFile, "r"); $fp = @fopen($packageFile, "r");
if ($fp === FALSE) { if ($fp === FALSE) {
$errors[] = getlocal2("install.cannot_read", array("$mibewroot/install/package")); $errors[] = getlocal2("install.cannot_read", array(MIBEW_WEB_ROOT . "/install/package"));
if (file_exists($packageFile)) { if (file_exists($packageFile)) {
$errors[] = getlocal2("install.check_permissions", array(fpermissions($packageFile))); $errors[] = getlocal2("install.check_permissions", array(fpermissions($packageFile)));
} }
@ -135,10 +145,10 @@ function check_files()
$relativeName = MIBEW_FS_ROOT . "/$file"; $relativeName = MIBEW_FS_ROOT . "/$file";
if (!is_readable($relativeName)) { if (!is_readable($relativeName)) {
if (file_exists($relativeName)) { if (file_exists($relativeName)) {
$errors[] = getlocal2("install.cannot_read", array("$mibewroot/$file")); $errors[] = getlocal2("install.cannot_read", array(MIBEW_WEB_ROOT . "/$file"));
$errors[] = getlocal2("install.check_permissions", array(fpermissions($relativeName))); $errors[] = getlocal2("install.check_permissions", array(fpermissions($relativeName)));
} else { } else {
$errors[] = getlocal2("install.no_file", array("$mibewroot/$file")); $errors[] = getlocal2("install.no_file", array(MIBEW_WEB_ROOT . "/$file"));
} }
return false; return false;
} }
@ -149,7 +159,7 @@ function check_files()
$result = md5(str_replace("\r", "", file_get_contents($relativeName))); $result = md5(str_replace("\r", "", file_get_contents($relativeName)));
} }
if ($result != $sum) { if ($result != $sum) {
$errors[] = getlocal2("install.bad_checksum", array("$mibewroot/$file")); $errors[] = getlocal2("install.bad_checksum", array(MIBEW_WEB_ROOT . "/$file"));
$errors[] = getlocal("install.check_files"); $errors[] = getlocal("install.check_files");
return false; return false;
} }
@ -162,7 +172,7 @@ function check_files()
function check_connection() function check_connection()
{ {
global $mysqlhost, $mysqllogin, $mysqlpass, $page, $errors, $mibewroot; global $mysqlhost, $mysqllogin, $mysqlpass, $page, $errors;
$link = @mysql_connect($mysqlhost, $mysqllogin, $mysqlpass); $link = @mysql_connect($mysqlhost, $mysqllogin, $mysqlpass);
if ($link) { if ($link) {
$result = mysql_query("SELECT VERSION() as c", $link); $result = mysql_query("SELECT VERSION() as c", $link);
@ -183,7 +193,7 @@ function check_connection()
function check_database($link) function check_database($link)
{ {
global $mysqldb, $force_charset_in_connection, $dbencoding, $page, $mibewroot; global $mysqldb, $force_charset_in_connection, $dbencoding, $page;
if (mysql_select_db($mysqldb, $link)) { if (mysql_select_db($mysqldb, $link)) {
$page['done'][] = getlocal2("install.2.db_exists", array($mysqldb)); $page['done'][] = getlocal2("install.2.db_exists", array($mysqldb));
if ($force_charset_in_connection) { if ($force_charset_in_connection) {
@ -193,14 +203,14 @@ function check_database($link)
} else { } else {
$page['nextstep'] = getlocal2("install.2.create", array($mysqldb)); $page['nextstep'] = getlocal2("install.2.create", array($mysqldb));
$page['nextnotice'] = getlocal("install.2.notice"); $page['nextnotice'] = getlocal("install.2.notice");
$page['nextstepurl'] = "$mibewroot/install/dbperform.php?act=createdb"; $page['nextstepurl'] = MIBEW_WEB_ROOT . "/install/dbperform.php?act=createdb";
} }
return false; return false;
} }
function check_tables($link) function check_tables($link)
{ {
global $dbtables, $page, $mibewroot; global $dbtables, $page;
$curr_tables = get_tables($link); $curr_tables = get_tables($link);
if ($curr_tables !== false) { if ($curr_tables !== false) {
$tocreate = array_diff(array_keys($dbtables), $curr_tables); $tocreate = array_diff(array_keys($dbtables), $curr_tables);
@ -209,7 +219,7 @@ function check_tables($link)
return true; return true;
} else { } else {
$page['nextstep'] = getlocal("install.3.create"); $page['nextstep'] = getlocal("install.3.create");
$page['nextstepurl'] = "$mibewroot/install/dbperform.php?act=ct"; $page['nextstepurl'] = MIBEW_WEB_ROOT . "/install/dbperform.php?act=ct";
} }
} }
return false; return false;
@ -217,7 +227,7 @@ function check_tables($link)
function check_columns($link) function check_columns($link)
{ {
global $dbtables, $dbtables_can_update, $dbtables_indexes, $errors, $page, $mibewroot; global $dbtables, $dbtables_can_update, $dbtables_indexes, $errors, $page;
$need_to_create_columns = false; $need_to_create_columns = false;
foreach ($dbtables as $id => $columns) { foreach ($dbtables as $id => $columns) {
@ -231,7 +241,7 @@ function check_columns($link)
if (count($cannot_update) != 0) { if (count($cannot_update) != 0) {
$errors[] = "Key columns are absent in table `$id'. Unable to continue installation."; $errors[] = "Key columns are absent in table `$id'. Unable to continue installation.";
$page['nextstep'] = getlocal("install.kill_tables"); $page['nextstep'] = getlocal("install.kill_tables");
$page['nextstepurl'] = "$mibewroot/install/dbperform.php?act=dt"; $page['nextstepurl'] = MIBEW_WEB_ROOT . "/install/dbperform.php?act=dt";
$page['nextnotice'] = getlocal("install.kill_tables.notice"); $page['nextnotice'] = getlocal("install.kill_tables.notice");
return false; return false;
} }
@ -253,7 +263,7 @@ function check_columns($link)
if ($need_to_create_columns || $need_to_create_indexes) { if ($need_to_create_columns || $need_to_create_indexes) {
$page['nextstep'] = getlocal("install.4.create"); $page['nextstep'] = getlocal("install.4.create");
$page['nextstepurl'] = "$mibewroot/install/dbperform.php?act=addcolumns"; $page['nextstepurl'] = MIBEW_WEB_ROOT . "/install/dbperform.php?act=addcolumns";
$page['nextnotice'] = getlocal("install.4.notice"); $page['nextnotice'] = getlocal("install.4.notice");
return false; return false;
} }
@ -317,7 +327,7 @@ function add_canned_messages($link){
function check_status() function check_status()
{ {
global $page, $mibewroot, $dbversion, $mysqlprefix; global $page, $dbversion, $mysqlprefix;
$page['done'][] = getlocal2("install.0.php", array(phpversion())); $page['done'][] = getlocal2("install.0.php", array(phpversion()));
@ -358,7 +368,7 @@ function check_status()
if (!check_admin($link)) { if (!check_admin($link)) {
$page['nextstep'] = getlocal("installed.login_link"); $page['nextstep'] = getlocal("installed.login_link");
$page['nextnotice'] = getlocal2("installed.notice", array("${mibewroot}/install/")); $page['nextnotice'] = getlocal2("installed.notice", array("${mibewroot}/install/"));
$page['nextstepurl'] = "$mibewroot/operator/login.php?login=admin"; $page['nextstepurl'] = MIBEW_WEB_ROOT . "/operator/login.php?login=admin";
} }
$page['show_small_login'] = true; $page['show_small_login'] = true;

View File

@ -436,14 +436,11 @@ function setup_chatview(Thread $thread) {
/** /**
* Prepare some data for chat for user * Prepare some data for chat for user
* *
* @global string $mibewroot Root URL path for Mibew
* @param Thread $thread thread object * @param Thread $thread thread object
* be used * be used
* @return array Array of chat view data * @return array Array of chat view data
*/ */
function setup_chatview_for_user(Thread $thread) { function setup_chatview_for_user(Thread $thread) {
global $mibewroot;
$data = setup_chatview($thread); $data = setup_chatview($thread);
// Load JavaScript plugins and JavaScripts, CSS files required by them // Load JavaScript plugins and JavaScripts, CSS files required by them
@ -462,7 +459,7 @@ function setup_chatview_for_user(Thread $thread) {
$params = "thread=" . $thread->id . "&amp;token=" . $thread->lastToken; $params = "thread=" . $thread->id . "&amp;token=" . $thread->lastToken;
// Set link to send mail page // Set link to send mail page
$data['chat']['links']['mail'] = "$mibewroot/client.php?" $data['chat']['links']['mail'] = MIBEW_WEB_ROOT . "/client.php?"
. $params . $params
. "&amp;act=mailthread"; . "&amp;act=mailthread";
@ -479,13 +476,12 @@ function setup_chatview_for_user(Thread $thread) {
/** /**
* Prepare some data for chat for operator * Prepare some data for chat for operator
* *
* @global string $mibewroot Root URL path for Mibew
* @global string $mibew_encoding Current Mibew encoding * @global string $mibew_encoding Current Mibew encoding
* @param Thread $thread thread object * @param Thread $thread thread object
* @return array Array of chat view data * @return array Array of chat view data
*/ */
function setup_chatview_for_operator(Thread $thread, $operator) { function setup_chatview_for_operator(Thread $thread, $operator) {
global $mibewroot, $mibew_encoding; global $mibew_encoding;
$data = setup_chatview($thread); $data = setup_chatview($thread);
@ -519,7 +515,7 @@ function setup_chatview_for_operator(Thread $thread, $operator) {
// Set history window params // Set history window params
$history_link_params = array("userid" => (string)$thread->userId); $history_link_params = array("userid" => (string)$thread->userId);
$data['chat']['links']['history'] = add_params( $data['chat']['links']['history'] = add_params(
$mibewroot . "/operator/userhistory.php", MIBEW_WEB_ROOT . "/operator/userhistory.php",
$history_link_params $history_link_params
); );
@ -528,7 +524,7 @@ function setup_chatview_for_operator(Thread $thread, $operator) {
$visitor = track_get_visitor_by_threadid($thread->id); $visitor = track_get_visitor_by_threadid($thread->id);
$tracked_link_params = array("visitor" => "" . $visitor['visitorid']); $tracked_link_params = array("visitor" => "" . $visitor['visitorid']);
$data['chat']['links']['tracked'] = add_params( $data['chat']['links']['tracked'] = add_params(
$mibewroot . "/operator/tracked.php", MIBEW_WEB_ROOT . "/operator/tracked.php",
$tracked_link_params $tracked_link_params
); );
} }
@ -563,7 +559,7 @@ function setup_chatview_for_operator(Thread $thread, $operator) {
} }
// Set link to user redirection page // Set link to user redirection page
$params = "thread=" . $thread->id . "&amp;token=" . $thread->lastToken; $params = "thread=" . $thread->id . "&amp;token=" . $thread->lastToken;
$data['chat']['links']['redirect'] = "$mibewroot/operator/agent.php?" $data['chat']['links']['redirect'] = MIBEW_WEB_ROOT . "/operator/agent.php?"
. $params . $params
. "&amp;act=redirect"; . "&amp;act=redirect";

View File

@ -43,7 +43,7 @@ class PageStyle extends Style implements StyleInterface {
public function render($template_name) { public function render($template_name) {
// We need to import some variables to make them visible to required // We need to import some variables to make them visible to required
// view. // view.
global $page, $mibewroot, $version, $errors; global $page, $version, $errors;
// Prepare to output html // Prepare to output html
start_html_output(); start_html_output();

View File

@ -107,8 +107,6 @@ function get_user_locale()
function get_locale() function get_locale()
{ {
global $mibewroot;
$locale = verifyparam("locale", "/./", ""); $locale = verifyparam("locale", "/./", "");
if ($locale && locale_pattern_check($locale) && locale_exists($locale)) { if ($locale && locale_pattern_check($locale) && locale_exists($locale)) {
@ -121,7 +119,7 @@ function get_locale()
$locale = get_user_locale(); $locale = get_user_locale();
} }
setcookie(LOCALE_COOKIE_NAME, $locale, time() + 60 * 60 * 24 * 1000, "$mibewroot/"); setcookie(LOCALE_COOKIE_NAME, $locale, time() + 60 * 60 * 24 * 1000, MIBEW_WEB_ROOT . "/");
return $locale; return $locale;
} }

View File

@ -64,11 +64,10 @@ function getgetparam($name, $default = '')
function get_app_location($showhost, $issecure) function get_app_location($showhost, $issecure)
{ {
global $mibewroot;
if ($showhost) { if ($showhost) {
return ($issecure ? "https://" : "http://") . $_SERVER['HTTP_HOST'] . $mibewroot; return ($issecure ? "https://" : "http://") . $_SERVER['HTTP_HOST'] . MIBEW_WEB_ROOT;
} else { } else {
return $mibewroot; return MIBEW_WEB_ROOT;
} }
} }

View File

@ -44,15 +44,15 @@ function expand_condition($matches)
function expand_var($matches) function expand_var($matches)
{ {
global $page, $mibewroot, $errors, $current_style, $flatten_page; global $page, $errors, $current_style, $flatten_page;
$prefix = $matches[1]; $prefix = $matches[1];
$var = $matches[2]; $var = $matches[2];
if (!$prefix) { if (!$prefix) {
if ($var == 'mibewroot') { if ($var == 'mibewroot') {
return $mibewroot; return MIBEW_WEB_ROOT;
} else if ($var == 'tplroot') { } else if ($var == 'tplroot') {
return "$mibewroot/" . $current_style->filesPath(); return MIBEW_WEB_ROOT . "/" . $current_style->filesPath();
} else if ($var == 'styleid') { } else if ($var == 'styleid') {
return $current_style->name(); return $current_style->name();
} else if ($var == 'pagination') { } else if ($var == 'pagination') {

View File

@ -41,11 +41,11 @@ function get_group_name($group)
function setup_group_settings_tabs($gid, $active) function setup_group_settings_tabs($gid, $active)
{ {
global $page, $mibewroot; global $page;
if ($gid) { if ($gid) {
$page['tabs'] = array( $page['tabs'] = array(
getlocal("page_group.tab.main") => $active != 0 ? "$mibewroot/operator/group.php?gid=$gid" : "", getlocal("page_group.tab.main") => $active != 0 ? (MIBEW_WEB_ROOT . "/operator/group.php?gid=$gid") : "",
getlocal("page_group.tab.members") => $active != 1 ? "$mibewroot/operator/groupmembers.php?gid=$gid" : "", getlocal("page_group.tab.members") => $active != 1 ? (MIBEW_WEB_ROOT . "/operator/groupmembers.php?gid=$gid") : "",
); );
} else { } else {
$page['tabs'] = array(); $page['tabs'] = array();

View File

@ -29,6 +29,11 @@ require_once(MIBEW_FS_ROOT.'/libs/config.php');
// Sanitize path to application and remove extra slashes // Sanitize path to application and remove extra slashes
$mibewroot = join("/", array_map("urlencode", preg_split('/\//', preg_replace('/\/+$/', '', preg_replace('/\/{2,}/', '/', '/' . $mibewroot))))); $mibewroot = join("/", array_map("urlencode", preg_split('/\//', preg_replace('/\/+$/', '', preg_replace('/\/{2,}/', '/', '/' . $mibewroot)))));
/**
* Base URL of the Mibew installation
*/
define('MIBEW_WEB_ROOT', $mibewroot);
// Include system constants file // Include system constants file
require_once(MIBEW_FS_ROOT.'/libs/common/constants.php'); require_once(MIBEW_FS_ROOT.'/libs/common/constants.php');
@ -53,7 +58,7 @@ require_once(MIBEW_FS_ROOT.'/libs/common/string.php');
if (is_secure_request()) { if (is_secure_request()) {
@ini_set('session.cookie_secure', TRUE); @ini_set('session.cookie_secure', TRUE);
} }
@ini_set('session.cookie_path', "$mibewroot/"); @ini_set('session.cookie_path', MIBEW_WEB_ROOT . "/");
@ini_set('session.name', 'MibewSessionID'); @ini_set('session.name', 'MibewSessionID');
// Initialize user session // Initialize user session

View File

@ -484,8 +484,6 @@ function append_query($link, $pv)
* an associative array with folloing keys: * an associative array with folloing keys:
* - 'requested_page': string, page where login check was failed. * - 'requested_page': string, page where login check was failed.
* *
* @global string $mibewroot Path of the mibew instalation from server root.
* It defined in libs/config.php
* @global string $session_prefix Use as prefix for all session variables to * @global string $session_prefix Use as prefix for all session variables to
* allow many instalation of the mibew messenger at one server. It defined in * allow many instalation of the mibew messenger at one server. It defined in
* libs/common/constants.php * libs/common/constants.php
@ -496,7 +494,7 @@ function append_query($link, $pv)
* null otherwise. * null otherwise.
*/ */
function check_login($redirect = true) { function check_login($redirect = true) {
global $mibewroot, $session_prefix; global $session_prefix;
if (!isset($_SESSION[$session_prefix."operator"])) { if (!isset($_SESSION[$session_prefix."operator"])) {
if (isset($_COOKIE[REMEMBER_OPERATOR_COOKIE_NAME])) { if (isset($_COOKIE[REMEMBER_OPERATOR_COOKIE_NAME])) {
list($login, $pwd) = preg_split('/\x0/', base64_decode($_COOKIE[REMEMBER_OPERATOR_COOKIE_NAME]), 2); list($login, $pwd) = preg_split('/\x0/', base64_decode($_COOKIE[REMEMBER_OPERATOR_COOKIE_NAME]), 2);
@ -521,7 +519,7 @@ function check_login($redirect = true) {
// Redirect operator if need // Redirect operator if need
if ($redirect) { if ($redirect) {
$_SESSION['backpath'] = $requested; $_SESSION['backpath'] = $requested;
header("Location: $mibewroot/operator/login.php"); header("Location: " . MIBEW_WEB_ROOT . "/operator/login.php");
exit; exit;
} else { } else {
return null; return null;
@ -533,9 +531,8 @@ function check_login($redirect = true) {
// Force the admin to set a password after the installation // Force the admin to set a password after the installation
function force_password($operator) function force_password($operator)
{ {
global $mibewroot;
if (check_password_hash($operator['vclogin'], $operator['vcpassword'], '')) { if (check_password_hash($operator['vclogin'], $operator['vcpassword'], '')) {
header("Location: $mibewroot/operator/operator.php?op=1"); header("Location: " . MIBEW_WEB_ROOT . "/operator/operator.php?op=1");
exit; exit;
} }
} }
@ -554,8 +551,6 @@ function get_logged_in()
* - 'operator': array of the logged in operator info; * - 'operator': array of the logged in operator info;
* - 'remember': boolean, indicates if system should remember operator. * - 'remember': boolean, indicates if system should remember operator.
* *
* @global string $mibewroot Path of the mibew instalation from server root.
* It defined in libs/config.php
* @global string $session_prefix Use as prefix for all session variables to * @global string $session_prefix Use as prefix for all session variables to
* allow many instalation of the mibew messenger at one server. It defined in * allow many instalation of the mibew messenger at one server. It defined in
* libs/common/constants.php * libs/common/constants.php
@ -565,14 +560,14 @@ function get_logged_in()
* @param boolean $https Indicates if cookie should be flagged as a secure one * @param boolean $https Indicates if cookie should be flagged as a secure one
*/ */
function login_operator($operator, $remember, $https = FALSE) { function login_operator($operator, $remember, $https = FALSE) {
global $mibewroot, $session_prefix; global $session_prefix;
$_SESSION[$session_prefix."operator"] = $operator; $_SESSION[$session_prefix."operator"] = $operator;
if ($remember) { if ($remember) {
$value = base64_encode($operator['vclogin'] . "\x0" . calculate_password_hash($operator['vclogin'], $operator['vcpassword'])); $value = base64_encode($operator['vclogin'] . "\x0" . calculate_password_hash($operator['vclogin'], $operator['vcpassword']));
setcookie(REMEMBER_OPERATOR_COOKIE_NAME, $value, time() + 60 * 60 * 24 * 1000, "$mibewroot/", NULL, $https, TRUE); setcookie(REMEMBER_OPERATOR_COOKIE_NAME, $value, time() + 60 * 60 * 24 * 1000, MIBEW_WEB_ROOT . "/", NULL, $https, TRUE);
} else if (isset($_COOKIE[REMEMBER_OPERATOR_COOKIE_NAME])) { } else if (isset($_COOKIE[REMEMBER_OPERATOR_COOKIE_NAME])) {
setcookie(REMEMBER_OPERATOR_COOKIE_NAME, '', time() - 3600, "$mibewroot/"); setcookie(REMEMBER_OPERATOR_COOKIE_NAME, '', time() - 3600, MIBEW_WEB_ROOT . "/");
} }
// Trigger login event // Trigger login event
@ -589,18 +584,16 @@ function login_operator($operator, $remember, $https = FALSE) {
* *
* Triggers 'operatorLogout' event after operator logged out. * Triggers 'operatorLogout' event after operator logged out.
* *
* @global string $mibewroot Path of the mibew instalation from server root.
* It defined in libs/config.php
* @global string $session_prefix Use as prefix for all session variables to * @global string $session_prefix Use as prefix for all session variables to
* allow many instalation of the mibew messenger at one server. It defined in * allow many instalation of the mibew messenger at one server. It defined in
* libs/common/constants.php * libs/common/constants.php
*/ */
function logout_operator() { function logout_operator() {
global $mibewroot, $session_prefix; global $session_prefix;
unset($_SESSION[$session_prefix."operator"]); unset($_SESSION[$session_prefix."operator"]);
unset($_SESSION['backpath']); unset($_SESSION['backpath']);
if (isset($_COOKIE[REMEMBER_OPERATOR_COOKIE_NAME])) { if (isset($_COOKIE[REMEMBER_OPERATOR_COOKIE_NAME])) {
setcookie(REMEMBER_OPERATOR_COOKIE_NAME, '', time() - 3600, "$mibewroot/"); setcookie(REMEMBER_OPERATOR_COOKIE_NAME, '', time() - 3600, MIBEW_WEB_ROOT . "/");
} }
// Trigger logout event // Trigger logout event
@ -610,7 +603,7 @@ function logout_operator() {
function setup_redirect_links($threadid, $operator, $token) function setup_redirect_links($threadid, $operator, $token)
{ {
global $page, $mibewroot; global $page;
$operator_in_isolation = in_isolation($operator); $operator_in_isolation = in_isolation($operator);
@ -648,7 +641,7 @@ function setup_redirect_links($threadid, $operator, $token)
: getlocal("char.redirect.operator.away_suff") : getlocal("char.redirect.operator.away_suff")
) )
: ""; : "";
$agent_list .= "<li><a href=\"" . add_params($mibewroot . "/operator/redirect.php", $params) . $agent_list .= "<li><a href=\"" . add_params(MIBEW_WEB_ROOT . "/operator/redirect.php", $params) .
"\" title=\"" . topage(get_operator_name($agent)) . "\">" . "\" title=\"" . topage(get_operator_name($agent)) . "\">" .
topage(get_operator_name($agent)) . topage(get_operator_name($agent)) .
"</a> $status</li>"; "</a> $status</li>";
@ -665,7 +658,7 @@ function setup_redirect_links($threadid, $operator, $token)
: ($group['ilastseenaway'] !== NULL && $group['ilastseenaway'] < Settings::get('online_timeout') : ($group['ilastseenaway'] !== NULL && $group['ilastseenaway'] < Settings::get('online_timeout')
? getlocal("char.redirect.operator.away_suff") ? getlocal("char.redirect.operator.away_suff")
: ""); : "");
$group_list .= "<li><a href=\"" . add_params($mibewroot . "/operator/redirect.php", $params) . $group_list .= "<li><a href=\"" . add_params(MIBEW_WEB_ROOT . "/operator/redirect.php", $params) .
"\" title=\"" . topage(get_group_name($group)) . "\">" . "\" title=\"" . topage(get_group_name($group)) . "\">" .
topage(get_group_name($group)) . topage(get_group_name($group)) .
"</a> $status</li>"; "</a> $status</li>";

View File

@ -17,14 +17,14 @@
function setup_operator_settings_tabs($opId, $active) function setup_operator_settings_tabs($opId, $active)
{ {
global $page, $mibewroot; global $page;
if ($opId) { if ($opId) {
$page['tabs'] = array( $page['tabs'] = array(
getlocal("page_agent.tab.main") => $active != 0 ? "$mibewroot/operator/operator.php?op=$opId" : "", getlocal("page_agent.tab.main") => $active != 0 ? (MIBEW_WEB_ROOT . "/operator/operator.php?op=$opId") : "",
getlocal("page_agent.tab.avatar") => $active != 1 ? "$mibewroot/operator/avatar.php?op=$opId" : "", getlocal("page_agent.tab.avatar") => $active != 1 ? (MIBEW_WEB_ROOT . "/operator/avatar.php?op=$opId") : "",
getlocal("page_agent.tab.groups") => $active != 2 ? "$mibewroot/operator/opgroups.php?op=$opId" : "", getlocal("page_agent.tab.groups") => $active != 2 ? (MIBEW_WEB_ROOT . "/operator/opgroups.php?op=$opId") : "",
getlocal("page_agent.tab.permissions") => $active != 3 ? "$mibewroot/operator/permissions.php?op=$opId" : "" getlocal("page_agent.tab.permissions") => $active != 3 ? (MIBEW_WEB_ROOT . "/operator/permissions.php?op=$opId") : ""
); );
} else { } else {
$page['tabs'] = array(); $page['tabs'] = array();

View File

@ -31,8 +31,7 @@ function generate_pagination_link($page, $title)
function generate_pagination_image($id, $alt) function generate_pagination_image($id, $alt)
{ {
global $mibewroot; return "<img src=\"" . MIBEW_WEB_ROOT . "/images/$id.gif\" border=\"0\" alt=\"" . htmlspecialchars($alt) . "\"/>";
return "<img src=\"$mibewroot/images/$id.gif\" border=\"0\" alt=\"" . htmlspecialchars($alt) . "\"/>";
} }
function prepare_pagination($items_count, $default_items_per_page = 15) function prepare_pagination($items_count, $default_items_per_page = 15)

View File

@ -20,16 +20,16 @@ use Mibew\Settings;
function setup_settings_tabs($active) function setup_settings_tabs($active)
{ {
global $page, $mibewroot; global $page;
$page['tabs'] = array( $page['tabs'] = array(
getlocal("page_settings.tab.main") => $active != 0 ? "$mibewroot/operator/settings.php" : "", getlocal("page_settings.tab.main") => $active != 0 ? (MIBEW_WEB_ROOT . "/operator/settings.php") : "",
getlocal("page_settings.tab.features") => $active != 1 ? "$mibewroot/operator/features.php" : "", getlocal("page_settings.tab.features") => $active != 1 ? (MIBEW_WEB_ROOT . "/operator/features.php") : "",
getlocal("page_settings.tab.performance") => $active != 2 ? "$mibewroot/operator/performance.php" : "", getlocal("page_settings.tab.performance") => $active != 2 ? (MIBEW_WEB_ROOT . "/operator/performance.php") : "",
getlocal("page_settings.tab.page_themes") => $active != 3 ? "$mibewroot/operator/page_themes.php" : "", getlocal("page_settings.tab.page_themes") => $active != 3 ? (MIBEW_WEB_ROOT . "/operator/page_themes.php") : "",
getlocal("page_settings.tab.themes") => $active != 4 ? "$mibewroot/operator/themes.php" : "", getlocal("page_settings.tab.themes") => $active != 4 ? (MIBEW_WEB_ROOT . "/operator/themes.php") : "",
); );
if (Settings::get('enabletracking')) { if (Settings::get('enabletracking')) {
$page['tabs'][getlocal("page_settings.tab.invitationthemes")] = ($active != 5 ? "$mibewroot/operator/invitationthemes.php" : ""); $page['tabs'][getlocal("page_settings.tab.invitationthemes")] = ($active != 5 ? (MIBEW_WEB_ROOT . "/operator/invitationthemes.php") : "");
} }
} }

View File

@ -34,13 +34,13 @@ function get_statistics_query($type)
function setup_statistics_tabs($active) function setup_statistics_tabs($active)
{ {
global $page, $mibewroot; global $page;
$page['tabs'] = array( $page['tabs'] = array(
getlocal("report.bydate.title") => $active != 0 ? "$mibewroot/operator/statistics.php".get_statistics_query('bydate') : "", getlocal("report.bydate.title") => $active != 0 ? (MIBEW_WEB_ROOT . "/operator/statistics.php".get_statistics_query('bydate')) : "",
getlocal("report.byoperator.title") => $active != 1 ? "$mibewroot/operator/statistics.php".get_statistics_query('byagent') : "" getlocal("report.byoperator.title") => $active != 1 ? (MIBEW_WEB_ROOT . "/operator/statistics.php".get_statistics_query('byagent')) : ""
); );
if (Settings::get('enabletracking')) { if (Settings::get('enabletracking')) {
$page['tabs'][getlocal("report.bypage.title")] = ($active != 2 ? "$mibewroot/operator/statistics.php".get_statistics_query('bypage') : ""); $page['tabs'][getlocal("report.bypage.title")] = ($active != 2 ? (MIBEW_WEB_ROOT . "/operator/statistics.php".get_statistics_query('bypage')) : "");
} }
} }

View File

@ -104,7 +104,7 @@ if (!isset($_GET['token'])) {
} }
$token = $thread->lastToken; $token = $thread->lastToken;
header("Location: $mibewroot/operator/agent.php?thread=" . intval($threadid) . "&token=" . urlencode($token)); header("Location: " . MIBEW_WEB_ROOT . "/operator/agent.php?thread=" . intval($threadid) . "&token=" . urlencode($token));
exit; exit;
} }

View File

@ -68,7 +68,7 @@ if (!$op) {
if (!@move_uploaded_file($_FILES['avatarFile']['tmp_name'], $full_file_path)) { if (!@move_uploaded_file($_FILES['avatarFile']['tmp_name'], $full_file_path)) {
$errors[] = failed_uploading_file($orig_filename, "errors.file.move.error"); $errors[] = failed_uploading_file($orig_filename, "errors.file.move.error");
} else { } else {
$avatar = "$mibewroot/files/avatar/$new_file_name"; $avatar = MIBEW_WEB_ROOT . "/files/avatar/$new_file_name";
} }
} }
} else { } else {
@ -81,7 +81,7 @@ if (!$op) {
if ($opId && $avatar && $_SESSION[$session_prefix."operator"] && $operator['operatorid'] == $opId) { if ($opId && $avatar && $_SESSION[$session_prefix."operator"] && $operator['operatorid'] == $opId) {
$_SESSION[$session_prefix."operator"]['vcavatar'] = $avatar; $_SESSION[$session_prefix."operator"]['vcavatar'] = $avatar;
} }
header("Location: $mibewroot/operator/avatar.php?op=" . intval($opId)); header("Location: " . MIBEW_WEB_ROOT . "/operator/avatar.php?op=" . intval($opId));
exit; exit;
} else { } else {
$page['avatar'] = topage($op['vcavatar']); $page['avatar'] = topage($op['vcavatar']);
@ -90,7 +90,7 @@ if (!$op) {
} else { } else {
if (isset($_GET['delete']) && $_GET['delete'] == "true" && $canmodify) { if (isset($_GET['delete']) && $_GET['delete'] == "true" && $canmodify) {
update_operator_avatar($op['operatorid'], ''); update_operator_avatar($op['operatorid'], '');
header("Location: $mibewroot/operator/avatar.php?op=" . intval($opId)); header("Location: " . MIBEW_WEB_ROOT . "/operator/avatar.php?op=" . intval($opId));
exit; exit;
} }
$page['avatar'] = topage($op['vcavatar']); $page['avatar'] = topage($op['vcavatar']);

View File

@ -44,7 +44,7 @@ if (isset($_GET['act']) && $_GET['act'] == 'del') {
if (count($errors) == 0) { if (count($errors) == 0) {
$db->query("delete from {chatban} where banid = ?", array($banId)); $db->query("delete from {chatban} where banid = ?", array($banId));
header("Location: $mibewroot/operator/blocked.php"); header("Location: " . MIBEW_WEB_ROOT . "/operator/blocked.php");
exit; exit;
} }
} }

View File

@ -83,7 +83,7 @@ if (isset($_GET['act']) && $_GET['act'] == 'delete') {
if (count($errors) == 0) { if (count($errors) == 0) {
$db = Database::getInstance(); $db = Database::getInstance();
$db->query("delete from {chatresponses} where id = ?", array($key)); $db->query("delete from {chatresponses} where id = ?", array($key));
header("Location: $mibewroot/operator/canned.php?lang=" . urlencode($lang) . "&group=" . intval($groupid)); header("Location: " . MIBEW_WEB_ROOT . "/operator/canned.php?lang=" . urlencode($lang) . "&group=" . intval($groupid));
exit; exit;
} }
} }

View File

@ -54,7 +54,7 @@ if (isset($_POST['sent'])) {
Settings::set($opt,(verifyparam($opt, "/^on$/", "") == "on" ? "1" : "0")); Settings::set($opt,(verifyparam($opt, "/^on$/", "") == "on" ? "1" : "0"));
} }
Settings::update(); Settings::update();
header("Location: $mibewroot/operator/features.php?stored"); header("Location: " . MIBEW_WEB_ROOT . "/operator/features.php?stored");
exit; exit;
} else { } else {
$errors[] = "Not an administrator"; $errors[] = "Not an administrator";

View File

@ -190,7 +190,7 @@ if (isset($_POST['name'])) {
'chattitle' => $chattitle, 'chattitle' => $chattitle,
'hosturl' => $hosturl, 'hosturl' => $hosturl,
'logo' => $logo)); 'logo' => $logo));
header("Location: $mibewroot/operator/groupmembers.php?gid=" . intval($newdep['groupid'])); header("Location: " . MIBEW_WEB_ROOT . "/operator/groupmembers.php?gid=" . intval($newdep['groupid']));
exit; exit;
} else { } else {
update_group(array( update_group(array(
@ -206,7 +206,7 @@ if (isset($_POST['name'])) {
'chattitle' => $chattitle, 'chattitle' => $chattitle,
'hosturl' => $hosturl, 'hosturl' => $hosturl,
'logo' => $logo)); 'logo' => $logo));
header("Location: $mibewroot/operator/group.php?gid=" . intval($groupid) . "&stored"); header("Location: " . MIBEW_WEB_ROOT . "/operator/group.php?gid=" . intval($groupid) . "&stored");
exit; exit;
} }
} else { } else {

View File

@ -80,7 +80,7 @@ if (!$group) {
} }
update_group_members($groupid, $new_members); update_group_members($groupid, $new_members);
header("Location: $mibewroot/operator/groupmembers.php?gid=" . intval($groupid) . "&stored"); header("Location: " . MIBEW_WEB_ROOT . "/operator/groupmembers.php?gid=" . intval($groupid) . "&stored");
exit; exit;
} }

View File

@ -44,7 +44,7 @@ if (isset($_GET['act']) && $_GET['act'] == 'del') {
$db->query("delete from {chatgroup} where groupid = ?", array($groupid)); $db->query("delete from {chatgroup} where groupid = ?", array($groupid));
$db->query("delete from {chatgroupoperator} where groupid = ?", array($groupid)); $db->query("delete from {chatgroupoperator} where groupid = ?", array($groupid));
$db->query("update {chatthread} set groupid = 0 where groupid = ?",array($groupid)); $db->query("update {chatthread} set groupid = 0 where groupid = ?",array($groupid));
header("Location: $mibewroot/operator/groups.php"); header("Location: " . MIBEW_WEB_ROOT . "/operator/groups.php");
exit; exit;
} }
} }

View File

@ -30,13 +30,13 @@ $isonline = is_operator_online($operator['operatorid']);
$page = array( $page = array(
'version' => $version, 'version' => $version,
'localeLinks' => get_locale_links("$mibewroot/operator/index.php"), 'localeLinks' => get_locale_links(MIBEW_WEB_ROOT . "/operator/index.php"),
'needUpdate' => Settings::get('dbversion') != $dbversion, 'needUpdate' => Settings::get('dbversion') != $dbversion,
'needChangePassword' => check_password_hash($operator['vclogin'], '', $operator['vcpassword']), 'needChangePassword' => check_password_hash($operator['vclogin'], '', $operator['vcpassword']),
'profilePage' => "$mibewroot/operator/operator.php?op=".$operator['operatorid'], 'profilePage' => MIBEW_WEB_ROOT . "/operator/operator.php?op=".$operator['operatorid'],
'updateWizard' => "$mibewroot/install/", 'updateWizard' => MIBEW_WEB_ROOT . "/install/",
'newFeatures' => Settings::get('featuresversion') != $featuresversion, 'newFeatures' => Settings::get('featuresversion') != $featuresversion,
'featuresPage' => "$mibewroot/operator/features.php", 'featuresPage' => MIBEW_WEB_ROOT . "/operator/features.php",
'isOnline' => $isonline, 'isOnline' => $isonline,
'title' => getlocal("topMenu.admin"), 'title' => getlocal("topMenu.admin"),
'menuid' => "main", 'menuid' => "main",

View File

@ -30,7 +30,7 @@ if (!$thread) {
} }
// Open chat window for operator // Open chat window for operator
$redirect_to = $mibewroot . $redirect_to = MIBEW_WEB_ROOT .
'/operator/agent.php?thread=' . intval($thread->id) . '/operator/agent.php?thread=' . intval($thread->id) .
'&token=' . urlencode($thread->lastToken); '&token=' . urlencode($thread->lastToken);
header('Location: ' . $redirect_to); header('Location: ' . $redirect_to);

View File

@ -34,10 +34,10 @@ if (isset($_POST['login']) && isset($_POST['password'])) {
if ($operator && isset($operator['vcpassword']) && check_password_hash($operator['vclogin'], $password, $operator['vcpassword']) && !operator_is_disabled($operator)) { if ($operator && isset($operator['vcpassword']) && check_password_hash($operator['vclogin'], $password, $operator['vcpassword']) && !operator_is_disabled($operator)) {
$target = $password == '' $target = $password == ''
? "$mibewroot/operator/operator.php?op=" . intval($operator['operatorid']) ? MIBEW_WEB_ROOT . "/operator/operator.php?op=" . intval($operator['operatorid'])
: (isset($_SESSION['backpath']) : (isset($_SESSION['backpath'])
? $_SESSION['backpath'] ? $_SESSION['backpath']
: "$mibewroot/operator/index.php"); : MIBEW_WEB_ROOT . "/operator/index.php");
login_operator($operator, $remember, is_secure_request()); login_operator($operator, $remember, is_secure_request());
header("Location: $target"); header("Location: $target");
@ -56,7 +56,7 @@ if (isset($_POST['login']) && isset($_POST['password'])) {
$page['formlogin'] = $login; $page['formlogin'] = $login;
} }
$page['localeLinks'] = get_locale_links("$mibewroot/operator/login.php"); $page['localeLinks'] = get_locale_links(MIBEW_WEB_ROOT . "/operator/login.php");
$page['title'] = getlocal("page_login.title"); $page['title'] = getlocal("page_login.title");
$page['headertitle'] = getlocal("app.title"); $page['headertitle'] = getlocal("app.title");
$page['show_small_login'] = false; $page['show_small_login'] = false;

View File

@ -20,6 +20,6 @@ require_once(MIBEW_FS_ROOT.'/libs/operator.php');
logout_operator(); logout_operator();
header("Location: $mibewroot/operator/login.php"); header("Location: " . MIBEW_WEB_ROOT . "/operator/login.php");
exit; exit;
?> ?>

View File

@ -95,7 +95,7 @@ if ((isset($_POST['login']) || !is_capable(CAN_ADMINISTRATE, $operator)) && isse
if (count($errors) == 0) { if (count($errors) == 0) {
if (!$opId) { if (!$opId) {
$newop = create_operator($login, $email, $password, $localname, $commonname, "", $code); $newop = create_operator($login, $email, $password, $localname, $commonname, "", $code);
header("Location: $mibewroot/operator/avatar.php?op=" . intval($newop['operatorid'])); header("Location: " . MIBEW_WEB_ROOT . "/operator/avatar.php?op=" . intval($newop['operatorid']));
exit; exit;
} else { } else {
update_operator($opId, $login, $email, $password, $localname, $commonname, $code); update_operator($opId, $login, $email, $password, $localname, $commonname, $code);
@ -104,11 +104,11 @@ if ((isset($_POST['login']) || !is_capable(CAN_ADMINISTRATE, $operator)) && isse
$toDashboard = check_password_hash($login, '', $operator['vcpassword']) && $password != ''; $toDashboard = check_password_hash($login, '', $operator['vcpassword']) && $password != '';
$_SESSION[$session_prefix."operator"]['vcpassword'] = calculate_password_hash($login, $password); $_SESSION[$session_prefix."operator"]['vcpassword'] = calculate_password_hash($login, $password);
if($toDashboard) { if($toDashboard) {
header("Location: $mibewroot/operator/index.php"); header("Location: " . MIBEW_WEB_ROOT . "/operator/index.php");
exit; exit;
} }
} }
header("Location: $mibewroot/operator/operator.php?op=" . intval($opId) . "&stored"); header("Location: " . MIBEW_WEB_ROOT . "/operator/operator.php?op=" . intval($opId) . "&stored");
exit; exit;
} }
} else { } else {

View File

@ -55,7 +55,7 @@ if (isset($_GET['act'])) {
if (count($errors) == 0) { if (count($errors) == 0) {
delete_operator($operatorid); delete_operator($operatorid);
header("Location: $mibewroot/operator/operators.php"); header("Location: " . MIBEW_WEB_ROOT . "/operator/operators.php");
exit; exit;
} }
} }
@ -85,7 +85,7 @@ if (isset($_GET['act'])) {
array(($act_disable ? '1' : '0'), $operatorid) array(($act_disable ? '1' : '0'), $operatorid)
); );
header("Location: $mibewroot/operator/operators.php"); header("Location: " . MIBEW_WEB_ROOT . "/operator/operators.php");
exit; exit;
} }
} }

View File

@ -72,7 +72,7 @@ if (!$op) {
} }
update_operator_groups($op['operatorid'], $new_groups); update_operator_groups($op['operatorid'], $new_groups);
header("Location: $mibewroot/operator/opgroups.php?op=" . intval($opId) . "&stored"); header("Location: " . MIBEW_WEB_ROOT . "/operator/opgroups.php?op=" . intval($opId) . "&stored");
exit; exit;
} }
} }

View File

@ -40,7 +40,7 @@ $screenshots = array();
foreach($style_config['screenshots'] as $name => $desc) { foreach($style_config['screenshots'] as $name => $desc) {
$screenshots[] = array( $screenshots[] = array(
'name' => $name, 'name' => $name,
'file' => $mibewroot . '/' . $preview_style->filesPath() 'file' => MIBEW_WEB_ROOT . '/' . $preview_style->filesPath()
. '/screenshots/' . $name . '.png', . '/screenshots/' . $name . '.png',
'description' => $desc 'description' => $desc
); );

View File

@ -101,7 +101,7 @@ if (isset($_POST['onlinetimeout'])) {
Settings::set($opt,$params[$opt]); Settings::set($opt,$params[$opt]);
} }
Settings::update(); Settings::update();
header("Location: $mibewroot/operator/performance.php?stored"); header("Location: " . MIBEW_WEB_ROOT . "/operator/performance.php?stored");
exit; exit;
} }
} }

View File

@ -57,7 +57,7 @@ if (!$op) {
if ($opId && $_SESSION[$session_prefix."operator"] && $operator['operatorid'] == $opId) { if ($opId && $_SESSION[$session_prefix."operator"] && $operator['operatorid'] == $opId) {
$_SESSION[$session_prefix."operator"]['iperm'] = $new_permissions; $_SESSION[$session_prefix."operator"]['iperm'] = $new_permissions;
} }
header("Location: $mibewroot/operator/permissions.php?op=" . intval($opId) . "&stored"); header("Location: " . MIBEW_WEB_ROOT . "/operator/permissions.php?op=" . intval($opId) . "&stored");
exit; exit;
} }

View File

@ -76,7 +76,7 @@ if (isset($_POST['loginoremail'])) {
$page['formloginoremail'] = topage($loginoremail); $page['formloginoremail'] = topage($loginoremail);
$page['localeLinks'] = get_locale_links("$mibewroot/operator/restore.php"); $page['localeLinks'] = get_locale_links(MIBEW_WEB_ROOT . "/operator/restore.php");
$page['isdone'] = false; $page['isdone'] = false;
$page_style->render('restore'); $page_style->render('restore');

View File

@ -127,7 +127,7 @@ if (isset($_POST['email']) && isset($_POST['title']) && isset($_POST['logo'])) {
} }
// Redirect the user // Redirect the user
header("Location: $mibewroot/operator/settings.php?stored"); header("Location: " . MIBEW_WEB_ROOT . "/operator/settings.php?stored");
exit; exit;
} }
} }

View File

@ -46,7 +46,7 @@ $screenshots = array();
foreach($style_config['screenshots'] as $name => $desc) { foreach($style_config['screenshots'] as $name => $desc) {
$screenshots[] = array( $screenshots[] = array(
'name' => $name, 'name' => $name,
'file' => $mibewroot . '/' . $chat_style->filesPath() 'file' => MIBEW_WEB_ROOT . '/' . $chat_style->filesPath()
. '/screenshots/' . $name . '.png', . '/screenshots/' . $name . '.png',
'description' => $desc 'description' => $desc
); );

View File

@ -18,7 +18,7 @@
require_once(dirname(__FILE__).'/inc_menu.php'); require_once(dirname(__FILE__).'/inc_menu.php');
require_once(dirname(__FILE__).'/inc_tabbar.php'); require_once(dirname(__FILE__).'/inc_tabbar.php');
function tpl_content() { global $page, $mibewroot, $errors; function tpl_content() { global $page, $errors;
?> ?>
<?php if( $page['opid'] ) { ?> <?php if( $page['opid'] ) { ?>
@ -42,7 +42,7 @@ require_once(dirname(__FILE__).'/inc_errors.php');
<?php if( $page['opid'] || $page['canmodify'] ) { ?> <?php if( $page['opid'] || $page['canmodify'] ) { ?>
<form name="agentForm" method="post" action="<?php echo $mibewroot ?>/operator/operator.php"> <form name="agentForm" method="post" action="<?php echo MIBEW_WEB_ROOT ?>/operator/operator.php">
<?php print_csrf_token_input() ?> <?php print_csrf_token_input() ?>
<input type="hidden" name="opid" value="<?php echo $page['opid'] ?>"/> <input type="hidden" name="opid" value="<?php echo $page['opid'] ?>"/>
<div> <div>
@ -114,7 +114,7 @@ require_once(dirname(__FILE__).'/inc_errors.php');
</div> </div>
<?php if($page['canmodify']) { ?> <?php if($page['canmodify']) { ?>
<div class="fbutton"> <div class="fbutton">
<input type="image" name="save" value="" src='<?php echo $mibewroot.getlocal("image.button.save") ?>' alt='<?php echo getlocal("button.save") ?>'/> <input type="image" name="save" value="" src='<?php echo MIBEW_WEB_ROOT . getlocal("image.button.save") ?>' alt='<?php echo getlocal("button.save") ?>'/>
</div> </div>
<?php } ?> <?php } ?>
</div> </div>

View File

@ -17,13 +17,13 @@
require_once(dirname(__FILE__).'/inc_menu.php'); require_once(dirname(__FILE__).'/inc_menu.php');
function tpl_header() { global $page, $mibewroot; function tpl_header() { global $page;
?> ?>
<script type="text/javascript" language="javascript" src="<?php echo $mibewroot ?>/js/libs/jquery.min.js"></script> <script type="text/javascript" language="javascript" src="<?php echo MIBEW_WEB_ROOT ?>/js/libs/jquery.min.js"></script>
<?php <?php
} }
function tpl_content() { global $page, $mibewroot, $errors; function tpl_content() { global $page, $errors;
?> ?>
<?php echo getlocal("page_agents.intro") ?> <?php echo getlocal("page_agents.intro") ?>
@ -33,7 +33,7 @@ function tpl_content() { global $page, $mibewroot, $errors;
require_once(dirname(__FILE__).'/inc_errors.php'); require_once(dirname(__FILE__).'/inc_errors.php');
?> ?>
<form name="agentsForm" method="get" action="<?php echo $mibewroot ?>/operator/operators.php"> <form name="agentsForm" method="get" action="<?php echo MIBEW_WEB_ROOT ?>/operator/operators.php">
<div class="mform"><div class="formtop"><div class="formtopi"></div></div><div class="forminner"> <div class="mform"><div class="formtop"><div class="formtopi"></div></div><div class="forminner">
@ -61,8 +61,8 @@ require_once(dirname(__FILE__).'/inc_errors.php');
<?php if($page['canmodify']) { ?> <?php if($page['canmodify']) { ?>
<div class="tabletool"> <div class="tabletool">
<img src='<?php echo $mibewroot ?>/styles/pages/default/images/buttons/createagent.gif' border="0" alt="" /> <img src='<?php echo MIBEW_WEB_ROOT ?>/styles/pages/default/images/buttons/createagent.gif' border="0" alt="" />
<a href='<?php echo $mibewroot ?>/operator/operator.php' title="<?php echo getlocal("page_agents.new_agent") ?>"> <a href='<?php echo MIBEW_WEB_ROOT ?>/operator/operator.php' title="<?php echo getlocal("page_agents.new_agent") ?>">
<?php echo getlocal("page_agents.new_agent") ?> <?php echo getlocal("page_agents.new_agent") ?>
</a> </a>
</div> </div>
@ -89,7 +89,7 @@ require_once(dirname(__FILE__).'/inc_errors.php');
<?php foreach( $page['allowedAgents'] as $a ) { ?> <?php foreach( $page['allowedAgents'] as $a ) { ?>
<tr> <tr>
<td class="notlast"> <td class="notlast">
<a id="ti<?php echo $a['operatorid'] ?>" href="<?php echo $mibewroot ?>/operator/operator.php?op=<?php echo $a['operatorid'] ?>" class="man"> <a id="ti<?php echo $a['operatorid'] ?>" href="<?php echo MIBEW_WEB_ROOT ?>/operator/operator.php?op=<?php echo $a['operatorid'] ?>" class="man">
<?php echo htmlspecialchars(topage($a['vclogin'])) ?> <?php echo htmlspecialchars(topage($a['vclogin'])) ?>
</a> </a>
</td> </td>
@ -108,13 +108,13 @@ require_once(dirname(__FILE__).'/inc_errors.php');
<?php if($page['canmodify']) { ?> <?php if($page['canmodify']) { ?>
<td> <td>
<?php if(operator_is_disabled($a)){ ?> <?php if(operator_is_disabled($a)){ ?>
<a href="<?php echo $mibewroot ?>/operator/operators.php?act=enable&amp;id=<?php echo $a['operatorid'] ?>"><?php echo getlocal("page_agents.enable.agent") ?></a> <a href="<?php echo MIBEW_WEB_ROOT ?>/operator/operators.php?act=enable&amp;id=<?php echo $a['operatorid'] ?>"><?php echo getlocal("page_agents.enable.agent") ?></a>
<?php }else{ ?> <?php }else{ ?>
<a href="<?php echo $mibewroot ?>/operator/operators.php?act=disable&amp;id=<?php echo $a['operatorid'] ?>"><?php echo getlocal("page_agents.disable.agent") ?></a> <a href="<?php echo MIBEW_WEB_ROOT ?>/operator/operators.php?act=disable&amp;id=<?php echo $a['operatorid'] ?>"><?php echo getlocal("page_agents.disable.agent") ?></a>
<?php } ?> <?php } ?>
</td> </td>
<td> <td>
<a class="removelink" id="i<?php echo $a['operatorid'] ?>" href="<?php echo $mibewroot ?>/operator/operators.php?act=del&amp;id=<?php echo $a['operatorid'] ?><?php print_csrf_token_in_url() ?>"> <a class="removelink" id="i<?php echo $a['operatorid'] ?>" href="<?php echo MIBEW_WEB_ROOT ?>/operator/operators.php?act=del&amp;id=<?php echo $a['operatorid'] ?><?php print_csrf_token_in_url() ?>">
<?php echo getlocal("remove.item") ?> <?php echo getlocal("remove.item") ?>
</a> </a>
</td> </td>

View File

@ -18,7 +18,7 @@
require_once(dirname(__FILE__).'/inc_menu.php'); require_once(dirname(__FILE__).'/inc_menu.php');
require_once(dirname(__FILE__).'/inc_tabbar.php'); require_once(dirname(__FILE__).'/inc_tabbar.php');
function tpl_content() { global $page, $mibewroot, $errors; function tpl_content() { global $page, $errors;
?> ?>
<?php echo getlocal("page_avatar.intro") ?> <?php echo getlocal("page_avatar.intro") ?>
@ -28,7 +28,7 @@ function tpl_content() { global $page, $mibewroot, $errors;
require_once(dirname(__FILE__).'/inc_errors.php'); require_once(dirname(__FILE__).'/inc_errors.php');
?> ?>
<form name="avatarForm" method="post" action="<?php echo $mibewroot ?>/operator/avatar.php" enctype="multipart/form-data"> <form name="avatarForm" method="post" action="<?php echo MIBEW_WEB_ROOT ?>/operator/avatar.php" enctype="multipart/form-data">
<?php print_csrf_token_input() ?> <?php print_csrf_token_input() ?>
<input type="hidden" name="op" value="<?php echo $page['opid'] ?>"/> <input type="hidden" name="op" value="<?php echo $page['opid'] ?>"/>
<div> <div>
@ -47,7 +47,7 @@ require_once(dirname(__FILE__).'/inc_errors.php');
<div class="fvalue"> <div class="fvalue">
<img src="<?php echo $page['avatar'] ?>" alt="cannot load avatar"/><br/> <img src="<?php echo $page['avatar'] ?>" alt="cannot load avatar"/><br/>
<?php if($page['canmodify']) { ?> <?php if($page['canmodify']) { ?>
<a class="formauth" href='<?php echo $mibewroot ?>/operator/avatar.php?op=<?php echo $page['opid'] ?>&amp;delete=true'> <a class="formauth" href='<?php echo MIBEW_WEB_ROOT ?>/operator/avatar.php?op=<?php echo $page['opid'] ?>&amp;delete=true'>
<?php echo getlocal("page_agent.clear_avatar") ?> <?php echo getlocal("page_agent.clear_avatar") ?>
</a> </a>
<?php } ?> <?php } ?>
@ -74,7 +74,7 @@ require_once(dirname(__FILE__).'/inc_errors.php');
</div> </div>
<div class="fbutton"> <div class="fbutton">
<input type="image" name="save" value="" src='<?php echo $mibewroot.getlocal("image.button.save") ?>' alt='<?php echo getlocal("button.save") ?>'/> <input type="image" name="save" value="" src='<?php echo MIBEW_WEB_ROOT . getlocal("image.button.save") ?>' alt='<?php echo getlocal("button.save") ?>'/>
</div> </div>
<?php } ?> <?php } ?>
</div> </div>

View File

@ -15,7 +15,7 @@
* limitations under the License. * limitations under the License.
*/ */
function tpl_content() { global $page, $mibewroot, $errors; function tpl_content() { global $page, $errors;
?> ?>
<?php if( $page['saved'] ) { ?> <?php if( $page['saved'] ) { ?>
@ -42,7 +42,7 @@ require_once(dirname(__FILE__).'/inc_errors.php');
<br/> <br/>
<?php } ?> <?php } ?>
<form name="banForm" method="post" action="<?php echo $mibewroot ?>/operator/ban.php"> <form name="banForm" method="post" action="<?php echo MIBEW_WEB_ROOT ?>/operator/ban.php">
<?php print_csrf_token_input() ?> <?php print_csrf_token_input() ?>
<input type="hidden" name="banId" value="<?php echo $page['banId'] ?>"/> <input type="hidden" name="banId" value="<?php echo $page['banId'] ?>"/>
<?php if( $page['threadid'] ) { ?> <?php if( $page['threadid'] ) { ?>
@ -79,7 +79,7 @@ require_once(dirname(__FILE__).'/inc_errors.php');
</div> </div>
<div class="fbutton"> <div class="fbutton">
<input type="image" name="save" value="" src='<?php echo $mibewroot.getlocal("image.button.save") ?>' alt='<?php echo getlocal("button.save") ?>'/> <input type="image" name="save" value="" src='<?php echo MIBEW_WEB_ROOT . getlocal("image.button.save") ?>' alt='<?php echo getlocal("button.save") ?>'/>
</div> </div>
</div> </div>

View File

@ -17,13 +17,13 @@
require_once(dirname(__FILE__).'/inc_menu.php'); require_once(dirname(__FILE__).'/inc_menu.php');
function tpl_header() { global $page, $mibewroot; function tpl_header() { global $page;
?> ?>
<script type="text/javascript" language="javascript" src="<?php echo $mibewroot ?>/js/libs/jquery.min.js"></script> <script type="text/javascript" language="javascript" src="<?php echo MIBEW_WEB_ROOT ?>/js/libs/jquery.min.js"></script>
<?php <?php
} }
function tpl_content() { global $page, $mibewroot, $errors; function tpl_content() { global $page, $errors;
?> ?>
<?php echo getlocal("page_ban.intro") ?> <?php echo getlocal("page_ban.intro") ?>
@ -34,9 +34,9 @@ require_once(dirname(__FILE__).'/inc_errors.php');
?> ?>
<div class="tabletool"> <div class="tabletool">
<img src="<?php echo $mibewroot ?>/styles/pages/default/images/buttons/createban.gif" border="0" alt=""/> <img src="<?php echo MIBEW_WEB_ROOT ?>/styles/pages/default/images/buttons/createban.gif" border="0" alt=""/>
<a href="<?php echo $mibewroot ?>/operator/ban.php" title="<?php echo getlocal("page_bans.add") ?>" <a href="<?php echo MIBEW_WEB_ROOT ?>/operator/ban.php" title="<?php echo getlocal("page_bans.add") ?>"
onclick="this.newWindow = window.open('<?php echo $mibewroot ?>/operator/ban.php', '', 'toolbar=0,scrollbars=1,location=0,status=1,menubar=0,width=640,height=480,resizable=1');this.newWindow.focus();this.newWindow.opener=window;return false;"><?php echo getlocal("page_bans.add") ?></a> onclick="this.newWindow = window.open('<?php echo MIBEW_WEB_ROOT ?>/operator/ban.php', '', 'toolbar=0,scrollbars=1,location=0,status=1,menubar=0,width=640,height=480,resizable=1');this.newWindow.focus();this.newWindow.opener=window;return false;"><?php echo getlocal("page_bans.add") ?></a>
</div> </div>
<br clear="all"/> <br clear="all"/>
@ -62,7 +62,7 @@ if( $page['pagination.items'] ) {
foreach( $page['pagination.items'] as $b ) { ?> foreach( $page['pagination.items'] as $b ) { ?>
<tr> <tr>
<td class="notlast"> <td class="notlast">
<a href="<?php echo $mibewroot ?>/operator/history.php?q=<?php echo $b['address']?>&type=visitor" class="man" id="ti<?php echo $b['banid'] ?>"> <a href="<?php echo MIBEW_WEB_ROOT ?>/operator/history.php?q=<?php echo $b['address']?>&type=visitor" class="man" id="ti<?php echo $b['banid'] ?>">
<?php echo htmlspecialchars($b['address']) ?> <?php echo htmlspecialchars($b['address']) ?>
</a> </a>
</td> </td>
@ -79,10 +79,10 @@ if( $page['pagination.items'] ) {
?> ?>
</td> </td>
<td> <td>
<a class="removelink" id="i<?php echo $b['banid'] ?>" href="<?php echo $mibewroot ?>/operator/blocked.php?act=del&amp;id=<?php echo $b['banid'] ?><?php print_csrf_token_in_url() ?>"> <a class="removelink" id="i<?php echo $b['banid'] ?>" href="<?php echo MIBEW_WEB_ROOT ?>/operator/blocked.php?act=del&amp;id=<?php echo $b['banid'] ?><?php print_csrf_token_in_url() ?>">
<?php echo getlocal("remove.item") ?></a>, <?php echo getlocal("remove.item") ?></a>,
<a href="<?php echo $mibewroot ?>/operator/ban.php?id=<?php echo $b['banid'] ?>" <a href="<?php echo MIBEW_WEB_ROOT ?>/operator/ban.php?id=<?php echo $b['banid'] ?>"
onclick="this.newWindow = window.open('<?php echo $mibewroot ?>/operator/ban.php?id=<?php echo $b['banid'] ?>', '', 'toolbar=0,scrollbars=1,location=0,status=1,menubar=0,width=640,height=480,resizable=1');this.newWindow.focus();this.newWindow.opener=window;return false;"><?php echo getlocal("edit.item") ?></a> onclick="this.newWindow = window.open('<?php echo MIBEW_WEB_ROOT ?>/operator/ban.php?id=<?php echo $b['banid'] ?>', '', 'toolbar=0,scrollbars=1,location=0,status=1,menubar=0,width=640,height=480,resizable=1');this.newWindow.focus();this.newWindow.opener=window;return false;"><?php echo getlocal("edit.item") ?></a>
</td> </td>
</tr> </tr>
<?php <?php

View File

@ -17,7 +17,7 @@
require_once(dirname(__FILE__).'/inc_menu.php'); require_once(dirname(__FILE__).'/inc_menu.php');
function tpl_content() { global $page, $mibewroot, $errors; function tpl_content() { global $page, $errors;
?> ?>
<?php echo getlocal("canned.descr") ?> <?php echo getlocal("canned.descr") ?>
@ -27,7 +27,7 @@ function tpl_content() { global $page, $mibewroot, $errors;
require_once(dirname(__FILE__).'/inc_errors.php'); require_once(dirname(__FILE__).'/inc_errors.php');
?> ?>
<form name="cannedForm" method="get" action="<?php echo $mibewroot ?>/operator/canned.php"> <form name="cannedForm" method="get" action="<?php echo MIBEW_WEB_ROOT ?>/operator/canned.php">
<div class="mform"><div class="formtop"><div class="formtopi"></div></div><div class="forminner"> <div class="mform"><div class="formtop"><div class="formtopi"></div></div><div class="forminner">
@ -55,9 +55,9 @@ require_once(dirname(__FILE__).'/inc_errors.php');
<br/> <br/>
<div class="tabletool"> <div class="tabletool">
<img src="<?php echo $mibewroot ?>/styles/pages/default/images/buttons/createban.gif" border="0" alt=""/> <img src="<?php echo MIBEW_WEB_ROOT ?>/styles/pages/default/images/buttons/createban.gif" border="0" alt=""/>
<a href="<?php echo $mibewroot ?>/operator/cannededit.php?lang=<?php echo form_value("lang") ?>&amp;group=<?php echo form_value("group")?>" target="_blank" <a href="<?php echo MIBEW_WEB_ROOT ?>/operator/cannededit.php?lang=<?php echo form_value("lang") ?>&amp;group=<?php echo form_value("group")?>" target="_blank"
onclick="this.newWindow = window.open('<?php echo $mibewroot ?>/operator/cannededit.php?lang=<?php echo form_value("lang") ?>&amp;group=<?php echo form_value("group")?>', '', 'toolbar=0,scrollbars=1,location=0,status=1,menubar=0,width=640,height=480,resizable=1');this.newWindow.focus();this.newWindow.opener=window;return false;"> onclick="this.newWindow = window.open('<?php echo MIBEW_WEB_ROOT ?>/operator/cannededit.php?lang=<?php echo form_value("lang") ?>&amp;group=<?php echo form_value("group")?>', '', 'toolbar=0,scrollbars=1,location=0,status=1,menubar=0,width=640,height=480,resizable=1');this.newWindow.focus();this.newWindow.opener=window;return false;">
<?php echo getlocal("canned.add") ?> <?php echo getlocal("canned.add") ?>
</a> </a>
</div> </div>
@ -87,9 +87,9 @@ if( $page['pagination.items'] ) {
<?php echo str_replace("\n", "<br/>",htmlspecialchars(topage($localstr['vcvalue']))) ?> <?php echo str_replace("\n", "<br/>",htmlspecialchars(topage($localstr['vcvalue']))) ?>
</td> </td>
<td> <td>
<a href="<?php echo $mibewroot ?>/operator/cannededit.php?key=<?php echo $localstr['id'] ?>" target="_blank" <a href="<?php echo MIBEW_WEB_ROOT ?>/operator/cannededit.php?key=<?php echo $localstr['id'] ?>" target="_blank"
onclick="this.newWindow = window.open('<?php echo $mibewroot ?>/operator/cannededit.php?key=<?php echo $localstr['id'] ?>', '', 'toolbar=0,scrollbars=1,location=0,status=1,menubar=0,width=640,height=480,resizable=1');this.newWindow.focus();this.newWindow.opener=window;return false;"><?php echo getlocal("canned.actions.edit") ?></a>, onclick="this.newWindow = window.open('<?php echo MIBEW_WEB_ROOT ?>/operator/cannededit.php?key=<?php echo $localstr['id'] ?>', '', 'toolbar=0,scrollbars=1,location=0,status=1,menubar=0,width=640,height=480,resizable=1');this.newWindow.focus();this.newWindow.opener=window;return false;"><?php echo getlocal("canned.actions.edit") ?></a>,
<a href="<?php echo $mibewroot ?>/operator/canned.php?act=delete&amp;key=<?php echo $localstr['id'] ?>&amp;lang=<?php echo form_value("lang") ?>&amp;group=<?php echo form_value("group")?><?php print_csrf_token_in_url() ?>"><?php echo getlocal("canned.actions.del") ?></a> <a href="<?php echo MIBEW_WEB_ROOT ?>/operator/canned.php?act=delete&amp;key=<?php echo $localstr['id'] ?>&amp;lang=<?php echo form_value("lang") ?>&amp;group=<?php echo form_value("group")?><?php print_csrf_token_in_url() ?>"><?php echo getlocal("canned.actions.del") ?></a>
</td> </td>
</tr> </tr>
<?php <?php

View File

@ -15,7 +15,7 @@
* limitations under the License. * limitations under the License.
*/ */
function tpl_content() { global $page, $mibewroot, $errors; function tpl_content() { global $page, $errors;
?> ?>
<?php if( $page['saved'] ) { ?> <?php if( $page['saved'] ) { ?>
@ -37,7 +37,7 @@ function tpl_content() { global $page, $mibewroot, $errors;
require_once(dirname(__FILE__).'/inc_errors.php'); require_once(dirname(__FILE__).'/inc_errors.php');
?> ?>
<form name="cannedForm" method="post" action="<?php echo $mibewroot ?>/operator/cannededit.php"> <form name="cannedForm" method="post" action="<?php echo MIBEW_WEB_ROOT ?>/operator/cannededit.php">
<?php print_csrf_token_input() ?> <?php print_csrf_token_input() ?>
<input type="hidden" name="key" value="<?php echo $page['key'] ?>"/> <input type="hidden" name="key" value="<?php echo $page['key'] ?>"/>
<?php if(!$page['key']) { ?> <?php if(!$page['key']) { ?>
@ -62,7 +62,7 @@ require_once(dirname(__FILE__).'/inc_errors.php');
</div> </div>
<div class="fbutton"> <div class="fbutton">
<input type="image" name="save" value="" src='<?php echo $mibewroot.getlocal("image.button.save") ?>' alt='<?php echo getlocal("button.save") ?>'/> <input type="image" name="save" value="" src='<?php echo MIBEW_WEB_ROOT . getlocal("image.button.save") ?>' alt='<?php echo getlocal("button.save") ?>'/>
</div> </div>
</div> </div>

View File

@ -15,7 +15,7 @@
* limitations under the License. * limitations under the License.
*/ */
function tpl_content() { global $page, $mibewroot; function tpl_content() { global $page;
?> ?>
<div id="confirmpane"> <div id="confirmpane">
@ -27,20 +27,20 @@ function tpl_content() { global $page, $mibewroot;
<div> <div>
<table class="nicebutton"><tr> <table class="nicebutton"><tr>
<td><a href="<?php echo $page['link'] ?>"> <td><a href="<?php echo $page['link'] ?>">
<img src='<?php echo $mibewroot ?>/styles/pages/default/images/submit.gif' width="40" height="35" border="0" alt="" /></a></td> <img src='<?php echo MIBEW_WEB_ROOT ?>/styles/pages/default/images/submit.gif' width="40" height="35" border="0" alt="" /></a></td>
<td class="submit"><a href="<?php echo $page['link'] ?>"> <td class="submit"><a href="<?php echo $page['link'] ?>">
<?php echo getlocal("confirm.take.yes") ?></a></td> <?php echo getlocal("confirm.take.yes") ?></a></td>
<td><a href="<?php echo $page['link'] ?>"> <td><a href="<?php echo $page['link'] ?>">
<img src='<?php echo $mibewroot ?>/styles/pages/default/images/submitrest.gif' width="10" height="35" border="0" alt="" /></a></td> <img src='<?php echo MIBEW_WEB_ROOT ?>/styles/pages/default/images/submitrest.gif' width="10" height="35" border="0" alt="" /></a></td>
</tr></table> </tr></table>
<table class="nicebutton"><tr> <table class="nicebutton"><tr>
<td><a href="javascript:window.close();"> <td><a href="javascript:window.close();">
<img src='<?php echo $mibewroot ?>/styles/pages/default/images/submit.gif' width="40" height="35" border="0" alt="" /></a></td> <img src='<?php echo MIBEW_WEB_ROOT ?>/styles/pages/default/images/submit.gif' width="40" height="35" border="0" alt="" /></a></td>
<td class="submit"><a href="javascript:window.close();"> <td class="submit"><a href="javascript:window.close();">
<?php echo getlocal("confirm.take.no") ?></a></td> <?php echo getlocal("confirm.take.no") ?></a></td>
<td><a href="javascript:window.close();"> <td><a href="javascript:window.close();">
<img src='<?php echo $mibewroot ?>/styles/pages/default/images/submitrest.gif' width="10" height="35" border="0" alt="" /></a></td> <img src='<?php echo MIBEW_WEB_ROOT ?>/styles/pages/default/images/submitrest.gif' width="10" height="35" border="0" alt="" /></a></td>
</tr></table> </tr></table>
<br clear="all"/> <br clear="all"/>

View File

@ -18,14 +18,14 @@
require_once(dirname(__FILE__).'/inc_menu.php'); require_once(dirname(__FILE__).'/inc_menu.php');
require_once(dirname(__FILE__).'/inc_tabbar.php'); require_once(dirname(__FILE__).'/inc_tabbar.php');
function tpl_header() { global $page, $mibewroot; function tpl_header() { global $page;
?> ?>
<script type="text/javascript" language="javascript" src="<?php echo $mibewroot ?>/js/libs/jquery.min.js"></script> <script type="text/javascript" language="javascript" src="<?php echo MIBEW_WEB_ROOT ?>/js/libs/jquery.min.js"></script>
<script type="text/javascript" language="javascript" src="<?php echo $mibewroot ?>/styles/pages/default/js/features.js"></script> <script type="text/javascript" language="javascript" src="<?php echo MIBEW_WEB_ROOT ?>/styles/pages/default/js/features.js"></script>
<?php <?php
} }
function tpl_content() { global $page, $mibewroot, $errors; function tpl_content() { global $page, $errors;
?> ?>
<?php echo getlocal("page_settings.intro") ?> <?php echo getlocal("page_settings.intro") ?>
@ -38,7 +38,7 @@ require_once(dirname(__FILE__).'/inc_errors.php');
<div id="formmessage"><?php echo getlocal("features.saved") ?></div> <div id="formmessage"><?php echo getlocal("features.saved") ?></div>
<?php } ?> <?php } ?>
<form name="features" method="post" action="<?php echo $mibewroot ?>/operator/features.php"> <form name="features" method="post" action="<?php echo MIBEW_WEB_ROOT ?>/operator/features.php">
<?php print_csrf_token_input() ?> <?php print_csrf_token_input() ?>
<input type="hidden" name="sent" value="true"/> <input type="hidden" name="sent" value="true"/>
<div> <div>
@ -183,7 +183,7 @@ require_once(dirname(__FILE__).'/inc_errors.php');
<?php if($page['canmodify']) { ?> <?php if($page['canmodify']) { ?>
<div class="fbutton"> <div class="fbutton">
<input type="image" name="save" value="" src='<?php echo $mibewroot.getlocal("image.button.save") ?>' alt='<?php echo getlocal("button.save") ?>'/> <input type="image" name="save" value="" src='<?php echo MIBEW_WEB_ROOT . getlocal("image.button.save") ?>' alt='<?php echo getlocal("button.save") ?>'/>
</div> </div>
<?php } ?> <?php } ?>
</div> </div>

View File

@ -17,7 +17,7 @@
require_once(dirname(__FILE__).'/inc_menu.php'); require_once(dirname(__FILE__).'/inc_menu.php');
function tpl_content() { global $page, $mibewroot, $errors; function tpl_content() { global $page, $errors;
?> ?>
<?php echo getlocal("page.gen_button.intro") ?> <?php echo getlocal("page.gen_button.intro") ?>
@ -27,7 +27,7 @@ function tpl_content() { global $page, $mibewroot, $errors;
require_once(dirname(__FILE__).'/inc_errors.php'); require_once(dirname(__FILE__).'/inc_errors.php');
?> ?>
<form name="buttonCodeForm" method="get" action="<?php echo $mibewroot ?>/operator/getcode.php"> <form name="buttonCodeForm" method="get" action="<?php echo MIBEW_WEB_ROOT ?>/operator/getcode.php">
<div class="mform"><div class="formtop"><div class="formtopi"></div></div><div class="forminner"> <div class="mform"><div class="formtop"><div class="formtopi"></div></div><div class="forminner">
<div class="fieldForm"> <div class="fieldForm">

View File

@ -18,14 +18,14 @@
require_once(dirname(__FILE__).'/inc_menu.php'); require_once(dirname(__FILE__).'/inc_menu.php');
require_once(dirname(__FILE__).'/inc_tabbar.php'); require_once(dirname(__FILE__).'/inc_tabbar.php');
function tpl_header() { global $page, $mibewroot; function tpl_header() { global $page;
?> ?>
<script type="text/javascript" language="javascript" src="<?php echo $mibewroot ?>/js/libs/jquery.min.js"></script> <script type="text/javascript" language="javascript" src="<?php echo MIBEW_WEB_ROOT ?>/js/libs/jquery.min.js"></script>
<script type="text/javascript" language="javascript" src="<?php echo $mibewroot ?>/styles/pages/default/js/group.js"></script> <script type="text/javascript" language="javascript" src="<?php echo MIBEW_WEB_ROOT ?>/styles/pages/default/js/group.js"></script>
<?php <?php
} }
function tpl_content() { global $page, $mibewroot, $errors; function tpl_content() { global $page, $errors;
?> ?>
<?php if( $page['grid'] ) { ?> <?php if( $page['grid'] ) { ?>
@ -43,7 +43,7 @@ require_once(dirname(__FILE__).'/inc_errors.php');
<div id="formmessage"><?php echo getlocal("data.saved") ?></div> <div id="formmessage"><?php echo getlocal("data.saved") ?></div>
<?php } ?> <?php } ?>
<form name="groupForm" method="post" action="<?php echo $mibewroot ?>/operator/group.php"> <form name="groupForm" method="post" action="<?php echo MIBEW_WEB_ROOT ?>/operator/group.php">
<?php print_csrf_token_input() ?> <?php print_csrf_token_input() ?>
<input type="hidden" name="gid" value="<?php echo $page['grid'] ?>"/> <input type="hidden" name="gid" value="<?php echo $page['grid'] ?>"/>
<div> <div>
@ -155,7 +155,7 @@ require_once(dirname(__FILE__).'/inc_errors.php');
</div> </div>
<div class="fbutton"> <div class="fbutton">
<input type="image" name="save" value="" src='<?php echo $mibewroot.getlocal("image.button.save") ?>' alt='<?php echo getlocal("button.save") ?>'/> <input type="image" name="save" value="" src='<?php echo MIBEW_WEB_ROOT . getlocal("image.button.save") ?>' alt='<?php echo getlocal("button.save") ?>'/>
</div> </div>
</div> </div>

View File

@ -18,7 +18,7 @@
require_once(dirname(__FILE__).'/inc_menu.php'); require_once(dirname(__FILE__).'/inc_menu.php');
require_once(dirname(__FILE__).'/inc_tabbar.php'); require_once(dirname(__FILE__).'/inc_tabbar.php');
function tpl_content() { global $page, $mibewroot, $errors; function tpl_content() { global $page, $errors;
?> ?>
<?php echo getlocal("page.groupmembers.intro") ?> <?php echo getlocal("page.groupmembers.intro") ?>
@ -31,7 +31,7 @@ require_once(dirname(__FILE__).'/inc_errors.php');
<div id="formmessage"><?php echo getlocal("data.saved") ?></div> <div id="formmessage"><?php echo getlocal("data.saved") ?></div>
<?php } ?> <?php } ?>
<form name="membersForm" method="post" action="<?php echo $mibewroot ?>/operator/groupmembers.php"> <form name="membersForm" method="post" action="<?php echo MIBEW_WEB_ROOT ?>/operator/groupmembers.php">
<?php print_csrf_token_input() ?> <?php print_csrf_token_input() ?>
<input type="hidden" name="gid" value="<?php echo $page['groupid'] ?>"/> <input type="hidden" name="gid" value="<?php echo $page['groupid'] ?>"/>
<div> <div>
@ -51,7 +51,7 @@ require_once(dirname(__FILE__).'/inc_errors.php');
<?php } ?> <?php } ?>
<div class="fbutton"> <div class="fbutton">
<input type="image" name="save" value="" src='<?php echo $mibewroot.getlocal("image.button.save") ?>' alt='<?php echo getlocal("button.save") ?>'/> <input type="image" name="save" value="" src='<?php echo MIBEW_WEB_ROOT . getlocal("image.button.save") ?>' alt='<?php echo getlocal("button.save") ?>'/>
</div> </div>
</div><div class="formbottom"><div class="formbottomi"></div></div></div> </div><div class="formbottom"><div class="formbottomi"></div></div></div>

View File

@ -17,13 +17,13 @@
require_once(dirname(__FILE__).'/inc_menu.php'); require_once(dirname(__FILE__).'/inc_menu.php');
function tpl_header() { global $page, $mibewroot; function tpl_header() { global $page;
?> ?>
<script type="text/javascript" language="javascript" src="<?php echo $mibewroot ?>/js/libs/jquery.min.js"></script> <script type="text/javascript" language="javascript" src="<?php echo MIBEW_WEB_ROOT ?>/js/libs/jquery.min.js"></script>
<?php <?php
} }
function tpl_content() { global $page, $mibewroot, $errors; function tpl_content() { global $page, $errors;
?> ?>
<?php echo getlocal("page.groups.intro") ?> <?php echo getlocal("page.groups.intro") ?>
@ -33,7 +33,7 @@ function tpl_content() { global $page, $mibewroot, $errors;
require_once(dirname(__FILE__).'/inc_errors.php'); require_once(dirname(__FILE__).'/inc_errors.php');
?> ?>
<form name="groupsForm" method="get" action="<?php echo $mibewroot ?>/operator/groups.php"> <form name="groupsForm" method="get" action="<?php echo MIBEW_WEB_ROOT ?>/operator/groups.php">
<div class="mform"><div class="formtop"><div class="formtopi"></div></div><div class="forminner"> <div class="mform"><div class="formtop"><div class="formtopi"></div></div><div class="forminner">
@ -61,8 +61,8 @@ require_once(dirname(__FILE__).'/inc_errors.php');
<?php if($page['canmodify']) { ?> <?php if($page['canmodify']) { ?>
<div class="tabletool"> <div class="tabletool">
<img src='<?php echo $mibewroot ?>/styles/pages/default/images/buttons/createdep.gif' border="0" alt="" /> <img src='<?php echo MIBEW_WEB_ROOT ?>/styles/pages/default/images/buttons/createdep.gif' border="0" alt="" />
<a href='<?php echo $mibewroot ?>/operator/group.php' title="<?php echo getlocal("page.groups.new") ?>"> <a href='<?php echo MIBEW_WEB_ROOT ?>/operator/group.php' title="<?php echo getlocal("page.groups.new") ?>">
<?php echo getlocal("page.groups.new") ?> <?php echo getlocal("page.groups.new") ?>
</a> </a>
</div> </div>
@ -94,7 +94,7 @@ if(count($page['groups']) > 0) {
foreach( $page['groups'] as $grp ) { ?> foreach( $page['groups'] as $grp ) { ?>
<tr> <tr>
<td class="notlast level<?php echo $grp['level'] ?>"> <td class="notlast level<?php echo $grp['level'] ?>">
<a href="<?php echo $mibewroot ?>/operator/group.php?gid=<?php echo $grp['groupid'] ?>" id="ti<?php echo $grp['groupid'] ?>" class="man"> <a href="<?php echo MIBEW_WEB_ROOT ?>/operator/group.php?gid=<?php echo $grp['groupid'] ?>" id="ti<?php echo $grp['groupid'] ?>" class="man">
<?php echo htmlspecialchars(topage($grp['vclocalname'])) ?> <?php echo htmlspecialchars(topage($grp['vclocalname'])) ?>
</a> </a>
</td> </td>
@ -111,7 +111,7 @@ if(count($page['groups']) > 0) {
<?php } ?> <?php } ?>
</td> </td>
<td> <td>
<a href="<?php echo $mibewroot ?>/operator/groupmembers.php?gid=<?php echo $grp['groupid'] ?>"> <a href="<?php echo MIBEW_WEB_ROOT ?>/operator/groupmembers.php?gid=<?php echo $grp['groupid'] ?>">
<?php echo htmlspecialchars(topage($grp['inumofagents'])) ?> <?php echo htmlspecialchars(topage($grp['inumofagents'])) ?>
</a> </a>
</td> </td>
@ -120,7 +120,7 @@ if(count($page['groups']) > 0) {
</td> </td>
<?php if($page['canmodify']) { ?> <?php if($page['canmodify']) { ?>
<td> <td>
<a href="<?php echo $mibewroot ?>/operator/groups.php?act=del&amp;gid=<?php echo $grp['groupid'] ?><?php print_csrf_token_in_url() ?>" id="i<?php echo $grp['groupid'] ?>" class="removelink"> <a href="<?php echo MIBEW_WEB_ROOT ?>/operator/groups.php?act=del&amp;gid=<?php echo $grp['groupid'] ?><?php print_csrf_token_in_url() ?>" id="i<?php echo $grp['groupid'] ?>" class="removelink">
<?php echo getlocal("remove.item") ?> <?php echo getlocal("remove.item") ?>
</a> </a>
</td> </td>

View File

@ -17,7 +17,7 @@
if( isset($errors) && count($errors) > 0 ) { ?> if( isset($errors) && count($errors) > 0 ) { ?>
<div class="errinfo"> <div class="errinfo">
<img src='<?php echo $mibewroot ?>/styles/pages/default/images/icon_err.gif' width="40" height="40" border="0" alt="" class="left"/> <img src='<?php echo MIBEW_WEB_ROOT ?>/styles/pages/default/images/icon_err.gif' width="40" height="40" border="0" alt="" class="left"/>
<?php <?php
print getlocal("errors.header"); print getlocal("errors.header");
foreach( $errors as $e ) { foreach( $errors as $e ) {

View File

@ -22,7 +22,7 @@ function menuloc($id) {
} }
return ""; return "";
} }
function tpl_menu() { global $page, $mibewroot, $errors, $current_locale; function tpl_menu() { global $page, $errors, $current_locale;
?> ?>
<li> <li>
<h2><b><?php echo getlocal("lang.choose") ?></b></h2> <h2><b><?php echo getlocal("lang.choose") ?></b></h2>

View File

@ -21,7 +21,7 @@ $isrtl = getlocal("localedirection") == 'rtl';
<html xmlns="http://www.w3.org/1999/xhtml"<?php if($isrtl) { ?> dir="rtl"<?php } ?>> <html xmlns="http://www.w3.org/1999/xhtml"<?php if($isrtl) { ?> dir="rtl"<?php } ?>>
<head> <head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="shortcut icon" href="<?php echo $mibewroot ?>/styles/pages/default/images/favicon.ico" type="image/x-icon"/> <link rel="shortcut icon" href="<?php echo MIBEW_WEB_ROOT ?>/styles/pages/default/images/favicon.ico" type="image/x-icon"/>
<?php <?php
if(function_exists('tpl_header')) if(function_exists('tpl_header'))
tpl_header(); tpl_header();
@ -29,22 +29,22 @@ $isrtl = getlocal("localedirection") == 'rtl';
<title> <title>
<?php echo $page['title'] ?> - <?php echo getlocal("app.title") ?> <?php echo $page['title'] ?> - <?php echo getlocal("app.title") ?>
</title> </title>
<link href="<?php echo $mibewroot ?>/styles/pages/default/css/default.css" rel="stylesheet" type="text/css" /> <link href="<?php echo MIBEW_WEB_ROOT ?>/styles/pages/default/css/default.css" rel="stylesheet" type="text/css" />
<!--[if lte IE 7]><link href="<?php echo $mibewroot ?>/styles/pages/default/css/default_ie.css" rel="stylesheet" type="text/css" /><![endif] --> <!--[if lte IE 7]><link href="<?php echo MIBEW_WEB_ROOT ?>/styles/pages/default/css/default_ie.css" rel="stylesheet" type="text/css" /><![endif] -->
<!--[if lte IE 6]><script language="JavaScript" type="text/javascript" src="<?php echo $mibewroot ?>/<?php echo jspath() ?>/ie.js"></script><![endif]--> <!--[if lte IE 6]><script language="JavaScript" type="text/javascript" src="<?php echo MIBEW_WEB_ROOT ?>/<?php echo jspath() ?>/ie.js"></script><![endif]-->
</head> </head>
<body<?php if(!function_exists('tpl_menu')) { ?> style="min-width: 400px;"<?php } ?>> <body<?php if(!function_exists('tpl_menu')) { ?> style="min-width: 400px;"<?php } ?>>
<div id="<?php echo (isset($page) && isset($page['fixedwrap'])) ? "fixedwrap" : (function_exists('tpl_menu') ? "wrap700" : "wrap400" )?>" class="l<?php echo getlocal("localedirection") ?>"> <div id="<?php echo (isset($page) && isset($page['fixedwrap'])) ? "fixedwrap" : (function_exists('tpl_menu') ? "wrap700" : "wrap400" )?>" class="l<?php echo getlocal("localedirection") ?>">
<div id="header"> <div id="header">
<div id="title"> <div id="title">
<h1><img src="<?php echo $mibewroot ?>/styles/pages/default/images/logo.png" alt="" width="32" height="32" class="left logo" /> <h1><img src="<?php echo MIBEW_WEB_ROOT ?>/styles/pages/default/images/logo.png" alt="" width="32" height="32" class="left logo" />
<a href="#"><?php echo isset($page['headertitle']) ? $page['headertitle'] : $page['title'] ?></a></h1> <a href="#"><?php echo isset($page['headertitle']) ? $page['headertitle'] : $page['title'] ?></a></h1>
</div> </div>
<?php if(isset($page) && isset($page['operator'])) { ?> <?php if(isset($page) && isset($page['operator'])) { ?>
<div id="path"><p><?php echo getlocal2("menu.operator",array($page['operator'])) ?></p></div> <div id="path"><p><?php echo getlocal2("menu.operator",array($page['operator'])) ?></p></div>
<?php } else if(isset($page) && isset($page['show_small_login']) && $page['show_small_login']) { ?> <?php } else if(isset($page) && isset($page['show_small_login']) && $page['show_small_login']) { ?>
<div id="loginsmallpane"> <div id="loginsmallpane">
<form name="smallLogin" method="post" action="<?php echo $mibewroot ?>/operator/login.php"> <form name="smallLogin" method="post" action="<?php echo MIBEW_WEB_ROOT ?>/operator/login.php">
<?php echo getlocal("page_login.login") ?> <?php echo getlocal("page_login.login") ?>
<input type="text" name="login" size="8" class="formauth"/> <input type="text" name="login" size="8" class="formauth"/>
<input type="password" name="password" size="8" class="formauth" autocomplete="off"/> <input type="password" name="password" size="8" class="formauth" autocomplete="off"/>

View File

@ -23,49 +23,49 @@ function menuli($name) {
return ""; return "";
} }
function tpl_menu() { global $page, $mibewroot, $errors; function tpl_menu() { global $page, $errors;
if(isset($page['isOnline']) && !$page['isOnline']) { ?> if(isset($page['isOnline']) && !$page['isOnline']) { ?>
<li id="offwarn"> <li id="offwarn">
<img src="<?php echo $mibewroot ?>/styles/pages/default/images/dash/warn.gif" alt="" width="24" height="24"/> <img src="<?php echo MIBEW_WEB_ROOT ?>/styles/pages/default/images/dash/warn.gif" alt="" width="24" height="24"/>
<p><?php echo getlocal2("menu.goonline",array($mibewroot."/operator/users.php?nomenu")) ?></p> <p><?php echo getlocal2("menu.goonline",array(MIBEW_WEB_ROOT . "/operator/users.php?nomenu")) ?></p>
</li> </li>
<?php } <?php }
if(isset($page['operator'])) { ?> if(isset($page['operator'])) { ?>
<li> <li>
<h2><?php echo getlocal('right.main') ?></h2> <h2><?php echo getlocal('right.main') ?></h2>
<ul class="submenu"> <ul class="submenu">
<li<?php menuli("main")?>><a href='<?php echo $mibewroot ?>/operator/index.php'><?php echo getlocal('topMenu.main') ?></a></li> <li<?php menuli("main")?>><a href='<?php echo MIBEW_WEB_ROOT ?>/operator/index.php'><?php echo getlocal('topMenu.main') ?></a></li>
<li<?php menuli("users")?>><a href='<?php echo $mibewroot ?>/operator/users.php'><?php echo getlocal('topMenu.users') ?></a> <span class="small">(<a class="inner" href='<?php echo $mibewroot ?>/operator/users.php?nomenu'><?php echo getlocal('topMenu.users.nomenu') ?></a>)</span></li> <li<?php menuli("users")?>><a href='<?php echo MIBEW_WEB_ROOT ?>/operator/users.php'><?php echo getlocal('topMenu.users') ?></a> <span class="small">(<a class="inner" href='<?php echo MIBEW_WEB_ROOT ?>/operator/users.php?nomenu'><?php echo getlocal('topMenu.users.nomenu') ?></a>)</span></li>
<li<?php menuli("history")?>><a href='<?php echo $mibewroot ?>/operator/history.php'><?php echo getlocal('page_analysis.search.title') ?></a></li> <li<?php menuli("history")?>><a href='<?php echo MIBEW_WEB_ROOT ?>/operator/history.php'><?php echo getlocal('page_analysis.search.title') ?></a></li>
<?php if(isset($page['showstat']) && $page['showstat']) { ?> <?php if(isset($page['showstat']) && $page['showstat']) { ?>
<li<?php menuli("statistics")?>><a href='<?php echo $mibewroot ?>/operator/statistics.php'><?php echo getlocal('statistics.title') ?></a></li> <li<?php menuli("statistics")?>><a href='<?php echo MIBEW_WEB_ROOT ?>/operator/statistics.php'><?php echo getlocal('statistics.title') ?></a></li>
<?php } ?> <?php } ?>
<?php if(isset($page['showban']) && $page['showban']) { ?> <?php if(isset($page['showban']) && $page['showban']) { ?>
<li<?php menuli("blocked")?>><a href='<?php echo $mibewroot ?>/operator/blocked.php'><?php echo getlocal('menu.blocked') ?></a></li> <li<?php menuli("blocked")?>><a href='<?php echo MIBEW_WEB_ROOT ?>/operator/blocked.php'><?php echo getlocal('menu.blocked') ?></a></li>
<?php } ?> <?php } ?>
</ul> </ul>
</li> </li>
<li> <li>
<h2><?php echo getlocal('right.administration') ?></h2> <h2><?php echo getlocal('right.administration') ?></h2>
<ul class="submenu"> <ul class="submenu">
<li<?php menuli("canned")?>><a href='<?php echo $mibewroot ?>/operator/canned.php'><?php echo getlocal('menu.canned') ?></a></li> <li<?php menuli("canned")?>><a href='<?php echo MIBEW_WEB_ROOT ?>/operator/canned.php'><?php echo getlocal('menu.canned') ?></a></li>
<?php if(isset($page['showadmin']) && $page['showadmin']) { ?> <?php if(isset($page['showadmin']) && $page['showadmin']) { ?>
<li<?php menuli("getcode")?>><a href='<?php echo $mibewroot ?>/operator/getcode.php'><?php echo getlocal('leftMenu.client_gen_button') ?></a></li> <li<?php menuli("getcode")?>><a href='<?php echo MIBEW_WEB_ROOT ?>/operator/getcode.php'><?php echo getlocal('leftMenu.client_gen_button') ?></a></li>
<li<?php menuli("operators")?>><a href='<?php echo $mibewroot ?>/operator/operators.php'><?php echo getlocal('leftMenu.client_agents') ?></a></li> <li<?php menuli("operators")?>><a href='<?php echo MIBEW_WEB_ROOT ?>/operator/operators.php'><?php echo getlocal('leftMenu.client_agents') ?></a></li>
<li<?php menuli("groups")?>><a href='<?php echo $mibewroot ?>/operator/groups.php'><?php echo getlocal('menu.groups') ?></a></li> <li<?php menuli("groups")?>><a href='<?php echo MIBEW_WEB_ROOT ?>/operator/groups.php'><?php echo getlocal('menu.groups') ?></a></li>
<li<?php menuli("settings")?>><a href='<?php echo $mibewroot ?>/operator/settings.php'><?php echo getlocal('leftMenu.client_settings') ?></a></li> <li<?php menuli("settings")?>><a href='<?php echo MIBEW_WEB_ROOT ?>/operator/settings.php'><?php echo getlocal('leftMenu.client_settings') ?></a></li>
<li<?php menuli("translate")?>><a href='<?php echo $mibewroot ?>/operator/translate.php'><?php echo getlocal('menu.translate') ?></a></li> <li<?php menuli("translate")?>><a href='<?php echo MIBEW_WEB_ROOT ?>/operator/translate.php'><?php echo getlocal('menu.translate') ?></a></li>
<li<?php menuli("updates")?>><a href='<?php echo $mibewroot ?>/operator/updates.php'><?php echo getlocal('menu.updates') ?></a></li> <li<?php menuli("updates")?>><a href='<?php echo MIBEW_WEB_ROOT ?>/operator/updates.php'><?php echo getlocal('menu.updates') ?></a></li>
<?php } ?> <?php } ?>
<?php if(isset($page['currentopid']) && $page['currentopid']) {?> <?php if(isset($page['currentopid']) && $page['currentopid']) {?>
<li<?php menuli("profile")?>><a href='<?php echo $mibewroot ?>/operator/operator.php?op=<?php echo $page['currentopid'] ?>'><?php echo getlocal('menu.profile') ?></a></li> <li<?php menuli("profile")?>><a href='<?php echo MIBEW_WEB_ROOT ?>/operator/operator.php?op=<?php echo $page['currentopid'] ?>'><?php echo getlocal('menu.profile') ?></a></li>
<?php } ?> <?php } ?>
</ul> </ul>
</li> </li>
<li> <li>
<h2><?php echo getlocal('right.other') ?></h2> <h2><?php echo getlocal('right.other') ?></h2>
<ul class="submenu"> <ul class="submenu">
<li><a href='<?php echo $mibewroot ?>/operator/logout.php'><?php echo getlocal('topMenu.logoff') ?></a></li> <li><a href='<?php echo MIBEW_WEB_ROOT ?>/operator/logout.php'><?php echo getlocal('topMenu.logoff') ?></a></li>
</ul> </ul>
</li> </li>
<?php <?php

View File

@ -15,7 +15,7 @@
* limitations under the License. * limitations under the License.
*/ */
function tpl_content() { global $page, $mibewroot, $errors; function tpl_content() { global $page, $errors;
?> ?>
<?php <?php

View File

@ -19,28 +19,28 @@ if(isset($page) && isset($page['localeLinks'])) {
require_once(dirname(__FILE__).'/inc_locales.php'); require_once(dirname(__FILE__).'/inc_locales.php');
} }
function tpl_header() { global $page, $mibewroot; function tpl_header() { global $page;
if($page['soundcheck']) { if($page['soundcheck']) {
?> ?>
<!-- External libs --> <!-- External libs -->
<script type="text/javascript" src="<?php echo $mibewroot ?>/js/libs/jquery.min.js"></script> <script type="text/javascript" src="<?php echo MIBEW_WEB_ROOT ?>/js/libs/jquery.min.js"></script>
<script type="text/javascript" src="<?php echo $mibewroot ?>/js/libs/json2.js"></script> <script type="text/javascript" src="<?php echo MIBEW_WEB_ROOT ?>/js/libs/json2.js"></script>
<script type="text/javascript" src="<?php echo $mibewroot ?>/js/libs/underscore-min.js"></script> <script type="text/javascript" src="<?php echo MIBEW_WEB_ROOT ?>/js/libs/underscore-min.js"></script>
<script type="text/javascript" src="<?php echo $mibewroot ?>/js/libs/backbone-min.js"></script> <script type="text/javascript" src="<?php echo MIBEW_WEB_ROOT ?>/js/libs/backbone-min.js"></script>
<script type="text/javascript" src="<?php echo $mibewroot ?>/js/libs/backbone.marionette.min.js"></script> <script type="text/javascript" src="<?php echo MIBEW_WEB_ROOT ?>/js/libs/backbone.marionette.min.js"></script>
<script type="text/javascript" src="<?php echo $mibewroot ?>/js/libs/handlebars.js"></script> <script type="text/javascript" src="<?php echo MIBEW_WEB_ROOT ?>/js/libs/handlebars.js"></script>
<!-- Default application files --> <!-- Default application files -->
<script type="text/javascript" src="<?php echo $mibewroot ?>/js/compiled/mibewapi.js"></script> <script type="text/javascript" src="<?php echo MIBEW_WEB_ROOT ?>/js/compiled/mibewapi.js"></script>
<script type="text/javascript" src="<?php echo $mibewroot ?>/js/compiled/default_app.js"></script> <script type="text/javascript" src="<?php echo MIBEW_WEB_ROOT ?>/js/compiled/default_app.js"></script>
<script type="text/javascript" language="javascript" src="<?php echo $mibewroot ?>/js/compiled/soundcheck.js"></script> <script type="text/javascript" language="javascript" src="<?php echo MIBEW_WEB_ROOT ?>/js/compiled/soundcheck.js"></script>
<?php <?php
} }
} }
function tpl_content() { global $page, $mibewroot, $errors; function tpl_content() { global $page, $errors;
?> ?>
<?php echo getlocal("install.message") ?> <?php echo getlocal("install.message") ?>
<br/> <br/>
@ -74,7 +74,7 @@ require_once(dirname(__FILE__).'/inc_errors.php');
<?php } ?> <?php } ?>
<br/> <br/>
<a href="<?php echo $mibewroot ?>/license.php"><?php echo getlocal("install.license") ?></a> <a href="<?php echo MIBEW_WEB_ROOT ?>/license.php"><?php echo getlocal("install.license") ?></a>
<?php <?php

View File

@ -18,20 +18,20 @@
require_once(dirname(__FILE__).'/inc_menu.php'); require_once(dirname(__FILE__).'/inc_menu.php');
require_once(dirname(__FILE__).'/inc_tabbar.php'); require_once(dirname(__FILE__).'/inc_tabbar.php');
function tpl_header() { global $page, $mibewroot; function tpl_header() { global $page;
?> ?>
<link href="<?php echo $mibewroot ?>/styles/invitations/<?php echo $page['preview'] ?>/invite.css" rel="stylesheet" type="text/css" /> <link href="<?php echo MIBEW_WEB_ROOT ?>/styles/invitations/<?php echo $page['preview'] ?>/invite.css" rel="stylesheet" type="text/css" />
<? <?
} /* header */ } /* header */
function tpl_content() { global $page, $mibewroot; function tpl_content() { global $page;
?> ?>
<?php echo getlocal("page.preview.intro") ?> <?php echo getlocal("page.preview.intro") ?>
<br /> <br />
<br /> <br />
<form name="preview" method="get" action="<?php echo $mibewroot ?>/operator/invitationthemes.php"> <form name="preview" method="get" action="<?php echo MIBEW_WEB_ROOT ?>/operator/invitationthemes.php">
<div> <div>
<?php print_tabbar(); ?> <?php print_tabbar(); ?>
<div class="mform"><div class="formtop"><div class="formtopi"></div></div><div class="forminner"> <div class="mform"><div class="formtop"><div class="formtopi"></div></div><div class="forminner">

View File

@ -15,7 +15,7 @@
* limitations under the License. * limitations under the License.
*/ */
function tpl_content() { global $page, $mibewroot, $errors; function tpl_content() { global $page, $errors;
?> ?>
<p>Copyright 2005-2013 the original author or authors.</p> <p>Copyright 2005-2013 the original author or authors.</p>

View File

@ -19,14 +19,14 @@ if(isset($page) && isset($page['localeLinks'])) {
require_once(dirname(__FILE__).'/inc_locales.php'); require_once(dirname(__FILE__).'/inc_locales.php');
} }
function tpl_content() { global $page, $mibewroot, $errors; function tpl_content() { global $page, $errors;
?> ?>
<div id="loginintro"> <div id="loginintro">
<p><?php echo getlocal("app.descr")?></p> <p><?php echo getlocal("app.descr")?></p>
</div> </div>
<form name="loginForm" method="post" action="<?php echo $mibewroot ?>/operator/login.php"> <form name="loginForm" method="post" action="<?php echo MIBEW_WEB_ROOT ?>/operator/login.php">
<div id="loginpane"> <div id="loginpane">
<div class="header"> <div class="header">
@ -68,7 +68,7 @@ require_once(dirname(__FILE__).'/inc_errors.php');
</div> </div>
<div class="fbutton"> <div class="fbutton">
<input type="image" name="login" src='<?php echo $mibewroot.getlocal("image.button.login") ?>' alt='<?php echo getlocal("button.enter") ?>'/> <input type="image" name="login" src='<?php echo MIBEW_WEB_ROOT . getlocal("image.button.login") ?>' alt='<?php echo getlocal("button.enter") ?>'/>
<div class="links"> <div class="links">
<a href="restore.php"><?php echo getlocal("restore.pwd.message") ?></a><br/> <a href="restore.php"><?php echo getlocal("restore.pwd.message") ?></a><br/>

View File

@ -17,11 +17,11 @@
require_once(dirname(__FILE__).'/inc_menu.php'); require_once(dirname(__FILE__).'/inc_menu.php');
function tpl_header() { global $page, $mibewroot; function tpl_header() { global $page;
if(isset($page) && isset($page['localeLinks'])) { if(isset($page) && isset($page['localeLinks'])) {
?> ?>
<script type="text/javascript" language="javascript" src="<?php echo $mibewroot ?>/js/libs/jquery.min.js"></script> <script type="text/javascript" language="javascript" src="<?php echo MIBEW_WEB_ROOT ?>/js/libs/jquery.min.js"></script>
<script type="text/javascript" language="javascript" src="<?php echo $mibewroot ?>/js/compiled/locale.js"></script> <script type="text/javascript" language="javascript" src="<?php echo MIBEW_WEB_ROOT ?>/js/compiled/locale.js"></script>
<?php <?php
} }
} }
@ -32,7 +32,7 @@ function menuseparator() {
if(($menuItemsCount%3) == 0) { echo "</tr><tr>"; } if(($menuItemsCount%3) == 0) { echo "</tr><tr>"; }
} }
function tpl_content() { global $page, $mibewroot, $current_locale, $menuItemsCount, $version; function tpl_content() { global $page, $current_locale, $menuItemsCount, $version;
?> ?>
<br/> <br/>
@ -51,15 +51,15 @@ function tpl_content() { global $page, $mibewroot, $current_locale, $menuItemsCo
<table id="dashboard"> <table id="dashboard">
<tr> <tr>
<td class="dashitem"> <td class="dashitem">
<img src="<?php echo $mibewroot ?>/styles/pages/default/images/dash/visitors.gif" alt=""/> <img src="<?php echo MIBEW_WEB_ROOT ?>/styles/pages/default/images/dash/visitors.gif" alt=""/>
<a href='<?php echo $mibewroot ?>/operator/users.php'> <a href='<?php echo MIBEW_WEB_ROOT ?>/operator/users.php'>
<?php echo getlocal('topMenu.users') ?></a> <?php echo getlocal('topMenu.users') ?></a>
<?php echo getlocal('page_client.pending_users') ?> <?php echo getlocal('page_client.pending_users') ?>
</td> </td>
<td class="dashitem"> <td class="dashitem">
<img src="<?php echo $mibewroot ?>/styles/pages/default/images/dash/history.gif" alt=""/> <img src="<?php echo MIBEW_WEB_ROOT ?>/styles/pages/default/images/dash/history.gif" alt=""/>
<a href='<?php echo $mibewroot ?>/operator/history.php'> <a href='<?php echo MIBEW_WEB_ROOT ?>/operator/history.php'>
<?php echo getlocal('page_analysis.search.title') ?></a> <?php echo getlocal('page_analysis.search.title') ?></a>
<?php echo getlocal('content.history') ?> <?php echo getlocal('content.history') ?>
</td> </td>
@ -69,8 +69,8 @@ $menuItemsCount = 2;
<?php if($page['showstat']) { ?> <?php if($page['showstat']) { ?>
<td class="dashitem"> <td class="dashitem">
<img src="<?php echo $mibewroot ?>/styles/pages/default/images/dash/stat.gif" alt=""/> <img src="<?php echo MIBEW_WEB_ROOT ?>/styles/pages/default/images/dash/stat.gif" alt=""/>
<a href='<?php echo $mibewroot ?>/operator/statistics.php'> <a href='<?php echo MIBEW_WEB_ROOT ?>/operator/statistics.php'>
<?php echo getlocal('statistics.title') ?></a> <?php echo getlocal('statistics.title') ?></a>
<?php echo getlocal('statistics.description') ?> <?php echo getlocal('statistics.description') ?>
</td> </td>
@ -79,8 +79,8 @@ $menuItemsCount = 2;
<?php if( $page['showban'] ) { ?> <?php if( $page['showban'] ) { ?>
<td class="dashitem"> <td class="dashitem">
<img src="<?php echo $mibewroot ?>/styles/pages/default/images/dash/blocked.gif" alt=""/> <img src="<?php echo MIBEW_WEB_ROOT ?>/styles/pages/default/images/dash/blocked.gif" alt=""/>
<a href='<?php echo $mibewroot ?>/operator/blocked.php'> <a href='<?php echo MIBEW_WEB_ROOT ?>/operator/blocked.php'>
<?php echo getlocal('menu.blocked') ?></a> <?php echo getlocal('menu.blocked') ?></a>
<?php echo getlocal('content.blocked') ?> <?php echo getlocal('content.blocked') ?>
</td> </td>
@ -88,8 +88,8 @@ $menuItemsCount = 2;
<?php } ?> <?php } ?>
<td class="dashitem"> <td class="dashitem">
<img src="<?php echo $mibewroot ?>/styles/pages/default/images/dash/canned.gif" alt=""/> <img src="<?php echo MIBEW_WEB_ROOT ?>/styles/pages/default/images/dash/canned.gif" alt=""/>
<a href='<?php echo $mibewroot ?>/operator/canned.php'> <a href='<?php echo MIBEW_WEB_ROOT ?>/operator/canned.php'>
<?php echo getlocal('menu.canned') ?></a> <?php echo getlocal('menu.canned') ?></a>
<?php echo getlocal('canned.descr') ?> <?php echo getlocal('canned.descr') ?>
</td> </td>
@ -97,32 +97,32 @@ $menuItemsCount = 2;
<?php if( $page['showadmin'] ) { ?> <?php if( $page['showadmin'] ) { ?>
<td class="dashitem"> <td class="dashitem">
<img src="<?php echo $mibewroot ?>/styles/pages/default/images/dash/getcode.gif" alt=""/> <img src="<?php echo MIBEW_WEB_ROOT ?>/styles/pages/default/images/dash/getcode.gif" alt=""/>
<a href='<?php echo $mibewroot ?>/operator/getcode.php'> <a href='<?php echo MIBEW_WEB_ROOT ?>/operator/getcode.php'>
<?php echo getlocal('leftMenu.client_gen_button') ?></a> <?php echo getlocal('leftMenu.client_gen_button') ?></a>
<?php echo getlocal('admin.content.client_gen_button') ?> <?php echo getlocal('admin.content.client_gen_button') ?>
</td> </td>
<?php menuseparator(); ?> <?php menuseparator(); ?>
<td class="dashitem"> <td class="dashitem">
<img src="<?php echo $mibewroot ?>/styles/pages/default/images/dash/operators.gif" alt=""/> <img src="<?php echo MIBEW_WEB_ROOT ?>/styles/pages/default/images/dash/operators.gif" alt=""/>
<a href='<?php echo $mibewroot ?>/operator/operators.php'> <a href='<?php echo MIBEW_WEB_ROOT ?>/operator/operators.php'>
<?php echo getlocal('leftMenu.client_agents') ?></a> <?php echo getlocal('leftMenu.client_agents') ?></a>
<?php echo getlocal('admin.content.client_agents') ?> <?php echo getlocal('admin.content.client_agents') ?>
</td> </td>
<?php menuseparator(); ?> <?php menuseparator(); ?>
<td class="dashitem"> <td class="dashitem">
<img src="<?php echo $mibewroot ?>/styles/pages/default/images/dash/dep.gif" alt=""/> <img src="<?php echo MIBEW_WEB_ROOT ?>/styles/pages/default/images/dash/dep.gif" alt=""/>
<a href='<?php echo $mibewroot ?>/operator/groups.php'> <a href='<?php echo MIBEW_WEB_ROOT ?>/operator/groups.php'>
<?php echo getlocal('menu.groups') ?></a> <?php echo getlocal('menu.groups') ?></a>
<?php echo getlocal('menu.groups.content') ?> <?php echo getlocal('menu.groups.content') ?>
</td> </td>
<?php menuseparator(); ?> <?php menuseparator(); ?>
<td class="dashitem"> <td class="dashitem">
<img src="<?php echo $mibewroot ?>/styles/pages/default/images/dash/settings.gif" alt=""/> <img src="<?php echo MIBEW_WEB_ROOT ?>/styles/pages/default/images/dash/settings.gif" alt=""/>
<a href='<?php echo $mibewroot ?>/operator/settings.php'> <a href='<?php echo MIBEW_WEB_ROOT ?>/operator/settings.php'>
<?php echo getlocal('leftMenu.client_settings') ?></a> <?php echo getlocal('leftMenu.client_settings') ?></a>
<?php echo getlocal('admin.content.client_settings') ?> <?php echo getlocal('admin.content.client_settings') ?>
</td> </td>
@ -131,8 +131,8 @@ $menuItemsCount = 2;
<?php if(isset($page['currentopid']) && $page['currentopid']) {?> <?php if(isset($page['currentopid']) && $page['currentopid']) {?>
<td class="dashitem"> <td class="dashitem">
<img src="<?php echo $mibewroot ?>/styles/pages/default/images/dash/profile.gif" alt=""/> <img src="<?php echo MIBEW_WEB_ROOT ?>/styles/pages/default/images/dash/profile.gif" alt=""/>
<a href='<?php echo $mibewroot ?>/operator/operator.php?op=<?php echo $page['currentopid'] ?>'> <a href='<?php echo MIBEW_WEB_ROOT ?>/operator/operator.php?op=<?php echo $page['currentopid'] ?>'>
<?php echo getlocal('menu.profile') ?></a> <?php echo getlocal('menu.profile') ?></a>
<?php echo getlocal('menu.profile.content') ?> <?php echo getlocal('menu.profile.content') ?>
</td> </td>
@ -141,7 +141,7 @@ $menuItemsCount = 2;
<?php if(isset($page) && isset($page['localeLinks'])) { ?> <?php if(isset($page) && isset($page['localeLinks'])) { ?>
<td class="dashitem"> <td class="dashitem">
<img src="<?php echo $mibewroot ?>/styles/pages/default/images/dash/locale.gif" alt=""/> <img src="<?php echo MIBEW_WEB_ROOT ?>/styles/pages/default/images/dash/locale.gif" alt=""/>
<a href='#' id="changelang"> <a href='#' id="changelang">
<?php echo getlocal('menu.locale') ?></a> <?php echo getlocal('menu.locale') ?></a>
<?php echo getlocal('menu.locale.content') ?> <?php echo getlocal('menu.locale.content') ?>
@ -151,8 +151,8 @@ $menuItemsCount = 2;
<?php if( $page['showadmin'] ) { ?> <?php if( $page['showadmin'] ) { ?>
<td class="dashitem"> <td class="dashitem">
<img src="<?php echo $mibewroot ?>/styles/pages/default/images/dash/updates.gif" alt=""/> <img src="<?php echo MIBEW_WEB_ROOT ?>/styles/pages/default/images/dash/updates.gif" alt=""/>
<a href='<?php echo $mibewroot ?>/operator/updates.php'> <a href='<?php echo MIBEW_WEB_ROOT ?>/operator/updates.php'>
<?php echo getlocal('menu.updates') ?></a> <?php echo getlocal('menu.updates') ?></a>
<?php echo getlocal('menu.updates.content') ?> <?php echo getlocal('menu.updates.content') ?>
</td> </td>
@ -160,8 +160,8 @@ $menuItemsCount = 2;
<?php } ?> <?php } ?>
<td class="dashitem"> <td class="dashitem">
<img src="<?php echo $mibewroot ?>/styles/pages/default/images/dash/exit.gif" alt=""/> <img src="<?php echo MIBEW_WEB_ROOT ?>/styles/pages/default/images/dash/exit.gif" alt=""/>
<a href='<?php echo $mibewroot ?>/operator/logout.php'> <a href='<?php echo MIBEW_WEB_ROOT ?>/operator/logout.php'>
<?php echo getlocal('topMenu.logoff') ?></a> <?php echo getlocal('topMenu.logoff') ?></a>
<?php echo getlocal('content.logoff') ?> <?php echo getlocal('content.logoff') ?>
</td> </td>
@ -171,8 +171,8 @@ $menuItemsCount = 2;
<?php if(isset($page) && isset($page['localeLinks'])) { ?> <?php if(isset($page) && isset($page['localeLinks'])) { ?>
<div id="dashlocalesPopup"> <div id="dashlocalesPopup">
<a href="#" id="dashlocalesPopupClose"><img src="<?php echo $mibewroot ?>/styles/pages/default/images/dash/close.gif" alt="X"/></a> <a href="#" id="dashlocalesPopupClose"><img src="<?php echo MIBEW_WEB_ROOT ?>/styles/pages/default/images/dash/close.gif" alt="X"/></a>
<h2><img src="<?php echo $mibewroot ?>/styles/pages/default/images/dash/locale.gif" alt=""/> <h2><img src="<?php echo MIBEW_WEB_ROOT ?>/styles/pages/default/images/dash/locale.gif" alt=""/>
<b><?php echo getlocal("lang.choose") ?></b></h2> <b><?php echo getlocal("lang.choose") ?></b></h2>
<ul class="locales"> <ul class="locales">
<?php foreach($page['localeLinks'] as $id => $title) { ?> <?php foreach($page['localeLinks'] as $id => $title) { ?>

View File

@ -18,7 +18,7 @@
require_once(dirname(__FILE__).'/inc_menu.php'); require_once(dirname(__FILE__).'/inc_menu.php');
require_once(dirname(__FILE__).'/inc_tabbar.php'); require_once(dirname(__FILE__).'/inc_tabbar.php');
function tpl_content() { global $page, $mibewroot, $errors; function tpl_content() { global $page, $errors;
?> ?>
<?php echo getlocal("operator.groups.intro") ?> <?php echo getlocal("operator.groups.intro") ?>
@ -31,7 +31,7 @@ require_once(dirname(__FILE__).'/inc_errors.php');
<div id="formmessage"><?php echo getlocal("data.saved") ?></div> <div id="formmessage"><?php echo getlocal("data.saved") ?></div>
<?php } ?> <?php } ?>
<form name="opgroupsForm" method="post" action="<?php echo $mibewroot ?>/operator/opgroups.php"> <form name="opgroupsForm" method="post" action="<?php echo MIBEW_WEB_ROOT ?>/operator/opgroups.php">
<?php print_csrf_token_input() ?> <?php print_csrf_token_input() ?>
<input type="hidden" name="op" value="<?php echo $page['opid'] ?>"/> <input type="hidden" name="op" value="<?php echo $page['opid'] ?>"/>
<div> <div>
@ -54,7 +54,7 @@ require_once(dirname(__FILE__).'/inc_errors.php');
<?php if($page['canmodify']) { ?> <?php if($page['canmodify']) { ?>
<div class="fbutton"> <div class="fbutton">
<input type="image" name="save" value="" src='<?php echo $mibewroot.getlocal("image.button.save") ?>' alt='<?php echo getlocal("button.save") ?>'/> <input type="image" name="save" value="" src='<?php echo MIBEW_WEB_ROOT . getlocal("image.button.save") ?>' alt='<?php echo getlocal("button.save") ?>'/>
</div> </div>
<?php } ?> <?php } ?>
</div><div class="formbottom"><div class="formbottomi"></div></div></div> </div><div class="formbottom"><div class="formbottomi"></div></div></div>

View File

@ -18,14 +18,14 @@
require_once(dirname(__FILE__).'/inc_menu.php'); require_once(dirname(__FILE__).'/inc_menu.php');
require_once(dirname(__FILE__).'/inc_tabbar.php'); require_once(dirname(__FILE__).'/inc_tabbar.php');
function tpl_content() { global $page, $mibewroot; function tpl_content() { global $page;
?> ?>
<?php echo getlocal("page.preview.intro") ?> <?php echo getlocal("page.preview.intro") ?>
<br /> <br />
<br /> <br />
<form name="preview" method="get" action="<?php echo $mibewroot ?>/operator/page_themes.php"> <form name="preview" method="get" action="<?php echo MIBEW_WEB_ROOT ?>/operator/page_themes.php">
<div> <div>
<?php print_tabbar(); ?> <?php print_tabbar(); ?>
<div class="mform"><div class="formtop"><div class="formtopi"></div></div><div class="forminner"> <div class="mform"><div class="formtop"><div class="formtopi"></div></div><div class="forminner">

View File

@ -17,7 +17,7 @@
require_once(dirname(__FILE__).'/inc_menu.php'); require_once(dirname(__FILE__).'/inc_menu.php');
function tpl_header() { global $page, $mibewroot; function tpl_header() { global $page;
?> ?>
<!-- Plugins CSS files --> <!-- Plugins CSS files -->
@ -25,17 +25,17 @@ function tpl_header() { global $page, $mibewroot;
<!-- External libs --> <!-- External libs -->
<script type="text/javascript" src="<?php echo $mibewroot ?>/js/libs/jquery.min.js"></script> <script type="text/javascript" src="<?php echo MIBEW_WEB_ROOT ?>/js/libs/jquery.min.js"></script>
<script type="text/javascript" src="<?php echo $mibewroot ?>/js/libs/json2.js"></script> <script type="text/javascript" src="<?php echo MIBEW_WEB_ROOT ?>/js/libs/json2.js"></script>
<script type="text/javascript" src="<?php echo $mibewroot ?>/js/libs/underscore-min.js"></script> <script type="text/javascript" src="<?php echo MIBEW_WEB_ROOT ?>/js/libs/underscore-min.js"></script>
<script type="text/javascript" src="<?php echo $mibewroot ?>/js/libs/backbone-min.js"></script> <script type="text/javascript" src="<?php echo MIBEW_WEB_ROOT ?>/js/libs/backbone-min.js"></script>
<script type="text/javascript" src="<?php echo $mibewroot ?>/js/libs/backbone.marionette.min.js"></script> <script type="text/javascript" src="<?php echo MIBEW_WEB_ROOT ?>/js/libs/backbone.marionette.min.js"></script>
<script type="text/javascript" src="<?php echo $mibewroot ?>/js/libs/handlebars.js"></script> <script type="text/javascript" src="<?php echo MIBEW_WEB_ROOT ?>/js/libs/handlebars.js"></script>
<!-- Application files --> <!-- Application files -->
<script type="text/javascript" src="<?php echo $mibewroot ?>/js/compiled/mibewapi.js"></script> <script type="text/javascript" src="<?php echo MIBEW_WEB_ROOT ?>/js/compiled/mibewapi.js"></script>
<script type="text/javascript" src="<?php echo $mibewroot ?>/js/compiled/default_app.js"></script> <script type="text/javascript" src="<?php echo MIBEW_WEB_ROOT ?>/js/compiled/default_app.js"></script>
<script type="text/javascript" src="<?php echo $mibewroot ?>/js/compiled/users_app.js"></script> <script type="text/javascript" src="<?php echo MIBEW_WEB_ROOT ?>/js/compiled/users_app.js"></script>
<!-- Plugins JavaScript files --> <!-- Plugins JavaScript files -->
<?php echo $page['additional_js']; ?> <?php echo $page['additional_js']; ?>
@ -92,7 +92,7 @@ function tpl_header() { global $page, $mibewroot;
jQuery(document).ready(function(){ jQuery(document).ready(function(){
Mibew.Application.start({ Mibew.Application.start({
server: { server: {
url: "<?php echo $mibewroot ?>/operator/update.php", url: "<?php echo MIBEW_WEB_ROOT ?>/operator/update.php",
requestsFrequency: <?php echo $page['frequency'] ?> requestsFrequency: <?php echo $page['frequency'] ?>
}, },
@ -108,11 +108,11 @@ function tpl_header() { global $page, $mibewroot;
threadTag: "<?php echo $page['coreStyles.threadTag']; ?>", threadTag: "<?php echo $page['coreStyles.threadTag']; ?>",
visitorTag: "<?php echo $page['coreStyles.visitorTag']; ?>", visitorTag: "<?php echo $page['coreStyles.visitorTag']; ?>",
agentLink: "<?php echo $mibewroot ?>/operator/agent.php", agentLink: "<?php echo MIBEW_WEB_ROOT ?>/operator/agent.php",
geoLink: "<?php echo $page['geoLink']; ?>", geoLink: "<?php echo $page['geoLink']; ?>",
trackedLink: "<?php echo $mibewroot ?>/operator/tracked.php", trackedLink: "<?php echo MIBEW_WEB_ROOT ?>/operator/tracked.php",
banLink: "<?php echo $mibewroot ?>/operator/ban.php", banLink: "<?php echo MIBEW_WEB_ROOT ?>/operator/ban.php",
inviteLink: "<?php echo $mibewroot ?>/operator/invite.php", inviteLink: "<?php echo MIBEW_WEB_ROOT ?>/operator/invite.php",
chatWindowParams: "<?php echo $page['chatStyles.chatWindowParams']; ?>", chatWindowParams: "<?php echo $page['chatStyles.chatWindowParams']; ?>",
geoWindowParams: "<?php echo $page['geoWindowParams'];?>", geoWindowParams: "<?php echo $page['geoWindowParams'];?>",
@ -129,7 +129,7 @@ function tpl_header() { global $page, $mibewroot;
<?php <?php
} }
function tpl_content() { global $page, $mibewroot; function tpl_content() { global $page;
?> ?>
<div> <div>

View File

@ -18,7 +18,7 @@
require_once(dirname(__FILE__).'/inc_menu.php'); require_once(dirname(__FILE__).'/inc_menu.php');
require_once(dirname(__FILE__).'/inc_tabbar.php'); require_once(dirname(__FILE__).'/inc_tabbar.php');
function tpl_content() { global $page, $mibewroot, $errors; function tpl_content() { global $page, $errors;
?> ?>
<?php echo getlocal("page_settings.intro") ?> <?php echo getlocal("page_settings.intro") ?>
@ -31,7 +31,7 @@ require_once(dirname(__FILE__).'/inc_errors.php');
<div id="formmessage"><?php echo getlocal("settings.saved") ?></div> <div id="formmessage"><?php echo getlocal("settings.saved") ?></div>
<?php } ?> <?php } ?>
<form name="performance" method="post" action="<?php echo $mibewroot ?>/operator/performance.php"> <form name="performance" method="post" action="<?php echo MIBEW_WEB_ROOT ?>/operator/performance.php">
<?php print_csrf_token_input() ?> <?php print_csrf_token_input() ?>
<div> <div>
<?php print_tabbar(); ?> <?php print_tabbar(); ?>
@ -131,7 +131,7 @@ require_once(dirname(__FILE__).'/inc_errors.php');
<?php } ?> <?php } ?>
<div class="fbutton"> <div class="fbutton">
<input type="image" name="save" value="" src='<?php echo $mibewroot.getlocal("image.button.save") ?>' alt='<?php echo getlocal("button.save") ?>'/> <input type="image" name="save" value="" src='<?php echo MIBEW_WEB_ROOT . getlocal("image.button.save") ?>' alt='<?php echo getlocal("button.save") ?>'/>
</div> </div>
</div> </div>

View File

@ -18,7 +18,7 @@
require_once(dirname(__FILE__).'/inc_menu.php'); require_once(dirname(__FILE__).'/inc_menu.php');
require_once(dirname(__FILE__).'/inc_tabbar.php'); require_once(dirname(__FILE__).'/inc_tabbar.php');
function tpl_content() { global $page, $mibewroot, $errors; function tpl_content() { global $page, $errors;
?> ?>
<?php echo getlocal("permissions.intro") ?> <?php echo getlocal("permissions.intro") ?>
@ -31,7 +31,7 @@ require_once(dirname(__FILE__).'/inc_errors.php');
<div id="formmessage"><?php echo getlocal("data.saved") ?></div> <div id="formmessage"><?php echo getlocal("data.saved") ?></div>
<?php } ?> <?php } ?>
<form name="permissionsForm" method="post" action="<?php echo $mibewroot ?>/operator/permissions.php"> <form name="permissionsForm" method="post" action="<?php echo MIBEW_WEB_ROOT ?>/operator/permissions.php">
<?php print_csrf_token_input() ?> <?php print_csrf_token_input() ?>
<input type="hidden" name="op" value="<?php echo $page['opid'] ?>"/> <input type="hidden" name="op" value="<?php echo $page['opid'] ?>"/>
<div> <div>
@ -50,7 +50,7 @@ require_once(dirname(__FILE__).'/inc_errors.php');
<?php if($page['canmodify']) { ?> <?php if($page['canmodify']) { ?>
<div class="fbutton"> <div class="fbutton">
<input type="image" name="save" value="" src='<?php echo $mibewroot.getlocal("image.button.save") ?>' alt='<?php echo getlocal("button.save") ?>'/> <input type="image" name="save" value="" src='<?php echo MIBEW_WEB_ROOT . getlocal("image.button.save") ?>' alt='<?php echo getlocal("button.save") ?>'/>
</div> </div>
<?php } ?> <?php } ?>
</div><div class="formbottom"><div class="formbottomi"></div></div></div> </div><div class="formbottom"><div class="formbottomi"></div></div></div>

View File

@ -20,7 +20,7 @@ if(isset($page) && isset($page['localeLinks'])) {
} }
function tpl_content() { function tpl_content() {
global $page, $mibewroot, $errors; global $page, $errors;
if($page['isdone']) { if($page['isdone']) {
?> ?>
@ -41,7 +41,7 @@ function tpl_content() {
} else { } else {
?> ?>
<form name="resetForm" method="post" action="<?php echo $mibewroot ?>/operator/resetpwd.php"> <form name="resetForm" method="post" action="<?php echo MIBEW_WEB_ROOT ?>/operator/resetpwd.php">
<input type="hidden" name="id" value="<?php echo $page['id'] ?>"/> <input type="hidden" name="id" value="<?php echo $page['id'] ?>"/>
<input type="hidden" name="token" value="<?php echo $page['token'] ?>"/> <input type="hidden" name="token" value="<?php echo $page['token'] ?>"/>
@ -79,11 +79,11 @@ require_once(dirname(__FILE__).'/inc_errors.php');
<div class="fbutton"> <div class="fbutton">
<table class="submitbutton"><tr> <table class="submitbutton"><tr>
<td><a href="javascript:document.resetForm.submit();"> <td><a href="javascript:document.resetForm.submit();">
<img src='<?php echo $mibewroot ?>/styles/pages/default/images/submit.gif' width="40" height="35" border="0" alt="" /></a></td> <img src='<?php echo MIBEW_WEB_ROOT ?>/styles/pages/default/images/submit.gif' width="40" height="35" border="0" alt="" /></a></td>
<td class="submit"><a href="javascript:document.resetForm.submit();"> <td class="submit"><a href="javascript:document.resetForm.submit();">
<?php echo getlocal("resetpwd.submit") ?></a></td> <?php echo getlocal("resetpwd.submit") ?></a></td>
<td><a href="javascript:document.resetForm.submit();"> <td><a href="javascript:document.resetForm.submit();">
<img src='<?php echo $mibewroot ?>/styles/pages/default/images/submitrest.gif' width="10" height="35" border="0" alt="" /></a></td> <img src='<?php echo MIBEW_WEB_ROOT ?>/styles/pages/default/images/submitrest.gif' width="10" height="35" border="0" alt="" /></a></td>
</tr></table> </tr></table>
<div class="links"> <div class="links">

View File

@ -20,7 +20,7 @@ if(isset($page) && isset($page['localeLinks'])) {
} }
function tpl_content() { function tpl_content() {
global $page, $mibewroot, $errors; global $page, $errors;
if($page['isdone']) { if($page['isdone']) {
?> ?>
@ -41,7 +41,7 @@ function tpl_content() {
} else { } else {
?> ?>
<form name="restoreForm" method="post" action="<?php echo $mibewroot ?>/operator/restore.php"> <form name="restoreForm" method="post" action="<?php echo MIBEW_WEB_ROOT ?>/operator/restore.php">
<div id="loginpane"> <div id="loginpane">
<div class="header"> <div class="header">
@ -67,11 +67,11 @@ require_once(dirname(__FILE__).'/inc_errors.php');
<div class="fbutton"> <div class="fbutton">
<table class="submitbutton"><tr> <table class="submitbutton"><tr>
<td><a href="javascript:document.restoreForm.submit();"> <td><a href="javascript:document.restoreForm.submit();">
<img src='<?php echo $mibewroot ?>/styles/pages/default/images/submit.gif' width="40" height="35" border="0" alt="" /></a></td> <img src='<?php echo MIBEW_WEB_ROOT ?>/styles/pages/default/images/submit.gif' width="40" height="35" border="0" alt="" /></a></td>
<td class="submit"><a href="javascript:document.restoreForm.submit();"> <td class="submit"><a href="javascript:document.restoreForm.submit();">
<?php echo getlocal("restore.submit") ?></a></td> <?php echo getlocal("restore.submit") ?></a></td>
<td><a href="javascript:document.restoreForm.submit();"> <td><a href="javascript:document.restoreForm.submit();">
<img src='<?php echo $mibewroot ?>/styles/pages/default/images/submitrest.gif' width="10" height="35" border="0" alt="" /></a></td> <img src='<?php echo MIBEW_WEB_ROOT ?>/styles/pages/default/images/submitrest.gif' width="10" height="35" border="0" alt="" /></a></td>
</tr></table> </tr></table>
<div class="links"> <div class="links">

View File

@ -18,7 +18,7 @@
require_once(dirname(__FILE__).'/inc_menu.php'); require_once(dirname(__FILE__).'/inc_menu.php');
require_once(dirname(__FILE__).'/inc_tabbar.php'); require_once(dirname(__FILE__).'/inc_tabbar.php');
function tpl_content() { global $page, $mibewroot, $errors; function tpl_content() { global $page, $errors;
?> ?>
<?php echo getlocal("page_settings.intro") ?> <?php echo getlocal("page_settings.intro") ?>
@ -31,7 +31,7 @@ require_once(dirname(__FILE__).'/inc_errors.php');
<div id="formmessage"><?php echo getlocal("settings.saved") ?></div> <div id="formmessage"><?php echo getlocal("settings.saved") ?></div>
<?php } ?> <?php } ?>
<form name="settings" method="post" action="<?php echo $mibewroot ?>/operator/settings.php"> <form name="settings" method="post" action="<?php echo MIBEW_WEB_ROOT ?>/operator/settings.php">
<?php print_csrf_token_input() ?> <?php print_csrf_token_input() ?>
<div> <div>
<?php print_tabbar(); ?> <?php print_tabbar(); ?>
@ -155,7 +155,7 @@ require_once(dirname(__FILE__).'/inc_errors.php');
</div> </div>
<div class="fbutton"> <div class="fbutton">
<input type="image" name="save" value="" src='<?php echo $mibewroot.getlocal("image.button.save") ?>' alt='<?php echo getlocal("button.save") ?>'/> <input type="image" name="save" value="" src='<?php echo MIBEW_WEB_ROOT . getlocal("image.button.save") ?>' alt='<?php echo getlocal("button.save") ?>'/>
</div> </div>
</div> </div>

View File

@ -18,7 +18,7 @@
require_once(dirname(__FILE__).'/inc_tabbar.php'); require_once(dirname(__FILE__).'/inc_tabbar.php');
require_once(dirname(__FILE__).'/inc_menu.php'); require_once(dirname(__FILE__).'/inc_menu.php');
function tpl_content() { global $page, $mibewroot, $errors; function tpl_content() { global $page, $errors;
?> ?>
<?php echo getlocal2("statistics.description.full", array(date_to_text($page['last_cron_run']), $page['cron_path'])) ?> <?php echo getlocal2("statistics.description.full", array(date_to_text($page['last_cron_run']), $page['cron_path'])) ?>
@ -28,7 +28,7 @@ function tpl_content() { global $page, $mibewroot, $errors;
require_once(dirname(__FILE__).'/inc_errors.php'); require_once(dirname(__FILE__).'/inc_errors.php');
?> ?>
<form name="statisticsForm" method="get" action="<?php echo $mibewroot ?>/operator/statistics.php"> <form name="statisticsForm" method="get" action="<?php echo MIBEW_WEB_ROOT ?>/operator/statistics.php">
<input type="hidden" name="type" value="<?php echo $page['type'] ?>" /> <input type="hidden" name="type" value="<?php echo $page['type'] ?>" />
<?php print_tabbar(); ?> <?php print_tabbar(); ?>
@ -52,7 +52,7 @@ require_once(dirname(__FILE__).'/inc_errors.php');
<select name="endmonth"><?php foreach($page['availableMonth'] as $k => $v) { echo "<option value=\"".$k."\"".($k == form_value("endmonth") ? " selected=\"selected\"" : "").">".$v."</option>"; } ?></select> <select name="endmonth"><?php foreach($page['availableMonth'] as $k => $v) { echo "<option value=\"".$k."\"".($k == form_value("endmonth") ? " selected=\"selected\"" : "").">".$v."</option>"; } ?></select>
</div> </div>
<div id="searchbutton"> <div id="searchbutton">
<input type="image" name="search" src='<?php echo $mibewroot.getlocal("image.button.search") ?>' alt='<?php echo getlocal("button.search") ?>'/> <input type="image" name="search" src='<?php echo MIBEW_WEB_ROOT . getlocal("image.button.search") ?>' alt='<?php echo getlocal("button.search") ?>'/>
</div> </div>
</div> </div>
<br clear="all"/> <br clear="all"/>
@ -182,7 +182,7 @@ require_once(dirname(__FILE__).'/inc_errors.php');
<?php if( $page['reportByAgent'] ) { ?> <?php if( $page['reportByAgent'] ) { ?>
<?php foreach( $page['reportByAgent'] as $row ) { ?> <?php foreach( $page['reportByAgent'] as $row ) { ?>
<tr> <tr>
<td><a href="<?php echo $mibewroot ?>/operator/history.php?q=<?php echo topage(htmlspecialchars($row['name'])) ?>&type=operator"><?php echo topage(htmlspecialchars($row['name'])) ?></a></td> <td><a href="<?php echo MIBEW_WEB_ROOT ?>/operator/history.php?q=<?php echo topage(htmlspecialchars($row['name'])) ?>&type=operator"><?php echo topage(htmlspecialchars($row['name'])) ?></a></td>
<td><?php echo $row['threads'] ?></td> <td><?php echo $row['threads'] ?></td>
<td><?php echo $row['msgs'] ?></td> <td><?php echo $row['msgs'] ?></td>
<td><?php echo $row['avglen'] ?></td> <td><?php echo $row['avglen'] ?></td>

View File

@ -18,14 +18,14 @@
require_once(dirname(__FILE__).'/inc_menu.php'); require_once(dirname(__FILE__).'/inc_menu.php');
require_once(dirname(__FILE__).'/inc_tabbar.php'); require_once(dirname(__FILE__).'/inc_tabbar.php');
function tpl_content() { global $page, $mibewroot; function tpl_content() { global $page;
?> ?>
<?php echo getlocal("page.preview.intro") ?> <?php echo getlocal("page.preview.intro") ?>
<br /> <br />
<br /> <br />
<form name="preview" method="get" action="<?php echo $mibewroot ?>/operator/themes.php"> <form name="preview" method="get" action="<?php echo MIBEW_WEB_ROOT ?>/operator/themes.php">
<div> <div>
<?php print_tabbar(); ?> <?php print_tabbar(); ?>
<div class="mform"><div class="formtop"><div class="formtopi"></div></div><div class="forminner"> <div class="mform"><div class="formtop"><div class="formtopi"></div></div><div class="forminner">

View File

@ -15,20 +15,20 @@
* limitations under the License. * limitations under the License.
*/ */
function tpl_header() { global $page, $mibewroot; ?> function tpl_header() { global $page; ?>
<!-- External libs --> <!-- External libs -->
<script type="text/javascript" src="<?php echo $mibewroot ?>/js/libs/jquery.min.js"></script> <script type="text/javascript" src="<?php echo MIBEW_WEB_ROOT ?>/js/libs/jquery.min.js"></script>
<script type="text/javascript" src="<?php echo $mibewroot ?>/js/libs/json2.js"></script> <script type="text/javascript" src="<?php echo MIBEW_WEB_ROOT ?>/js/libs/json2.js"></script>
<script type="text/javascript" src="<?php echo $mibewroot ?>/js/libs/underscore-min.js"></script> <script type="text/javascript" src="<?php echo MIBEW_WEB_ROOT ?>/js/libs/underscore-min.js"></script>
<script type="text/javascript" src="<?php echo $mibewroot ?>/js/libs/backbone-min.js"></script> <script type="text/javascript" src="<?php echo MIBEW_WEB_ROOT ?>/js/libs/backbone-min.js"></script>
<script type="text/javascript" src="<?php echo $mibewroot ?>/js/libs/backbone.marionette.min.js"></script> <script type="text/javascript" src="<?php echo MIBEW_WEB_ROOT ?>/js/libs/backbone.marionette.min.js"></script>
<script type="text/javascript" src="<?php echo $mibewroot ?>/js/libs/handlebars.js"></script> <script type="text/javascript" src="<?php echo MIBEW_WEB_ROOT ?>/js/libs/handlebars.js"></script>
<!-- Application files --> <!-- Application files -->
<script type="text/javascript" src="<?php echo $mibewroot ?>/js/compiled/mibewapi.js"></script> <script type="text/javascript" src="<?php echo MIBEW_WEB_ROOT ?>/js/compiled/mibewapi.js"></script>
<script type="text/javascript" src="<?php echo $mibewroot ?>/js/compiled/default_app.js"></script> <script type="text/javascript" src="<?php echo MIBEW_WEB_ROOT ?>/js/compiled/default_app.js"></script>
<script type="text/javascript" src="<?php echo $mibewroot ?>/js/compiled/thread_log_app.js"></script> <script type="text/javascript" src="<?php echo MIBEW_WEB_ROOT ?>/js/compiled/thread_log_app.js"></script>
<!-- Start application --> <!-- Start application -->
<script type="text/javascript"><!-- <script type="text/javascript"><!--
@ -40,7 +40,7 @@ function tpl_header() { global $page, $mibewroot; ?>
//--></script> //--></script>
<?php } <?php }
function tpl_content() { global $page, $mibewroot, $errors; function tpl_content() { global $page, $errors;
$chatthreadinfo = $page['thread_info']; $chatthreadinfo = $page['thread_info'];
$chatthread = $page['thread_info']['thread']; $chatthread = $page['thread_info']['thread'];
?> ?>
@ -110,7 +110,7 @@ $chatthread = $page['thread_info']['thread'];
</div> </div>
<br /> <br />
<a href="<?php echo $mibewroot ?>/operator/history.php"> <a href="<?php echo MIBEW_WEB_ROOT ?>/operator/history.php">
<?php echo getlocal("thread.back_to_search") ?></a> <?php echo getlocal("thread.back_to_search") ?></a>
<br /> <br />

View File

@ -17,14 +17,14 @@
require_once(dirname(__FILE__).'/inc_menu.php'); require_once(dirname(__FILE__).'/inc_menu.php');
function tpl_content() { global $page, $mibewroot; function tpl_content() { global $page;
?> ?>
<?php echo getlocal("page_search.intro") ?> <?php echo getlocal("page_search.intro") ?>
<br /> <br />
<br /> <br />
<form name="searchForm" method="get" action="<?php echo $mibewroot ?>/operator/history.php"> <form name="searchForm" method="get" action="<?php echo MIBEW_WEB_ROOT ?>/operator/history.php">
<div class="mform"><div class="formtop"><div class="formtopi"></div></div><div class="forminner"> <div class="mform"><div class="formtop"><div class="formtopi"></div></div><div class="forminner">
<div class="fieldForm"> <div class="fieldForm">
@ -44,7 +44,7 @@ function tpl_content() { global $page, $mibewroot;
</select> </select>
</div> </div>
<div id="searchbutton"> <div id="searchbutton">
<input type="image" name="search" src='<?php echo $mibewroot.getlocal("image.button.search") ?>' alt='<?php echo getlocal("button.search") ?>'/> <input type="image" name="search" src='<?php echo MIBEW_WEB_ROOT . getlocal("image.button.search") ?>' alt='<?php echo getlocal("button.search") ?>'/>
</div><br clear="all"/> </div><br clear="all"/>
<div class="searchctrl" id="inSystemMessages"<?php echo ((form_value('type') != 'all' && form_value('type') != 'message')?' style="display: none;"':'')?>> <div class="searchctrl" id="inSystemMessages"<?php echo ((form_value('type') != 'all' && form_value('type') != 'message')?' style="display: none;"':'')?>>
<input id="insystemmessagesfield" type="checkbox" name="insystemmessages" <?php echo (form_value('insystemmessages')?'checked="checked"':'') ?>/> <label for="insystemmessagesfield"><?php echo getlocal("page_search.search.type.in_system_messages") ?></label> <input id="insystemmessagesfield" type="checkbox" name="insystemmessages" <?php echo (form_value('insystemmessages')?'checked="checked"':'') ?>/> <label for="insystemmessagesfield"><?php echo getlocal("page_search.search.type.in_system_messages") ?></label>
@ -82,7 +82,7 @@ if( $page['pagination.items'] ) {
foreach( $page['pagination.items'] as $chatthread ) { ?> foreach( $page['pagination.items'] as $chatthread ) { ?>
<tr> <tr>
<td> <td>
<a href="<?php echo $mibewroot ?>/operator/threadprocessor.php?threadid=<?php echo $chatthread->id ?>" target="_blank" onclick="this.newWindow = window.open('<?php echo $mibewroot ?>/operator/threadprocessor.php?threadid=<?php echo $chatthread->id ?>', '', 'toolbar=0,scrollbars=1,location=0,status=1,menubar=0,width=720,height=520,resizable=1');this.newWindow.focus();this.newWindow.opener=window;return false;"><?php echo topage(htmlspecialchars($chatthread->userName)) ?></a> <a href="<?php echo MIBEW_WEB_ROOT ?>/operator/threadprocessor.php?threadid=<?php echo $chatthread->id ?>" target="_blank" onclick="this.newWindow = window.open('<?php echo MIBEW_WEB_ROOT ?>/operator/threadprocessor.php?threadid=<?php echo $chatthread->id ?>', '', 'toolbar=0,scrollbars=1,location=0,status=1,menubar=0,width=720,height=520,resizable=1');this.newWindow.focus();this.newWindow.opener=window;return false;"><?php echo topage(htmlspecialchars($chatthread->userName)) ?></a>
</td> </td>
<td> <td>
<?php echo get_user_addr(topage($chatthread->remote)) ?> <?php echo get_user_addr(topage($chatthread->remote)) ?>

View File

@ -15,7 +15,7 @@
* limitations under the License. * limitations under the License.
*/ */
function tpl_content() { global $page, $mibewroot, $errors; function tpl_content() { global $page, $errors;
?> ?>
<?php if( $page['saved'] ) { ?> <?php if( $page['saved'] ) { ?>
@ -37,7 +37,7 @@ function tpl_content() { global $page, $mibewroot, $errors;
require_once(dirname(__FILE__).'/inc_errors.php'); require_once(dirname(__FILE__).'/inc_errors.php');
?> ?>
<form name="translateForm" method="post" action="<?php echo $mibewroot ?>/operator/translate.php"> <form name="translateForm" method="post" action="<?php echo MIBEW_WEB_ROOT ?>/operator/translate.php">
<?php print_csrf_token_input() ?> <?php print_csrf_token_input() ?>
<input type="hidden" name="key" value="<?php echo $page['key'] ?>"/> <input type="hidden" name="key" value="<?php echo $page['key'] ?>"/>
<input type="hidden" name="target" value="<?php echo $page['target'] ?>"/> <input type="hidden" name="target" value="<?php echo $page['target'] ?>"/>
@ -59,7 +59,7 @@ require_once(dirname(__FILE__).'/inc_errors.php');
</div> </div>
<div class="fbutton"> <div class="fbutton">
<input type="image" name="save" value="" src='<?php echo $mibewroot.getlocal("image.button.save") ?>' alt='<?php echo getlocal("button.save") ?>'/> <input type="image" name="save" value="" src='<?php echo MIBEW_WEB_ROOT . getlocal("image.button.save") ?>' alt='<?php echo getlocal("button.save") ?>'/>
</div> </div>
</div> </div>

View File

@ -17,14 +17,14 @@
require_once(dirname(__FILE__).'/inc_menu.php'); require_once(dirname(__FILE__).'/inc_menu.php');
function tpl_content() { global $page, $mibewroot; function tpl_content() { global $page;
?> ?>
<?php echo getlocal("page.translate.descr") ?> <?php echo getlocal("page.translate.descr") ?>
<br /> <br />
<br /> <br />
<form name="translateForm" method="get" action="<?php echo $mibewroot ?>/operator/translate.php"> <form name="translateForm" method="get" action="<?php echo MIBEW_WEB_ROOT ?>/operator/translate.php">
<div class="mform"><div class="formtop"><div class="formtopi"></div></div><div class="forminner"> <div class="mform"><div class="formtop"><div class="formtopi"></div></div><div class="forminner">
@ -87,7 +87,7 @@ if( $page['pagination.items'] ) {
foreach( $page['pagination.items'] as $localstr ) { ?> foreach( $page['pagination.items'] as $localstr ) { ?>
<tr> <tr>
<td> <td>
<a href="<?php echo $mibewroot ?>/operator/translate.php?source=<?php echo $page['lang1'] ?>&amp;target=<?php echo $page['lang2'] ?>&amp;key=<?php echo $localstr['id'] ?>" target="_blank" onclick="this.newWindow = window.open('<?php echo $mibewroot ?>/operator/translate.php?source=<?php echo $page['lang1'] ?>&amp;target=<?php echo $page['lang2'] ?>&amp;key=<?php echo $localstr['id'] ?>', '', 'toolbar=0,scrollbars=1,location=0,status=1,menubar=0,width=640,height=480,resizable=1');this.newWindow.focus();this.newWindow.opener=window;return false;"><?php echo topage($localstr['id']) ?></a> <a href="<?php echo MIBEW_WEB_ROOT ?>/operator/translate.php?source=<?php echo $page['lang1'] ?>&amp;target=<?php echo $page['lang2'] ?>&amp;key=<?php echo $localstr['id'] ?>" target="_blank" onclick="this.newWindow = window.open('<?php echo MIBEW_WEB_ROOT ?>/operator/translate.php?source=<?php echo $page['lang1'] ?>&amp;target=<?php echo $page['lang2'] ?>&amp;key=<?php echo $localstr['id'] ?>', '', 'toolbar=0,scrollbars=1,location=0,status=1,menubar=0,width=640,height=480,resizable=1');this.newWindow.focus();this.newWindow.opener=window;return false;"><?php echo topage($localstr['id']) ?></a>
</td> </td>
<td> <td>
<?php echo topage($localstr['l1']) ?> <?php echo topage($localstr['l1']) ?>

View File

@ -17,15 +17,15 @@
require_once(dirname(__FILE__).'/inc_menu.php'); require_once(dirname(__FILE__).'/inc_menu.php');
function tpl_header() { global $page, $mibewroot; function tpl_header() { global $page;
?> ?>
<script type="text/javascript" language="javascript" src="<?php echo $mibewroot ?>/js/libs/jquery.min.js"></script> <script type="text/javascript" language="javascript" src="<?php echo MIBEW_WEB_ROOT ?>/js/libs/jquery.min.js"></script>
<script type="text/javascript" language="javascript" src="http://mibew.org/latestMibew.js"></script> <script type="text/javascript" language="javascript" src="http://mibew.org/latestMibew.js"></script>
<script type="text/javascript" language="javascript" src="<?php echo $mibewroot ?>/js/compiled/update.js"></script> <script type="text/javascript" language="javascript" src="<?php echo MIBEW_WEB_ROOT ?>/js/compiled/update.js"></script>
<?php <?php
} }
function tpl_content() { global $page, $mibewroot; function tpl_content() { global $page;
?> ?>
<?php echo getlocal("updates.intro") ?> <?php echo getlocal("updates.intro") ?>

View File

@ -15,7 +15,7 @@
* limitations under the License. * limitations under the License.
*/ */
function tpl_content() { global $page, $mibewroot; function tpl_content() { global $page;
?> ?>
<?php echo getlocal("page.analysis.userhistory.intro") ?> <?php echo getlocal("page.analysis.userhistory.intro") ?>
@ -43,7 +43,7 @@ if( $page['pagination.items'] ) {
foreach( $page['pagination.items'] as $chatthread ) { ?> foreach( $page['pagination.items'] as $chatthread ) { ?>
<tr> <tr>
<td> <td>
<a href="<?php echo $mibewroot ?>/operator/threadprocessor.php?threadid=<?php echo $chatthread->id ?>" target="_blank" onclick="this.newWindow = window.open('<?php echo $mibewroot ?>/operator/threadprocessor.php?threadid=<?php echo $chatthread->id ?>', '', 'toolbar=0,scrollbars=1,location=0,status=1,menubar=0,width=720,height=520,resizable=1');this.newWindow.focus();this.newWindow.opener=window;return false;"><?php echo topage(htmlspecialchars($chatthread->userName)) ?></a> <a href="<?php echo MIBEW_WEB_ROOT ?>/operator/threadprocessor.php?threadid=<?php echo $chatthread->id ?>" target="_blank" onclick="this.newWindow = window.open('<?php echo MIBEW_WEB_ROOT ?>/operator/threadprocessor.php?threadid=<?php echo $chatthread->id ?>', '', 'toolbar=0,scrollbars=1,location=0,status=1,menubar=0,width=720,height=520,resizable=1');this.newWindow.focus();this.newWindow.opener=window;return false;"><?php echo topage(htmlspecialchars($chatthread->userName)) ?></a>
</td> </td>
<td> <td>
<?php echo get_user_addr(topage($chatthread->remote)) ?> <?php echo get_user_addr(topage($chatthread->remote)) ?>