Fusion avec fix-bitmap-crash

--HG--
branch : atys
hg/ark
ulukyn 5 years ago
commit e3fbe18162

@ -1,4 +1,3 @@
950d650ca92e6041611258d7e5131ccf661e4ec2 compatibility-merge
4eddbaff0c5e5d685db96ee3e8427aa0fd96ac83 ryzomcore/v0.8.0 4eddbaff0c5e5d685db96ee3e8427aa0fd96ac83 ryzomcore/v0.8.0
00d9b6e29e95f56785fbf85abe60afd34674f402 ryzomcore/v0.9.0 00d9b6e29e95f56785fbf85abe60afd34674f402 ryzomcore/v0.9.0
79776c337176dd5b02e1a74fe5dfb703b91747aa ryzomcore/v0.9.1 79776c337176dd5b02e1a74fe5dfb703b91747aa ryzomcore/v0.9.1
@ -17,10 +16,13 @@ d4060f217f4f834cc62a33f2f1ccdf3c28298066 ryzom-patch-3.1.0-hotfix
4036ecf59e83960f03acebc2089eb2ff5eeaed0a ryzom-patch-3.2.0 4036ecf59e83960f03acebc2089eb2ff5eeaed0a ryzom-patch-3.2.0
18403bb9485da3d9742c6f007a16d5619ebfb196 ryzom-patch-3.2.1 18403bb9485da3d9742c6f007a16d5619ebfb196 ryzom-patch-3.2.1
822ff8f8917ad66e09e2c21c983282f6f693b9f6 ryzom-patch-3.3.0 822ff8f8917ad66e09e2c21c983282f6f693b9f6 ryzom-patch-3.3.0
00dde390a394fce9da06c2f3264140282158d39f 3.3.0 00dde390a394fce9da06c2f3264140282158d39f ryzom-patch-3.3.0
0000000000000000000000000000000000000000 3.3.0 0000000000000000000000000000000000000000 3.3.0
dcd4c4d161ef775136e18c7e8f5072b75dede27e ryzom-patch-3.3.1
fc4be8ebec5ca754ef4453bc6a9faef90837c674 ryzom-patch-3.4.0 fc4be8ebec5ca754ef4453bc6a9faef90837c674 ryzom-patch-3.4.0
70eba02e8eab6920586dbabf74e9e8180c729980 ryzom-patch-3.4.0 Steam Fix 70eba02e8eab6920586dbabf74e9e8180c729980 ryzom-patch-3.4.0 Steam Fix
3941482843f9cd130cfc16634efc08d34a98ed35 ryzom-patch-3.4.0 Atysmas 3941482843f9cd130cfc16634efc08d34a98ed35 ryzom-patch-3.4.0 Atysmas
ecae9feb4cceb78103e5d7236caccaf450796cdb ryzom-patch-3.5.0 ecae9feb4cceb78103e5d7236caccaf450796cdb ryzom-patch-3.5.0
95783afa226f241062134eb62f4323295d29ac84 ryzom-patch-3.5.0.9637 95783afa226f241062134eb62f4323295d29ac84 ryzom-patch-3.5.0.9637
8eb94c3549be898fdc4a7c6d791d2477bdc11a18 ryzomcore/v1.0.1
3e92c7104c20d6bc6c2147b4b5fc289e8621d322 ryzomcore/v1.0.0

@ -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

@ -332,7 +332,9 @@ namespace NLGUI
{ {
ERR_error_string_n(errCode, errorBuffer, 1024); ERR_error_string_n(errCode, errorBuffer, 1024);
nlwarning("Error adding certificate %s: %s", entry.name.c_str(), errorBuffer); nlwarning("Error adding certificate %s: %s", entry.name.c_str(), errorBuffer);
res = CURLE_SSL_CACERT; // There seems to be intermittent issues (on windows) where cert loading will fail for same 3 to 5 certs
// with an 'SSL_shutdown while in init' error. It does not seem to be fatal for connection.
//res = CURLE_SSL_CACERT;
} }
} }
else else

