Location: PHPKode > projects > phlyMail Lite > phlymail/frontend/templates/contacts.preview.tpl
<script type="text/javascript">
/*<![CDATA[*/
function print()
{
    window.open('{print_url}', 'printcontact_{id}', 'width=650,height=620,left=100,top=100,scrollbars=yes,resizable=yes,location=no,menubar=no,status=no,toolbar=no');
}

function edit()
{
    window.open('{edit_url}', 'editcontact_{id}', 'width=510,height=470,left=100,top=100,scrollbars=no,resizable=yes,location=no,menubar=no,status=yes,toolbar=no');
}

$(document).ready(function () {
    $('.field_email').each(function() {
        if ($(this).text().length > 0) {
            $(this).html('<a href="{composemail_url}' + $(this).text() + '" target="_blank">' + $(this).text() + '</a>');
        }
    });
    $('.field_www').each(function() {
        if ($(this).text().length > 0) {
            var URL = $(this).text();
            if (!URL.match(/^([a-zA-Z])+\:(\/\/)?/)) {
                URL = 'http://' + URL;
            }
            $(this).html('<a href="' + URL + '" target="_blank">' + $(this).text() + '</a>');
        }
    });
});

/*]]>*/
</script>
<div style="width:49%;float:left;">
    <div style="padding:4px;text-align:left">
        <div style="text-align:left; font-size: 1.5em; margin:4px; position:relative;"><!-- START ifimage -->
            <div style="float:right;width:{imgw}px;height:{imgh}px;">
                <img src="{imgurl}" alt="" style="display:block"/>
            </div><!-- END ifimage -->
            <strong>{displayname}</strong><br />
            <span style="font-style:italic;">{group}</span>
        </div>
        <br style="clear:both"/>
        <fieldset>
            <legend>{leg_general}</legend>
            <table border="0" cellpadding="2" cellspacing="0">
                <tr>
                    <td class="l t"><strong>{msg_nick}</strong></td><td class="l t">{nick}</td>
                </tr>
                <tr>
                   <td class="l t"><strong>{msg_fname}</strong></td><td class="l t">{fname}</td>
                </tr>
                <tr>
                    <td class="l t"><strong>{msg_lname}</strong></td><td class="l t">{lname}</td>
                </tr>
                <tr>
                    <td class="l t"><strong>{msg_bday}</strong></td><td class="l t">{bday}</td>
                </tr>
                <tr>
                    <td class="l t"><strong>{msg_comment}</strong></td><td class="l t">{comment}</td>
                </tr>
            </table>
        </fieldset>
        <br />
        <br />
        <fieldset>
            <legend>{leg_personal}</legend>
            <table border="0" cellpadding="2" cellspacing="0">
                <tr>
                    <td class="l t"><strong>{msg_addr}</strong></td><td class="l t">{addr}</td>
                </tr>
                <tr>
                    <td class="l t"><strong>{msg_street}</strong></td><td class="l t">{street}</td>
                </tr>
                <tr>
                    <td class="l t"><strong>{msg_zip} / {msg_location}</strong></td><td class="l t">{zip_location}</td>
                </tr>
                <tr>
                    <td class="l t"><strong>{msg_region} / {msg_country}</strong></td><td class="l t">{region_country}</td>
                </tr>
                <tr>
                    <td class="l t"><strong>{msg_fonprivate}</strong></td><td class="l t">{fon_private}</td>
                </tr>
                <tr>
                    <td class="l t"><strong>{msg_fax}</strong></td><td class="l t">{fax}</td>
                </tr>
                <tr>
                    <td class="l t"><strong>{msg_mobile}</strong></td><td class="l t">{cellular}</td>
                </tr>
                <tr>
                    <td class="l t"><strong>{msg_email1}</strong></td><td class="l t field_email">{email1}</td>
                </tr>
                <tr>
                    <td class="l t"><strong>{msg_www}</strong></td><td class="l t field_www">{www}</td>
                </tr>
            </table>
        </fieldset>
    </div>
</div>
<div style="width:49%;float:right;">
    <div style="text-align:right;padding:2px;">
        <button type="button" onclick="print();">{msg_print}</button><!-- START may_edit -->
        &nbsp;
        <button type="button" onclick="edit();">{msg_edit}</button><!-- END may_edit -->
    </div>
    <div style="padding:4px;text-align:left">
        <fieldset>
            <legend>{leg_business}</legend>
            <table border="0" cellpadding="2" cellspacing="0">
                <tr>
                    <td class="l t"><strong>{msg_company}</strong></td><td class="l t">{company}</td>
                </tr>
                <tr>
                    <td class="l t"><strong>{msg_comp_dep}</strong></td><td class="l t">{department}</td>
                </tr>
                <tr>
                    <td class="l t"><strong>{msg_addr}</strong></td><td class="l t">{comp_addr}</td>
                </tr>
                <tr>
                    <td class="l t"><strong>{msg_street}</strong></td><td class="l t">{comp_street}</td>
                </tr>
                <tr>
                    <td class="l t"><strong>{msg_zip} / {msg_location}</strong></td><td class="l t">{comp_zip_location}</td>
                </tr>
                <tr>
                    <td class="l t"><strong>{msg_region} / {msg_country}</strong></td><td class="l t">{comp_region_country}</td>
                </tr>
                <tr>
                    <td class="l t"><strong>{msg_fonbusiness}</strong></td><td class="l t">{fon_business}</td>
                </tr>
                <tr>
                    <td class="l t"><strong>{msg_fax}</strong></td><td class="l t">{comp_fax}</td>
                </tr>
                <tr>
                    <td class="l t"><strong>{msg_mobile}</strong></td><td class="l t">{comp_cellular}</td>
                </tr>
                <tr>
                    <td class="l t"><strong>{msg_email2}</strong></td><td class="l t field_email">{email2}</td>
                </tr>
                <tr>
                    <td class="l t"><strong>{msg_www}</strong></td><td class="l t field_www">{comp_www}</td>
                </tr>
            </table>
        </fieldset>
    </div>
</div>
Return current item: phlyMail Lite