Exemple #1
0
        $roster->tpl->assign_block_vars('profile', array('CNAME' => '<a href="' . makelink('user-user-profile-' . $data['usr']) . '" target="_blank">' . $data['usr'] . '</a>', 'CUSR' => $data['usr'], 'ID' => $uid));
        $k = 0;
        foreach ($data as $val_name => $value) {
            if (substr($val_name, 0, 5) != 'show_') {
                continue;
            }
            $field = '<div class="radioset">';
            $field .= '	<input type="radio" id="chard_f' . $k . '_' . $data['id'] . '" name="disp_:' . $val_name . '" value="0" ' . ($value == '0' ? 'checked="checked"' : '') . ' /><label for="chard_f' . $k . '_' . $data['id'] . '">Off</label>';
            $field .= '	<input type="radio" id="chard_n' . $k . '_' . $data['id'] . '" name="disp_:' . $val_name . '" value="1" ' . ($value == '1' ? 'checked="checked"' : '') . ' /><label for="chard_n' . $k . '_' . $data['id'] . '">On</label>';
            $field .= '</div>';
            $roster->tpl->assign_block_vars('profile.cfg', array('NAME' => $roster->locale->act['user_settings'][substr($val_name, 5)], 'FIELD' => $field));
            $k++;
        }
        $i++;
    }
    $roster->tpl->assign_block_vars('profile.cfg', array('NAME' => $roster->locale->act['user_settings']['main'], 'FIELD' => selectMain($uid)));
    $roster->tpl->assign_block_vars('profile.cfg', array('NAME' => $roster->locale->act['user_settings']['src_gen'], 'FIELD' => selectGen($uid)));
} else {
    $formbody = 'No Data';
}
$tab1 = explode('|', $roster->locale->act['user_settings']['set']);
$tab3 = explode('|', $roster->locale->act['user_main_menu']['my_prof']);
$menu = '
<ul class="tab_menu">
	<li class="selected"><span class="ui-icon ui-icon-help" style="float:left;cursor:help;" ' . makeOverlib($tab1[1], $tab1[0], '', 2, '', ',WRAP') . '></span><a href="' . makelink('ucp-addon-user') . '">' . $tab1[0] . '</a></li>
	<li><span class="ui-icon ui-icon-help" style="float:left;cursor:help;" ' . makeOverlib($tab3[1], $tab3[0], '', 2, '', ',WRAP') . '></span><a href="' . makelink('ucp-addon-user-edit') . '">' . $tab3[0] . '</a></li>
</ul>';
$roster->tpl->set_filenames(array('ucp2' => $addon['basename'] . '/ucp-profile.html'));
$roster->tpl->assign_vars(array('ROSTERCP_TITLE' => !empty($rostercp_title) ? $rostercp_title : $roster->locale->act['roster_cp_ab'], 'PAGE_INFO' => 'Profile Display Settings'));
$body = $roster->tpl->fetch('ucp2');
/**
Exemple #2
0
			' . $data['name'] . "</td>\n";
        $k = 0;
        foreach ($data as $val_name => $value) {
            if (substr($val_name, 0, 5) != 'show_') {
                continue;
            }
            $formbody .= '		<td class="membersRow' . ($i % 2 + 1) . '">' . "\n";
            $formbody .= '			<input type="radio" id="chard_f' . $k . '_' . $data['uid'] . '" name="disp_' . $data['uid'] . ':' . $val_name . '" value="0" ' . ($value == '0' ? 'checked="checked"' : '') . ' /><label for="chard_f' . $k . '_' . $data['uid'] . '">Off</label><br />' . "\n";
            $formbody .= '			<input type="radio" id="chard_n' . $k . '_' . $data['uid'] . '" name="disp_' . $data['uid'] . ':' . $val_name . '" value="1" ' . ($value == '1' ? 'checked="checked"' : '') . ' /><label for="chard_n' . $k . '_' . $data['uid'] . '">On</label>' . "\n";
            $formbody .= "\t\t</td>\n";
            $k++;
        }
        $formbody .= "\t</tr>\n";
        $i++;
    }
    $formbody .= '<tr><td class="membersRow2" colspan="13"><center><div>' . $roster->locale->act['acc_settings']['main'] . ': ' . selectMain($uid) . '&nbsp;&nbsp;&nbsp;' . $roster->locale->act['acc_settings']['src_gen'] . ': ' . selectGen($uid) . '</div></center></td></tr>';
    $formbody .= "</table>\n" . border('syellow', 'end') . "\n</div>\n";
    $formbody .= $prev . $listing . $next;
} else {
    $formbody = 'No Data';
}
$roster->output['body_onload'] .= 'initARC(\'config\',\'radioOn\',\'radioOff\',\'checkboxOn\',\'checkboxOff\');';
$body = "\n<form action=\"\" method=\"post\" enctype=\"multipart/form-data\" id=\"config\" onsubmit=\"return confirm('" . $roster->locale->act['confirm_config_submit'] . "');submitonce(this);\">\n\t{$formbody}\n<br /><br />\n<input type=\"submit\" value=\"" . $roster->locale->act['config_submit_button'] . "\" />\n<input type=\"reset\" name=\"Reset\" value=\"" . $roster->locale->act['config_reset_button'] . "\" onclick=\"return confirm('" . $roster->locale->act['confirm_config_reset'] . "')\"/>\n<input type=\"hidden\" name=\"process\" value=\"process\" />\n\n</form>";
$tab1 = explode('|', $roster->locale->act['acc_settings']['set']);
$tab2 = explode('|', $roster->locale->act['acc_settings']['prof']);
$menu = messagebox('
<ul class="tab_menu">
	<li><a href="' . makelink('util-accounts-settings') . '" style="cursor:help;"' . makeOverlib($tab1[1], $tab1[0], '', 1, '', ',WRAP') . '>' . $tab1[0] . '</a></li>
	<li class="selected"><a href="' . makelink('util-accounts-settings-profile') . '" style="cursor:help;"' . makeOverlib($tab2[1], $tab2[0], '', 1, '', ',WRAP') . '>' . $tab2[0] . '</a></li>
</ul>
', $roster->locale->act['acc_page']['settings'], 'sgray', '145px');