@ -740,6 +740,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");
@ -3829,6 +3847,9 @@ namespace NLGUI
return; return;
} }
// received content from remote
std::string content = trim(_CurlWWW->Content);
// save HSTS header from all requests regardless of HTTP code // save HSTS header from all requests regardless of HTTP code
if (_CurlWWW->hasHSTSHeader()) if (_CurlWWW->hasHSTSHeader())
{ {
@ -3870,8 +3891,11 @@ namespace NLGUI
else if ( (code < 200 || code >= 300) ) else if ( (code < 200 || code >= 300) )
{ {
// catches 304 not modified, but html is not in cache anyway // catches 304 not modified, but html is not in cache anyway
browseError(string("Connection failed\nhttp code " + toString((sint32)code) + ")\nURL '" + _CurlWWW->Url + "'").c_str()); // if server did not send any error back
return; if (content.empty())
{
content = string("<html><head><title>ERROR</title></head><body><h1>Connection failed</h1><p>HTTP code '" + toString((sint32)code) + "'</p><p>URL '" + _CurlWWW->Url + "'</p></body></html>");
}
} }
char *ch; char *ch;
@ -3882,7 +3906,7 @@ namespace NLGUI
contentType = ch; contentType = ch;
} }
htmlDownloadFinished(_CurlWWW->Content, contentType, code); htmlDownloadFinished(content, contentType, code);
// clear curl handler // clear curl handler
if (MultiCurl) if (MultiCurl)

@ -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));
} }
} }

@ -180,6 +180,7 @@ int main(int argc, char **argv)
Args.addAdditionalArg("login", "Login to use", true, false); Args.addAdditionalArg("login", "Login to use", true, false);
Args.addAdditionalArg("password", "Password to use", true, false); Args.addAdditionalArg("password", "Password to use", true, false);
Args.addAdditionalArg("shard_id", "Shard ID to use", true, false); Args.addAdditionalArg("shard_id", "Shard ID to use", true, false);
Args.addAdditionalArg("slot", "Char slot to use", true, false);
#ifdef TEST_CRASH_COUNTER #ifdef TEST_CRASH_COUNTER
Args.addArg("", "crash", "", "Crash client before init"); Args.addArg("", "crash", "", "Crash client before init");
@ -220,6 +221,12 @@ int main(int argc, char **argv)
if (Args.haveAdditionalArg("shard_id")) if (Args.haveAdditionalArg("shard_id"))
sLoginShardId = Args.getAdditionalArg("shard_id").front(); sLoginShardId = Args.getAdditionalArg("shard_id").front();
if (Args.haveAdditionalArg("slot"))
{
if (!fromString(Args.getAdditionalArg("slot").front(), LoginCharsel))
LoginCharsel = -1;
}
} }
} }

@ -144,14 +144,13 @@ ucstring PlayerSelectedHomeShardName;
ucstring PlayerSelectedHomeShardNameWithParenthesis; ucstring PlayerSelectedHomeShardNameWithParenthesis;
extern std::string CurrentCookie; extern std::string CurrentCookie;
ucstring NewKeysCharNameWanted; // name of the character for which a new keyset must be created ucstring NewKeysCharNameWanted; // name of the character for which a new keyset must be created
ucstring NewKeysCharNameValidated; ucstring NewKeysCharNameValidated;
std::string GameKeySet = "keys.xml"; std::string GameKeySet = "keys.xml";
std::string RingEditorKeySet = "keys_r2ed.xml"; std::string RingEditorKeySet = "keys_r2ed.xml";
string ScenarioFileName; string ScenarioFileName;
sint LoginCharsel = -1;
static const char *KeySetVarName = "BuiltInKeySets"; static const char *KeySetVarName = "BuiltInKeySets";
@ -1095,8 +1094,15 @@ TInterfaceState globalMenu()
noUserChar = userChar = false; noUserChar = userChar = false;
if( FarTP.isReselectingChar() || !FarTP.isServerHopInProgress() ) // if doing a Server Hop, expect serverReceivedReady without action from the user if( FarTP.isReselectingChar() || !FarTP.isServerHopInProgress() ) // if doing a Server Hop, expect serverReceivedReady without action from the user
{ {
sint charSelect = -1;
if (ClientCfg.SelectCharacter != -1)
charSelect = ClientCfg.SelectCharacter;
if (LoginCharsel != -1)
charSelect = LoginCharsel;
WaitServerAnswer = false; WaitServerAnswer = false;
if (ClientCfg.SelectCharacter == -1) if (charSelect == -1)
{ {
CCDBNodeLeaf *pNL = NLGUI::CDBManager::getInstance()->getDbProp("UI:SERVER_RECEIVED_CHARS", false); CCDBNodeLeaf *pNL = NLGUI::CDBManager::getInstance()->getDbProp("UI:SERVER_RECEIVED_CHARS", false);
if (pNL != NULL) if (pNL != NULL)
@ -1112,7 +1118,7 @@ TInterfaceState globalMenu()
else else
{ {
// check that the pre selected character is available // check that the pre selected character is available
if (CharacterSummaries[ClientCfg.SelectCharacter].People == EGSPD::CPeople::Unknown) if (CharacterSummaries[charSelect].People == EGSPD::CPeople::Unknown || charSelect > 4)
{ {
// BAD ! preselected char does not exist, use the first available or fail // BAD ! preselected char does not exist, use the first available or fail
uint i; uint i;
@ -1132,12 +1138,14 @@ TInterfaceState globalMenu()
if (ret == UDriver::noId) if (ret == UDriver::noId)
exit(-1); exit(-1);
else else
ClientCfg.SelectCharacter = i; charSelect = i;
} }
} }
// Auto-selection for fast launching (dev only) // Auto-selection for fast launching (dev only)
CAHManager::getInstance()->runActionHandler("launch_game", NULL, toString("slot=%d|edit_mode=0", ClientCfg.SelectCharacter)); CAHManager::getInstance()->runActionHandler("launch_game", NULL, toString("slot=%d|edit_mode=0", charSelect));
if (LoginCharsel == -1)
ClientCfg.SelectCharacter = charSelect;
} }
} }

