This commit is contained in:
Nimetu 2014-01-03 18:01:47 +02:00
parent 6b0e480d34
commit 40dacf5029
27 changed files with 10574 additions and 12535 deletions

View file

@ -8,14 +8,11 @@ IF(CustomMFC_FIND_REQUIRED)
SET(MFC_FIND_REQUIRED TRUE) SET(MFC_FIND_REQUIRED TRUE)
ENDIF(CustomMFC_FIND_REQUIRED) ENDIF(CustomMFC_FIND_REQUIRED)
# Try to find MFC using official module, MFC_FOUND is set
FIND_PACKAGE(MFC)
IF(NOT MFC_DIR) IF(NOT MFC_DIR)
# If MFC have been found, remember their directory # If MFC have been found, remember their directory
IF(MFC_FOUND AND VC_DIR) IF(VC_DIR)
SET(MFC_STANDARD_DIR "${VC_DIR}/atlmfc") SET(MFC_STANDARD_DIR "${VC_DIR}/atlmfc")
ENDIF(MFC_FOUND AND VC_DIR) ENDIF(VC_DIR)
FIND_PATH(MFC_DIR FIND_PATH(MFC_DIR
include/afxwin.h include/afxwin.h
@ -45,6 +42,9 @@ IF(MFC_FOUND)
# Set definitions for using MFC in DLL # Set definitions for using MFC in DLL
SET(MFC_DEFINITIONS -D_AFXDLL) SET(MFC_DEFINITIONS -D_AFXDLL)
# Set CMake flag to use MFC DLL
SET(CMAKE_MFC_FLAG 2)
ENDIF(MFC_FOUND) ENDIF(MFC_FOUND)
# TODO: create a macro which set MFC_DEFINITIONS, MFC_LIBRARY_DIR and MFC_INCLUDE_DIR for a project # TODO: create a macro which set MFC_DEFINITIONS, MFC_LIBRARY_DIR and MFC_INCLUDE_DIR for a project

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -488,9 +488,9 @@ void CDriverGL::setUniformParams(TProgram program, CGPUProgramParams &params)
if (index == ~0) if (index == ~0)
{ {
const std::string &name = params.getNameByOffset(offset); const std::string &name = params.getNameByOffset(offset);
nlassert(!name.empty() /* missing both parameter name and index, code error /); nlassert(!name.empty()); // missing both parameter name and index, code error
uint index = prog->getUniformIndex(name.c_str()); uint index = prog->getUniformIndex(name.c_str());
nlassert(index != ~0 /* invalid parameter name /); nlassert(index != ~0); // invalid parameter name
params.map(index, name); params.map(index, name);
} }

View file

@ -350,7 +350,7 @@ public:
{ {
i++; i++;
// Set the result // Set the result
result = atof (filename.c_str () + i); NLMISC::fromString(filename.substr(i), result);
} }
else else
{ {

View file

@ -876,38 +876,32 @@ namespace NLGUI
{ {
case Hotspot_TL: case Hotspot_TL:
return "TL"; return "TL";
break;
case Hotspot_TM: case Hotspot_TM:
return "TM"; return "TM";
break;
case Hotspot_TR: case Hotspot_TR:
return "TR"; return "TR";
break;
case Hotspot_ML: case Hotspot_ML:
return "ML"; return "ML";
break;
case Hotspot_MM: case Hotspot_MM:
return "MM"; return "MM";
break;
case Hotspot_MR: case Hotspot_MR:
return "MR"; return "MR";
break;
case Hotspot_BL: case Hotspot_BL:
return "BL"; return "BL";
break;
case Hotspot_BM: case Hotspot_BM:
return "BM"; return "BM";
break;
case Hotspot_BR: case Hotspot_BR:
return "BR"; return "BR";
default:
break; break;
} }

View file

@ -139,7 +139,7 @@ bool ReadFloat (const char *propName, float &result, const char *filename, xmlNo
string value; string value;
if (GetPropertyString (value, filename, xmlNode, propName)) if (GetPropertyString (value, filename, xmlNode, propName))
{ {
result = (float)atof (value.c_str ()); NLMISC::fromString(value, result);
return true; return true;
} }
return false; return false;

View file

@ -38,7 +38,7 @@ bool ReadFloat (const char *propName, float &result, xmlNodePtr xmlNode)
string value; string value;
if (CIXml::getPropertyString (value, xmlNode, propName)) if (CIXml::getPropertyString (value, xmlNode, propName))
{ {
result = (float)atof (value.c_str ()); NLMISC::fromString(value, result);
return true; return true;
} }
return false; return false;

View file

@ -517,13 +517,6 @@ void CBufServer::receive( CMemStream& buffer, TSockId* phostid )
*phostid = *((TSockId*)&(buffer.buffer()[buffer.size()-sizeof(TSockId)-1])); *phostid = *((TSockId*)&(buffer.buffer()[buffer.size()-sizeof(TSockId)-1]));
nlassert( buffer.buffer()[buffer.size()-1] == CBufNetBase::User ); nlassert( buffer.buffer()[buffer.size()-1] == CBufNetBase::User );
// debug features, we number all packet to be sure that they are all sent and received
// \todo remove this debug feature when ok
#ifdef NL_BIG_ENDIAN
uint32 val = NLMISC_BSWAP32(*(uint32*)buffer.buffer());
#else
uint32 val = *(uint32*)buffer.buffer();
#endif
buffer.resize( buffer.size()-sizeof(TSockId)-1 ); buffer.resize( buffer.size()-sizeof(TSockId)-1 );
// TODO OPTIM remove the nldebug for speed // TODO OPTIM remove the nldebug for speed

View file

@ -991,7 +991,7 @@ int main(sint argc, char **argv)
if(argc == 4) if(argc == 4)
{ {
weldRadius = (float) atof(argv[3]); NLMISC::fromString(argv[3], weldRadius);
} }
std::string center=getName(argv[1]).c_str(); std::string center=getName(argv[1]).c_str();

View file

@ -564,7 +564,7 @@ CCharacter3D::CCharacter3D()
_CurrentSetup.ArmsWidth = _CurrentSetup.LegsWidth = _CurrentSetup.BreastSize = -20.0f; _CurrentSetup.ArmsWidth = _CurrentSetup.LegsWidth = _CurrentSetup.BreastSize = -20.0f;
_PelvisPos.set(0.f,0.f,-20.0f); _PelvisPos.set(0.f,0.f,-20.0f);
_CurPosX = _CurPosY = _CurPosZ = 0.0f; _CurPosX = _CurPosY = _CurPosZ = 0.0f;
_CurRotX, _CurRotY, _CurRotZ = 0.0f; _CurRotX = _CurRotY = _CurRotZ = 0.0f;
_NextBlinkTime = 0; _NextBlinkTime = 0;
_CopyAnim=false; _CopyAnim=false;
} }

View file

@ -163,7 +163,7 @@ void CGroupQuickHelp::setGroupTextSize (CInterfaceGroup *group, bool selected)
{ {
bool globalColor = selected ? TextColorGlobalColor : _NonSelectedGlobalColor; bool globalColor = selected ? TextColorGlobalColor : _NonSelectedGlobalColor;
bool linkGlobalColor = selected ? LinkColorGlobalColor : _NonSelectedGlobalColor; bool linkGlobalColor = selected ? LinkColorGlobalColor : _NonSelectedGlobalColor;
uint fontSize = selected ? TextFontSize : _NonSelectedSize;_NonSelectedSize; uint fontSize = selected ? TextFontSize : _NonSelectedSize;
NLMISC::CRGBA color = selected ? TextColor : _NonSelectedColor; NLMISC::CRGBA color = selected ? TextColor : _NonSelectedColor;
NLMISC::CRGBA linkColor = selected ? LinkColor : _NonSelectedLinkColor; NLMISC::CRGBA linkColor = selected ? LinkColor : _NonSelectedLinkColor;

View file

@ -997,7 +997,6 @@ bool mainLoop()
// Init GameContextMenu. // Init GameContextMenu.
GameContextMenu;
GameContextMenu.init(""); GameContextMenu.init("");
// Active inputs // Active inputs

View file

@ -1100,7 +1100,7 @@ void CTimedFXManager::setMaxNumFXInstances(uint maxNumInstances)
FPU_CHECKER FPU_CHECKER
H_AUTO_USE(RZ_TimedFX) H_AUTO_USE(RZ_TimedFX)
_MaxNumberOfFXInstances = maxNumInstances; _MaxNumberOfFXInstances = maxNumInstances;
_CandidateFXListTouched; _CandidateFXListTouched = true;
} }
// ******************************************************************************************* // *******************************************************************************************

View file

@ -371,7 +371,7 @@ local registerFeature = function ()
-------------------- --------------------
convertToWidgetValue = convertToWidgetValue =
function(value) function(value)
local result = math.mod(math.floor(180 * value / math.pi), 360) local result = math.fmod(math.floor(180 * value / math.pi), 360)
if result < 0 then result = 360 + result end if result < 0 then result = 360 + result end
return result return result
end, end,

View file

@ -78,7 +78,7 @@ feature.Components.EasterEgg =
function(value) function(value)
local angle = value local angle = value
if angle == nil then angle = 0 end if angle == nil then angle = 0 end
local result = math.mod(math.floor(180 * angle / math.pi), 360) local result = math.fmod(math.floor(180 * angle / math.pi), 360)
if result < 0 then result = 360 + result end if result < 0 then result = 360 + result end
return result return result
end, end,

View file

@ -635,7 +635,7 @@ function CharTracking:onDraw()
self.LastRefreshTime = nltime.getLocalTime() / 1000 self.LastRefreshTime = nltime.getLocalTime() / 1000
--self:getWindow():find("refreshText").active = false --self:getWindow():find("refreshText").active = false
else else
local waitText = i18n.get("uiRAP_WaitChars" .. math.mod(os.time(), 3)) local waitText = i18n.get("uiRAP_WaitChars" .. math.fmod(os.time(), 3))
self:setInfoMessage(waitText) self:setInfoMessage(waitText)
--local refreshText = self:getWindow():find("refreshText") --local refreshText = self:getWindow():find("refreshText")
--if not self.ListReceived then --if not self.ListReceived then

View file

@ -613,7 +613,7 @@ function PlayerTracking:onDraw()
local timeInSec = nltime.getLocalTime() / 1000 local timeInSec = nltime.getLocalTime() / 1000
if self.WaitingList then if self.WaitingList then
local waitText = i18n.get("uiRAP_WaitMsg" .. math.mod(os.time(), 3)) local waitText = i18n.get("uiRAP_WaitMsg" .. math.fmod(os.time(), 3))
if not self.ListReceived then if not self.ListReceived then
self:setInfoMessage(waitText) self:setInfoMessage(waitText)
waitTextColor.A = 127 + 127 * (0.5 + 0.5 * math.cos(6 * timeInSec)) waitTextColor.A = 127 + 127 * (0.5 + 0.5 * math.cos(6 * timeInSec))

View file

@ -158,6 +158,8 @@ public:
case FLOAT : case FLOAT :
fromString((*itt).second, value); fromString((*itt).second, value);
break; break;
default:
break;
} }
} }

View file

@ -477,9 +477,12 @@ void CStaticFames::loadStaticFame( const string& filename )
if (sep == string::npos) if (sep == string::npos)
sep = s.size(); sep = s.size();
else else
factor = (float) atof( s.substr(sep+1, s.size()-sep-1).c_str()); NLMISC::fromString(s.substr(sep+1, s.size()-sep-1), factor);
// Fames in file are in [-600;600] so don't forget 1000 factor // Fames in file are in [-600;600] so don't forget 1000 factor
sint32 fame = (sint32)(atof(s.substr(0,sep).c_str())*1000.f); sint32 fame;
float fameFloat;
NLMISC::fromString(s.substr(0, sep), fameFloat);
fame = (sint32)(fameFloat * 1000.f);
_FameTable[iFaction*_FameTableSize + jFaction] = fame; _FameTable[iFaction*_FameTableSize + jFaction] = fame;
_PropagationFactorTable[iFaction*_FameTableSize + jFaction] = factor; _PropagationFactorTable[iFaction*_FameTableSize + jFaction] = factor;

View file

@ -2401,9 +2401,17 @@ NLMISC_COMMAND(setStartPoint,"Set the start point for a continent","<continent>
CVectorD startPoint; CVectorD startPoint;
startPoint.x = atof(args[1].c_str()); NLMISC::fromString(args[1], startPoint.x);
startPoint.y = atof(args[2].c_str()); NLMISC::fromString(args[2], startPoint.y);
startPoint.z = (args.size() < 4 ? 0.0 : atof(args[3].c_str()));
if (args.size() < 4)
{
startPoint.z = 0.0;
}
else
{
NLMISC::fromString(args[3], startPoint.z);
}
StartPoints.insert(multimap<string, CVectorD>::value_type(args[0], startPoint)); StartPoints.insert(multimap<string, CVectorD>::value_type(args[0], startPoint));
@ -2417,10 +2425,10 @@ NLMISC_COMMAND(setBoundingBox, "Set the working bounding box", "<minx> <miny> <m
if (args.size() < 4) if (args.size() < 4)
return false; return false;
BoxMin.x = atof(args[0].c_str()); NLMISC::fromString(args[0], BoxMin.x);
BoxMin.y = atof(args[1].c_str()); NLMISC::fromString(args[1], BoxMin.y);
BoxMax.x = atof(args[2].c_str()); NLMISC::fromString(args[2], BoxMax.x);
BoxMax.y = atof(args[3].c_str()); NLMISC::fromString(args[3], BoxMax.y);
return true; return true;
} }

View file

@ -2332,7 +2332,7 @@ static void parsePrimDynFaunaZone(const CAIAliasDescriptionNode *aliasNode, cons
y = prim->getPrimVector()->y; y = prim->getPrimVector()->y;
string s; string s;
prim->getPropertyByName("radius", s); prim->getPropertyByName("radius", s);
r = float(atof(s.c_str())); NLMISC::fromString(s, r);
vector<string> *params = &EmptyStringVector; vector<string> *params = &EmptyStringVector;
prim->getPropertyByName("properties", params); prim->getPropertyByName("properties", params);
@ -2361,7 +2361,7 @@ static void parsePrimDynNpcZonePlace(const CAIAliasDescriptionNode *aliasNode, c
y = prim->getPrimVector()->y; y = prim->getPrimVector()->y;
string s; string s;
prim->getPropertyByName("radius", s); prim->getPropertyByName("radius", s);
r = float(atof(s.c_str())); NLMISC::fromString(s, r);
vector<string> *params=&EmptyStringVector; vector<string> *params=&EmptyStringVector;
prim->getPropertyByName("properties", params); prim->getPropertyByName("properties", params);
@ -2425,19 +2425,19 @@ static void parsePrimRoadTrigger(const CAIAliasDescriptionNode *aliasNode, const
{ {
t1 = *child->getPrimVector(); t1 = *child->getPrimVector();
child->getPropertyByName("radius", s); child->getPropertyByName("radius", s);
t1r = float(atof(s.c_str())); NLMISC::fromString(s, t1r);
} }
else if (nodeName(child) == "trigger 2") else if (nodeName(child) == "trigger 2")
{ {
t2 = *child->getPrimVector(); t2 = *child->getPrimVector();
child->getPropertyByName("radius", s); child->getPropertyByName("radius", s);
t2r = float(atof(s.c_str())); NLMISC::fromString(s, t2r);
} }
else if (nodeName(child) == "spawn") else if (nodeName(child) == "spawn")
{ {
sp = *child->getPrimVector(); sp = *child->getPrimVector();
child->getPropertyByName("radius", s); child->getPropertyByName("radius", s);
spr = float(atof(s.c_str())); NLMISC::fromString(s, spr);
} }
} }
} }
@ -2468,7 +2468,8 @@ static void parsePrimDynRoad(const CAIAliasDescriptionNode *aliasNode, const IPr
// road dificulty // road dificulty
string s; string s;
prim->getPropertyByName("difficulty", s); prim->getPropertyByName("difficulty", s);
float difficulty = float(atof(s.c_str())); float difficulty;
NLMISC::fromString(s, difficulty);
uint32 verticalPos; uint32 verticalPos;
parseVerticalPos(prim, verticalPos); parseVerticalPos(prim, verticalPos);
@ -3169,7 +3170,7 @@ static void parsePrimOutpostSpawnZone(const CAIAliasDescriptionNode *aliasNode,
y = prim->getPrimVector()->y; y = prim->getPrimVector()->y;
string s; string s;
prim->getPropertyByName("radius", s); prim->getPropertyByName("radius", s);
r = float(atof(s.c_str())); NLMISC::fromString(s, r);
uint32 verticalPos; uint32 verticalPos;
parseVerticalPos(prim, verticalPos); parseVerticalPos(prim, verticalPos);
@ -3428,7 +3429,8 @@ static void parsePrimSafeZone(const IPrimitive *prim, const std::string &mapName
float y=(float)(prim->getPrimVector()->y); float y=(float)(prim->getPrimVector()->y);
string radiusString; string radiusString;
prim->getPropertyByName("radius",radiusString); prim->getPropertyByName("radius",radiusString);
float radius=(float)atof(radiusString.c_str()); float radius;
NLMISC::fromString(radiusString, radius);
CAIActions::exec("SAFEZONE", x, y, radius); CAIActions::exec("SAFEZONE", x, y, radius);
} }

View file

@ -966,7 +966,7 @@ uint32 CStringManager::translateTitle(const std::string &title, TLanguages lang
{ {
const std::string colName("name"); const std::string colName("name");
const CStringManager::CEntityWords &ew = getEntityWords(language, STRING_MANAGER::title); const CStringManager::CEntityWords &ew = getEntityWords(language, STRING_MANAGER::title);
std::string rowName = NLMISC::strlwr(title); std::string rowName = NLMISC::toLower(title);
uint32 stringId; uint32 stringId;
stringId = ew.getStringId(rowName, colName); stringId = ew.getStringId(rowName, colName);

View file

@ -428,7 +428,7 @@ CStringManager::CEntityWords CStringManager::parseEntityWords(const ucstring &st
for (i=1; i<ws.size(); ++i) for (i=1; i<ws.size(); ++i)
{ {
// on the first col, we uncapitalize the id // on the first col, we uncapitalize the id
ws.setData(i, 0, ucstring(NLMISC::strlwr(ws.getData(i, 0).toString()))); ws.setData(i, 0, ucstring(NLMISC::toLower(ws.getData(i, 0).toString())));
ew._RowInfo.insert(make_pair(ws.getData(i, 0).toString(), i-1)); ew._RowInfo.insert(make_pair(ws.getData(i, 0).toString(), i-1));
for (uint j=0; j<ws.ColCount; ++j) for (uint j=0; j<ws.ColCount; ++j)
@ -802,7 +802,7 @@ bool CStringManager::parseTag(const CPhrase &phrase, const ucstring &tag, TRepla
nlwarning("Error reading tag property in the tag [%s]", tag.toString().c_str()); nlwarning("Error reading tag property in the tag [%s]", tag.toString().c_str());
return false; return false;
} }
spec = NLMISC::strlwr(spec); spec = NLMISC::toLower(spec);
} }
else else
spec = "name"; spec = "name";
@ -1098,7 +1098,7 @@ bool CStringManager::parseParamList(ucstring::const_iterator &it, ucstring::cons
nlwarning("Error parsing parameter %u type in param list", count); nlwarning("Error parsing parameter %u type in param list", count);
return false; return false;
} }
type = NLMISC::strlwr(type); type = NLMISC::toLower(type);
NLMISC::CI18N::skipWhiteSpace(it, last); NLMISC::CI18N::skipWhiteSpace(it, last);
if (!NLMISC::CI18N::parseLabel(it, last, name)) if (!NLMISC::CI18N::parseLabel(it, last, name))

View file

@ -1835,11 +1835,11 @@ void CMissionData::parseMissionHeader(NLLIGO::IPrimitive *prim)
// _MissionTitle.init(*this, prim, vs); // _MissionTitle.init(*this, prim, vs);
_MissionDescriptionRaw = getPropertyArray(prim, "mission_description", false, false); _MissionDescriptionRaw = getPropertyArray(prim, "mission_description", false, false);
// _MissionDescription.init(*this, prim, vs); // _MissionDescription.init(*this, prim, vs);
_MonoInstance = strlwr(getProperty(prim, "mono_instance", true, false)) == "true"; _MonoInstance = toLower(getProperty(prim, "mono_instance", true, false)) == "true";
_RunOnce = strlwr(getProperty(prim, "run_only_once", true, false)) == "true"; _RunOnce = toLower(getProperty(prim, "run_only_once", true, false)) == "true";
_Replayable = strlwr(getProperty(prim, "replayable", true, false)) == "true"; _Replayable = toLower(getProperty(prim, "replayable", true, false)) == "true";
_NeedValidation = strlwr(getProperty(prim, "need_validation", true, false)) == "true"; _NeedValidation = toLower(getProperty(prim, "need_validation", true, false)) == "true";
_MissionAutoMenuRaw = getPropertyArray(prim, "phrase_auto_menu", false, false); _MissionAutoMenuRaw = getPropertyArray(prim, "phrase_auto_menu", false, false);

View file

@ -19,10 +19,20 @@
exit; exit;
} else { } else {
ini_set( "display_errors", true );
error_reporting( E_ALL );
if (file_exists('../config.php')) { if (file_exists('../config.php')) {
require( '../config.php' ); require( '../config.php' );
} else { } else {
require( '../config.default.php' ); //copy config.default.php to config.php!
if (!file_exists('../config.php')) {
if (!copy('../config.default.php', '../config.php')) {
echo "failed to copy ../config.php ...\n";
echo '<br><a href="'.$_SERVER['REQUEST_URI'].'" >Reload!</a> ';
exit;
}
}
} }
//var used to access the DB; //var used to access the DB;
@ -54,7 +64,7 @@
); );
GRANT ALL ON `" . $cfg['db']['web']['name'] ."`.* TO `" . $cfg['db']['web']['user'] ."`@localhost; GRANT ALL ON `" . $cfg['db']['web']['name'] ."`.* TO `" . $cfg['db']['web']['user'] ."`@".$cfg['db']['web']['host'].";
"; ";
$dbw->executeWithoutParams($sql); $dbw->executeWithoutParams($sql);
@ -460,7 +470,7 @@
ON DELETE NO ACTION ON DELETE NO ACTION
ON UPDATE NO ACTION) ON UPDATE NO ACTION)
ENGINE = InnoDB; ENGINE = InnoDB;
GRANT ALL ON `" . $cfg['db']['lib']['name'] ."`.* TO `" . $cfg['db']['lib']['user'] ."`@localhost; GRANT ALL ON `" . $cfg['db']['lib']['name'] ."`.* TO `" . $cfg['db']['lib']['user'] ."`@".$cfg['db']['lib']['host'].";
"; ";
$dbl->executeWithoutParams($sql); $dbl->executeWithoutParams($sql);
print "The Lib & Web database were correctly installed! <br />"; print "The Lib & Web database were correctly installed! <br />";
@ -575,7 +585,7 @@
KEY `GMId` (`GMId`) KEY `GMId` (`GMId`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT='contains all users informations for login system' AUTO_INCREMENT=1 ; ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT='contains all users informations for login system' AUTO_INCREMENT=1 ;
GRANT ALL ON `" . $cfg['db']['shard']['name'] ."`.* TO `" . $cfg['db']['shard']['user'] ."`@localhost; GRANT ALL ON `" . $cfg['db']['shard']['name'] ."`.* TO `" . $cfg['db']['shard']['user'] ."`@".$cfg['db']['shard']['host'].";
"; ";
$dbs->executeWithoutParams($sql); $dbs->executeWithoutParams($sql);
print "The shard database was correctly installed! <br />"; print "The shard database was correctly installed! <br />";
@ -1358,7 +1368,7 @@
(164, 31, 104, 9), (164, 31, 104, 9),
(165, 31, 103, 9); (165, 31, 103, 9);
GRANT ALL ON `" . $cfg['db']['tool']['name'] ."`.* TO `" . $cfg['db']['tool']['user'] ."`@localhost; GRANT ALL ON `" . $cfg['db']['tool']['name'] ."`.* TO `" . $cfg['db']['tool']['user'] ."`@".$cfg['db']['tool']['host'].";
"; ";
$dbn->executeWithoutParams($sql); $dbn->executeWithoutParams($sql);
print "The nel_tool database was correctly installed! <br />"; print "The nel_tool database was correctly installed! <br />";
@ -1383,14 +1393,7 @@
}catch (PDOException $e){ }catch (PDOException $e){
print "There was an error while creating the admin account! "; print "There was an error while creating the admin account! ";
} }
//copy config.default.php to config.php!
if (!file_exists('../config.php')) {
if (!copy('../config.default.php', '../config.php')) {
echo "failed to copy ../config.php ...\n";
}
}
echo '<br><a href="'.$_SERVER['REQUEST_URI'].'" >Reload!</a> '; echo '<br><a href="'.$_SERVER['REQUEST_URI'].'" >Reload!</a> ';
exit; exit;