first commit
This commit is contained in:
parent
a13717e013
commit
3649d1124e
|
@ -1,18 +1,11 @@
|
|||
<?php
|
||||
/*
|
||||
|
||||
$servdb = "";
|
||||
$userdb = "";
|
||||
$pdb = "";
|
||||
$dbname = "";
|
||||
$table = "StatServer_1";
|
||||
|
||||
*/
|
||||
|
||||
$servdb = "183.90.168.189";
|
||||
$userdb = "fpinth_status";
|
||||
$pdb = "Nick053896077";
|
||||
$dbname = "fpinth_status";
|
||||
$table = "StatServer_1";
|
||||
|
||||
$StatServer = $table;
|
||||
|
||||
|
|
17
index.php
17
index.php
|
@ -220,10 +220,10 @@ $sec = "300";
|
|||
}
|
||||
*/
|
||||
|
||||
if (count($objlower) > 0) {
|
||||
if (count($objlower) > 0) {
|
||||
echo $InfoGT[73].$InfoGT[74].$InfoGT[75].$InfoGT[76].$InfoGT[77].$InfoGT[78];
|
||||
echo "<small style='color: grey;'><i class='fas fa-sun'></i><span style='color: white;'>x". $InfoGT[47]. "</span> - <i class='fas fa-moon'></i><span style='color: white;'>x".$InfoGT[60]." </span>";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
|
@ -253,7 +253,18 @@ $sec = "300";
|
|||
|
||||
<div class="col-md-2 col-xs-12">
|
||||
<div class="description-block">
|
||||
<h5 class="description-header"><?php echo $InfoGT[24].$InfoGT[25].$InfoGT[26].$InfoGT[27].$InfoGT[28].$InfoGT[29].$InfoGT[30].$InfoGT[31]; ?>
|
||||
<h5 class="description-header">
|
||||
<?php //echo count($objlower)
|
||||
|
||||
if (count($objlower) == 0){
|
||||
echo $InfoGT[18].$InfoGT[19].$InfoGT[20].$InfoGT[21].$InfoGT[22].$InfoGT[23].$InfoGT[24].$InfoGT[25];
|
||||
}
|
||||
|
||||
if (count($objlower) > 0){
|
||||
echo $InfoGT[19].$InfoGT[25].$InfoGT[26].$InfoGT[27].$InfoGT[28].$InfoGT[29].$InfoGT[30].$InfoGT[31];
|
||||
}
|
||||
?>
|
||||
|
||||
</h5>
|
||||
<span class="description-text">HIVE</span>
|
||||
</div>
|
||||
|
|
|
@ -1,13 +1,10 @@
|
|||
<?php
|
||||
|
||||
|
||||
ini_set('display_errors', 'on');
|
||||
error_reporting(E_ALL); // Display all types of error
|
||||
|
||||
|
||||
|
||||
require_once("config.inc.php");
|
||||
require_once("gameq/src/GameQ/Autoloader.php");
|
||||
require_once("GameQ/Autoloader.php");
|
||||
//require_once("GameQ/src/GameQ/Autoloader.php");
|
||||
function secondsToString($seconds) {
|
||||
$hours = floor($seconds / 3600);
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
{"name":"[TH] F2P SERVER | Chernarus Map | No Mod | F2P.IN.TH |","map":"chernarusplus","password":false,"raw":{"protocol":17,"folder":"dayz","game":"DayZ","steamappid":0,"numplayers":14,"numbots":0,"listentype":"d","environment":"w","secure":1,"version":"1.10.153598","steamid":"90142619942483979","tags":"battleye,external,privHive,shard,lqs0,etm12.000000,entm2.000000,mod,08:42","gameid":"221100","rules":{"\u0001\u0001":"\u0001\u0001\u0001\u0002\u0001\u0002\u0001\u0002\u0001\u0001\u0002<30>>&\u0013Ԓ\u0011\u000bLivonia DLC\u0001\u0001\u0004dayz","allowedBuild":"0","dedicated":"1","island":"chernarusplus","language":"65545","platform":"win","requiredBuild":"0","requiredVersion":"110","timeLeft":"15"}},"maxplayers":60,"players":[{},{},{},{},{},{},{},{},{},{},{},{},{},{}],"bots":[],"connect":"103.58.149.102:2302","ping":195}
|
|
@ -6,10 +6,11 @@
|
|||
|
||||
echo "<hr><h1> TEST connection MYSQL </h1>";
|
||||
|
||||
//echo $InfoGT ;
|
||||
//echo $InfoGT;
|
||||
|
||||
echo "<hr>";
|
||||
echo $Players;
|
||||
echo "<hr>";
|
||||
|
||||
//echo $Info['GameTags'];
|
||||
echo $Info['GameTags'];
|
||||
|
||||
?>
|
||||
|
|
|
@ -18,10 +18,17 @@ varMod="server1"
|
|||
|
||||
# Game Port IP mod
|
||||
IpGame="103.58.149.102"
|
||||
PortGame="2402"
|
||||
QueryGame="27017"
|
||||
PortGame="2302"
|
||||
QueryGame="27016"
|
||||
|
||||
#CHECKstatserver="/tmp/CHECKstatserver_${varMod}.json"
|
||||
|
||||
TABLE="StatServer_1"
|
||||
DB_USER="fpinth_status"
|
||||
DB_PASSWD="Nick053896077"
|
||||
DB_NAME="fpinth_status"
|
||||
DB_SERV="183.90.168.189"
|
||||
|
||||
CHECKstatserver="/tmp/CHECKstatserver_${varMod}.json"
|
||||
statserver="${pathd}/${varMod}/statserver.json"
|
||||
gameqjson="${pathd}/${varMod}/gameqjson.json"
|
||||
|
||||
|
@ -30,15 +37,11 @@ gameqjson="${pathd}/${varMod}/gameqjson.json"
|
|||
# pathBin="/dayz/bin"
|
||||
pathDBe="${pathd}/${varMod}"
|
||||
|
||||
# NEED to SET
|
||||
# NEED to SET date
|
||||
# SQL
|
||||
datesql=$(date +'%F %T')
|
||||
date=$(date +'%F %T')
|
||||
|
||||
TABLE=""
|
||||
DB_USER=""
|
||||
DB_PASSWD=""
|
||||
DB_NAME=""
|
||||
|
||||
#DEBUG:
|
||||
# ls ${statserver}
|
||||
|
@ -55,7 +58,7 @@ fi
|
|||
|
||||
if [ ! -r "$statserver" ]; then
|
||||
echo " ⛔Error:"${statserver}" doesn't exits"
|
||||
exit 1
|
||||
# exit 1
|
||||
fi
|
||||
|
||||
|
||||
|
@ -79,36 +82,13 @@ insert_mysql_down() {
|
|||
numplayers="0"
|
||||
players="0"
|
||||
ping="0"
|
||||
mysql --user=$DB_USER --password=$DB_PASSWD --database=$DB_NAME << EOF
|
||||
mysql --host=$DB_SERV --user=$DB_USER --password=$DB_PASSWD --database=$DB_NAME << EOF
|
||||
SET NAMES utf8;
|
||||
insert into $TABLE (\`date\`,\`name\`,\`game\`,\`map\`,\`version\`,\`requiredVersion\`,\`numplayers\`,\`players\`,\`maxplayers\`,\`ping\`,\`timeserver\`,\`hive\`,\`battleye\`,\`connect\`,\`secure\`) VALUES ("$datesql","OFFLINE","$game","$map","$version","$requiredVersion","$numplayers","$players","$maxplayers","$ping","$timeserver","$hive","$battleye","$connect","$secure");
|
||||
|
||||
EOF
|
||||
}
|
||||
|
||||
print_info() {
|
||||
echo -e "$name $map $password $game ($numplayers) $version $maxplayers $ping $connect $secure $requiredVersion $island [$players] $mod $hive $battleye $timeserver $speedtime $speedtimenight $timeLeft $secure" > $pathDBe/Info-all.txt
|
||||
echo -e "- Statserver Expansion: ${date}" > $pathDBe/Info-date.txt
|
||||
echo "Name: $name" > $pathDBe/Info-name.txt
|
||||
echo "Game: $game" > $pathDBe/Info-game.txt
|
||||
echo "Numplayer: $numplayers" > $pathDBe/Info-numplayers.txt
|
||||
echo "Version: $version" > $pathDBe/Info-version.txt
|
||||
echo "Connect: $connect" > $pathDBe/Info-connect.txt
|
||||
echo "Timeserver: $timeserver" > $pathDBe/Info-timeserver.txt
|
||||
echo "Maxplayer: $maxplayers" > $pathDBe/Info-maxplayers.txt
|
||||
echo "Password: $password" > $pathDBe/Info-password.txt
|
||||
echo "RequireVersion: $requiredVersion" > $pathDBe/Info-requiredVersion.txt
|
||||
echo "Secure: $secure" > $pathDBe/Info-secure.txt
|
||||
echo "Island: $island" > $pathDBe/Info-island.txt
|
||||
echo "Ping: $ping" > $pathDBe/Info-ping.txt
|
||||
echo "Map: $map" > $pathDBe/Info-map.txt
|
||||
|
||||
echo "Hive: $hive" > $pathDBe/Info-hive.txt
|
||||
echo "Battleye: $battleye" > $pathDBe/Info-battleye.txt
|
||||
|
||||
echo "Players: $players" > $pathDBe/Info-players.txt
|
||||
#echo "Players: $gq_players" >> $pathDBe/Info-players.txt
|
||||
}
|
||||
|
||||
varcat=$(cat $statserver)
|
||||
|
||||
|
@ -130,7 +110,7 @@ island=$(echo $varcat | jq -r '.raw.rules.island')
|
|||
mod=$(echo $varcat | jq -r '.raw.tags[63:66]')
|
||||
hive=$(echo $varcat | jq -r '.raw.tags[18:26]')
|
||||
battleye=$(echo $varcat | jq -r '.raw.tags[:8]')
|
||||
timeserver=$(echo $varcat | jq -r '.raw.tags[67:]')
|
||||
timeserver=$(echo $varcat | jq -r '.raw.tags[68:]')
|
||||
speedtime=$(echo $varcat | jq -r '.raw.tags[41:42]')
|
||||
speedtimenight=$(echo $varcat | jq -r '.raw.tags[54:55]')
|
||||
timeLeft=$(echo $varcat | jq -r '.raw.rules.timeLeft')
|
||||
|
@ -140,16 +120,11 @@ serverstatus="UP"
|
|||
###############
|
||||
# check
|
||||
|
||||
print_info 2>&1
|
||||
# print only error
|
||||
cat $pathDBe/Info-* > $pathDBe/Info_$varMod.txt
|
||||
# cat $pathDBe/Info_$varMod.txt
|
||||
|
||||
echo " [✔] Server UP =>> update mysql"
|
||||
echo " Debug: $numplayers"
|
||||
|
||||
insert_mysql() {
|
||||
mysql --user=$DB_USER --password=$DB_PASSWD --database=$DB_NAME << EOF
|
||||
mysql --host=$DB_SERV --user=$DB_USER --password=$DB_PASSWD --database=$DB_NAME << EOF
|
||||
SET NAMES utf8;
|
||||
insert into $TABLE (\`date\`,\`name\`,\`game\`,\`map\`,\`version\`,\`requiredVersion\`,\`numplayers\`,\`players\`,\`maxplayers\`,\`ping\`,\`timeserver\`,\`hive\`,\`battleye\`,\`connect\`,\`secure\`) VALUES ("$datesql","$name","$game","$map","$version","$requiredVersion","$numplayers","$players","$maxplayers","$ping","$timeserver","$hive","$battleye","$connect","$secure");
|
||||
|
||||
|
@ -159,4 +134,8 @@ EOF
|
|||
insert_mysql && echo -e "\n ✅ Updated Mysql " || echo -e "\n Huston ,up MYSQL issue"
|
||||
|
||||
fi
|
||||
|
||||
echo -e "\nCheck Date SQL format:"
|
||||
echo $date
|
||||
|
||||
exit 1
|
||||
|
|
Loading…
Reference in New Issue