1
1
mirror of https://gitlab.com/ceda_ei/Zeeth-Naaw-Bot synced 2025-10-30 01:40:05 +01:00

Add write last member. Add new_member function

The update file now writes the last member to lastmember.php. Added new_member function.
This commit is contained in:
2018-04-04 20:54:10 +05:30
parent 6c4fa4848c
commit d49d6fa764
2 changed files with 39 additions and 1 deletions

View File

@@ -87,7 +87,7 @@ function chain_to_string($chain) {
for ($i = count($chain) - 1; $i >= 0 ; $i--) {
$string .= $chain[$i]['username'];
if ($i != 0) {
$string .= " > ";
$string .= " ";
}
}
return $string;
@@ -133,6 +133,10 @@ if ($saved_chain != $chain_string) {
$contents = "<?php return '". $chain_string . "'; ?>";
fwrite($file, $contents);
fclose($file);
$file2 = fopen('lastmember.php', 'w');
$contents = "<?php return '" . $chain[count($chain) - 1] . "'; ?>";
fwrite($file2, $contents);
fclose($file2);
}