mirror of
https://github.com/Shadowss/TravianZ.git
synced 2026-09-03 08:57:17 +00:00
@@ -3260,9 +3260,17 @@ class Automation {
|
|||||||
$end = ($database->getUserField($to['owner'],'tribe',0)*10);
|
$end = ($database->getUserField($to['owner'],'tribe',0)*10);
|
||||||
|
|
||||||
$j='1';
|
$j='1';
|
||||||
|
$units = [];
|
||||||
|
$amounts = [];
|
||||||
|
$modes = [];
|
||||||
|
|
||||||
for($i=$start;$i<=$end;$i++){
|
for($i=$start;$i<=$end;$i++){
|
||||||
$database->modifyEnforce($post['ckey'],$i,$post['t'.$j.''],0); $j++;
|
$units[] = $i;
|
||||||
|
$amounts[] = $post['t'.$j.''];
|
||||||
|
$modes[] = 0;
|
||||||
|
$j++;
|
||||||
}
|
}
|
||||||
|
$database->modifyEnforce($post['ckey'], $units, $amounts, $modes);
|
||||||
|
|
||||||
//get cord
|
//get cord
|
||||||
$from = $database->getVillage($enforce['from']);
|
$from = $database->getVillage($enforce['from']);
|
||||||
@@ -5635,8 +5643,13 @@ class Automation {
|
|||||||
//Put all true dens to 0
|
//Put all true dens to 0
|
||||||
$query="SELECT id FROM ".TB_PREFIX."users ORDER BY id+0 DESC";
|
$query="SELECT id FROM ".TB_PREFIX."users ORDER BY id+0 DESC";
|
||||||
$result=mysqli_query($GLOBALS['link'],$query);
|
$result=mysqli_query($GLOBALS['link'],$query);
|
||||||
|
$userIDs = [];
|
||||||
for ($i=0; $row=mysqli_fetch_row($result); $i++){
|
for ($i=0; $row=mysqli_fetch_row($result); $i++){
|
||||||
mysqli_query($GLOBALS['link'],"UPDATE ".TB_PREFIX."users SET ap=0, dp=0,Rc=0,clp=0, RR=0 WHERE id = ".(int) $row[0]);
|
$userIDs[] = (int) $row[0];
|
||||||
|
}
|
||||||
|
|
||||||
|
if (count($userIDs)) {
|
||||||
|
mysqli_query($GLOBALS['link'],"UPDATE ".TB_PREFIX."users SET ap=0, dp=0,Rc=0,clp=0, RR=0 WHERE id IN(".implode(', ', $userIDs).")");
|
||||||
}
|
}
|
||||||
|
|
||||||
//Start alliance Medals wooot
|
//Start alliance Medals wooot
|
||||||
@@ -5708,8 +5721,14 @@ class Automation {
|
|||||||
|
|
||||||
$query="SELECT id FROM ".TB_PREFIX."alidata ORDER BY id+0 DESC";
|
$query="SELECT id FROM ".TB_PREFIX."alidata ORDER BY id+0 DESC";
|
||||||
$result=mysqli_query($GLOBALS['link'],$query);
|
$result=mysqli_query($GLOBALS['link'],$query);
|
||||||
|
|
||||||
|
$aliIDs = [];
|
||||||
for ($i=0; $row=mysqli_fetch_row($result); $i++){
|
for ($i=0; $row=mysqli_fetch_row($result); $i++){
|
||||||
mysqli_query($GLOBALS['link'],"UPDATE ".TB_PREFIX."alidata SET ap=0, dp=0, RR=0, clp=0 WHERE id = ".(int) $row[0]);
|
$aliIDs[] = (int) $row[0];
|
||||||
|
}
|
||||||
|
|
||||||
|
if (count($aliIDs)) {
|
||||||
|
mysqli_query($GLOBALS['link'],"UPDATE ".TB_PREFIX."alidata SET ap=0, dp=0,RR=0,clp=0 WHERE id IN(".implode(', ', $aliIDs).")");
|
||||||
}
|
}
|
||||||
|
|
||||||
$q = "UPDATE ".TB_PREFIX."config SET lastgavemedal=".$time;
|
$q = "UPDATE ".TB_PREFIX."config SET lastgavemedal=".$time;
|
||||||
|
|||||||
+86
-38
@@ -3594,12 +3594,15 @@ class MYSQLi_DB implements IDbConnection {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function clearExpansionSlot($id) {
|
function clearExpansionSlot($id) {
|
||||||
list($id) = $this->escape_input((int) $id);
|
$id = (int) $id;
|
||||||
|
|
||||||
|
$pairs = [];
|
||||||
for($i = 1; $i <= 3; $i++) {
|
for($i = 1; $i <= 3; $i++) {
|
||||||
$q = "UPDATE " . TB_PREFIX . "vdata SET exp" . $i . "=0 WHERE exp" . $i . "=" . $id;
|
$pairs[] = 'exp'.$i.' = 0';
|
||||||
mysqli_query($this->dblink,$q);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$q = "UPDATE " . TB_PREFIX . "vdata SET ".implode(',', $pairs)." WHERE wref = " . $id;
|
||||||
|
mysqli_query($this->dblink,$q);
|
||||||
}
|
}
|
||||||
|
|
||||||
// no need to cache this method
|
// no need to cache this method
|
||||||
@@ -3691,16 +3694,28 @@ class MYSQLi_DB implements IDbConnection {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function setArchived($id) {
|
function setArchived($id) {
|
||||||
list($id) = $this->escape_input((int) $id);
|
if (!is_array($id)) {
|
||||||
|
$id = [$id];
|
||||||
|
|
||||||
$q = "UPDATE " . TB_PREFIX . "mdata set archived = 1 where id = $id";
|
foreach ($id as $index => $idValue) {
|
||||||
|
$id[$index] = (int) $idValue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$q = "UPDATE " . TB_PREFIX . "mdata set archived = 1 where id IN(".implode(', ', $id).")";
|
||||||
return mysqli_query($this->dblink,$q);
|
return mysqli_query($this->dblink,$q);
|
||||||
}
|
}
|
||||||
|
|
||||||
function setNorm($id) {
|
function setNorm($id) {
|
||||||
list($id) = $this->escape_input((int) $id);
|
if (!is_array($id)) {
|
||||||
|
$id = [$id];
|
||||||
|
|
||||||
$q = "UPDATE " . TB_PREFIX . "mdata set archived = 0 where id = $id";
|
foreach ($id as $index => $idValue) {
|
||||||
|
$id[$index] = (int) $idValue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$q = "UPDATE " . TB_PREFIX . "mdata set archived = 0 where id IN(".implode(',', $id).")";
|
||||||
return mysqli_query($this->dblink,$q);
|
return mysqli_query($this->dblink,$q);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -3718,8 +3733,7 @@ class MYSQLi_DB implements IDbConnection {
|
|||||||
function getMessage($id, $mode) {
|
function getMessage($id, $mode) {
|
||||||
global $session;
|
global $session;
|
||||||
|
|
||||||
list($id, $mode) = $this->escape_input((int) $id, $mode);
|
$mode = (int) $mode;
|
||||||
|
|
||||||
// update $id if we should show Support messages for Admins and we are an admin
|
// update $id if we should show Support messages for Admins and we are an admin
|
||||||
if (
|
if (
|
||||||
($session->access == MULTIHUNTER || $session->access == ADMIN)
|
($session->access == MULTIHUNTER || $session->access == ADMIN)
|
||||||
@@ -3729,6 +3743,18 @@ class MYSQLi_DB implements IDbConnection {
|
|||||||
$id = $id . ', 1';
|
$id = $id . ', 1';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (in_array($mode, [5,7,8])) {
|
||||||
|
if (!is_array($id)) {
|
||||||
|
$id = [$id];
|
||||||
|
|
||||||
|
foreach ($id as $index => $idValue) {
|
||||||
|
$id[$index] = (int) $idValue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
$id = (int) $id;
|
||||||
|
}
|
||||||
|
|
||||||
global $session;
|
global $session;
|
||||||
switch($mode) {
|
switch($mode) {
|
||||||
case 1:
|
case 1:
|
||||||
@@ -3744,16 +3770,16 @@ class MYSQLi_DB implements IDbConnection {
|
|||||||
$q = "UPDATE " . TB_PREFIX . "mdata set viewed = 1 where id = $id AND target IN(".((($session->access == MULTIHUNTER || $session->access == ADMIN) && ADMIN_RECEIVE_SUPPORT_MESSAGES) ? $session->uid.',1' : $session->uid).")";
|
$q = "UPDATE " . TB_PREFIX . "mdata set viewed = 1 where id = $id AND target IN(".((($session->access == MULTIHUNTER || $session->access == ADMIN) && ADMIN_RECEIVE_SUPPORT_MESSAGES) ? $session->uid.',1' : $session->uid).")";
|
||||||
break;
|
break;
|
||||||
case 5:
|
case 5:
|
||||||
$q = "UPDATE " . TB_PREFIX . "mdata set deltarget = 1,viewed = 1 where id = $id";
|
$q = "UPDATE " . TB_PREFIX . "mdata set deltarget = 1,viewed = 1 where id IN(".implode(', ', $id).")";
|
||||||
break;
|
break;
|
||||||
case 6:
|
case 6:
|
||||||
$q = "SELECT * FROM " . TB_PREFIX . "mdata where target IN($id) and send = 0 and archived = 1";
|
$q = "SELECT * FROM " . TB_PREFIX . "mdata where target IN($id) and send = 0 and archived = 1";
|
||||||
break;
|
break;
|
||||||
case 7:
|
case 7:
|
||||||
$q = "UPDATE " . TB_PREFIX . "mdata set delowner = 1 where id = $id";
|
$q = "UPDATE " . TB_PREFIX . "mdata set delowner = 1 where id IN(".implode(', ', $id).")";
|
||||||
break;
|
break;
|
||||||
case 8:
|
case 8:
|
||||||
$q = "UPDATE " . TB_PREFIX . "mdata set deltarget = 1,delowner = 1,viewed = 1 where id = $id";
|
$q = "UPDATE " . TB_PREFIX . "mdata set deltarget = 1,delowner = 1,viewed = 1 where IN(".implode(', ', $id).")";
|
||||||
break;
|
break;
|
||||||
case 9:
|
case 9:
|
||||||
$q = "SELECT * FROM " . TB_PREFIX . "mdata WHERE target IN($id) and send = 0 and archived = 0 and deltarget = 0 ORDER BY time DESC";
|
$q = "SELECT * FROM " . TB_PREFIX . "mdata WHERE target IN($id) and send = 0 and archived = 0 and deltarget = 0 ORDER BY time DESC";
|
||||||
@@ -3774,23 +3800,41 @@ class MYSQLi_DB implements IDbConnection {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function unarchiveNotice($id) {
|
function unarchiveNotice($id) {
|
||||||
list($id) = $this->escape_input((int) $id);
|
if (!is_array($id)) {
|
||||||
|
$id = [$id];
|
||||||
|
|
||||||
$q = "UPDATE " . TB_PREFIX . "ndata set ntype = archive, archive = 0 where id = $id";
|
foreach ($id as $index => $idValue) {
|
||||||
|
$id[$index] = (int) $idValue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$q = "UPDATE " . TB_PREFIX . "ndata set ntype = archive, archive = 0 where id IN(".implode(',', $id).")";
|
||||||
return mysqli_query($this->dblink,$q);
|
return mysqli_query($this->dblink,$q);
|
||||||
}
|
}
|
||||||
|
|
||||||
function archiveNotice($id) {
|
function archiveNotice($id) {
|
||||||
list($id) = $this->escape_input((int) $id);
|
if (!is_array($id)) {
|
||||||
|
$id = [$id];
|
||||||
|
|
||||||
$q = "update " . TB_PREFIX . "ndata set archive = ntype, ntype = 9 where id = $id";
|
foreach ($id as $index => $idValue) {
|
||||||
|
$id[$index] = (int) $idValue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$q = "update " . TB_PREFIX . "ndata set archive = ntype, ntype = 9 where id IN(".implode(',', $id).")";
|
||||||
return mysqli_query($this->dblink,$q);
|
return mysqli_query($this->dblink,$q);
|
||||||
}
|
}
|
||||||
|
|
||||||
function removeNotice($id) {
|
function removeNotice($id) {
|
||||||
list($id) = $this->escape_input((int) $id);
|
if (!is_array($id)) {
|
||||||
|
$id = [$id];
|
||||||
|
|
||||||
$q = "UPDATE " . TB_PREFIX . "ndata set del = 1,viewed = 1 where id = $id";
|
foreach ($id as $index => $idValue) {
|
||||||
|
$id[$index] = (int) $idValue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$q = "UPDATE " . TB_PREFIX . "ndata set del = 1,viewed = 1 where id IN(".implode(',', $id).")";
|
||||||
return mysqli_query($this->dblink,$q);
|
return mysqli_query($this->dblink,$q);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -5194,27 +5238,31 @@ class MYSQLi_DB implements IDbConnection {
|
|||||||
|
|
||||||
// no need to cache this method
|
// no need to cache this method
|
||||||
function getUnitsNumber($vid, $use_cache = false) {
|
function getUnitsNumber($vid, $use_cache = false) {
|
||||||
list($vid) = $this->escape_input((int) $vid);
|
list( $vid ) = $this->escape_input( (int) $vid );
|
||||||
|
|
||||||
|
$dbarray = $this->getUnit( $vid );
|
||||||
|
$totalunits = 0;
|
||||||
|
$movingunits = $this->getVillageMovement( $vid );
|
||||||
|
for ( $i = 1; $i <= 50; $i ++ ) {
|
||||||
|
$totalunits += $dbarray[ 'u' . $i ];
|
||||||
|
}
|
||||||
|
|
||||||
|
$totalunits += $dbarray['hero'];
|
||||||
|
$movingunits = $this->getVillageMovement( $vid );
|
||||||
|
$reinforcingunits = $this->getEnforceArray( $vid, 1 );
|
||||||
|
$owner = $this->getVillageField( $vid, "owner" );
|
||||||
|
$ownertribe = $this->getUserField( $owner, "tribe", 0 );
|
||||||
|
$start = ( $ownertribe - 1 ) * 10 + 1;
|
||||||
|
$end = ( $ownertribe * 10 );
|
||||||
|
|
||||||
|
for ( $i = $start; $i <= $end; $i ++ ) {
|
||||||
|
$totalunits += $movingunits[ 'u' . $i ];
|
||||||
|
$totalunits += $reinforcingunits[ 'u' . $i ];
|
||||||
|
}
|
||||||
|
|
||||||
|
$totalunits += $movingunits['hero'];
|
||||||
|
$totalunits += $reinforcingunits['hero'];
|
||||||
|
|
||||||
$dbarray = $this->getUnit($vid);
|
|
||||||
$totalunits = 0;
|
|
||||||
$movingunits = $this->getVillageMovement($vid);
|
|
||||||
for($i=1;$i<=50;$i++){
|
|
||||||
$totalunits += $dbarray['u'.$i];
|
|
||||||
}
|
|
||||||
$totalunits += $dbarray['hero'];
|
|
||||||
$movingunits = $this->getVillageMovement($vid);
|
|
||||||
$reinforcingunits = $this->getEnforceArray($vid,1);
|
|
||||||
$owner = $this->getVillageField($vid,"owner");
|
|
||||||
$ownertribe = $this->getUserField($owner,"tribe",0);
|
|
||||||
$start = ($ownertribe-1)*10+1;
|
|
||||||
$end = ($ownertribe*10);
|
|
||||||
for($i=$start;$i<=$end;$i++){
|
|
||||||
$totalunits += $movingunits['u'.$i];
|
|
||||||
$totalunits += $reinforcingunits['u'.$i];
|
|
||||||
}
|
|
||||||
$totalunits += $movingunits['hero'];
|
|
||||||
$totalunits += $reinforcingunits['hero'];
|
|
||||||
return $totalunits;
|
return $totalunits;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+51
-8
@@ -236,75 +236,118 @@ class Message {
|
|||||||
private function removeMessage($post) {
|
private function removeMessage($post) {
|
||||||
global $database,$session;
|
global $database,$session;
|
||||||
$post = $database->escape($post);
|
$post = $database->escape($post);
|
||||||
|
|
||||||
|
$mode5updates = [];
|
||||||
|
$mode7updates = [];
|
||||||
|
$mode8updates = [];
|
||||||
|
|
||||||
for($i = 1; $i <= 10; $i++) {
|
for($i = 1; $i <= 10; $i++) {
|
||||||
if ( isset( $post[ 'n' . $i ] ) ) {
|
if ( isset( $post[ 'n' . $i ] ) ) {
|
||||||
$message1 = mysqli_query( $GLOBALS['link'], "SELECT target, owner FROM " . TB_PREFIX . "mdata where id = " . (int) $post[ 'n' . $i ] . "" );
|
$message1 = mysqli_query( $GLOBALS['link'], "SELECT target, owner FROM " . TB_PREFIX . "mdata where id = " . (int) $post[ 'n' . $i ] . "" );
|
||||||
$message = mysqli_fetch_array( $message1 );
|
$message = mysqli_fetch_array( $message1 );
|
||||||
|
|
||||||
if ( $message['target'] == $session->uid && $message['owner'] == $session->uid ) {
|
if ( $message['target'] == $session->uid && $message['owner'] == $session->uid ) {
|
||||||
$database->getMessage( $post[ 'n' . $i ], 8 );
|
$mode8updates[] = $post[ 'n' . $i ];
|
||||||
} else if ( $message['target'] == $session->uid ) {
|
} else if ( $message['target'] == $session->uid ) {
|
||||||
$database->getMessage( $post[ 'n' . $i ], 5 );
|
$mode5updates[] = $post[ 'n' . $i ];
|
||||||
} else if ( $message['owner'] == $session->uid ) {
|
} else if ( $message['owner'] == $session->uid ) {
|
||||||
$database->getMessage( $post[ 'n' . $i ], 7 );
|
$mode7updates[] = $post[ 'n' . $i ];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (count($mode5updates)) {
|
||||||
|
$database->getMessage( $mode5updates, 5 );
|
||||||
|
}
|
||||||
|
|
||||||
|
if (count($mode7updates)) {
|
||||||
|
$database->getMessage( $mode7updates, 7 );
|
||||||
|
}
|
||||||
|
|
||||||
|
if (count($mode8updates)) {
|
||||||
|
$database->getMessage( $mode8updates, 8 );
|
||||||
|
}
|
||||||
|
|
||||||
header("Location: nachrichten.php");
|
header("Location: nachrichten.php");
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
private function archiveMessage($post) {
|
private function archiveMessage($post) {
|
||||||
global $database;
|
global $database;
|
||||||
|
|
||||||
|
$archIDs = [];
|
||||||
for($i = 1; $i <= 10; $i++) {
|
for($i = 1; $i <= 10; $i++) {
|
||||||
if(isset($post['n' . $i])) {
|
if(isset($post['n' . $i])) {
|
||||||
$database->setArchived($post['n' . $i]);
|
$archIDs[] = $post['n' . $i];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$database->setArchived($archIDs);
|
||||||
|
|
||||||
header("Location: nachrichten.php");
|
header("Location: nachrichten.php");
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
private function unarchiveMessage($post) {
|
private function unarchiveMessage($post) {
|
||||||
global $database;
|
global $database;
|
||||||
|
|
||||||
|
$normIDs = [];
|
||||||
|
|
||||||
for($i = 1; $i <= 10; $i++) {
|
for($i = 1; $i <= 10; $i++) {
|
||||||
if(isset($post['n' . $i])) {
|
if(isset($post['n' . $i])) {
|
||||||
$database->setNorm($post['n' . $i]);
|
$normIDs[] = $post['n' . $i];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
$database->setNorm($normIDs);
|
||||||
|
|
||||||
header("Location: nachrichten.php");
|
header("Location: nachrichten.php");
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
private function removeNotice($post) {
|
private function removeNotice($post) {
|
||||||
global $database;
|
global $database;
|
||||||
|
|
||||||
|
$removeIDs = [];
|
||||||
|
|
||||||
for($i = 1; $i <= 10; $i++) {
|
for($i = 1; $i <= 10; $i++) {
|
||||||
if(isset($post['n' . $i])) {
|
if(isset($post['n' . $i])) {
|
||||||
$database->removeNotice($post['n' . $i], 5);
|
$removeIDs[] = $post['n' . $i];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
$database->removeNotice($removeIDs);
|
||||||
|
|
||||||
header("Location: berichte.php");
|
header("Location: berichte.php");
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
private function archiveNotice($post) {
|
private function archiveNotice($post) {
|
||||||
global $database;
|
global $database;
|
||||||
|
|
||||||
|
$archiveIDs = [];
|
||||||
|
|
||||||
for($i = 1; $i <= 10; $i++) {
|
for($i = 1; $i <= 10; $i++) {
|
||||||
if(isset($post['n' . $i])) {
|
if(isset($post['n' . $i])) {
|
||||||
$database->archiveNotice($post['n' . $i]);
|
$archiveIDs[] = $post['n' . $i];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
$database->archiveNotice($archiveIDs);
|
||||||
|
|
||||||
header("Location: berichte.php");
|
header("Location: berichte.php");
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
private function unarchiveNotice($post) {
|
private function unarchiveNotice($post) {
|
||||||
global $database;
|
global $database;
|
||||||
|
|
||||||
|
$unarchIDs = [];
|
||||||
|
|
||||||
for($i = 1; $i <= 10; $i++) {
|
for($i = 1; $i <= 10; $i++) {
|
||||||
if(isset($post['n' . $i])) {
|
if(isset($post['n' . $i])) {
|
||||||
$database->unarchiveNotice($post['n' . $i]);
|
$unarchIDs[] = $post['n' . $i];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
$database->unarchiveNotice($unarchIDs);
|
||||||
|
|
||||||
header("Location: berichte.php");
|
header("Location: berichte.php");
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -235,7 +235,9 @@ class Village {
|
|||||||
$bakery = $this->resarray['f'.$i];
|
$bakery = $this->resarray['f'.$i];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for($i=0;$i<=count($cropholder)-1;$i++) { $basecrop+= $bid4[$this->resarray[$cropholder[$i]]]['prod']; }
|
for ( $i = 0; $i <= count( $cropholder ) - 1; $i ++ ) {
|
||||||
|
$basecrop += $bid4[ $this->resarray[ $cropholder[ $i ] ] ]['prod'];
|
||||||
|
}
|
||||||
$crop = $basecrop + $basecrop * 0.25 * $this->ocounter[3];
|
$crop = $basecrop + $basecrop * 0.25 * $this->ocounter[3];
|
||||||
if($grainmill >= 1 || $bakery >= 1) {
|
if($grainmill >= 1 || $bakery >= 1) {
|
||||||
$crop += $basecrop /100 * (isset($bid8[$grainmill]['attri']) ? $bid8[$grainmill]['attri'] : 0) + (isset($bid9[$bakery]['attri']) ? $bid9[$bakery]['attri'] : 0);
|
$crop += $basecrop /100 * (isset($bid8[$grainmill]['attri']) ? $bid8[$grainmill]['attri'] : 0) + (isset($bid9[$bakery]['attri']) ? $bid9[$bakery]['attri'] : 0);
|
||||||
|
|||||||
+1
-6
@@ -542,12 +542,7 @@ if(isset($_POST['password']) && $_POST['password'] != ""){
|
|||||||
$text = preg_replace("'%TEKST%'",ARTEFACT ,$text);
|
$text = preg_replace("'%TEKST%'",ARTEFACT ,$text);
|
||||||
fwrite($fh, $text);
|
fwrite($fh, $text);
|
||||||
|
|
||||||
$query="SELECT * FROM ".TB_PREFIX."users ORDER BY id DESC";
|
$query="UPDATE ".TB_PREFIX."users SET ok = 1";
|
||||||
$result=mysqli_query($GLOBALS['link'],$query) or die (mysqli_error($database->dblink));
|
|
||||||
for ($i=0; $row=mysqli_fetch_row($result); $i++) {
|
|
||||||
$updateattquery = mysqli_query($GLOBALS['link'],"UPDATE ".TB_PREFIX."users SET ok = '1' WHERE id = '".$row[0]."'")
|
|
||||||
or die(mysqli_error($database->dblink));
|
|
||||||
}
|
|
||||||
|
|
||||||
echo "Done";
|
echo "Done";
|
||||||
}elseif(User::exists($database,'Natars')) {
|
}elseif(User::exists($database,'Natars')) {
|
||||||
|
|||||||
+3
-13
@@ -18,12 +18,7 @@ $max_per_pass = 1000;
|
|||||||
if (mysqli_num_rows(mysqli_query($GLOBALS['link'],"SELECT id FROM ".TB_PREFIX."users WHERE access = 9 AND id = ".$session->uid)) != '1') die("Hacking attempt!");
|
if (mysqli_num_rows(mysqli_query($GLOBALS['link'],"SELECT id FROM ".TB_PREFIX."users WHERE access = 9 AND id = ".$session->uid)) != '1') die("Hacking attempt!");
|
||||||
|
|
||||||
if(isset($_GET['del'])){
|
if(isset($_GET['del'])){
|
||||||
$query="SELECT * FROM ".TB_PREFIX."users ORDER BY id DESC";
|
mysqli_query($GLOBALS['link'], "UPDATE ".TB_PREFIX."users SET ok = 0");
|
||||||
$result=mysqli_query($GLOBALS['link'],$query) or die (mysqli_error($database->dblink));
|
|
||||||
for ($i=0; $row=mysqli_fetch_row($result); $i++) {
|
|
||||||
$updateattquery = mysqli_query($GLOBALS['link'],"UPDATE ".TB_PREFIX."users SET ok = '0' WHERE id = '".$row[0]."'")
|
|
||||||
or die(mysqli_error($database->dblink));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (@$_POST['submit'] == "Send")
|
if (@$_POST['submit'] == "Send")
|
||||||
@@ -33,7 +28,6 @@ if (@$_POST['submit'] == "Send")
|
|||||||
$NextStep = true;
|
$NextStep = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (@isset($_POST['confirm']))
|
if (@isset($_POST['confirm']))
|
||||||
{
|
{
|
||||||
if ($_POST['confirm'] == 'No' ) $Interupt = true;
|
if ($_POST['confirm'] == 'No' ) $Interupt = true;
|
||||||
@@ -50,12 +44,8 @@ if (@isset($_POST['confirm']))
|
|||||||
// $text = utf8_encode($text);
|
// $text = utf8_encode($text);
|
||||||
fwrite($fh, $text);
|
fwrite($fh, $text);
|
||||||
|
|
||||||
$query="SELECT * FROM ".TB_PREFIX."users ORDER BY id DESC";
|
mysqli_query($GLOBALS['link'], "UPDATE ".TB_PREFIX."users SET ok = 1");
|
||||||
$result=mysqli_query($GLOBALS['link'],$query) or die (mysqli_error($database->dblink));
|
|
||||||
for ($i=0; $row=mysqli_fetch_row($result); $i++) {
|
|
||||||
$updateattquery = mysqli_query($GLOBALS['link'],"UPDATE ".TB_PREFIX."users SET ok = '1' WHERE id = '".$row[0]."'")
|
|
||||||
or die(mysqli_error($database->dblink));
|
|
||||||
}
|
|
||||||
$done = true;
|
$done = true;
|
||||||
} else { die("<br/><br/><br/>wrong"); }
|
} else { die("<br/><br/><br/>wrong"); }
|
||||||
}}
|
}}
|
||||||
|
|||||||
Reference in New Issue
Block a user