Skip to content
This repository has been archived by the owner on Jan 1, 2018. It is now read-only.

Commit

Permalink
- More improvements
Browse files Browse the repository at this point in the history
- Removed more notices
- Removed old officers in the admin cp
- Clean up
- Updated changelog
  • Loading branch information
LucasKovacs committed Jan 28, 2016
1 parent b112648 commit 2eeddfb
Show file tree
Hide file tree
Showing 10 changed files with 6,460 additions and 6,451 deletions.
931 changes: 468 additions & 463 deletions src/2.10.9/upload/adm/AccountDataPage.php

Large diffs are not rendered by default.

778 changes: 389 additions & 389 deletions src/2.10.9/upload/adm/MakerPage.php

Large diffs are not rendered by default.

274 changes: 137 additions & 137 deletions src/2.10.9/upload/adm/MessageListPage.php
Original file line number Diff line number Diff line change
@@ -1,138 +1,138 @@
<?php

/**
* @project XG Proyect
* @version 2.10.x build 0000
* @copyright Copyright (C) 2008 - 2016
*/

define('INSIDE' , TRUE);
define('INSTALL' , FALSE);
define('IN_ADMIN', TRUE);
define('XGP_ROOT', './../');

include(XGP_ROOT . 'global.php');

if ($Observation != 1) die(message ($lang['404_page']));

$parse = $lang;
$Prev = ( !empty($_POST['prev']) ) ? TRUE : FALSE;
$Next = ( !empty($_POST['next']) ) ? TRUE : FALSE;
$DelSel = ( !empty($_POST['delsel']) ) ? TRUE : FALSE;
$DelDat = ( !empty($_POST['deldat']) ) ? TRUE : FALSE;
$CurrPage = ( !empty($_POST['curr']) ) ? $_POST['curr'] : 1;
$Selected = ( !empty($_POST['sele']) ) ? $_POST['sele'] : 0;
$SelType = $_POST['type'];
$SelPage = $_POST['page'];

$ViewPage = 1;
if ( $Selected != $SelType )
{
$Selected = $SelType;
$ViewPage = 1;
}
elseif ( $CurrPage != $SelPage )
{
$ViewPage = ( !empty($SelPage) ) ? $SelPage : 1;
}

if($Prev == TRUE)
{
$CurrPage -= 1;
if ($CurrPage >= 1)
$ViewPage = $CurrPage;
else
$ViewPage = 1;

}
elseif ($Next == TRUE && $_POST['page'])
{
if ($Selected < 100)
$Mess = doquery("SELECT COUNT(*) AS `max` FROM {{table}} WHERE `message_type` = '". $Selected ."';", 'messages', TRUE);
elseif ($Selected == 100)
$Mess = doquery("SELECT COUNT(*) AS `max` FROM {{table}}", 'messages', TRUE);

$MaxPage = ceil ( ($Mess['max'] / 25) );
$CurrPage += 1;
if ($CurrPage <= $MaxPage)
$ViewPage = $CurrPage;
else
$ViewPage = $MaxPage;
}

if ($_POST['delsel'] && $_POST['sele'] >= 1 && $_POST['page'])
{
if ($DelSel == TRUE)
{
foreach($_POST['sele'] as $MessId => $Value)
{
if ($Value = "on")
doquery ( "DELETE FROM {{table}} WHERE `message_id` = '". $MessId ."';", 'messages');
}
}
}

if ($_POST['deldat'] && $_POST['sele'] >= 1 && is_numeric($_POST['selday']) && is_numeric($_POST['selmonth']) && is_numeric($_POST['selyear'])
&& $_POST['page'])
{
if ($DelDat == TRUE)
{
$SelDay = $_POST['selday'];
$SelMonth = $_POST['selmonth'];
$SelYear = $_POST['selyear'];
$LimitDate = mktime (0,0,0, $SelMonth, $SelDay, $SelYear );
if ($LimitDate != FALSE)
{
doquery ( "DELETE FROM {{table}} WHERE `message_time` <= '". $LimitDate ."';", 'messages');
doquery ( "DELETE FROM {{table}} WHERE `time` <= '". $LimitDate ."';", 'rw');
}
}
}

if ($Selected < 100)
$Mess = doquery("SELECT COUNT(*) AS `max` FROM {{table}} WHERE `message_type` = '". $Selected ."';", 'messages', TRUE);
elseif ($Selected == 100)
$Mess = doquery("SELECT COUNT(*) AS `max` FROM {{table}}", 'messages', TRUE);

$MaxPage = ceil ( ($Mess['max'] / 25) );

$parse['mlst_data_page'] = $ViewPage;
$parse['mlst_data_pagemax'] = $MaxPage;
$parse['mlst_data_sele'] = $Selected;
$parse['mlst_data_types'] = "<option value=\"0\"". (($Selected == "0") ? " SELECTED" : "") .">".$lang['mg_type'][0]."</option>";
$parse['mlst_data_types'] .= "<option value=\"1\"". (($Selected == "1") ? " SELECTED" : "") .">".$lang['mg_type'][1]."</option>";
$parse['mlst_data_types'] .= "<option value=\"2\"". (($Selected == "2") ? " SELECTED" : "") .">".$lang['mg_type'][2]."</option>";
$parse['mlst_data_types'] .= "<option value=\"3\"". (($Selected == "3") ? " SELECTED" : "") .">".$lang['mg_type'][3]."</option>";
$parse['mlst_data_types'] .= "<option value=\"4\"". (($Selected == "4") ? " SELECTED" : "") .">".$lang['mg_type'][4]."</option>";
$parse['mlst_data_types'] .= "<option value=\"5\"". (($Selected == "5") ? " SELECTED" : "") .">".$lang['mg_type'][5]."</option>";
$parse['mlst_data_types'] .= "<option value=\"15\"". (($Selected == "15") ? " SELECTED" : "") .">".$lang['mg_type'][15]."</option>";
$parse['mlst_data_types'] .= "<option value=\"99\"". (($Selected == "99") ? " SELECTED" : "") .">".$lang['mg_type'][99]."</option>";
$parse['mlst_data_types'] .= "<option value=\"100\"". (($Selected == "100") ? " SELECTED" : "") .">".$lang['ml_see_all_messages']."</option>";
$parse['mlst_data_pages'] = "";

for ( $cPage = 1; $cPage <= $MaxPage; $cPage++ )
{
$parse['mlst_data_pages'] .= "<option value=\"".$cPage."\"". (($ViewPage == $cPage) ? " SELECTED" : "") .">". $cPage ."/". $MaxPage ."</option>";
}

$StartRec = ($ViewPage - 1) * 25;

if ($Selected < 100)
$Messages = doquery("SELECT * FROM {{table}} WHERE `message_type` = '". $Selected ."' ORDER BY `message_time` DESC LIMIT ". $StartRec .",25;", 'messages');
elseif ($Selected == 100)
$Messages = doquery("SELECT * FROM {{table}} ORDER BY `message_time` DESC LIMIT ". $StartRec .",25;", 'messages');

while ($row = mysql_fetch_assoc($Messages))
{
$OwnerData = doquery ("SELECT `username` FROM {{table}} WHERE `id` = '". $row['message_owner'] ."';", 'users',TRUE);
$bloc['mlst_id'] = $row['message_id'];
$bloc['mlst_from'] = $row['message_from'];
$bloc['mlst_to'] = $OwnerData['username'] ." ".$lang['input_id'].":". $row['message_owner'];
$bloc['mlst_subject'] = $row['message_subject'];
$bloc['mlst_text'] = $row['message_text'];
$bloc['mlst_time'] = date ("d/M/y H:i:s", $row['message_time'] );

$parse['mlst_data_rows'] .= parsetemplate(gettemplate('adm/MessageListRows'), $bloc);
}
display (parsetemplate(gettemplate('adm/MessageListBody'), $parse), FALSE, '', TRUE, FALSE);
<?php

/**
* @project XG Proyect
* @version 2.10.x build 0000
* @copyright Copyright (C) 2008 - 2016
*/

define('INSIDE' , TRUE);
define('INSTALL' , FALSE);
define('IN_ADMIN', TRUE);
define('XGP_ROOT', './../');

include(XGP_ROOT . 'global.php');

if ($Observation != 1) die(message ($lang['404_page']));

