Exemplo n.º 1
0
<?
 //var_dump($params);
$orig_params = $params;
if(!$limit){
$limit = 12;	
}
?>

<h2>New on Skid-e-Kids</h2>
<ul class="user_friends_list <? print $list_class ?>">
  <? $users = get_new_users('300 days', 50);  ?>
  <? if(!empty($users)): 
  shuffle($users);
  $users = array_slice($users, 0, $limit);
  ?>
  <? foreach($users as $item): ?>
  <? $user = get_user($item); ?>
  <li> <a href="<?php 
print profile_link($item);
?>
"> <span style="background-image: url(<? print user_thumbnail($item, 75) ?>)"></span> <strong><? print user_name($item); ?></strong> </a> </li>
  <? endforeach; ?>
  <? endif; ?>
</ul>
<br class="c" />
<br />

Exemplo n.º 2
0
function display_add_users_conf_form($new_users)
{
    //$users is an array with seperate different users' names at each index- with addslashes (by magic_quotes)
    ?>
<table width="90%">
<tr>
	<td align="center" class="naglowek">Zaraz dodasz u¿ytkowników<hr></td>
</tr>
<tr>
	<td>
	<table>
<?php 
    if (!empty($new_users)) {
        ?>
	<tr>
		<td align="right" valign="top"><b>Istniej±cy u¿ytkownicy (zostan± zignorowani):</b></td>
		<td align="left">
<?php 
        $existing_users = get_existing_users($new_users);
        if ($existing_users === false) {
            echo 'B³±d bazy danych, spróbuj pó¼niej.';
        } else {
            if (empty($existing_users)) {
                echo '-';
            } else {
                foreach (array_keys($existing_users) as $user_id) {
                    display_link_to_user($user_id);
                    echo "<br>\n";
                }
            }
        }
        ?>
		</td>
	</tr>
	<tr>
		<td align="right" valign="top"><b>Nowi u¿ytkownicy:</b></td>
		<td align="left">
<?php 
        $new_users = get_new_users($new_users);
        if (empty($new_users)) {
            echo '-';
        } else {
            foreach ($new_users as $user) {
                echo $user . "<br>\n";
            }
        }
        ?>
        </td>
	</tr>
<?php 
    }
    ?>
	<tr>
		<td align="right"><form action="add_users_form.php" method="post">
		<input type="hidden" name="users" value="<?php 
    echo htmlspecialchars(join("\n", $new_users));
    ?>
">
		<input type="submit" value="Wstecz"></form>
		</td>
		<td align="left">
		<form action="add_users.php" method="post">
		<input type="hidden" name="confirmed" value="yes">
		<input type="hidden" name="users" value="<?php 
    echo htmlspecialchars(join("\n", $new_users));
    ?>
">
		<input type="submit" value="Zatwierd¼">
		</form>
		</td>
	</tr>
	</table>
	</td>
</tr>
</table>
<?php 
}