|
<%
try {
Vector vectID = EMailing.getEmaHtmlCtlGrpID();
for(int i = 0; i < vectID.size(); i++) {
Vector usr = Utils.explodeList((String)vectID.elementAt(i), ":");
String usrID = (String)usr.elementAt(0);
String usrType = (String)usr.elementAt(1);
String usrName = "";
boolean isPerson = "Person".equals(usrType);
String radical = isPerson ? "Per" : "Sil";
String[] fields = new String[ctlFields.length];
for(int j = 0; j < ctlFields.length; j++) {
fields[j] = radical + ctlFields[j];
}
String[][] query = {{radical + "ID = " + Utils.formatToSQL(context, usrID)}};
Hashtable usrVal = (Hashtable)(isPerson ? PersonBean.listSummary(session, fields, query, 0, 1) : SilhouetteBean.listSummary(session, fields, query, 0, 1)).firstElement();
for(int j = 0; j < fields.length - 1; j++) {
usrName += (usrVal.get(fields[j]) == null ? "" : (String)usrVal.get(fields[j]) + " ");
}
usrName = usrName.trim();
if(usrName.equals("")) {
usrName = (String)usrVal.get(fields[fields.length - 1]);
} else {
String usrMail = (String)usrVal.get(fields[fields.length - 1]);
if(usrMail != null) {
usrName += " <" + usrMail + ">";
}
}
String strLink = "";
if (isPerson){
strLink = "/read_person.fl?id="+usrID;
}else {
strLink = "/read_silhouette.fl?id="+usrID;
}
%>
<%= Utils.formatToWeb(usrName, false) %>
<%
}
} catch (Exception ex) { } %>
|
"/>
|
|
|