Code: Select all
<?php
include 'config.php';
$table = 'phpbb_users';
if (!mysql_connect($dbhost, $dbuser, $dbpasswd))
die("Can't connect to the database");
if (!mysql_select_db($dbname))
die("Can't select the database");
// sending query
$result = mysql_query("SELECT user_email FROM {$table}");
if (!$result) {
die("Query to show fields from table failed");
}
$fields_num = mysql_num_fields($result);
echo "<h1>All user's email addresses:</h1>";
// printing table headers
for($i=0; $i<$fields_num; $i++)
{
$field = mysql_fetch_field($result);
}
echo "</tr>\n";
// printing table rows
while($row = mysql_fetch_row($result))
{
// $row is array... foreach( .. ) puts every element
// of $row to $cell variable
foreach($row as $cell)
echo "<td>$cell<br></td>";
echo "</tr>\n";
}
mysql_free_result($result);
?>
Code: Select all
<form id="action_purge_cache_form" method="post" action="{U_ACTION}">
<dl>
<dt><label for="action_purge_cache">{L_PURGE_CACHE}</label><br /><span>{L_PURGE_CACHE_EXPLAIN}</span></dt>
<dd><input type="hidden" name="action" value="purge_cache" /><input class="button2" type="submit" id="action_purge_cache" name="action_purge_cache" value="{L_RUN}" /></dd>
</dl>
</form>
<form><dl>
Code: Select all
<dl>
<dt><label>List all emails</label><br /><span>Lists all emails of all users in one text file.</span></dt>
<dd><input class="button2" type="button" onClick="document.location.href='http://www.yourforumurl.com/path/showusers.php'" value="Run now" /></dd></dl></form>