$parse = $lang;
$Prev = ( !empty($_POST['prev']) ) ? TRUE : FALSE;
$Next = ( !empty($_POST['next']) ) ? TRUE : FALSE;
$DelSel = ( !empty($_POST['delsel']) ) ? TRUE : FALSE;
$DelDat = ( !empty($_POST['deldat']) ) ? TRUE : FALSE;
$CurrPage = ( !empty($_POST['curr']) ) ? $_POST['curr'] : 1;
$Selected = ( !empty($_POST['sele']) ) ? $_POST['sele'] : 0;
$SelType = isset($_POST['type']) ? $_POST['type'] : '';
$SelPage = isset($_POST['page']) ? $_POST['page'] : '';

$ViewPage = 1;
if ( $Selected != $SelType )
{
$Selected = $SelType;
$ViewPage = 1;
}
elseif ( $CurrPage != $SelPage )
{
$ViewPage = ( !empty($SelPage) ) ? $SelPage : 1;
}

if($Prev == TRUE)
{
$CurrPage -= 1;
if ($CurrPage >= 1)
$ViewPage = $CurrPage;
else
$ViewPage = 1;

}
elseif ($Next == TRUE && isset($_POST['page']) && $_POST['page'])
{
if ($Selected < 100)
$Mess = doquery("SELECT COUNT(*) AS `max` FROM {{table}} WHERE `message_type` = '". $Selected ."';", 'messages', TRUE);
elseif ($Selected == 100)
$Mess = doquery("SELECT COUNT(*) AS `max` FROM {{table}}", 'messages', TRUE);

$MaxPage = ceil ( ($Mess['max'] / 25) );
$CurrPage += 1;
if ($CurrPage <= $MaxPage)
$ViewPage = $CurrPage;
else
$ViewPage = $MaxPage;
}

if (isset($_POST['delsel']) && $_POST['delsel'] && isset($_POST['sele']) && $_POST['sele'] >= 1 && isset($_POST['page']) && $_POST['page'])
{
if ($DelSel == TRUE)
{
foreach($_POST['sele'] as $MessId => $Value)
{
if ($Value = "on")
doquery ( "DELETE FROM {{table}} WHERE `message_id` = '". $MessId ."';", 'messages');
}
}
}

if (isset($_POST['deldat']) && $_POST['deldat'] && $_POST['sele'] >= 1 && is_numeric($_POST['selday']) && is_numeric($_POST['selmonth']) && is_numeric($_POST['selyear'])
&& $_POST['page'])
{
if ($DelDat == TRUE)
{
$SelDay = $_POST['selday'];
$SelMonth = $_POST['selmonth'];
$SelYear = $_POST['selyear'];
$LimitDate = mktime (0,0,0, $SelMonth, $SelDay, $SelYear );
if ($LimitDate != FALSE)
{
doquery ( "DELETE FROM {{table}} WHERE `message_time` <= '". $LimitDate ."';", 'messages');
doquery ( "DELETE FROM {{table}} WHERE `time` <= '". $LimitDate ."';", 'rw');
}
}
}

if ($Selected < 100)
$Mess = doquery("SELECT COUNT(*) AS `max` FROM {{table}} WHERE `message_type` = '". $Selected ."';", 'messages', TRUE);
elseif ($Selected == 100)
$Mess = doquery("SELECT COUNT(*) AS `max` FROM {{table}}", 'messages', TRUE);

$MaxPage = ceil ( ($Mess['max'] / 25) );

$parse['mlst_data_page'] = $ViewPage;
$parse['mlst_data_pagemax'] = $MaxPage;
$parse['mlst_data_sele'] = $Selected;
$parse['mlst_data_types'] = "<option value=\"0\"". (($Selected == "0") ? " SELECTED" : "") .">".$lang['mg_type'][0]."</option>";
$parse['mlst_data_types'] .= "<option value=\"1\"". (($Selected == "1") ? " SELECTED" : "") .">".$lang['mg_type'][1]."</option>";
$parse['mlst_data_types'] .= "<option value=\"2\"". (($Selected == "2") ? " SELECTED" : "") .">".$lang['mg_type'][2]."</option>";
$parse['mlst_data_types'] .= "<option value=\"3\"". (($Selected == "3") ? " SELECTED" : "") .">".$lang['mg_type'][3]."</option>";
$parse['mlst_data_types'] .= "<option value=\"4\"". (($Selected == "4") ? " SELECTED" : "") .">".$lang['mg_type'][4]."</option>";
$parse['mlst_data_types'] .= "<option value=\"5\"". (($Selected == "5") ? " SELECTED" : "") .">".$lang['mg_type'][5]."</option>";
$parse['mlst_data_types'] .= "<option value=\"15\"". (($Selected == "15") ? " SELECTED" : "") .">".$lang['mg_type'][15]."</option>";
$parse['mlst_data_types'] .= "<option value=\"99\"". (($Selected == "99") ? " SELECTED" : "") .">".$lang['mg_type'][99]."</option>";
$parse['mlst_data_types'] .= "<option value=\"100\"". (($Selected == "100") ? " SELECTED" : "") .">".$lang['ml_see_all_messages']."</option>";
$parse['mlst_data_pages'] = "";