@ -34,6 +34,7 @@ extern ucstring PlayerSelectedHomeShardName; // The home shard name (aniro,
extern ucstring PlayerSelectedHomeShardNameWithParenthesis; // Same with parenthesis extern ucstring PlayerSelectedHomeShardNameWithParenthesis; // Same with parenthesis
extern std::vector<CCharacterSummary> CharacterSummaries; extern std::vector<CCharacterSummary> CharacterSummaries;
extern std::string UserPrivileges; extern std::string UserPrivileges;
extern sint LoginCharsel;
extern ucstring NewKeysCharNameWanted; extern ucstring NewKeysCharNameWanted;
extern ucstring NewKeysCharNameValidated; extern ucstring NewKeysCharNameValidated;

@ -30,6 +30,7 @@
#include "../connection.h" #include "../connection.h"
#include <curl/curl.h> #include <curl/curl.h>
#include "nel/gui/curl_certificates.h"
using namespace std; using namespace std;
using namespace NLMISC; using namespace NLMISC;
@ -168,6 +169,17 @@ public:
_Thread = NULL; _Thread = NULL;
curl_global_init(CURL_GLOBAL_ALL); curl_global_init(CURL_GLOBAL_ALL);
Curl = NULL;
//nlinfo("ctor CWebigNotificationThread");
}
void init()
{
if (Curl)
{
return;
}
Curl = curl_easy_init(); Curl = curl_easy_init();
if(!Curl) return; if(!Curl) return;
curl_easy_setopt(Curl, CURLOPT_COOKIEFILE, ""); curl_easy_setopt(Curl, CURLOPT_COOKIEFILE, "");
@ -175,7 +187,8 @@ public:
curl_easy_setopt(Curl, CURLOPT_USERAGENT, getUserAgent().c_str()); curl_easy_setopt(Curl, CURLOPT_USERAGENT, getUserAgent().c_str());
curl_easy_setopt(Curl, CURLOPT_FOLLOWLOCATION, 1); curl_easy_setopt(Curl, CURLOPT_FOLLOWLOCATION, 1);
curl_easy_setopt(Curl, CURLOPT_WRITEFUNCTION, writeDataFromCurl); curl_easy_setopt(Curl, CURLOPT_WRITEFUNCTION, writeDataFromCurl);
//nlinfo("ctor CWebigNotificationThread");
NLGUI::CCurlCertificates::useCertificates(Curl);
} }
~CWebigNotificationThread() ~CWebigNotificationThread()
@ -183,7 +196,7 @@ public:
if(Curl) if(Curl)
{ {
curl_easy_cleanup(Curl); curl_easy_cleanup(Curl);
Curl = 0; Curl = NULL;
} }
if (_Thread) if (_Thread)
{ {
@ -275,6 +288,9 @@ public:
void startThread() void startThread()
{ {
// initialize curl outside thread
init();
if (!_Thread) if (!_Thread)
{ {
_Thread = IThread::create(this); _Thread = IThread::create(this);
@ -286,7 +302,6 @@ public:
{ {
nlwarning("WebIgNotification thread already started"); nlwarning("WebIgNotification thread already started");
} }
} }
void stopThread() void stopThread()
@ -305,7 +320,7 @@ public:
} }
} }
bool isRunning() const bool isRunning() const
{ {
return _Running; return _Running;
} }

