' . l10n('Home') . '' . $conf['level_separator'] . '' . l10n('Users').''. $conf['level_separator'] . ''.$username. '';
$template->assign(
'gestionB', array(
'USERUSBU' => $username,
));
$query = '
SELECT DISTINCT(id)
FROM ' . IMAGES_TABLE . '
INNER JOIN ' . IMAGE_CATEGORY_TABLE . ' AS ic ON id = ic.image_id
' . get_sql_condition_FandF
(
array
(
'forbidden_categories' => 'category_id',
'visible_categories' => 'category_id',
'visible_images' => 'id'
), 'WHERE'
) . '
AND added_by = \'' . $testd[0] . '\'
' . $conf['order_by'] . '
;';
$page = array_merge
(
$page, array
(
'title' => '' . $me . '',
'items' => array_from_query($query, 'id'),
)
);
}else{
show_users_home();
}
}else{
show_users_home();
}
/*fin gestion URL*/
function show_users_home(){
/*users cloud*/
// template vars
global $page, $conf, $user, $template;
$me = 'user-';
$page['section'] = $me;
$page['section_title'] = '' . l10n('Home') . '' . $conf['level_separator'] . '' . l10n('Users') . '';
$userslistecloud1 = see_userlist_nb_photo();
$level=see_nb_photo();
if (pwg_db_num_rows($userslistecloud1)) {
while ($userslistecloud = pwg_db_fetch_assoc($userslistecloud1)) {
if($userslistecloud['PBU']>$level*4/5){$wheight=5;}
else if($userslistecloud['PBU']>$level*3/5){$wheight=4;}
else if($userslistecloud['PBU']>$level*2/5){$wheight=3;}
else if($userslistecloud['PBU']>$level*1/5){$wheight=2;}
else{$wheight=1;}
$items = array(
'USERSSPBYLID' => $userslistecloud['id'],
'USERSSPBYL' => $userslistecloud['username'],
'USERSSPBYLC' => $userslistecloud['PBU'],
'USERSSPBYWEIGHT' => $wheight,
);
$template->append('userslistecloud1', $items);
}
}
$linkusersliste = get_root_url() . 'index.php?/user-';
$template->assign(array(
'USERSSPBY'=> $linkusersliste,
'USERSSPBYCOLOR' => $conf['see_photos_by_user_color'],
'USERSSPBYSHAPE' => $conf['see_photos_by_user_shape'],
));
if($conf['see_photos_by_user_show_user_home']==1){
$template->assign(
'gestionD', array(
'SPBA_PATH'=> get_root_url() . SPBA_PATH,
));
}else if($conf['see_photos_by_user_show_user_home']==2){
$template->assign(
'gestionC', array(
'SPBA_PATH'=> get_root_url() . SPBA_PATH,
));
}else if($conf['see_photos_by_user_show_user_home']==3){
$groups = array();
$result = see_userlist_nb_photo();
while ($row = pwg_db_fetch_assoc($result)) {
$groups[$row['id']] = $row['username'] . ' (' . $row['PBU'] . ')';
}
$selected = 0;
if (empty($testd[0])) {
$options['b'] = l10n('select user');
} else {
$options['b'] = l10n('select other user');
}
$options['a'] = '----------------------';
foreach ($groups as $metalist => $metalist2) {
$options[$metalist] = $metalist2;
}
$template->assign(
'gestionA', array(
'OPTIONS' => $options,
'SELECTED' => $selected
));
if (isset($_POST['submitchoixauteur'])) {
$redirect_url = get_root_url() . 'index.php?/user-';
if(is_numeric($_POST['metalist'])){
$query = 'SELECT id, username FROM ' . USERS_TABLE . ' WHERE id = \'' . $_POST['metalist'] . '\';';
$result = pwg_query($query);
$row = pwg_db_fetch_assoc($result);
$username = $row['username'];
$redirect_url .=($_POST['metalist']).'-'.$username;
}
redirect($redirect_url);
}
}else{}
}
?>