1.
Ickam napisał(a):
wybór osób np przez id
jeśli wystarczy ci możliwość wpisania ich w pliku i jeżeli chodzi ci o stałe osoby na cały forum a nie inne przy każdym rzucie to
(jeśli chodzi o coś innego to powiedz)
znajdź w viewtopic.php
Kod:
$sql = "SELECT d.dice_nr, d.dice_value, d.dice_type, d.dice_date, u.username FROM " . DICES_TABLE . " d, " . USERS_TABLE . " u WHERE d.dice_post_id=".$postrow[$i]['post_id']." AND u.user_id=d.dice_roller";
if(!($result = $db->sql_query($sql)))
{
message_die(GENERAL_ERROR, "Could not obtain dices rolls results", '', __LINE__, __FILE__, $sql);
}
$post_dices_rolls = '';
while($dice_roll = $db->sql_fetchrow($result))
{
$post_dices_rolls .= sprintf($lang['Dice_roll_explain'], create_date($board_config['default_dateformat'], $dice_roll['dice_date'], $board_config['board_timezone']), $dice_roll['username'], $dice_roll['dice_nr'].'k'.$dice_roll['dice_type'], $dice_roll['dice_value']).'<br />';
}
zmień na
Kod:
$users_dice_arr = array(2, 5, 17); //id userów oddzielone przecienkiem
if(in_array($userdata['user_id'], $users_dice_arr))
{
$sql = "SELECT d.dice_nr, d.dice_value, d.dice_type, d.dice_date, u.username FROM " . DICES_TABLE . " d, " . USERS_TABLE . " u WHERE d.dice_post_id=".$postrow[$i]['post_id']." AND u.user_id=d.dice_roller";
if(!($result = $db->sql_query($sql)))
{
message_die(GENERAL_ERROR, "Could not obtain dices rolls results", '', __LINE__, __FILE__, $sql);
}
$post_dices_rolls = '';
while($dice_roll = $db->sql_fetchrow($result))
{
$post_dices_rolls .= sprintf($lang['Dice_roll_explain'], create_date($board_config['default_dateformat'], $dice_roll['dice_date'], $board_config['board_timezone']), $dice_roll['username'], $dice_roll['dice_nr'].'k'.$dice_roll['dice_type'], $dice_roll['dice_value']).'<br />';
}
}
else
{
$post_dices_rolls = '';
}
2.
Ickam napisał(a):
wysłanie wyniku rzutu
wysłanie przez co? pw, email?
AIFM [1%] - kiedyś powstanie