Merge with develop

--HG--
branch : yubo
hg/yubo
Nimetu 5 years ago
commit 7148d476ad

@ -125,6 +125,8 @@ namespace NLGUI
// add image download (used by view_bitmap.cpp to load web images) // add image download (used by view_bitmap.cpp to load web images)
void addImageDownload(const std::string &url, CViewBase *img, const CStyleParams &style = CStyleParams(), const TImageType type = NormalImage); void addImageDownload(const std::string &url, CViewBase *img, const CStyleParams &style = CStyleParams(), const TImageType type = NormalImage);
// remove image from download list if present
void removeImageDownload(CViewBase *img);
std::string localImageName(const std::string &url); std::string localImageName(const std::string &url);
// Timeout // Timeout

@ -56,8 +56,14 @@ namespace NLGUI
_TxtOffsetY = 0; _TxtOffsetY = 0;
_TxtWidth = -1; _TxtWidth = -1;
_TxtHeight = -1; _TxtHeight = -1;
// Support for https://.. textures
_HtmlDownload = false;
} }
/// Destructor
virtual ~CViewBitmap();
std::string getProperty( const std::string &name ) const; std::string getProperty( const std::string &name ) const;
void setProperty( const std::string &name, const std::string &value ); void setProperty( const std::string &name, const std::string &value );
xmlNodePtr serialize( xmlNodePtr parentNode, const char *type ) const; xmlNodePtr serialize( xmlNodePtr parentNode, const char *type ) const;
@ -132,6 +138,7 @@ namespace NLGUI
bool _Flip : 1; bool _Flip : 1;
bool _Tile : 1; bool _Tile : 1;
bool _InheritGCAlpha : 1; bool _InheritGCAlpha : 1;
bool _HtmlDownload : 1;
// For single texture // For single texture

@ -711,7 +711,6 @@ namespace NLGUI
return; return;
} }
// TODO: if no image in cache, nothing is visible
finalUrl = upgradeInsecureUrl(getAbsoluteUrl(url)); finalUrl = upgradeInsecureUrl(getAbsoluteUrl(url));
// use requested url for local name (cache) // use requested url for local name (cache)
@ -719,9 +718,15 @@ namespace NLGUI
LOG_DL("add to download '%s' dest '%s' img %p", finalUrl.c_str(), dest.c_str(), img); LOG_DL("add to download '%s' dest '%s' img %p", finalUrl.c_str(), dest.c_str(), img);
// Display cached image while downloading new // Display cached image while downloading new
if (type != OverImage && CFile::fileExists(dest)) if (type != OverImage)
{ {
setImage(img, dest, type); std::string temp = dest;
if (!CFile::fileExists(temp))
{
// TODO: placeholder
temp = "web_del.tga";
}
setImage(img, temp, type);
setImageSize(img, style); setImageSize(img, style);
} }
@ -740,6 +745,24 @@ namespace NLGUI
pumpCurlQueue(); pumpCurlQueue();
} }
void CGroupHTML::removeImageDownload(CViewBase *img)
{
for(std::list<CDataDownload>::iterator it = Curls.begin(); it != Curls.end(); ++it)
{
// check all active downloads because image does not keep url around
std::vector<CDataImageDownload>::iterator imgIter = it->imgs.begin();
while(imgIter != it->imgs.end())
{
if (imgIter->Image == img)
{
it->imgs.erase(imgIter);
break;
}
++imgIter;
}
}
}
void CGroupHTML::initImageDownload() void CGroupHTML::initImageDownload()
{ {
LOG_DL("Init Image Download"); LOG_DL("Init Image Download");

@ -37,6 +37,18 @@ REGISTER_UI_CLASS(CViewBitmap)
namespace NLGUI namespace NLGUI
{ {
CViewBitmap::~CViewBitmap()
{
if (_HtmlDownload)
{
CGroupHTML *groupHtml = dynamic_cast<CGroupHTML*>(CWidgetManager::getInstance()->getElementFromId("ui:interface:webig:content:html"));
if (groupHtml) {
_HtmlDownload = false;
groupHtml->removeImageDownload(dynamic_cast<CViewBase*>(this));
}
}
}
std::string CViewBitmap::getProperty( const std::string &name ) const std::string CViewBitmap::getProperty( const std::string &name ) const
{ {
if( name == "color" ) if( name == "color" )
@ -461,6 +473,7 @@ namespace NLGUI
if (!CFile::fileExists(localname)) if (!CFile::fileExists(localname))
localname = "web_del.tga"; localname = "web_del.tga";
_TextureId.setTexture (localname.c_str(), _TxtOffsetX, _TxtOffsetY, _TxtWidth, _TxtHeight, false); _TextureId.setTexture (localname.c_str(), _TxtOffsetX, _TxtOffsetY, _TxtWidth, _TxtHeight, false);
_HtmlDownload = true;
groupHtml->addImageDownload(TxName, dynamic_cast<CViewBase*>(this)); groupHtml->addImageDownload(TxName, dynamic_cast<CViewBase*>(this));
} }
} }

@ -53,6 +53,7 @@
#include "action_handler_tools.h" #include "action_handler_tools.h"
#include "../connection.h" #include "../connection.h"
#include "../client_chat_manager.h" #include "../client_chat_manager.h"
#include "group_compas.h"
// Game specific includes // Game specific includes
#include "../motion/user_controls.h" #include "../motion/user_controls.h"
@ -2475,6 +2476,17 @@ class CAHTarget : public IActionHandler
if (entity && entity->properties().selectable() && !entity->getDisplayName().empty()) if (entity && entity->properties().selectable() && !entity->getDisplayName().empty())
{ {
UserEntity->selection(entity->slot()); UserEntity->selection(entity->slot());
CGroupCompas *gc = dynamic_cast<CGroupCompas *>(CWidgetManager::getInstance()->getElementFromId("ui:interface:compass"));
if (gc)
{
CCompassTarget ct;
ct.setType(CCompassTarget::Selection);
gc->setActive(true);
gc->setTarget(ct);
gc->blink();
CWidgetManager::getInstance()->setTopWindow(gc);
}
} }
else if (!quiet) else if (!quiet)
{ {
@ -2484,6 +2496,33 @@ class CAHTarget : public IActionHandler
}; };
REGISTER_ACTION_HANDLER (CAHTarget, "target"); REGISTER_ACTION_HANDLER (CAHTarget, "target");
// ***************************************************************************
class CAHTargetLandmark : public IActionHandler
{
virtual void execute (CCtrlBase * /* pCaller */, const string &Params)
{
string search = getParam(Params, "search");
if (search.empty()) return;
bool startsWith = false;
if (search.size() > 0 && (search[0] == '\'' || search[0] == '"') && search[0] == search[search.size()-1])
{
startsWith = true;
search = trimQuotes(search);
}
const std::string mapid = "ui:interface:map:content:map_content:actual_map";
CGroupMap* cgMap = dynamic_cast<CGroupMap*>(CWidgetManager::getInstance()->getElementFromId(mapid));
if (cgMap)
{
if (!cgMap->targetLandmarkByName(search, startsWith))
{
CInterfaceManager::getInstance()->displaySystemInfo(CI18N::get("uiTargetErrorCmd"));
}
}
}
};
REGISTER_ACTION_HANDLER (CAHTargetLandmark, "target_landmark");
class CAHAddShape : public IActionHandler class CAHAddShape : public IActionHandler

@ -101,6 +101,12 @@ const uint32 ISLAND_PIXEL_PER_METER = 2;
static void setupFromZoom(CViewBase *pVB, CContLandMark::TContLMType t, float fMeterPerPixel); static void setupFromZoom(CViewBase *pVB, CContLandMark::TContLMType t, float fMeterPerPixel);
// calculate distance (squared) between two points
static float distsqr(const CVector2f a, const CVector2f b)
{
return pow(a.x - b.x, 2) + pow(a.y - b.y, 2);
}
// popup the landmark name dialog // popup the landmark name dialog
static void popupLandMarkNameDialog() static void popupLandMarkNameDialog()
@ -2760,21 +2766,38 @@ void CGroupMap::updateLandMarkButton(CLandMarkButton *lmb, const CLandMarkOption
} }
//============================================================================================================ //============================================================================================================
bool CGroupMap::filterLandmark(const ucstring &title) const bool CGroupMap::filterLandmark(const ucstring &title, const std::vector<ucstring> filter, bool startsWith) const
{ {
if (_LandmarkFilter.size() > 0) if (filter.size() > 0)
{ {
ucstring lcTitle = toLower(title); ucstring lcTitle = toLower(title);
for(uint i = 0; i< _LandmarkFilter.size(); ++i) { if (startsWith)
if (lcTitle.find(_LandmarkFilter[i]) == ucstring::npos) { {
if (lcTitle.find(filter[0]) != 0)
{
return false; return false;
} }
} }
else
{
for(uint i = 0; i< filter.size(); ++i)
{
if (lcTitle.find(filter[i]) == ucstring::npos)
{
return false;
}
}
}
} }
return true; return true;
} }
//============================================================================================================
bool CGroupMap::filterLandmark(const ucstring &title) const
{
return filterLandmark(title, _LandmarkFilter);
}
//============================================================================================================ //============================================================================================================
void CGroupMap::addLandMark(TLandMarkButtonVect &destList, const NLMISC::CVector2f &pos, const ucstring &title, const CLandMarkOptions &options) void CGroupMap::addLandMark(TLandMarkButtonVect &destList, const NLMISC::CVector2f &pos, const ucstring &title, const CLandMarkOptions &options)
{ {
@ -3319,6 +3342,129 @@ void CGroupMap::targetLandmarkResult(uint32 index)
} }
} }
//=========================================================================================================
CGroupMap::CLandMarkButton* CGroupMap::findClosestLandmark(const CVector2f &center, const ucstring &search, bool startsWith, const TLandMarkButtonVect &landmarks, float &closest) const
{
CLandMarkButton *ret = NULL;
std::vector<ucstring> keywords;
if (startsWith)
keywords.push_back(search);
else
splitUCString(toLower(search), ucstring(" "), keywords);
closest = std::numeric_limits<float>::max();
for(TLandMarkButtonVect::const_iterator it = landmarks.begin(); it != landmarks.end(); ++it)
{
ucstring lc;
(*it)->getContextHelp(lc);
if(filterLandmark(lc, keywords, startsWith)) {
CVector2f pos;
mapToWorld(pos, (*it)->Pos);
float dist = distsqr(center, pos);
if (dist < closest)
{
ret = (*it);
closest = dist;
}
}
}
return ret;
}
//=========================================================================================================
CGroupMap::CLandMarkText* CGroupMap::findClosestLandmark(const CVector2f &center, const ucstring &search, bool startsWith, const TLandMarkTextVect &landmarks, float &closest) const
{
CLandMarkText *ret = NULL;
std::vector<ucstring> keywords;
if (startsWith)
keywords.push_back(search);
else
splitUCString(toLower(search), ucstring(" "), keywords);
closest = std::numeric_limits<float>::max();
for(TLandMarkTextVect::const_iterator it = landmarks.begin(); it != landmarks.end(); ++it)
{
ucstring lc;
lc = (*it)->getText();
if(filterLandmark(lc, keywords, startsWith)) {
CVector2f pos;
mapToWorld(pos, (*it)->Pos);
float dist = distsqr(center, pos);
if (dist < closest)
{
ret = (*it);
closest = dist;
}
}
}
return ret;
}
bool CGroupMap::targetLandmarkByName(const ucstring &search, bool startsWith) const
{
CCompassTarget ct;
CLandMarkButton* lm;
float dist;
float closest = std::numeric_limits<float>::max();
bool found = false;
CVector2f center;
mapToWorld(center, _PlayerPos);
lm = findClosestLandmark(center, search, startsWith, _UserLM, dist);
if (lm && dist < closest)
{
ct.setType(CCompassTarget::UserLandMark);
mapToWorld(ct.Pos, lm->Pos);
lm->getContextHelp(ct.Name);
closest = dist;
found = true;
}
// only check other types if user landmark was not found
if (!found)
{
lm = findClosestLandmark(center, search, startsWith, _ContinentLM, dist);
if (lm && dist < closest)
{
ct.setType(CCompassTarget::ContinentLandMark);
mapToWorld(ct.Pos, lm->Pos);
lm->getContextHelp(ct.Name);
closest = dist;
found = true;
}
CLandMarkText* lmt;
lmt = findClosestLandmark(center, search, startsWith, _ContinentText, dist);
if (lmt && dist < closest)
{
ct.setType(CCompassTarget::ContinentLandMark);
mapToWorld(ct.Pos, lmt->Pos);
ct.Name = lmt->getText();
closest = dist;
found = true;
}
}
if (found)
{
CInterfaceManager *im = CInterfaceManager::getInstance();
CGroupCompas *gc = dynamic_cast<CGroupCompas *>(CWidgetManager::getInstance()->getElementFromId(_CompassId));
if (gc)
{
gc->setActive(true);
gc->setTarget(ct);
gc->blink();
CWidgetManager::getInstance()->setTopWindow(gc);
}
}
return found;
}
//========================================================================================================= //=========================================================================================================
void CGroupMap::getLandmarkPosition(const CCtrlButton *lm, NLMISC::CVector2f &worldPos) void CGroupMap::getLandmarkPosition(const CCtrlButton *lm, NLMISC::CVector2f &worldPos)
{ {

@ -214,6 +214,8 @@ public:
// target the given landmark // target the given landmark
void targetLandmark(CCtrlButton *lm); void targetLandmark(CCtrlButton *lm);
void targetLandmarkResult(uint32 index); void targetLandmarkResult(uint32 index);
// search matching landmark and target it. return true if landmark was targeted
bool targetLandmarkByName(const ucstring &search, bool startsWith) const;
// get the world position of a landmark or return vector Null if not found // get the world position of a landmark or return vector Null if not found
void getLandmarkPosition(const CCtrlButton *lm, NLMISC::CVector2f &worldPos); void getLandmarkPosition(const CCtrlButton *lm, NLMISC::CVector2f &worldPos);
@ -592,6 +594,12 @@ private:
// Test title against landmark filter // Test title against landmark filter
bool filterLandmark(const ucstring &title) const; bool filterLandmark(const ucstring &title) const;
bool filterLandmark(const ucstring &title, const std::vector<ucstring> filter, bool startsWith = false) const;
// return closest landmark which matches (case insensitive) search string
// center position must be in world coordindates
CLandMarkButton* findClosestLandmark(const NLMISC::CVector2f &center, const ucstring &search, bool startsWith, const TLandMarkButtonVect &landmarks, float &closest) const;
CLandMarkText* findClosestLandmark(const NLMISC::CVector2f &center, const ucstring &search, bool startsWith, const TLandMarkTextVect &landmarks, float &closest) const;
// update the scale depending on the window size and the user scale // update the scale depending on the window size and the user scale
void updateScale(); void updateScale();

@ -29,7 +29,6 @@ class Helpers {
// define('SMARTY_SPL_AUTOLOAD',1); // define('SMARTY_SPL_AUTOLOAD',1);
require_once $AMS_LIB . '/smarty/libs/Smarty.class.php'; require_once $AMS_LIB . '/smarty/libs/Smarty.class.php';
spl_autoload_register( '__autoload' );
$smarty = new Smarty; $smarty = new Smarty;
$smarty -> setCompileDir( $SITEBASE . '/templates_c/' ); $smarty -> setCompileDir( $SITEBASE . '/templates_c/' );

@ -3,7 +3,7 @@
* Base include file for library functions for AMS. * Base include file for library functions for AMS.
* Autoload function that loads the classes in case they aren't loaded yet. * Autoload function that loads the classes in case they aren't loaded yet.
*/ */
function __autoload( $className ){ function __ams_autoload( $className ){
global $AMS_LIB; global $AMS_LIB;
global $SITEBASE; global $SITEBASE;
//if the class exists in the lib's autload dir, load that one //if the class exists in the lib's autload dir, load that one
@ -16,4 +16,6 @@ function __autoload( $className ){
} }
} }
spl_autoload_register( '__ams_autoload' );

@ -72,30 +72,31 @@ abstract class Smarty_Internal_CompileBase
} }
// named attribute // named attribute
} else { } else {
$kv = each($mixed); foreach($mixed as $k => $v) {
// option flag? // option flag?
if (in_array($kv['key'], $this->option_flags)) { if (in_array($k, $this->option_flags)) {
if (is_bool($kv['value'])) { if (is_bool($v)) {
$_indexed_attr[$kv['key']] = $kv['value']; $_indexed_attr[$k] = $v;
} elseif (is_string($kv['value']) && in_array(trim($kv['value'], '\'"'), array('true', 'false'))) { } elseif (is_string($v) && in_array(trim($v, '\'"'), array('true', 'false'))) {
if (trim($kv['value']) == 'true') { if (trim($v) == 'true') {
$_indexed_attr[$kv['key']] = true; $_indexed_attr[$k] = true;
} else { } else {
$_indexed_attr[$kv['key']] = false; $_indexed_attr[$k] = false;
} }
} elseif (is_numeric($kv['value']) && in_array($kv['value'], array(0, 1))) { } elseif (is_numeric($v) && in_array($v, array(0, 1))) {
if ($kv['value'] == 1) { if ($v == 1) {
$_indexed_attr[$kv['key']] = true; $_indexed_attr[$k] = true;
} else { } else {
$_indexed_attr[$kv['key']] = false; $_indexed_attr[$k] = false;
} }
} else { } else {
$compiler->trigger_template_error("illegal value of option flag \"{$kv['key']}\"", $compiler->lex->taglineno); $compiler->trigger_template_error("illegal value of option flag \"{$k}\"", $compiler->lex->taglineno);
} }
// must be named attribute // must be named attribute
} else { } else {
reset($mixed); reset($mixed);
$_indexed_attr[key($mixed)] = $mixed[key($mixed)]; $_indexed_attr[$k] = $v;
}
} }
} }
} }

@ -4,6 +4,13 @@
* THIS FILE SHOULD ONLY INCLUDE SMALL USEFUL FUNCTIONS * THIS FILE SHOULD ONLY INCLUDE SMALL USEFUL FUNCTIONS
*/ */
if (!function_exists('ereg')) {
/** removed from php 7.0.0 */
function ereg($pattern, $line, &$match = array()) {
return preg_match('/'.$pattern.'/', $line, $match);
}
}
/* /*
* pushes some data in the debug variable * pushes some data in the debug variable
*/ */

@ -1,381 +0,0 @@
<?php
/***************************************************************************
* mysql.php
* -------------------
* begin : Saturday, Feb 13, 2001
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
* $Id: functions_mysql.php,v 1.2 2006/07/06 15:17:22 powles Exp $
*
***************************************************************************/
/***************************************************************************
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
***************************************************************************/
if(!defined("SQL_LAYER"))
{
define("SQL_LAYER","mysql");
class sql_db
{
var $db_connect_id;
var $query_result;
var $row = array();
var $rowset = array();
var $num_queries = 0;
//
// Constructor
//
function sql_db($sqlserver, $sqluser, $sqlpassword, $database, $persistency = true)
{
$this->persistency = $persistency;
$this->user = $sqluser;
$this->password = $sqlpassword;
$this->server = $sqlserver;
$this->dbname = $database;
if($this->persistency)
{
$this->db_connect_id = mysql_pconnect($this->server, $this->user, $this->password);
}
else
{
$this->db_connect_id = mysql_connect($this->server, $this->user, $this->password);
}
if($this->db_connect_id)
{
if($database != "")
{
$this->dbname = $database;
$dbselect = mysql_select_db($this->dbname);
if(!$dbselect)
{
mysql_close($this->db_connect_id);
$this->db_connect_id = $dbselect;
}
}
return $this->db_connect_id;
}
else
{
echo "Connection to mySQL failed!";
exit;
}
}
//
// Other base methods
//
function sql_close()
{
if($this->db_connect_id)
{
if($this->query_result)
{
@mysql_free_result($this->query_result);
}
$result = mysql_close($this->db_connect_id);
return $result;
}
else
{
return false;
}
}
//
// Base query method
//
function sql_query($query = "", $transaction = FALSE)
{
// Remove any pre-existing queries
unset($this->query_result);
if($query != "")
{
nt_common_add_debug($query);
$this->num_queries++;
$this->query_result = mysql_query($query, $this->db_connect_id);
}
if($this->query_result)
{
unset($this->row[$this->query_result]);
unset($this->rowset[$this->query_result]);
return $this->query_result;
}
else
{
return ( $transaction == 'END_TRANSACTION' ) ? true : false;
}
}
function sql_select_db($dbname)
{
if($this->db_connect_id)
{
$result = mysql_select_db($dbname, $this->db_connect_id);
return $result;
}
return false;
}
function sql_reselect_db()
{
if($this->db_connect_id)
{
$result = mysql_select_db($this->dbname, $this->db_connect_id);
return $result;
}
return false;
}
//
// Other query methods
//
function sql_numrows($query_id = 0)
{
if(!$query_id)
{
$query_id = $this->query_result;
}
if($query_id)
{
$result = mysql_num_rows($query_id);
return $result;
}
else
{
return false;
}
}
function sql_affectedrows()
{
if($this->db_connect_id)
{
$result = mysql_affected_rows($this->db_connect_id);
return $result;
}
else
{
return false;
}
}
function sql_numfields($query_id = 0)
{
if(!$query_id)
{
$query_id = $this->query_result;
}
if($query_id)
{
$result = mysql_num_fields($query_id);
return $result;
}
else
{
return false;
}
}
function sql_fieldname($offset, $query_id = 0)
{
if(!$query_id)
{
$query_id = $this->query_result;
}
if($query_id)
{
$result = mysql_field_name($query_id, $offset);
return $result;
}
else
{
return false;
}
}
function sql_fieldtype($offset, $query_id = 0)
{
if(!$query_id)
{
$query_id = $this->query_result;
}
if($query_id)
{
$result = mysql_field_type($query_id, $offset);
return $result;
}
else
{
return false;
}
}
function sql_fetchrow($query_id = 0)
{
if(!$query_id)
{
$query_id = $this->query_result;
}
if($query_id)
{
$this->row[$query_id] = mysql_fetch_array($query_id);
return $this->row[$query_id];
}
else
{
return false;
}
}
function sql_fetchrowset($query_id = 0)
{
if(!$query_id)
{
$query_id = $this->query_result;
}
if($query_id)
{
unset($this->rowset[$query_id]);
unset($this->row[$query_id]);
while($this->rowset[$query_id] = mysql_fetch_array($query_id))
{
$result[] = $this->rowset[$query_id];
}
return $result;
}
else
{
return false;
}
}
function sql_fetchfield($field, $rownum = -1, $query_id = 0)
{
if(!$query_id)
{
$query_id = $this->query_result;
}
if($query_id)
{
if($rownum > -1)
{
$result = mysql_result($query_id, $rownum, $field);
}
else
{
if(empty($this->row[$query_id]) && empty($this->rowset[$query_id]))
{
if($this->sql_fetchrow())
{
$result = $this->row[$query_id][$field];
}
}
else
{
if($this->rowset[$query_id])
{
$result = $this->rowset[$query_id][$field];
}
else if($this->row[$query_id])
{
$result = $this->row[$query_id][$field];
}
}
}
return $result;
}
else
{
return false;
}
}
function sql_rowseek($rownum, $query_id = 0){
if(!$query_id)
{
$query_id = $this->query_result;
}
if($query_id)
{
$result = mysql_data_seek($query_id, $rownum);
return $result;
}
else
{
return false;
}
}
function sql_nextid(){
if($this->db_connect_id)
{
$result = mysql_insert_id($this->db_connect_id);
return $result;
}
else
{
return false;
}
}
function sql_freeresult($query_id = 0){
if(!$query_id)
{
$query_id = $this->query_result;
}
if ( $query_id )
{
unset($this->row[$query_id]);
unset($this->rowset[$query_id]);
@mysql_free_result($query_id);
return true;
}
else
{
return false;
}
}
function sql_error($query_id = 0)
{
$result["message"] = mysql_error($this->db_connect_id);
$result["code"] = mysql_errno($this->db_connect_id);
return $result;
}
} // class sql_db
class sql_db_string extends sql_db
{
//
// Constructor ($connstring format : mysql://user:password@host/dbname)
//
function sql_db_string($connstring, $persistency = true)
{
$ret = false;
if ($connstring != '')
{
if (ereg("^mysql\:\/\/([^\:]+)\:([^\@]+)\@([^\\]+)\/([^\/]+)[\/]?$", $connstring, $params))
{
$sqlserver = $params[3];
$sqluser = $params[1];
$sqlpassword = $params[2];
$database = $params[4];
$ret = $this->sql_db($sqlserver, $sqluser, $sqlpassword, $database, $persistency);
}
}
return $ret;
}
} // class sql_db_string
} // if ... define
?>

