From: <lpa...@us...> - 2022-02-06 14:08:49
|
Revision: 10013 http://sourceforge.net/p/planeshift/code/10013 Author: lpancallo Date: 2022-02-06 14:08:47 +0000 (Sun, 06 Feb 2022) Log Message: ----------- Improvements to unusedchars.php Modified Paths: -------------- www/webconsole-new/admin/unusedchars.php Modified: www/webconsole-new/admin/unusedchars.php =================================================================== --- www/webconsole-new/admin/unusedchars.php 2022-01-01 20:41:01 UTC (rev 10012) +++ www/webconsole-new/admin/unusedchars.php 2022-02-06 14:08:47 UTC (rev 10013) @@ -33,7 +33,7 @@ echo '</div></div></form>'."\n"; // end tr echo '<br/><br/>'; - $query = 'SELECT id, name, last_login, time_connected_sec, money_circles + money_octas + money_hexas + money_trias as coins FROM characters WHERE character_type=0 AND last_login<\''.$startfrom.'\' AND time_connected_sec <='. $secondsconnected . ' ORDER BY last_login asc'; + $query = 'SELECT id, name, lastname, last_login, time_connected_sec, money_circles + money_octas + money_hexas + money_trias as coins FROM characters WHERE character_type=0 AND last_login<\''.$startfrom.'\' AND time_connected_sec <='. $secondsconnected . ' ORDER BY last_login asc'; $result = mysql_query2($query); echo 'Total chars: '.mysqli_num_rows($result); @@ -45,6 +45,8 @@ function printTable($result) { $idStr = ''; + $nameStr = ''; + $countDelete = 0; echo '<div class="table"><div class="th">Character ID</div><div class="th">Character Name</div><div class="th">Last Login Date</div><div class="th">Time connected in seconds</div><div class="th">Coins</div><div class="th">Items</div>'; while ($row = fetchSqlAssoc($result)) { @@ -64,10 +66,17 @@ if ($row['coins'] == 0 && $items_row['count'] == 0) { $idStr = $idStr . $row['id'] . ','; + $nameStr = $nameStr . $row['name'] . ' ' . $row['lastname'] . ','; + $countDelete = $countDelete + 1; } } echo '</div>'."\n"; // end table + // generate list of names to publish + echo '</br><h3>Characters names to delete, excluding the ones with items or coins </h3>'; + echo 'to delete chars: ' . $countDelete. '<br/><br/>'; + echo 'names: ' . $nameStr . '<br/><br/>'; + // generate SQL to delete echo '</br><h3>SQL to delete the characters above, excluding the ones with items or coins </h3>'; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |