本文整理汇总了PHP中ca_users::preferenceHtmlFormElement方法的典型用法代码示例。如果您正苦于以下问题:PHP ca_users::preferenceHtmlFormElement方法的具体用法?PHP ca_users::preferenceHtmlFormElement怎么用?PHP ca_users::preferenceHtmlFormElement使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ca_users
的用法示例。
在下文中一共展示了ca_users::preferenceHtmlFormElement方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: form
function form($t_user = "")
{
if ($vs_last_page = $this->request->getParameter("site_last_page", pString)) {
# --- last_page is passed as "Sets" if was trying to add an image to set, "Bookmarks" if user was trying to bookmark an item
$this->request->session->setVar('site_last_page', $vs_last_page);
$this->request->session->setVar('site_last_page_object_id', $this->request->getParameter("object_id", pInteger));
$this->request->session->setVar('site_last_page_row_id', $this->request->getParameter("row_id", pInteger));
$this->request->session->setVar('site_last_page_tablename', $this->request->getParameter("tablename", pString));
}
if (!is_object($t_user)) {
$t_user = new ca_users();
}
$this->view->setVar("fname", $t_user->htmlFormElement("fname", "<div><b>" . _t("First name") . "</b><br/>^ELEMENT</div>"));
$this->view->setVar("lname", $t_user->htmlFormElement("lname", "<div><b>" . _t("Last name") . "</b><br/>^ELEMENT</div>"));
$this->view->setVar("email", $t_user->htmlFormElement("email", "<div><b>" . _t("Email address") . "</b><br/>^ELEMENT</div>"));
$this->view->setVar("password", $t_user->htmlFormElement("password", "<div><b>" . _t("Password") . "</b><br/>^ELEMENT</div>", array('value' => '')));
$va_profile_prefs = $t_user->getValidPreferences('profile');
if (is_array($va_profile_prefs) && sizeof($va_profile_prefs)) {
$va_elements = array();
foreach ($va_profile_prefs as $vs_pref) {
$va_pref_info = $t_user->getPreferenceInfo($vs_pref);
$va_elements[$vs_pref] = array('element' => $t_user->preferenceHtmlFormElement($vs_pref), 'formatted_element' => $t_user->preferenceHtmlFormElement($vs_pref, "<div><b>" . $va_pref_info['label'] . "</b><br/>^ELEMENT</div>"), 'info' => $va_pref_info, 'label' => $va_pref_info['label']);
}
$this->view->setVar("profile_settings", $va_elements);
}
$this->render('LoginReg/loginreg_html.php');
}