@ -41,7 +41,7 @@ class sql_db
// //
// Constructor // Constructor
// //
function sql_db($sqlserver, $sqluser, $sqlpassword, $database, $persistency = true) function __construct($sqlserver, $sqluser, $sqlpassword, $database, $persistency = true)
{ {
$this->persistency = $persistency; $this->persistency = $persistency;
@ -72,8 +72,7 @@ class sql_db
} }
else else
{ {
echo "Connection to mySQL failed!"; throw new \RuntimeException('Connection to mySQL failed!');
exit;
} }
} }
@ -270,7 +269,7 @@ class sql_db_string extends sql_db
// //
// Constructor ($connstring format : mysql://user:password@host/dbname) // Constructor ($connstring format : mysql://user:password@host/dbname)
// //
function sql_db_string($connstring, $persistency = true) function __construct($connstring, $persistency = true)
{ {
$ret = false; $ret = false;
if ($connstring != '') if ($connstring != '')
@ -282,10 +281,9 @@ class sql_db_string extends sql_db
$sqlpassword = $params[2]; $sqlpassword = $params[2];
$database = $params[4]; $database = $params[4];
$ret = $this->sql_db($sqlserver, $sqluser, $sqlpassword, $database, $persistency); $ret = parent::__construct($sqlserver, $sqluser, $sqlpassword, $database, $persistency);
} }
} }
return $ret; return $ret;
} }
} // class sql_db_string } // class sql_db_string

@ -30,7 +30,7 @@
reset($file_list); reset($file_list);
foreach($file_list as $tmp_key => $tmp_val) foreach($file_list as $tmp_key => $tmp_val)
{ {
$date_ary[$tmp_key] = $file_list['date']; $date_ary[$tmp_key] = $tmp_val['date'];
} }
array_multisort($date_ary, SORT_DESC, $file_list); array_multisort($date_ary, SORT_DESC, $file_list);