@ -61,6 +61,7 @@
#include "game_share/bg_downloader_msg.h" #include "game_share/bg_downloader_msg.h"
#include "misc.h" #include "misc.h"
#include "user_agent.h"
void ConnectToShard(); void ConnectToShard();
@ -783,6 +784,15 @@ void initLoginScreen()
ClientApp = ClientCfg.ConfigFile.getVar("Application").asString(0); ClientApp = ClientCfg.ConfigFile.getVar("Application").asString(0);
// version
std::string ext;
if (ClientApp.find("ryzom_") != ucstring::npos)
ext = " (" + ClientApp.substr(6) + ")";
CViewText *pV = dynamic_cast<CViewText*>(CWidgetManager::getInstance()->getElementFromId("ui:login:checkpass:content:ver_value"));
if (pV)
pV->setHardText(getDisplayVersion() + (ext.empty() ? "" : ext));
// give priority to login specified as argument // give priority to login specified as argument
string l = !LoginLogin.empty() ? LoginLogin:ClientCfg.LastLogin; string l = !LoginLogin.empty() ? LoginLogin:ClientCfg.LastLogin;

@ -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 {
$_indexed_attr[$k] = false;
}
} elseif (is_numeric($v) && in_array($v, array(0, 1))) {
if ($v == 1) {
$_indexed_attr[$k] = true;
} else {
$_indexed_attr[$k] = false;
}
} else { } else {
$_indexed_attr[$kv['key']] = false; $compiler->trigger_template_error("illegal value of option flag \"{$k}\"", $compiler->lex->taglineno);
}
} elseif (is_numeric($kv['value']) && in_array($kv['value'], array(0, 1))) {
if ($kv['value'] == 1) {
$_indexed_attr[$kv['key']] = true;
} else {
$_indexed_attr[$kv['key']] = false;
} }
// must be named attribute
} else { } else {
$compiler->trigger_template_error("illegal value of option flag \"{$kv['key']}\"", $compiler->lex->taglineno); reset($mixed);
$_indexed_attr[$k] = $v;
} }
// must be named attribute
} else {
reset($mixed);
$_indexed_attr[key($mixed)] = $mixed[key($mixed)];
} }
} }
} }

@ -32,7 +32,7 @@
$tpl = new Smarty; $tpl = new Smarty;
if (!is_object($tpl)) die("error on smarty init"); if (!is_object($tpl)) die("error on smarty init");
$iPhone = (strstr($_SERVER['HTTP_USER_AGENT'], "iPhone") !== FALSE); $iPhone = (strstr($_SERVER['HTTP_USER_AGENT'], "iPhone") !== FALSE);
$tpl->assign('iPhone', $iPhone); $tpl->assign('iPhone', $iPhone);
$tpl->template_dir = NELTOOL_SYSTEMBASE .'/templates/default/'; $tpl->template_dir = NELTOOL_SYSTEMBASE .'/templates/default/';

@ -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
*/ */
@ -206,4 +213,4 @@
} }
} }
?> ?>

@ -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);
@ -242,4 +242,4 @@
} }
?> ?>

@ -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
@ -264,4 +265,4 @@ class LogTicks extends Ticks{
} }
} // Class } // Class
/* EOF */ /* EOF */
?> ?>

@ -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 = '';
@ -479,4 +479,4 @@ class PlotMark {
} // Class } // Class
?> ?>

@ -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) {
@ -644,4 +644,4 @@ class RadarGraph extends Graph {
} // Class } // Class
/* EOF */ /* EOF */
?> ?>

@ -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