for ( $cPage = 1; $cPage <= $MaxPage; $cPage++ )
{
$parse['mlst_data_pages'] .= "<option value=\"".$cPage."\"". (($ViewPage == $cPage) ? " SELECTED" : "") .">". $cPage ."/". $MaxPage ."</option>";
}

$StartRec = ($ViewPage - 1) * 25;

if ($Selected < 100)
$Messages = doquery("SELECT * FROM {{table}} WHERE `message_type` = '". $Selected ."' ORDER BY `message_time` DESC LIMIT ". $StartRec .",25;", 'messages');
elseif ($Selected == 100)
$Messages = doquery("SELECT * FROM {{table}} ORDER BY `message_time` DESC LIMIT ". $StartRec .",25;", 'messages');

while ($row = mysql_fetch_assoc($Messages))
{
$OwnerData = doquery ("SELECT `username` FROM {{table}} WHERE `id` = '". $row['message_owner'] ."';", 'users',TRUE);
$bloc['mlst_id'] = $row['message_id'];
$bloc['mlst_from'] = $row['message_from'];
$bloc['mlst_to'] = $OwnerData['username'] ." ".$lang['input_id'].":". $row['message_owner'];
$bloc['mlst_subject'] = $row['message_subject'];
$bloc['mlst_text'] = $row['message_text'];
$bloc['mlst_time'] = date ("d/M/y H:i:s", $row['message_time'] );

$parse['mlst_data_rows'] .= parsetemplate(gettemplate('adm/MessageListRows'), $bloc);
}
display (parsetemplate(gettemplate('adm/MessageListBody'), $parse), FALSE, '', TRUE, FALSE);
?>
15 changes: 8 additions & 7 deletions src/2.10.9/upload/adm/SearchingPage.php
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ function MyCrazyLittleSearch($SpecifyItems, $WhereItem, $SpecifyWhere, $SpecialS
}



$Minimize = '';
$SearchFile = isset($_GET['search']) ? $_GET['search'] : '';
$SearchFor = isset($_GET['search_in']) ? $_GET['search_in'] : '';
$SearchMethod = isset($_GET['fuki']) ? $_GET['fuki'] : '';
Expand Down Expand Up @@ -288,7 +288,7 @@ function MyCrazyLittleSearch($SpecifyItems, $WhereItem, $SpecifyWhere, $SpecialS
$SpecifyWhere = "LIKE '%".$SpecifyWhere."%'";

// MINIMIZADOR
if ($_GET['minimize'] == 'on')
if (isset($_GET['minimize']) && $_GET['minimize'] == 'on')
{
$Minimize = "&minimize=on";
$parse['minimize'] = 'checked = "checked"';
Expand All @@ -297,11 +297,12 @@ function MyCrazyLittleSearch($SpecifyItems, $WhereItem, $SpecifyWhere, $SpecialS

if ($_GET)
{
$ArrayUsers = array("users", "vacation", "admin", "inactives", "online");
$ArrayPlanets = array("planet", "moon", "p_connect");
$ArrayBanned = array("banned");
$ArrayAlliance = array("alliance");

$ArrayUsers = array("users", "vacation", "admin", "inactives", "online");
$ArrayPlanets = array("planet", "moon", "p_connect");
$ArrayBanned = array("banned");
$ArrayAlliance = array("alliance");
$SpecialSpecify = '';

if (in_array($SearchFile, $ArrayUsers))
{
$Table = "users";
Expand Down
Loading

0 comments on commit 2eeddfb

Please sign in to comment.