@ -320,6 +320,9 @@
foreach($sline_vars as $sline_var) foreach($sline_vars as $sline_var)
{ {
$sline_parts = explode("=", $sline_var); $sline_parts = explode("=", $sline_var);
if (!isset($sline_parts[1])) {
$sline_parts[1] = '';
}
if ($sline_parts[0] == 'RunningState') if ($sline_parts[0] == 'RunningState')
{ {
@ -1023,6 +1026,7 @@
function tool_main_get_shards_info_from_db($application, $status, $filters, $ringsqlstring='') function tool_main_get_shards_info_from_db($application, $status, $filters, $ringsqlstring='')
{ {
$shard_list = array(); $shard_list = array();
$shard_list2 = array();
$shard_list_result = array(); $shard_list_result = array();
//nt_common_add_debug('in tool_main_get_shards_info_from_db()'); //nt_common_add_debug('in tool_main_get_shards_info_from_db()');
@ -1034,7 +1038,7 @@
foreach($status as $sline) foreach($status as $sline)
{ {
$shard_name = trim($sline['ShardName']); $shard_name = trim($sline['ShardName']);
$shard_id = trim($sline['ShardId']); $shard_id = isset($sline['ShardId']) ? trim($sline['ShardId']) : '';
if (($shard_name != '' && $shard_id != '') && (isset($filters[$shard_name]) || isset($filters['_all_']))) if (($shard_name != '' && $shard_id != '') && (isset($filters[$shard_name]) || isset($filters['_all_'])))
{ {

@ -225,7 +225,7 @@ require_once 'jpgraph_gradient.php';
class ErrMsgText { class ErrMsgText {
var $lt=NULL; var $lt=NULL;
var $supportedLocales = array('en'); var $supportedLocales = array('en');
function ErrMsgText() { function __construct() {
GLOBAL $__jpg_err_locale; GLOBAL $__jpg_err_locale;
if( !in_array($__jpg_err_locale,$this->supportedLocales) ) if( !in_array($__jpg_err_locale,$this->supportedLocales) )
$aLoc = 'en'; $aLoc = 'en';
@ -294,16 +294,16 @@ GLOBAL $__jpg_err;
GLOBAL $__jpg_err_locale ; GLOBAL $__jpg_err_locale ;
$__jpg_err_locale = 'en'; $__jpg_err_locale = 'en';
class JpGraphError { class JpGraphError {
function Install($aErrObject) { static function Install($aErrObject) {
GLOBAL $__jpg_err; GLOBAL $__jpg_err;
$__jpg_err = $aErrObject; $__jpg_err = $aErrObject;
} }
function Raise($aMsg,$aHalt=true){ static function Raise($aMsg,$aHalt=true){
GLOBAL $__jpg_err; GLOBAL $__jpg_err;
$tmp = new $__jpg_err; $tmp = new $__jpg_err;
$tmp->Raise($aMsg,$aHalt); $tmp->Raise($aMsg,$aHalt);
} }
function RaiseL($errnbr,$a1=null,$a2=null,$a3=null,$a4=null,$a5=null) { static function RaiseL($errnbr,$a1=null,$a2=null,$a3=null,$a4=null,$a5=null) {
GLOBAL $__jpg_err; GLOBAL $__jpg_err;
$t = new ErrMsgText(); $t = new ErrMsgText();
$msg = $t->Get($errnbr,$a1,$a2,$a3,$a4,$a5); $msg = $t->Get($errnbr,$a1,$a2,$a3,$a4,$a5);
@ -383,7 +383,7 @@ class JpGraphErrObject {
var $iTitle = "JpGraph Error"; var $iTitle = "JpGraph Error";
var $iDest = false; var $iDest = false;
function JpGraphErrObject() { function __construct() {
// Empty. Reserved for future use // Empty. Reserved for future use
} }
@ -631,7 +631,7 @@ class JpgTimer {
var $idx; var $idx;
//--------------- //---------------
// CONSTRUCTOR // CONSTRUCTOR
function JpgTimer() { function __construct() {
$this->idx=0; $this->idx=0;
} }
@ -671,7 +671,7 @@ class DateLocale {
//--------------- //---------------
// CONSTRUCTOR // CONSTRUCTOR
function DateLocale() { function __construct() {
settype($this->iDayAbb, 'array'); settype($this->iDayAbb, 'array');
settype($this->iShortDay, 'array'); settype($this->iShortDay, 'array');
settype($this->iShortMonth, 'array'); settype($this->iShortMonth, 'array');
@ -758,7 +758,7 @@ class Footer {
var $iRightMargin = 3; var $iRightMargin = 3;
var $iBottomMargin = 3; var $iBottomMargin = 3;
function Footer() { function __construct() {
$this->left = new Text(); $this->left = new Text();
$this->left->ParagraphAlign('left'); $this->left->ParagraphAlign('left');
$this->center = new Text(); $this->center = new Text();
@ -866,7 +866,7 @@ class Graph {
// aTimeOut Timeout in minutes for image in cache // aTimeOut Timeout in minutes for image in cache
// aInline If true the image is streamed back in the call to Stroke() // aInline If true the image is streamed back in the call to Stroke()
// If false the image is just created in the cache // If false the image is just created in the cache
function Graph($aWidth=300,$aHeight=200,$aCachedName="",$aTimeOut=0,$aInline=true) { function __construct($aWidth=300,$aHeight=200,$aCachedName="",$aTimeOut=0,$aInline=true) {
GLOBAL $gJpgBrandTiming; GLOBAL $gJpgBrandTiming;
// If timing is used create a new timing object // If timing is used create a new timing object
if( $gJpgBrandTiming ) { if( $gJpgBrandTiming ) {
@ -3071,7 +3071,7 @@ class TTF {
var $font_files,$style_names; var $font_files,$style_names;
//--------------- //---------------
// CONSTRUCTOR // CONSTRUCTOR
function TTF() { function __construct() {
$this->style_names=array(FS_NORMAL=>'normal',FS_BOLD=>'bold',FS_ITALIC=>'italic',FS_BOLDITALIC=>'bolditalic'); $this->style_names=array(FS_NORMAL=>'normal',FS_BOLD=>'bold',FS_ITALIC=>'italic',FS_BOLDITALIC=>'bolditalic');
// File names for available fonts // File names for available fonts
$this->font_files=array( $this->font_files=array(
@ -3193,7 +3193,7 @@ class Text {
// CONSTRUCTOR // CONSTRUCTOR
// Create new text at absolute pixel coordinates // Create new text at absolute pixel coordinates
function Text($aTxt="",$aXAbsPos=0,$aYAbsPos=0) { function __construct($aTxt="",$aXAbsPos=0,$aYAbsPos=0) {
if( ! is_string($aTxt) ) { if( ! is_string($aTxt) ) {
JpGraphError::RaiseL(25050);//('First argument to Text::Text() must be s atring.'); JpGraphError::RaiseL(25050);//('First argument to Text::Text() must be s atring.');
} }
@ -3429,7 +3429,8 @@ class GraphTabTitle extends Text{
var $corner = 6 , $posx = 7, $posy = 4; var $corner = 6 , $posx = 7, $posy = 4;
var $color='darkred',$fillcolor='lightyellow',$bordercolor='black'; var $color='darkred',$fillcolor='lightyellow',$bordercolor='black';
var $align = 'left', $width=TABTITLE_WIDTHFIT; var $align = 'left', $width=TABTITLE_WIDTHFIT;
function GraphTabTitle() { function __construct() {
parent::__construct();
$this->t = ''; $this->t = '';
$this->font_style = FS_BOLD; $this->font_style = FS_BOLD;
$this->hide = true; $this->hide = true;
@ -3450,8 +3451,9 @@ class GraphTabTitle extends Text{
$this->align = $aAlign; $this->align = $aAlign;
} }
function SetPos($aAlign) { function SetPos($aXAbsPos = 0, $aYAbsPos = 0, $aHAlign = 'left', $aVAlign = 'top') {
$this->align = $aAlign; //$this->align = $aXAbsPos;
throw new \Exception('Invalid function call. should use SetTabAlign()');
} }
function SetWidth($aWidth) { function SetWidth($aWidth) {
@ -3467,7 +3469,8 @@ class GraphTabTitle extends Text{
$this->corner = $aD ; $this->corner = $aD ;
} }
function Stroke(&$aImg) { // parent class compat function
function Stroke(&$aImg, $x = NULL, $y = NULL) {
if( $this->hide ) if( $this->hide )
return; return;
$this->boxed = false; $this->boxed = false;
@ -3560,8 +3563,8 @@ class SuperScriptText extends Text {
var $iSDir=0; var $iSDir=0;
var $iSimple=false; var $iSimple=false;
function SuperScriptText($aTxt="",$aSuper="",$aXAbsPos=0,$aYAbsPos=0) { function __construct($aTxt="",$aSuper="",$aXAbsPos=0,$aYAbsPos=0) {
parent::Text($aTxt,$aXAbsPos,$aYAbsPos); parent::__construct($aTxt,$aXAbsPos,$aYAbsPos);
$this->iSuper = $aSuper; $this->iSuper = $aSuper;
} }
@ -3738,7 +3741,7 @@ class Grid {
var $fill=false,$fillcolor=array('#EFEFEF','#BBCCFF'); var $fill=false,$fillcolor=array('#EFEFEF','#BBCCFF');
//--------------- //---------------
// CONSTRUCTOR // CONSTRUCTOR
function Grid(&$aAxis) { function __construct(&$aAxis) {
$this->scale = &$aAxis->scale; $this->scale = &$aAxis->scale;
$this->img = &$aAxis->img; $this->img = &$aAxis->img;
} }
@ -3901,7 +3904,7 @@ class Axis {
//--------------- //---------------
// CONSTRUCTOR // CONSTRUCTOR
function Axis(&$img,&$aScale,$color=array(0,0,0)) { function __construct(&$img,&$aScale,$color=array(0,0,0)) {
$this->img = &$img; $this->img = &$img;
$this->scale = &$aScale; $this->scale = &$aScale;
$this->color = $color; $this->color = $color;
@ -4356,7 +4359,7 @@ class Ticks {
//--------------- //---------------
// CONSTRUCTOR // CONSTRUCTOR
function Ticks(&$aScale) { function __construct(&$aScale) {
$this->scale=&$aScale; $this->scale=&$aScale;
$this->precision = -1; $this->precision = -1;
} }
@ -4483,7 +4486,8 @@ class LinearTicks extends Ticks {
//--------------- //---------------
// CONSTRUCTOR // CONSTRUCTOR
function LinearTicks() { function __construct() {
parent::__construct();
$this->precision = -1; $this->precision = -1;
} }
@ -4825,7 +4829,7 @@ class LinearScale {
var $name = 'lin'; var $name = 'lin';
//--------------- //---------------
// CONSTRUCTOR // CONSTRUCTOR
function LinearScale($aMin=0,$aMax=0,$aType="y") { function __construct($aMin=0,$aMax=0,$aType="y") {
assert($aType=="x" || $aType=="y" ); assert($aType=="x" || $aType=="y" );
assert($aMin<=$aMax); assert($aMin<=$aMax);
@ -5360,7 +5364,7 @@ class LinearScale {
class RGB { class RGB {
var $rgb_table; var $rgb_table;
var $img; var $img;
function RGB(&$aImg) { function __construct(&$aImg) {
$this->img = &$aImg; $this->img = &$aImg;
// Conversion array between color names and RGB // Conversion array between color names and RGB
@ -5950,7 +5954,7 @@ class Image {
//--------------- //---------------
// CONSTRUCTOR // CONSTRUCTOR
function Image($aWidth,$aHeight,$aFormat=DEFAULT_GFORMAT) { function __construct($aWidth,$aHeight,$aFormat=DEFAULT_GFORMAT) {
$this->CreateImgCanvas($aWidth,$aHeight); $this->CreateImgCanvas($aWidth,$aHeight);
$this->SetAutoMargin(); $this->SetAutoMargin();
@ -7531,8 +7535,8 @@ class RotImage extends Image {
var $a=0; var $a=0;
var $dx=0,$dy=0,$transx=0,$transy=0; var $dx=0,$dy=0,$transx=0,$transy=0;
function RotImage($aWidth,$aHeight,$a=0,$aFormat=DEFAULT_GFORMAT) { function __construct($aWidth,$aHeight,$a=0,$aFormat=DEFAULT_GFORMAT) {
$this->Image($aWidth,$aHeight,$aFormat); parent::__construct($aWidth,$aHeight,$aFormat);
$this->dx=$this->left_margin+$this->plotwidth/2; $this->dx=$this->left_margin+$this->plotwidth/2;
$this->dy=$this->top_margin+$this->plotheight/2; $this->dy=$this->top_margin+$this->plotheight/2;
$this->SetAngle($a); $this->SetAngle($a);
@ -7597,7 +7601,7 @@ class RotImage extends Image {
parent::Arc($xc,$yc,$w,$h,$s,$e); parent::Arc($xc,$yc,$w,$h,$s,$e);
} }
function FilledArc($xc,$yc,$w,$h,$s,$e) { function FilledArc($xc,$yc,$w,$h,$s,$e, $style='') {
list($xc,$yc) = $this->Rotate($xc,$yc); list($xc,$yc) = $this->Rotate($xc,$yc);
$s += $this->a; $s += $this->a;
$e += $this->a; $e += $this->a;
@ -7686,7 +7690,7 @@ class ImgStreamCache {
var $timeout=0; // Infinite timeout var $timeout=0; // Infinite timeout
//--------------- //---------------
// CONSTRUCTOR // CONSTRUCTOR
function ImgStreamCache(&$aImg, $aCacheDir=CACHE_DIR) { function __construct(&$aImg, $aCacheDir=CACHE_DIR) {
$this->img = &$aImg; $this->img = &$aImg;
$this->cache_dir = $aCacheDir; $this->cache_dir = $aCacheDir;
} }
@ -7862,7 +7866,7 @@ class Legend {
var $reverse = false ; var $reverse = false ;
//--------------- //---------------
// CONSTRUCTOR // CONSTRUCTOR
function Legend() { function __construct() {
// Empty // Empty
} }
//--------------- //---------------
@ -8334,7 +8338,7 @@ class Plot {
var $legendcsimalt=''; var $legendcsimalt='';
//--------------- //---------------
// CONSTRUCTOR // CONSTRUCTOR
function Plot(&$aDatay,$aDatax=false) { function __construct(&$aDatay,$aDatax=false) {
$this->numpoints = count($aDatay); $this->numpoints = count($aDatay);
if( $this->numpoints==0 ) if( $this->numpoints==0 )
JpGraphError::RaiseL(25121);//("Empty input data array specified for plot. Must have at least one data point."); JpGraphError::RaiseL(25121);//("Empty input data array specified for plot. Must have at least one data point.");
@ -8510,7 +8514,7 @@ class PlotLine {
//--------------- //---------------
// CONSTRUCTOR // CONSTRUCTOR
function PlotLine($aDir=HORIZONTAL,$aPos=0,$aColor="black",$aWeight=1) { function __construct($aDir=HORIZONTAL,$aPos=0,$aColor="black",$aWeight=1) {
$this->direction = $aDir; $this->direction = $aDir;
$this->color=$aColor; $this->color=$aColor;
$this->weight=$aWeight; $this->weight=$aWeight;

@ -34,7 +34,7 @@ class Gradient {
var $numcolors=100; var $numcolors=100;
//--------------- //---------------
// CONSTRUCTOR // CONSTRUCTOR
function Gradient(&$img) { function __construct(&$img) {
$this->img = &$img; $this->img = &$img;
} }

@ -36,8 +36,8 @@ class LinePlot extends Plot{
//--------------- //---------------
// CONSTRUCTOR // CONSTRUCTOR
function LinePlot(&$datay,$datax=false) { function __construct(&$datay,$datax=false) {
$this->Plot($datay,$datax); parent::__construct($datay,$datax);
$this->mark = new PlotMark(); $this->mark = new PlotMark();
} }
//--------------- //---------------
@ -424,7 +424,7 @@ class AccLinePlot extends Plot {
var $iStartEndZero=true; var $iStartEndZero=true;
//--------------- //---------------
// CONSTRUCTOR // CONSTRUCTOR
function AccLinePlot($plots) { function __construct($plots) {
$this->plots = $plots; $this->plots = $plots;
$this->nbrplots = count($plots); $this->nbrplots = count($plots);
$this->numpoints = $plots[0]->numpoints; $this->numpoints = $plots[0]->numpoints;

@ -23,8 +23,8 @@ class LogScale extends LinearScale {
// CONSTRUCTOR // CONSTRUCTOR
// Log scale is specified using the log of min and max // Log scale is specified using the log of min and max
function LogScale($min,$max,$type="y") { function __construct($min,$max,$type="y") {
$this->LinearScale($min,$max,$type); parent::__construct($min,$max,$type);
$this->ticks = new LogTicks(); $this->ticks = new LogTicks();
$this->name = 'log'; $this->name = 'log';
} }
@ -84,7 +84,7 @@ class LogScale extends LinearScale {
// Note that for log autoscale the "maxstep" the fourth argument // Note that for log autoscale the "maxstep" the fourth argument
// isn't used. This is just included to give the method the same // isn't used. This is just included to give the method the same
// signature as the linear counterpart. // signature as the linear counterpart.
function AutoScale(&$img,$min,$max,$dummy) { function AutoScale(&$img,$min,$max,$dummy, $dummy2 = true) {
if( $min==0 ) $min=1; if( $min==0 ) $min=1;
if( $max <= 0 ) { if( $max <= 0 ) {
@ -107,7 +107,8 @@ class LogTicks extends Ticks{
var $label_logtype=LOGLABELS_MAGNITUDE; var $label_logtype=LOGLABELS_MAGNITUDE;
//--------------- //---------------
// CONSTRUCTOR // CONSTRUCTOR
function LogTicks() { function __construct() {
parent::__construct();
} }
//--------------- //---------------
// PUBLIC METHODS // PUBLIC METHODS

@ -59,7 +59,7 @@ class FlagCache {
global $_gFlagCache; global $_gFlagCache;
require_once('jpgraph_flags.php'); require_once('jpgraph_flags.php');
if( $_gFlagCache[$aSize] === null ) { if( $_gFlagCache[$aSize] === null ) {
$_gFlagCache[$aSize] =& new FlagImages($aSize); $_gFlagCache[$aSize] = new FlagImages($aSize);
} }
$f =& $_gFlagCache[$aSize]; $f =& $_gFlagCache[$aSize];
$idx = $f->GetIdxByName($aName,$aFullName); $idx = $f->GetIdxByName($aName,$aFullName);
@ -89,7 +89,7 @@ class PlotMark {
//-------------- //--------------
// CONSTRUCTOR // CONSTRUCTOR
function PlotMark() { function __construct() {
$this->title = new Text(); $this->title = new Text();
$this->title->Hide(); $this->title->Hide();
$this->csimareas = ''; $this->csimareas = '';

@ -47,7 +47,7 @@ class PolarPlot {
var $csimalts=null; // ALT:s for corresponding target var $csimalts=null; // ALT:s for corresponding target
var $line_style='solid',$mark; var $line_style='solid',$mark;
function PolarPlot($aData) { function __construct($aData) {
$n = count($aData); $n = count($aData);
if( $n & 1 ) { if( $n & 1 ) {
JpGraphError::RaiseL(17001); JpGraphError::RaiseL(17001);

@ -15,7 +15,7 @@ require_once('jpgraph_plotmark.inc');
class RadarLogTicks extends Ticks { class RadarLogTicks extends Ticks {
//--------------- //---------------
// CONSTRUCTOR // CONSTRUCTOR
function RadarLogTicks() { function __construct() {
} }
//--------------- //---------------
// PUBLIC METHODS // PUBLIC METHODS
@ -468,17 +468,17 @@ class RadarGraph extends Graph {
//("Illegal scale for radarplot ($axtype). Must be \"lin\" or \"log\""); //("Illegal scale for radarplot ($axtype). Must be \"lin\" or \"log\"");
} }
if( $axtype=="lin" ) { if( $axtype=="lin" ) {
$this->yscale = & new LinearScale($ymin,$ymax); $this->yscale = new LinearScale($ymin,$ymax);
$this->yscale->ticks = & new RadarLinearTicks(); $this->yscale->ticks = new RadarLinearTicks();
$this->yscale->ticks->SupressMinorTickMarks(); $this->yscale->ticks->SupressMinorTickMarks();
} }
elseif( $axtype=="log" ) { elseif( $axtype=="log" ) {
$this->yscale = & new LogScale($ymin,$ymax); $this->yscale = new LogScale($ymin,$ymax);
$this->yscale->ticks = & new RadarLogTicks(); $this->yscale->ticks = new RadarLogTicks();
} }
$this->axis = & new RadarAxis($this->img,$this->yscale); $this->axis = new RadarAxis($this->img,$this->yscale);
$this->grid = & new RadarGrid(); $this->grid = new RadarGrid();
} }
function SetSize($aSize) { function SetSize($aSize) {

@ -19,7 +19,7 @@
var $InputStream; var $InputStream;
var $Pos; var $Pos;
function CMemStream () function __construct()
{ {
$this->InputStream = false; $this->InputStream = false;
$this->Pos = 0; $this->Pos = 0;
@ -104,11 +104,6 @@
{ {
var $MsgName; var $MsgName;
function CMessage()
{
$this->CMemStream();
}
function setName($name) function setName($name)
{ {
$this->MsgName = $name; $this->MsgName = $name;

@ -566,7 +566,7 @@ class Smarty
/** /**
* The class constructor. * The class constructor.
*/ */
function Smarty() function __construct()
{ {
$this->assign('SCRIPT_NAME', isset($_SERVER['SCRIPT_NAME']) ? $_SERVER['SCRIPT_NAME'] $this->assign('SCRIPT_NAME', isset($_SERVER['SCRIPT_NAME']) ? $_SERVER['SCRIPT_NAME']
: @$GLOBALS['HTTP_SERVER_VARS']['SCRIPT_NAME']); : @$GLOBALS['HTTP_SERVER_VARS']['SCRIPT_NAME']);

@ -78,8 +78,10 @@ class Smarty_Compiler extends Smarty {
/** /**
* The class constructor. * The class constructor.
*/ */
function Smarty_Compiler() function __construct()
{ {
parent::__construct();
// matches double quoted strings: // matches double quoted strings:
// "foobar" // "foobar"
// "foo\"bar" // "foo\"bar"
@ -262,12 +264,11 @@ class Smarty_Compiler extends Smarty {
reset($this->_folded_blocks); reset($this->_folded_blocks);
/* replace special blocks by "{php}" */ /* replace special blocks by "{php}" */
$source_content = preg_replace_callback($search, create_function ('$matches', "return '" $source_content = preg_replace_callback($search, function($matches) {
. $this->_quote_replace($this->left_delimiter) . 'php' return $this->_quote_replace($this->left_delimiter).'php'.
. "' . str_repeat(\"\n\", substr_count('\$matches[1]', \"\n\")) .'" str_repeat("\n", substr_count($matches[1], "\n")).
. $this->_quote_replace($this->right_delimiter) $this->_quote_replace($this->right_delimiter);
. "';") }, $source_content);
, $source_content);
/* Gather all template tags. */ /* Gather all template tags. */
preg_match_all("~{$ldq}\s*(.*?)\s*{$rdq}~s", $source_content, $_match); preg_match_all("~{$ldq}\s*(.*?)\s*{$rdq}~s", $source_content, $_match);
@ -556,7 +557,7 @@ class Smarty_Compiler extends Smarty {
case 'php': case 'php':
/* handle folded tags replaced by {php} */ /* handle folded tags replaced by {php} */
list(, $block) = each($this->_folded_blocks); $block = current($this->_folded_blocks);
$this->_current_line_no += substr_count($block[0], "\n"); $this->_current_line_no += substr_count($block[0], "\n");
/* the number of matched elements in the regexp in _compile_file() /* the number of matched elements in the regexp in _compile_file()
determins the type of folded tag that was found */ determins the type of folded tag that was found */

@ -1,486 +0,0 @@
{include file="page_header.tpl"}
{literal}
<script language="Javascript" type="text/javascript">
<!--
function CheckAll()
{
for (var i=0; i<document.qlist.elements.length; i++)
{
var e = document.qlist.elements[i];
if (e.type == 'checkbox' && e.name != 'allbox')
e.checked = document.qlist.allbox.checked;
}
}
function CheckToggle(checkname)
{
checkname.checked = !checkname.checked;
}
var total_secs;
function TimerDown(secs)
{
total_secs = secs;
CountDown();
}
function TimerDisplay(secs)
{
timer_min = Math.floor(secs / 60);
timer_sec = secs % 60;
if (timer_min < 10) timer_min = '0'+ timer_min;
if (timer_sec < 10) timer_sec = '0'+ timer_sec;
return timer_min+':'+timer_sec;
}
function CountDown()
{
total_secs--;
if (total_secs >= 0)
{
document.fcounter.counter.value = TimerDisplay(total_secs);
down=setTimeout("CountDown()",1000);
}
}
function toggleBox(mybox1, mybox2)
{
if (document.all)
{
if (document.all.item(mybox1).style.display == "none")
{
document.all.item(mybox1).style.display = "";
document.all.item(mybox2).style.display = "none";
}
else
{
document.all.item(mybox2).style.display = "";
document.all.item(mybox1).style.display = "none";
}
}
else
{
if (document.getElementById(mybox1).style.display == "none")
{
document.getElementById(mybox1).style.display = "";
document.getElementById(mybox2).style.display = "none";
}
else
{
document.getElementById(mybox2).style.display = "";
document.getElementById(mybox1).style.display = "none";
}
}
}
function openWindow(w_uri, w_title)
{
window.open(w_uri, w_title, 'width=800,height=600,directories=no,location=no,menubar=no,resizable=yes,scrollbars=no,status=no,toolbar=no');
}
//-->
</script>
{/literal}
<br>
<table width="100%" border="0" cellpadding="0" cellspacing="10">
<tr>
<td align="left" valign="top" width="150px">
{if $tool_domain_selected && $tool_shard_selected}
<table width="100%" border="0" cellpadding="1" bgcolor="#cccccc" class="view">
<tr>
<th colspan="10">Refresh</th>
</tr>
<form action="index.php?domain={$tool_domain_selected}&shard={$tool_shard_selected}" method="post" name="fcounter">
<tr>
<td>
<select name="services_refresh" style="width:100%;" onchange="this.form.submit();">
{section name=refresh loop=$tool_refresh_list}
<option value="{$tool_refresh_list[refresh].secs}" {if $tool_refresh_rate == $tool_refresh_list[refresh].secs}selected{/if}>{$tool_refresh_list[refresh].desc}</option>
{/section}
</select>
</td>
</tr>
{if $tool_refresh_rate > 0}
<tr>
<td>
<input type="text" name="counter" value="" readonly class="refresh_counter">
<script language="Javascript" type="text/javascript">
<!--
TimerDown({$tool_refresh_rate});
-->
</script>
</td>
</tr>
{/if}
</form>
</table>
<br>
{/if}
<table width="100%" border="0" cellpadding="1" bgcolor="#cccccc" class="view">
<tr>
<th colspan="10">Domains</th>
</tr>
{section name=domain loop=$tool_domain_list}
<tr>
<td align="center" class="{if $tool_domain_selected == $tool_domain_list[domain].domain_id}domainlistselected{else}domainlist{/if}"><a href="index.php?domain={$tool_domain_list[domain].domain_id}">{$tool_domain_list[domain].domain_name}</a></td>
</tr>
{/section}
</table>
{if $tool_domain_selected}
<br>
<table width="100%" border="0" cellpadding="1" bgcolor="#cccccc" class="view">
<tr>
<th colspan="10">Shards</th>
</tr>
{section name=shard loop=$tool_shard_list}
{if $tool_domain_selected == $tool_shard_list[shard].shard_domain_id}
<tr>
<td align="center" class="{if $tool_shard_selected == $tool_shard_list[shard].shard_id}shardlistselected{else}shardlist{/if}"><a href="index.php?domain={$tool_domain_selected}&shard={$tool_shard_list[shard].shard_id}">{$tool_shard_list[shard].shard_name}</a></td>
</tr>
{/if}
{/section}
</table>
{/if}
{if $restriction_tool_notes && $tool_note_list}
<br>
<table width="100%" border="0" cellpadding="1" bgcolor="#cccccc" class="view">
<tr>
<th colspan="10">Notes</th>
</tr>
{section name=note loop=$tool_note_list}
<tr>
{if $tool_note_list[note].note_mode == 0}
<td align="center"><a href="javascript:void(0);" onclick="return overlib('{$tool_note_list[note].note_data}', WIDTH, 250, STICKY, DRAGGABLE, CAPTION, '{$tool_note_list[note].note_title2}', CENTER, CLOSECLICK, ANCHOR, 'ol_anchor_right', ANCHORALIGN, 'LL', 'UR');" onmouseout="nd();">{$tool_note_list[note].note_title}</a></td>
{elseif $tool_note_list[note].note_mode == 1}
<td align="center"><a href="javascript:openWindow('{$tool_note_list[note].note_popup_uri}','{$tool_note_list[note].note_title}');">{$tool_note_list[note].note_title}</a></td>
{/if}
</tr>
{/section}
</table>
{/if}
{if $tool_hd_list}
<br>
<table width="100%" border="0" cellpadding="1" bgcolor="#cccccc" class="view">
<tr>
<th colspan="10">HardDrives</th>
</tr>
{section name=hd loop=$tool_hd_list}
{if $tool_hd_list[hd].hd_percent >= 85}{assign var="hdtrclass" value="row_red"}
{elseif $tool_hd_list[hd].hd_percent >= 75}{assign var="hdtrclass" value="row_orange_light"}
{else}{assign var="hdtrclass" value="row0"}{/if}
<tr class="{$hdtrclass}">
<td align="left" ><a href="javascript:void(0);" onmouseover="return overlib('{$tool_hd_list[hd].summary}', OFFSETX, 40, OFFSETY, 10);" onmouseout="return nd();">{$tool_hd_list[hd].hd_server}</a></td>
<td align="right">{$tool_hd_list[hd].hd_percent}%</td>
</tr>
{/section}
<tr>
<th colspan="10"><small>{$tool_hd_time|date_format:"%Y/%m/%d %H:%M:%S"}</small></th>
</tr>
</table>
{/if}
</td>
<td width="10px">&nbsp;</td>
<td align="right" valign="top">
{if tool_domain_selected && $tool_shard_selected}
<table width="100%" border="0" cellpadding="1" bgcolor="#cccccc" class="view">
<form action="index.php" method="post">
{if $tool_annotation_info || $tool_has_lock}
<tr>
<th width="10%">Annotation</th>
<td><input type="text" name="annotation" value="{$tool_annotation_info.annotation_data}" maxlength="255" size="80" {if !$tool_has_lock}readonly{/if}> {if $tool_has_lock}<input type="submit" name="lock" value="update annotation">{/if}
{if $tool_annotation_info}
({$tool_annotation_info.annotation_user_name} @ {$tool_annotation_info.annotation_date|date_format:"%Y/%m/%d %H:%M:%S"})
{/if}
</td>
</tr>
{/if}
<tr>
<th width="10%">Lock</th>
<td>
{if $tool_no_lock}
{* if (!$tool_lock_info || $tool_lock_info.lock_shard_id) && !$tool_cant_lock && ($tool_shard_restart_status == 0) && !$tool_no_domain_lock *}
{if (!$tool_lock_info || $tool_lock_info.lock_shard_id) && !$tool_cant_lock && !$tool_no_domain_lock}
{if $restriction_tool_main_lock_shard}<input type="submit" name="lock" value="lock shard">{/if}
{else}
Lock unavailable, a restart sequence is active !
{/if}
{if ($tool_shard_restart_status == 0) && ($tool_domain_has_shard_restart == 0)}
{if $restriction_tool_main_lock_domain}<input type="submit" name="lock" value="lock domain">{/if}
{/if}
{elseif $tool_has_shard_lock}
{if $tool_shard_restart_status == 0}
<input type="submit" name="lock" value="unlock shard">
{/if}
{if ($tool_shard_restart_status == 0) && ($tool_domain_has_shard_restart == 0)}
{if $restriction_tool_main_lock_domain}<input type="submit" name="lock" value="lock domain">{/if}
{elseif $tool_shard_restart_status > 0}
Restart Sequence is active !
{/if}
{if $restriction_tool_main_easy_restart && ($tool_shard_restart_status == 0)}
<input type="submit" name="lock" value="restart sequence" class="restart" onclick="if (confirm('Are you sure you want to engage the RESTART SEQUENCE for this shard ?')) return true; return false;">
<input type="hidden" name="restart_ws_state" value="{$tool_restart_ws_state}">
{/if}
{elseif $tool_has_domain_lock}
<input type="submit" name="lock" value="unlock domain">
{/if}
{if $tool_lock_info}
{if $tool_lock_info.lock_domain_id} Domain{elseif $tool_lock_info.lock_shard_id} Shard{/if}
Locked by <b>{$tool_lock_info.lock_user_name}</b> @ {$tool_lock_info.lock_date|date_format:"%Y/%m/%d %H:%M:%S"}
{else}
Unlocked.
{/if}
</td>
</tr>
</form>
</table>
<br>
{/if}
{if !$tool_domain_selected}
<table width="100%" border="0" cellpadding="1" bgcolor="#cccccc" class="view">
<tr>
<td class="row0">You need to select a domain.</td>
</tr>
</table>
{elseif !$tool_shard_selected}
<table width="100%" border="0" cellpadding="1" bgcolor="#cccccc" class="view">
<tr>
<td class="row0">You need to select a shard.</td>
</tr>
</table>
{elseif $tool_domain_error}
<table width="100%" border="0" cellpadding="1" bgcolor="#cccccc" class="view">
<tr>
<td class="row0"><span class="alert">{$tool_domain_error}</span></td>
</tr>
</table>
{else}
{if $tool_as_error}
<table width="100%" border="0" cellpadding="1" bgcolor="#cccccc" class="view">
<tr>
<td class="row0"><span class="alert">{$tool_as_error}</span></td>
</tr>
</table>
<br>
{/if}
<form action="index.php" method="post" name="qlist">
<table width="100%" border="0" cellpadding="1" bgcolor="#cccccc" class="view">
<tr>
<td class="heads"><input class="check" type="checkbox" name="allbox" value="1" onclick="CheckAll();"></td>
<td class="heads">AliasName</td>
<td class="heads">Shard</td>
{*<td class="heads">LongName</td>*}
<td class="heads">ShortName</td>
{*<td class="heads">ServiceAlias</td>*}
<td class="heads">Hostname</td>
<td class="heads">Running State</td>
<td class="heads">Running Orders</td>
<td class="heads">Running Tags</td>
<td class="heads">State</td>
<td class="heads">Report</td>
<td class="heads">Start Counters</td>
<td class="heads">User SL</td>
<td class="heads">Tick SL</td>
<td class="heads">Memory</td>
<td class="heads">NbPlayers</td>
<td class="heads">UpTime</td>
</tr>
{section name=service loop=$tool_services_list}
{assign var="service_shard_id" value=$tool_services_list[service].ShardName}
{if $tool_shard_filters.$service_shard_id || $tool_shard_filters._all_ || ($tool_shard_filters._unknown_ && !$tool_services_list[service].ShardName)}
{cycle assign="trclass" values="row0,row1"}
{assign var="tdclass1" value=""}
{assign var="tdclass2" value=""}
{if $tool_services_list[service]._flags_.rs_stopped}{assign var="tdclass1" value="class=\"cell_inactive1\""}{assign var="tdclass2" value="class=\"cell_inactive2\""}{assign var="trclass" value="row_stopped"}{/if}
{if $tool_services_list[service]._flags_.rs_starting}{* assign var="tdclass1" value="class=\"cell_inactive1\"" *}{assign var="tdclass2" value="class=\"cell_inactive2\""}{assign var="trclass" value="row_starting"}{/if}
{if $tool_services_list[service]._flags_.alert_red && ($tool_services_list[service]._flags_.rs_starting || $tool_services_list[service]._flags_.rs_online)}{assign var="trclass" value="row_red"}
{elseif $tool_services_list[service]._flags_.alert_orange_dark && ($tool_services_list[service]._flags_.rs_starting || $tool_services_list[service]._flags_.rs_online)}{assign var="trclass" value="row_orange_dark"}
{elseif $tool_services_list[service]._flags_.alert_orange_light && ($tool_services_list[service]._flags_.rs_starting || $tool_services_list[service]._flags_.rs_online)}{assign var="trclass" value="row_orange_light"}{/if}
{assign var="check_name" value=$tool_services_list[service].AliasName}
<tr class="{$trclass}">
<td><input class="check" type="checkbox" name="service_{$tool_services_list[service].AliasName}" value="{$tool_services_list[service].AliasName}" {if $tool_service_select_list.$check_name}checked{/if}></td>
<td onclick="CheckToggle(document.qlist.service_{$tool_services_list[service].AliasName})" {$tdclass1}>{$tool_services_list[service].AliasName}</td>
<td onclick="CheckToggle(document.qlist.service_{$tool_services_list[service].AliasName})" {$tdclass1}>{if $tool_services_list[service].ShardName != ""}{$tool_services_list[service].ShardName}{else}?{/if}{if $tool_services_list[service].ShardId != ""}/{$tool_services_list[service].ShardId}{/if}</td>
{*<td>{$tool_services_list[service].LongName}</td>*}
<td onclick="CheckToggle(document.qlist.service_{$tool_services_list[service].AliasName})" {$tdclass1}>{$tool_services_list[service].ShortName}</td>
{*<td>{$tool_services_list[service].ServiceAlias}</td>*}
<td onclick="CheckToggle(document.qlist.service_{$tool_services_list[service].AliasName})" {$tdclass1}>{$tool_services_list[service].Hostname}</td>
<td onclick="CheckToggle(document.qlist.service_{$tool_services_list[service].AliasName})" {$tdclass1}>{$tool_services_list[service].RunningState}</td>
<td onclick="CheckToggle(document.qlist.service_{$tool_services_list[service].AliasName})" {$tdclass1}>{$tool_services_list[service].RunningOrders}</td>
<td onclick="CheckToggle(document.qlist.service_{$tool_services_list[service].AliasName})" {$tdclass1}>{$tool_services_list[service].RunningTags}</td>
<td onclick="CheckToggle(document.qlist.service_{$tool_services_list[service].AliasName})" {$tdclass2}>{$tool_services_list[service].State}</td>
<td onclick="CheckToggle(document.qlist.service_{$tool_services_list[service].AliasName})" {$tdclass2}>{$tool_services_list[service].NoReportSince}</td>
<td onclick="CheckToggle(document.qlist.service_{$tool_services_list[service].AliasName})" {$tdclass2}>{$tool_services_list[service].StartCounter}</td>
<td onclick="CheckToggle(document.qlist.service_{$tool_services_list[service].AliasName})" {$tdclass2}>{$tool_services_list[service].UserSpeedLoop}</td>
<td onclick="CheckToggle(document.qlist.service_{$tool_services_list[service].AliasName})" {$tdclass2}>{$tool_services_list[service].TickSpeedLoop}</td>
<td onclick="CheckToggle(document.qlist.service_{$tool_services_list[service].AliasName})" {$tdclass2}>{$tool_services_list[service].ProcessUsedMemory}</td>
<td onclick="CheckToggle(document.qlist.service_{$tool_services_list[service].AliasName})" {$tdclass2}>{$tool_services_list[service].NbPlayers}</td>
<td onclick="CheckToggle(document.qlist.service_{$tool_services_list[service].AliasName})" {$tdclass2}>{$tool_services_list[service].UpTime}</td>
</tr>
{/if}
{/section}
</table>
<!-- ugly trick to block the first submit button being triggered when hitting ENTER to send the form -->
<div style="display: none;"><input type="submit" name="fake" value="fake" onclick="alert('PLEASE DO NOT USE THE &lt;ENTER&gt; KEY !'); return false;"></div>
<!-- end ugly trick :) -->
{if $restriction_tool_main_easy_restart && ($tool_shard_restart_status > 0)}
{include file="index_restart_sequence.tpl"}
{else}
{if $restriction_tool_main_ws}
<br>
<table width="100%" border="0" cellpadding="1" bgcolor="#cccccc" class="view">
<tr>
<td align="right" width="100px"><b>WS : </b>{if $restriction_tool_main_ws_old}<br><small><a href="javascript:toggleBox('ws_old','ws_new');">new/old</a></small>{/if}</td>
<td>
{if $restriction_tool_main_ws_old}
<div id="ws_old" style="display: none;">
&nbsp;
<input type="submit" name="services_update" value="open ws" onclick="if (confirm('Are you sure you want to OPEN the selected WS services ?')) return true; return false;">&nbsp;
<input type="submit" name="services_update" value="lock ws" onclick="if (confirm('Are you sure you want to LOCK the selected WS services ?')) return true; return false;">&nbsp;
<input type="submit" name="services_update" value="close ws" onclick="if (confirm('Are you sure you want to CLOSE the selected WS services ?')) return true; return false;">&nbsp;
</div>
{/if}
<div id="ws_new">
<table width="100%" border="0" cellpadding="1">
<input type="hidden" name="ws_su" value="{$tool_shard_su_name}">
<input type="hidden" name="ws_shard_name" value="">
<input type="hidden" name="ws_shard_id" value="">
{section name=shard loop=$tool_shard_run_list}
{assign var="sname" value=$tool_shard_run_list[shard]}
{if $tool_shard_infos[$sname] && $tool_shard_su_name}
<tr>
<td width="10%">&nbsp;<b>{$tool_shard_run_list[shard]}</b></td>
<td width="10%">
<select name="ws_state_{$sname}">
{section name=state loop=$tool_shard_ws_states}
<option class="ws_{$tool_shard_ws_states[state]}" value="{$tool_shard_ws_states[state]}" {if $tool_shard_infos[$sname].state == $tool_shard_ws_states[state]}selected{/if}>{$tool_shard_ws_states[state]}</option>
{/section}
</select></td>
<td width="20%"><input type="text" name="ws_motd_{$sname}" value="{$tool_shard_infos[$sname].motd}" maxlength="255" size="40"></td>
<td width="20%"><input type="submit" name="ws_update" value="update WS" onclick="if (confirm('Are you sure you want to change the WS State for shard &lt;{$sname}&gt; ?')) {ldelim} this.form.ws_shard_name.value='{$sname}'; this.form.ws_shard_id.value='{$tool_shard_infos[$sname].shard_id}'; return true; {rdelim} else {ldelim} return false; {rdelim}"></td>
<td>&nbsp;</td>
</tr>
{/if}
{/section}
</table>
</div>
</td>
</tr>
</table>
{/if}
{if $restriction_tool_main_start || $restriction_tool_main_stop || $restriction_tool_main_restart || $restriction_tool_main_kill || $restriction_tool_main_abort || $restriction_tool_main_reset_counters || $restriction_tool_main_service_autostart}
<br>
<table width="100%" border="0" cellpadding="1" bgcolor="#cccccc" class="view">
<tr>
<td align="right" width="100px"><b>Services : </b></td>
<td>&nbsp;
{if $restriction_tool_main_start}
<input type="submit" name="services_update" value="start" onclick="if (confirm('Are you sure you want to START the selected services ?')) return true; return false;">&nbsp;
{/if}
{if $restriction_tool_main_stop}
<input type="submit" name="services_update" value="stop" onclick="if (confirm('Are you sure you want to STOP the selected services ?')) return true; return false;">&nbsp;
{/if}
{if $restriction_tool_main_restart}
<input type="submit" name="services_update" value="restart" onclick="if (confirm('Are you sure you want to RESTART the selected services ?')) return true; return false;">&nbsp;
{/if}
{if $restriction_tool_main_kill}
<input type="submit" name="services_update" value="kill" onclick="if (confirm('Are you sure you want to KILL the selected services ?')) return true; return false;">&nbsp;
{/if}
{if $restriction_tool_main_abort}
<input type="submit" name="services_update" value="abort" onclick="if (confirm('Are you sure you want to ABORT the selected services ?')) return true; return false;">&nbsp;
{/if}
{if $restriction_tool_main_service_autostart}
<input type="submit" name="services_update" value="activate" onclick="if (confirm('Are you sure you want to ACTIVATE the selected services ?')) return true; return false;">&nbsp;
<input type="submit" name="services_update" value="deactivate" onclick="if (confirm('Are you sure you want to DEACTIVATE the selected services ?')) return true; return false;">&nbsp;
{/if}
{if $restriction_tool_main_reset_counters}
<input type="submit" name="services_update" value="reset counters" onclick="if (confirm('Are you sure you want to RESET START COUNTERS on the selected services (AES only) ?')) return true; return false;">&nbsp;
{/if}
</td>
</tr>
</table>
{/if}
{if $restriction_tool_main_shard_autostart && $tool_shard_run_list}
<br>
<table width="100%" border="0" cellpadding="1" bgcolor="#cccccc" class="view">
<tr>
<td align="right" width="100px"><b>Shards : </b></td>
<td><table width="100%" border="0" cellpadding="1">
<input type="hidden" name="shards_update_name" value="">
{section name=shard loop=$tool_shard_run_list}
{assign var="sname" value=$tool_shard_run_list[shard]}
<tr>
<td width="10%">&nbsp;<b>{$tool_shard_run_list[shard]}</b></td>
<td width="10%">{if $sname != ""}<span class="{$tool_shard_orders[$sname]}">{$tool_shard_orders[$sname]|replace:'_':'&nbsp;'}</span>{/if}&nbsp;</td>
<td width="80%">
<input type="submit" name="shards_update" value="auto restart on" onclick="if (confirm('Are you sure you want to set AUTO RESTART ON for shard &lt;{$tool_shard_run_list[shard]}&gt; ?')) {ldelim} this.form.shards_update_name.value='{$tool_shard_run_list[shard]}'; return true; {rdelim} else {ldelim} return false; {rdelim}">&nbsp;
<input type="submit" name="shards_update" value="auto restart off" onclick="if (confirm('Are you sure you want to set AUTO RESTART OFF for shard &lt;{$tool_shard_run_list[shard]}&gt; ?')) {ldelim} this.form.shards_update_name.value='{$tool_shard_run_list[shard]}'; return true; {rdelim} else {ldelim} return false; {rdelim}">&nbsp;
</td>
</tr>
{/section}
</table></td>
</tr>
</table>
{/if}
{if $restriction_tool_main_execute}
<br>
<table width="100%" border="0" cellpadding="1" bgcolor="#cccccc" class="view">
<tr>
<td align="right" width="100px"><b>Command : </b></td>
<td>&nbsp;<input type="text" name="service_command" value="{$tool_execute_command}" size="50">&nbsp;
<input type="submit" name="services_update" value="execute" {* onclick="if (confirm('Are you sure you want to EXECUTE this command on the selected services ?')) return true; return false;" *}>&nbsp;
</td>
</tr>
</table>
{if $tool_execute_command}
<br>
<table width="100%" border="0" cellpadding="1" bgcolor="#cccccc" class="view">
<tr>
<th>Command Results for '{$tool_execute_command}' :</th>
</tr>
<tr>
<td><textarea width="100%" rows="50" class="command" readonly >{section name=exe loop=$tool_execute_result}{$tool_execute_result[exe]}{/section}</textarea></td>
</tr>
</table>
{/if}
{/if}
{* end of: if $restriction_tool_main_easy_restart && ($tool_shard_restart_status > 0) *}
{/if}
</form>
{/if}
</td>
</tr>
</table>
{include file="page_footer.tpl"}

@ -195,7 +195,7 @@
<td width="10px">&nbsp;</td> <td width="10px">&nbsp;</td>
<td align="right" valign="top"> <td align="right" valign="top">
{if tool_domain_selected && $tool_shard_selected} {if $tool_domain_selected && $tool_shard_selected}
<table width="100%" border="0" cellpadding="1" bgcolor="#cccccc" class="view"> <table width="100%" border="0" cellpadding="1" bgcolor="#cccccc" class="view">
<form action="index.php" method="post"> <form action="index.php" method="post">
{if $tool_annotation_info || $tool_has_lock} {if $tool_annotation_info || $tool_has_lock}

@ -22,6 +22,7 @@
<link id="bs-css" href="css/bootstrap-cerulean.min.css" rel="stylesheet"> <link id="bs-css" href="css/bootstrap-cerulean.min.css" rel="stylesheet">
<link href="css/charisma-app.css" rel="stylesheet"> <link href="css/charisma-app.css" rel="stylesheet">
<link href="css/jquery-ui-1.8.21.custom.css" rel="stylesheet">
<link href='css/jquery.noty.css' rel='stylesheet'> <link href='css/jquery.noty.css' rel='stylesheet'>
<link href='css/noty_theme_default.css' rel='stylesheet'> <link href='css/noty_theme_default.css' rel='stylesheet'>
<link href='css/elfinder.min.css' rel='stylesheet'> <link href='css/elfinder.min.css' rel='stylesheet'>
@ -33,11 +34,6 @@
<!-- jQuery --> <!-- jQuery -->
<script src="js/jquery.min.js"></script> <script src="js/jquery.min.js"></script>
<!-- The HTML5 shim, for IE6-8 support of HTML5 elements -->
<!--[if lt IE 9]>
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<!-- The fav icon --> <!-- The fav icon -->
<!--<link rel="shortcut icon" href="img/favicon.ico">--> <!--<link rel="shortcut icon" href="img/favicon.ico">-->
@ -229,9 +225,6 @@
_("status").innerHTML = "upload Aborted"; _("status").innerHTML = "upload Aborted";
} }
</script> </script>
<link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/base/jquery-ui.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"></script>
<script> <script>
$(document).ready(function() { $(document).ready(function() {

@ -2,9 +2,10 @@
// This file contains all variables needed by other php scripts // This file contains all variables needed by other php scripts
require_once('../config.php'); require_once dirname(__DIR__).'/config.php';
$LogRelativePath = 'logs/'; // !! IMPORTANT !! keep these outside public webroot
$LogRelativePath = '../../logs/';
// ---------------------------------------------------------------------------------------- // ----------------------------------------------------------------------------------------
// Variables for nel database access // Variables for nel database access

@ -21,7 +21,7 @@
{ {
var $Value; var $Value;
function RSMGR_TSessionPartStatus() function __construct()
{ {
global $RSMGR_TSessionPartStatus_InvalidValue; global $RSMGR_TSessionPartStatus_InvalidValue;
$this->Value = $RSMGR_TSessionPartStatus_InvalidValue; $this->Value = $RSMGR_TSessionPartStatus_InvalidValue;
@ -81,7 +81,7 @@
{ {
var $Value; var $Value;
function RSMGR_TSessionType() function __construct()
{ {
global $RSMGR_TSessionType_InvalidValue; global $RSMGR_TSessionType_InvalidValue;
$this->Value = $RSMGR_TSessionType_InvalidValue; $this->Value = $RSMGR_TSessionType_InvalidValue;
@ -143,7 +143,7 @@
{ {
var $Value; var $Value;
function RSMGR_TSessionOrientation() function __construct()
{ {
global $RSMGR_TSessionOrientation_InvalidValue; global $RSMGR_TSessionOrientation_InvalidValue;
$this->Value = $RSMGR_TSessionOrientation_InvalidValue; $this->Value = $RSMGR_TSessionOrientation_InvalidValue;
@ -203,7 +203,7 @@
{ {
var $Value; var $Value;
function RSMGR_TSessionState() function __construct()
{ {
global $RSMGR_TSessionState_InvalidValue; global $RSMGR_TSessionState_InvalidValue;
$this->Value = $RSMGR_TSessionState_InvalidValue; $this->Value = $RSMGR_TSessionState_InvalidValue;
@ -261,7 +261,7 @@
{ {
var $Value; var $Value;
function RSMGR_TAnimMode() function __construct()
{ {
global $RSMGR_TAnimMode_InvalidValue; global $RSMGR_TAnimMode_InvalidValue;
$this->Value = $RSMGR_TAnimMode_InvalidValue; $this->Value = $RSMGR_TAnimMode_InvalidValue;
@ -319,7 +319,7 @@
{ {
var $Value; var $Value;
function RSMGR_TAccessType() function __construct()
{ {
global $RSMGR_TAccessType_InvalidValue; global $RSMGR_TAccessType_InvalidValue;
$this->Value = $RSMGR_TAccessType_InvalidValue; $this->Value = $RSMGR_TAccessType_InvalidValue;
@ -377,7 +377,7 @@
{ {
var $Value; var $Value;
function RSMGR_TRuleType() function __construct()
{ {
global $RSMGR_TRuleType_InvalidValue; global $RSMGR_TRuleType_InvalidValue;
$this->Value = $RSMGR_TRuleType_InvalidValue; $this->Value = $RSMGR_TRuleType_InvalidValue;
@ -439,7 +439,7 @@
{ {
var $Value; var $Value;
function RSMGR_TLevelFilter() function __construct()
{ {
global $RSMGR_TLevelFilter_InvalidValue; global $RSMGR_TLevelFilter_InvalidValue;
$this->Value = $RSMGR_TLevelFilter_InvalidValue; $this->Value = $RSMGR_TLevelFilter_InvalidValue;
@ -498,7 +498,7 @@
{ {
var $Value; var $Value;
function RSMGR_TEstimatedDuration() function __construct()
{ {
global $RSMGR_TEstimatedDuration_InvalidValue; global $RSMGR_TEstimatedDuration_InvalidValue;
$this->Value = $RSMGR_TEstimatedDuration_InvalidValue; $this->Value = $RSMGR_TEstimatedDuration_InvalidValue;
@ -558,7 +558,7 @@
{ {
var $Value; var $Value;
function RSMGR_TRaceFilter() function __construct()
{ {
global $RSMGR_TRaceFilter_InvalidValue; global $RSMGR_TRaceFilter_InvalidValue;
$this->Value = $RSMGR_TRaceFilter_InvalidValue; $this->Value = $RSMGR_TRaceFilter_InvalidValue;
@ -617,7 +617,7 @@
{ {
var $Value; var $Value;
function RSMGR_TReligionFilter() function __construct()
{ {
global $RSMGR_TReligionFilter_InvalidValue; global $RSMGR_TReligionFilter_InvalidValue;
$this->Value = $RSMGR_TReligionFilter_InvalidValue; $this->Value = $RSMGR_TReligionFilter_InvalidValue;
@ -675,7 +675,7 @@
{ {
var $Value; var $Value;
function RSMGR_TGuildFilter() function __construct()
{ {
global $RSMGR_TGuildFilter_InvalidValue; global $RSMGR_TGuildFilter_InvalidValue;
$this->Value = $RSMGR_TGuildFilter_InvalidValue; $this->Value = $RSMGR_TGuildFilter_InvalidValue;
@ -763,7 +763,7 @@
{ {
var $Value; var $Value;
function RSMGR_TShardFilter() function __construct()
{ {
global $RSMGR_TShardFilter_InvalidValue; global $RSMGR_TShardFilter_InvalidValue;
$this->Value = $RSMGR_TShardFilter_InvalidValue; $this->Value = $RSMGR_TShardFilter_InvalidValue;
@ -822,7 +822,7 @@
{ {
var $Value; var $Value;
function RSMGR_TSessionEvent() function __construct()
{ {
global $RSMGR_TSessionEvent_InvalidValue; global $RSMGR_TSessionEvent_InvalidValue;
$this->Value = $RSMGR_TSessionEvent_InvalidValue; $this->Value = $RSMGR_TSessionEvent_InvalidValue;

@ -14,7 +14,7 @@
{ {
var $Value; var $Value;
function WS_TUserRole() function __construct()
{ {
global $WS_TUserRole_InvalidValue; global $WS_TUserRole_InvalidValue;
$this->Value = $WS_TUserRole_InvalidValue; $this->Value = $WS_TUserRole_InvalidValue;

@ -14,7 +14,7 @@
var $InputStream; var $InputStream;
var $Pos; var $Pos;
function CMemStream () function __construct()
{ {
$this->InputStream = false; $this->InputStream = false;
$this->Pos = 0; $this->Pos = 0;
@ -115,11 +115,6 @@
{ {
var $MsgName; var $MsgName;
function CMessage()
{
$this->CMemStream();
}
function setName($name) function setName($name)
{ {
$this->MsgName = $name; $this->MsgName = $name;
@ -521,4 +516,4 @@
// //
// return $ok; // return $ok;
// } // }
?>

Loading…
Cancel
Save