Esempio n. 1
0
File: umtag.php Progetto: philum/cms
function ummoay_build($p, $o)
{
    req('art,tri,pop,spe');
    reqp('msqarts');
    $tmp = ummoay_template();
    $r = req_arts_y($p);
    $rtg = list_tags();
    if ($r) {
        foreach ($r as $k => $v) {
            list($id, $day, $msg, $cat, $tag, $lk) = $v;
            $day = clean_day_tw($day);
            $msg = format_txt($msg, '', '');
            $lnk = lka(urlread($id));
            $pop = lj('', 'popup_trckpop___' . $id, picto('forum', 16));
            $rb[$day] = array('suj' => $cat, 'day' => mkday($day, 'Y/m/d'), 'msg' => $msg, 'url' => $lk, 'open' => popart($id, 'articles') . ' ' . $pop, 'tag' => $rc = $rtg[$id]);
        }
    }
    krsort($rb);
    foreach ($rb as $k => $v) {
        $rd[nms(100)] .= template_build($tmp, $v);
        $rc = $v['tag'];
        if ($rc) {
            foreach ($rc as $kb => $vb) {
                $rd[$kb] .= template_build($tmp, $v);
            }
        }
    }
    return make_tabs($rd);
}
Esempio n. 2
0
     $ttid = find_wishlist_item(html_entity_decode($artist), html_entity_decode($album), html_entity_decode($title));
     if ($ttid == null) {
         header('HTTP/1.1 400 Bad Request');
     } else {
         delete_track($ttid);
     }
     break;
 case 'cleanup':
     remove_cruft();
     update_track_stats();
     $returninfo = array();
     $returninfo['stats'] = alistheader(get_stat('ArtistCount'), get_stat('AlbumCount'), get_stat('TrackCount'), format_time(get_stat('TotalTime')));
     print json_encode($returninfo);
     break;
 case 'gettags':
     print json_encode(list_tags());
     break;
 case 'getfaveartists':
     print json_encode(get_fave_artists());
     break;
 case 'getcharts':
     $charts = array();
     $charts['Artists'] = get_artist_charts();
     $charts['Albums'] = get_album_charts();
     $charts['Tracks'] = get_track_charts();
     print json_encode($charts);
     break;
 case 'geturis':
     $uris = getItemsToAdd($uri, "");
     print json_encode($uris);
     break;
 }
 $numrows = mysql_num_rows($result);
 // FIXME strip slashes from output
 $html .= "<table width='99%' align='center'>";
 $html .= "<tr><th>{$strForenames}</th><th>{$strSurname}</th><th>";
 $html .= "{$strEmail}</th><th>{$strSite}</th><th>{$strAddress1}</th>";
 $html .= "<th>{$strAddress2}</th><th>{$strCity}</th><th>{$strCounty}</th>";
 $html .= "<th>{$strPostcode}</th><th>{$strCountry}</th><th>{$strTelephone}";
 $html .= "</th><th>{$strProducts}</th></tr>";
 $csvfieldheaders .= "\"{$strForenames}\",\"{$strSurname}\",\"{$strEmail}\",\"{$strSite}\",\"";
 $csvfieldheaders .= "{$strAddress1}\",\"{$strAddress2}\",\"{$strCity}\",\"{$strCounty}\",\"";
 $csvfieldheaders .= "{$strPostcode}\",\"{$strCountry}\",\"{$strTelephone}\",\"";
 $csvfieldheaders .= "{$strProducts}\"\r\n";
 $rowcount = 0;
 while ($row = mysql_fetch_object($result)) {
     $tags = list_tags($row->siteid, TAG_SITE, FALSE);
     $tags = explode(', ', $tags);
     if (!empty($filtertags)) {
         if (in_array($filtertags, $tags)) {
             $hide = FALSE;
         } else {
             $hide = TRUE;
         }
     } else {
         $hide = FALSE;
     }
     if ($row->contactemail != $lastemail and $hide == FALSE) {
         $html .= "<tr class='shade2'><td>{$row->forenames}</td>";
         $html .= "<td>{$row->surname}</td>";
         if ($row->dataprotection_email != 'Yes') {
             $html .= "<td>{$row->contactemail}</td>";
Esempio n. 4
0
        echo "<input type='text' name='lifetime_start' id='lifetime_start' size='10' value='";
        if ($software->lifetime_start > 1) {
            echo date('Y-m-d', mysql2date($software->lifetime_start));
        }
        echo "' /> ";
        echo date_picker('editsoftware.lifetime_start');
        echo $strTo . ": ";
        echo "<input type='text' name='lifetime_end' id='lifetime_end' size='10' value='";
        if ($software->lifetime_end > 1) {
            echo date('Y-m-d', mysql2date($software->lifetime_end));
        }
        echo "' /> ";
        echo date_picker('editsoftware.lifetime_end');
        echo "</td></tr>";
        echo "<tr><th>{$strTags}:</th>";
        echo "<td><textarea rows='2' cols='30' name='tags'>" . list_tags($id, TAG_SKILL, false) . "</textarea></td></tr>\n";
        echo "</table>";
    }
    echo "<input type='hidden' name='id' value='{$id}' />";
    echo "<input type='hidden' name='action' value='save' />";
    echo "<p align='center'><input name='submit' type='submit' value='{$strSave}' /></p>";
    echo "</form>\n";
    echo "<p align='center'><a href='products.php'>{$strReturnWithoutSaving}</a></p>";
    include APPLICATION_INCPATH . 'htmlfooter.inc.php';
} elseif ($action == 'delete') {
    // Delete
    // First check there are no incidents using this software
    $sql = "SELECT count(id) FROM `{$dbIncidents}` WHERE softwareid='{$id}'";
    $result = mysql_query($sql);
    if (mysql_error()) {
        trigger_error(mysql_error(), E_USER_WARNING);
Esempio n. 5
0
        echo "</table>";
    } else {
        echo "<p class='warning'>{$strNothingToDisplay}</p>";
    }
} else {
    $psql = "SELECT * FROM `{$dbProducts}` WHERE id='{$productid}' LIMIT 1";
    $presult = mysql_query($psql);
    if (mysql_error()) {
        trigger_error("MySQL Query Error " . mysql_error(), E_USER_WARNING);
    }
    if (mysql_num_rows($presult) >= 1) {
        while ($product = mysql_fetch_object($presult)) {
            echo "<h2>" . icon('product', 32) . " " . sprintf($strProductX, $product->name) . "</h2>";
            echo "<p align='center'><a href='edit_product.php?id={$product->id}'>Edit</a> ";
            echo "| <a href='product_delete.php?id={$product->id}'>{$strDelete}</a></p>";
            $tags = list_tags($product->id, TAG_PRODUCT, TRUE);
            if (!empty($tags)) {
                echo "<div style='width: 50%; margin: auto;'>{$tags}</div><br />\n";
            }
            echo "<table summary='List of skills linked to product' align='center'>";
            if (!empty($product->description)) {
                echo "<tr class='shade1'><td colspan='0'>" . nl2br($product->description) . "</td></tr>";
            }
            $swsql = "SELECT * FROM `{$dbSoftwareProducts}` AS sp, `{$dbSoftware}` AS s ";
            $swsql .= "WHERE sp.softwareid=s.id AND productid='{$product->id}' ORDER BY name";
            $swresult = mysql_query($swsql);
            if (mysql_error()) {
                trigger_error("MySQL Query Error " . mysql_error(), E_USER_WARNING);
            }
            if (mysql_num_rows($swresult) > 0) {
                echo "<tr><th>{$strSkill}</th><th>{$strLifetime}</th>";
$sql .= "AND i.id = linkcolref ";
$result = mysql_query($sql);
if (mysql_error()) {
    trigger_error("MySQL Query Error " . mysql_error(), E_USER_WARNING);
}
if (mysql_num_rows($result) > 0) {
    $inventory = mysql_fetch_object($result);
    echo "<a href='inventory.php?view={$inventory->id}'>";
    echo "{$inventory->name}";
    if (!empty($inventory->identifier)) {
        echo " ({$inventory->identifier})";
    } elseif (!empty($inventory->address)) {
        echo " ({$inventory->address})";
    }
}
$tags = list_tags($id, TAG_INCIDENT, TRUE);
if (!empty($tags)) {
    echo "{$tags}\n";
}
echo "</td>";
echo "<td>";
// Second column, Product and Incident details
if ($incident->owner != $sit[2] or $incident->towner > 0 and $incident->towner != $incident->owner) {
    echo "{$strOwner}: <strong>" . user_realname($incident->owner, TRUE) . "</strong> ";
    $incidentowner_phone = user_phone($incident->owner);
    if ($incidentowner_phone != '') {
        echo "({$strTel}: {$incidentowner_phone}) ";
    }
    if ($incident->towner > 0 and $incident->towner != $incident->owner) {
        echo "({$strTemp}: " . user_realname($incident->towner, TRUE) . ")";
    }
Esempio n. 7
0
 $task = mysql_fetch_object($result);
 if ($task->distribution == 'private' and $task->owner != $sit[2]) {
     echo user_alert($strTaskPrivateError, E_USER_ERROR);
 } elseif ($mode != 'incident') {
     echo "<div style='width: 48%; float: left;'>";
     $startdate = mysql2date($task->startdate);
     $duedate = mysql2date($task->duedate);
     $enddate = mysql2date($task->enddate);
     echo "<table class='vertical' width='100%'>";
     echo "<tr><th>{$strTitle}</th>";
     echo "<td>{$task->name}</td></tr>";
     echo "<tr><th>{$strDescription}</th>";
     echo "<td>" . nl2br($task->description) . "</td></tr>";
     if ($task->distribution == 'public') {
         echo "<tr><th>{$strTags}:</th><td>";
         echo list_tags($taskid, 4);
         echo "</td></tr>";
     }
     if ($task->owner != $sit[2]) {
         echo "<tr><th>{$strOwner}</th>";
         echo "<td>" . user_realname($task->owner, TRUE) . "</td></tr>";
     }
     echo "<tr><th>{$strPriority}</th>";
     echo "<td>" . priority_icon($task->priority) . ' ' . priority_name($task->priority) . "</td></tr>";
     echo "<tr><th>{$strStartDate}</th>";
     echo "<td>";
     if ($startdate > 0) {
         echo ldate($CONFIG['dateformat_datetime'], $startdate);
     }
     echo "</td></tr>";
     echo "<tr><th>{$strDueDate}</th>";
Esempio n. 8
0
/**
 * Output the html for the edit site form
 *
 * @param int $site ID of the site
 * @param string $mode whether this is internal or external facing, defaults to internal
 * @return string $html edit site form html
 * @author Kieran Hogg
 */
function show_edit_site($site, $mode = 'internal')
{
    global $CONFIG;
    $sql = "SELECT * FROM `{$GLOBALS['dbSites']}` WHERE id='{$site}' ";
    $siteresult = mysql_query($sql);
    if (mysql_error()) {
        trigger_error("MySQL Query Error " . mysql_error(), E_USER_WARNING);
    }
    while ($siterow = mysql_fetch_array($siteresult)) {
        if ($mode == 'internal') {
            $html .= "<h2>" . icon('site', 32) . " {$GLOBALS['strEditSite']}: {$site} - ";
            $html .= site_name($site) . "</h2>";
        } else {
            $html .= "<h2>" . icon('site', 32) . " " . site_name($site) . "</h2>";
        }
        $html .= "<form name='edit_site' action='{$_SERVER['PHP_SELF']}";
        $html .= "?action=update' method='post' onsubmit='return ";
        $html .= "confirm_action(\"{$GLOBALS['strAreYouSureMakeTheseChanges']}\")'>";
        $html .= "<table align='center' class='vertical'>";
        $html .= "<tr><th>{$GLOBALS['strName']}:</th>";
        $html .= "<td><input class='required' maxlength='50' name='name' size='40' value='{$siterow['name']}' />";
        $html .= "<span class='required'>{$GLOBALS['strRequired']}</span></td></tr>\n";
        if ($mode == 'internal') {
            $html .= "<tr><th>{$GLOBALS['strTags']}:</th><td><textarea rows='2' cols='60' name='tags'>";
            $html .= list_tags($site, TAG_SITE, false) . "</textarea>\n";
        }
        $html .= "<tr><th>{$GLOBALS['strDepartment']}:</th>";
        $html .= "<td><input maxlength='50' name='department' size='40' value='{$siterow['department']}' />";
        $html .= "</td></tr>\n";
        $html .= "<tr><th>{$GLOBALS['strAddress1']}:</th>";
        $html .= "<td><input maxlength='50' name='address1'";
        $html .= "size='40' value='{$siterow['address1']}' />";
        $html .= "</td></tr>\n";
        $html .= "<tr><th>{$GLOBALS['strAddress2']}: </th><td><input maxlength='50' name='address2' size='40' value='{$siterow['address2']}' /></td></tr>\n";
        $html .= "<tr><th>{$GLOBALS['strCity']}:</th><td><input maxlength='255' name='city' size='40' value='{$siterow['city']}' /></td></tr>\n";
        $html .= "<tr><th>{$GLOBALS['strCounty']}:</th><td><input maxlength='255' name='county' size='40' value='{$siterow['county']}' /></td></tr>\n";
        $html .= "<tr><th>{$GLOBALS['strPostcode']}:</th><td><input maxlength='255' name='postcode' size='40' value='{$siterow['postcode']}' /></td></tr>\n";
        $html .= "<tr><th>{$GLOBALS['strCountry']}:</th><td>" . country_drop_down('country', $siterow['country']) . "</td></tr>\n";
        $html .= "<tr><th>{$GLOBALS['strTelephone']}:</th><td>";
        $html .= "<input class='required' maxlength='255' name='telephone' size='40' value='{$siterow['telephone']}' />";
        $html .= "<span class='required'>{$GLOBALS['strRequired']}</span></td></tr>\n";
        $html .= "<tr><th>{$GLOBALS['strFax']}:</th><td>";
        $html .= "<input maxlength='255' name='fax' size='40' value='{$siterow['fax']}' /></td></tr>\n";
        $html .= "<tr><th>{$GLOBALS['strEmail']}:</th><td>";
        $html .= "<input class='required' maxlength='255' name='email' size='40' value='{$siterow['email']}' />";
        $html .= "<span class='required'>{$GLOBALS['strRequired']}</span></td></tr>\n";
        $html .= "<tr><th>{$GLOBALS['strWebsite']}:</th><td>";
        $html .= "<input maxlength='255' name='websiteurl' size='40' value='{$siterow['websiteurl']}' /></td></tr>\n";
        $html .= "<tr><th>{$GLOBALS['strSiteType']}:</th><td>\n";
        $html .= sitetype_drop_down('typeid', $siterow['typeid']);
        $html .= "</td></tr>\n";
        if ($mode == 'internal') {
            $html .= "<tr><th>{$GLOBALS['strSalesperson']}:</th><td>";
            $html .= user_drop_down('owner', $siterow['owner'], $accepting = FALSE, '', '', TRUE);
            $html .= "</td></tr>\n";
        }
        if ($mode == 'internal') {
            $html .= "<tr><th>{$GLOBALS['strIncidentPool']}:</th>";
            $incident_pools = explode(',', "{$GLOBALS['strNone']},{$CONFIG['incident_pools']}");
            if (array_key_exists($siterow['freesupport'], $incident_pools) == FALSE) {
                array_unshift($incident_pools, $siterow['freesupport']);
            }
            $html .= "<td>" . array_drop_down($incident_pools, 'incident_poolid', $siterow['freesupport']) . "</td></tr>";
            $html .= "<tr><th>{$GLOBALS['strActive']}:</th><td><input type='checkbox' name='active' ";
            if ($siterow['active'] == 'true') {
                $html .= "checked='" . $siterow['active'] . "'";
            }
            $html .= " value='true' /></td></tr>\n";
            $html .= "<tr><th>{$GLOBALS['strNotes']}:</th><td>";
            $html .= "<textarea rows='5' cols='30' name='notes'>{$siterow['notes']}</textarea>";
            $html .= "</td></tr>\n";
        }
        plugin_do('edit_site_form');
        $html .= "</table>\n";
        $html .= "<input name='site' type='hidden' value='{$site}' />";
        $html .= "<p><input name='submit' type='submit' value='{$GLOBALS['strSave']}' /></p>";
        $html .= "</form>";
    }
    return $html;
}
Esempio n. 9
0
     trigger_error(mysql_error(), E_USER_WARNING);
 }
 if (mysql_num_rows($result) >= 1) {
     while ($task = mysql_fetch_object($result)) {
         $startdate = mysql2date($task->startdate);
         $duedate = mysql2date($task->duedate);
         $enddate = mysql2date($task->enddate);
         echo "<form id='edittask' action='{$_SERVER['PHP_SELF']}' method='post'>";
         echo "<table class='vertical'>";
         echo "<tr><th>{$strTitle}</th>";
         echo "<td><input type='text' name='name' size='35' maxlength='255' value=\"{$task->name}\" /></td></tr>";
         echo "<tr><th>{$strDescription}</th>";
         echo "<td><textarea name='description' rows='4' cols='30'>{$task->description}</textarea></td></tr>";
         if ($task->distribution == 'public') {
             echo "<tr><th>{$strTags}:</th>";
             echo "<td><textarea rows='2' cols='30' name='tags'>" . list_tags($id, 4, false) . "</textarea></td></tr>";
         }
         echo "<tr><th>{$strPriority}</th>";
         echo "<td>" . priority_drop_down('priority', $task->priority) . "</td></tr>";
         echo "<tr><th>{$strStartDate}</th>";
         echo "<td><input type='text' name='startdate' id='startdate' size='10' value='";
         if ($startdate > 0) {
             echo date('Y-m-d', $startdate);
         }
         echo "' /> ";
         echo date_picker('edittask.startdate');
         echo " " . time_dropdown("starttime", date('H:i', $startdate));
         echo "</td></tr>";
         echo "<tr><th>{$strDueDate}</th>";
         echo "<td><input type='text' name='duedate' id='duedate' size='10' value='";
         if ($duedate > 0) {
Esempio n. 10
0
     list_new_requirements(filter_input(INPUT_POST, 'id', FILTER_SANITIZE_NUMBER_INT));
     break;
 case "list_new_tags":
     list_new_tags(filter_input(INPUT_POST, 'id', FILTER_SANITIZE_NUMBER_INT));
     break;
 case "list_notes":
     list_notes(filter_input(INPUT_POST, 'achievement_id', FILTER_SANITIZE_NUMBER_INT));
     break;
 case "list_relations":
     list_relations(filter_input(INPUT_POST, 'achievement_id', FILTER_SANITIZE_NUMBER_INT));
     break;
 case "list_requirements":
     list_requirements(filter_input(INPUT_POST, 'id', FILTER_SANITIZE_NUMBER_INT), filter_input(INPUT_POST, 'type', FILTER_SANITIZE_STRING));
     break;
 case "list_tags":
     list_tags(filter_input(INPUT_POST, 'id', FILTER_SANITIZE_NUMBER_INT));
     break;
 case "list_todo":
     list_todo(filter_input(INPUT_POST, 'achievement_id', FILTER_SANITIZE_NUMBER_INT));
     break;
 case "login":
     echo json_encode(login(filter_input(INPUT_POST, 'login', FILTER_SANITIZE_STRING), filter_input(INPUT_POST, 'password', FILTER_SANITIZE_STRING)));
     break;
 case "register_user":
     echo json_encode(register_user(filter_input(INPUT_POST, 'username', FILTER_SANITIZE_STRING), filter_input(INPUT_POST, 'password', FILTER_SANITIZE_STRING), filter_input(INPUT_POST, 'email', FILTER_SANITIZE_STRING)));
     break;
 case "restore_achievement":
     restore_achievement(filter_input(INPUT_POST, 'id', FILTER_SANITIZE_NUMBER_INT));
     break;
 case "toggle_documentation_status":
     toggle_documentation_status(filter_input(INPUT_POST, 'id', FILTER_SANITIZE_NUMBER_INT));
Esempio n. 11
0
}
// Display site
echo "<table align='center' class='vertical'>";
$sql = "SELECT * FROM `{$dbSites}` WHERE id='{$id}' ";
$siteresult = mysql_query($sql);
if (mysql_error()) {
    trigger_error(mysql_error(), E_USER_WARNING);
}
while ($siterow = mysql_fetch_array($siteresult)) {
    echo "<tr><th>{$strSite}:</th><td>";
    echo "<h3>" . icon('site', 32) . " " . $siterow['name'] . "</h3>";
    echo "</td></tr>";
    if ($siterow['active'] == 'false') {
        echo "<tr><th>{$strStatus}:</th><td><span class='expired'>{$strInactive}</span></td></tr>";
    }
    $tags = list_tags($id, TAG_SITE, TRUE);
    if (!empty($tags)) {
        echo "<tr><th>{$strTags}:</th><td>{$tags}</td></tr>";
    }
    echo "<tr><th>{$strDepartment}:</th><td>{$siterow['department']}</td></tr>";
    echo "<tr><th>{$strAddress1}:</th><td>{$siterow['address1']}</td></tr>";
    echo "<tr><th>{$strAddress2}:</th><td>{$siterow['address2']}</td></tr>";
    echo "<tr><th>{$strCity}:</th><td>{$siterow['city']}</td></tr>";
    echo "<tr><th>{$strCounty}:</th><td>{$siterow['county']}</td></tr>";
    echo "<tr><th>{$strCountry}:</th><td>{$siterow['country']}</td></tr>";
    echo "<tr><th>{$strPostcode}:</th><td>{$siterow['postcode']} ";
    if (!empty($siterow['postcode'])) {
        //TODO make this support different links via config
        echo "(<a href='http://www.google.com/maps?q={$siterow['postcode']}'>{$strMap}</a>)";
    }
    echo "</td></tr>";
Esempio n. 12
0
if (empty($submit)) {
    $title = $strEdit;
    include APPLICATION_INCPATH . 'incident_html_top.inc.php';
    // extract incident details
    $sql = "SELECT * FROM `{$dbIncidents}` WHERE id='{$id}'";
    $result = mysql_query($sql);
    if (mysql_error()) {
        trigger_error("MySQL Query Error " . mysql_error(), E_USER_WARNING);
    }
    $incident = mysql_fetch_array($result);
    // SUPPORT INCIDENT
    if ($incident["type"] == "Support") {
        echo "<form action='{$_SERVER['PHP_SELF']}' method='post' name='editform'>";
        echo "<table class='vertical'>";
        echo "<tr><th>{$strTitle}</th><td><input maxlength='150' name='title' size='40' type='text' value=\"" . $incident['title'] . "\" /></td></tr>\n";
        echo "<tr><th>{$strTags}</th><td><textarea rows='2' cols='40' name='tags'>" . list_tags($id, 2, false) . "</textarea></td></tr>\n";
        echo "<tr><th>{$strImportant}</th>";
        echo "<td>{$strChangingContact}. ";
        if ($incident['maintenanceid'] >= 1) {
            echo sprintf($strLoggedUnder, $incident['maintenanceid']) . ". ";
        } else {
            echo "{$strIncidentNoContract}. ";
        }
        echo "{$strToChangeContract}.";
        echo "</td></tr>\n";
        echo "<tr><th>{$strContact}</th><td>";
        echo contact_drop_down("contact", $incident["contact"], TRUE) . "</td></tr>\n";
        flush();
        $maintid = maintenance_siteid($incident['maintenanceid']);
        echo "<tr><th>{$strSite}</th><td>" . site_name($maintid) . "</td></tr>";
        echo "<tr><th>{$strSkill}</th><td>" . skill_drop_down("software", $incident["softwareid"]) . "</td></tr>\n";
Esempio n. 13
0
function save()
{
    inlog('Saving snippet file');
    cache_clear();
    global $config, $snippets;
    $snippets['tag_list'] = list_tags();
    $snippets['tag_private_list'] = list_tags(false);
    if (!store($config['data_file'], $snippets)) {
        return alert('Error');
    } else {
        return success('saved');
    }
}
Esempio n. 14
0
 }
 while ($contactrow = mysql_fetch_array($contactresult)) {
     // User does not have access
     echo "<h2>" . icon('contact', 32) . " ";
     echo "{$strEditContact}: {$contact}</h2>";
     echo "<form name='contactform' action='{$_SERVER['PHP_SELF']}?action=update' method='post' onsubmit='return confirm_action(\"{$strAreYouSureMakeTheseChanges}\");'>";
     echo "<p align='center'>" . sprintf($strMandatoryMarked, "<sup class='red'>*</sup>") . "</p>";
     echo "<table align='center' class='vertical'>";
     echo "<tr><th>{$strName}: <sup class='red'>*</sup><br />{$strTitle}, {$strForenames}, {$strSurname}</th>";
     echo "<td><input maxlength='50' name='courtesytitle' title='Courtesy Title (Mr, Mrs, Miss, Dr. etc.)' size='7' value='{$contactrow['courtesytitle']}' />\n";
     // i18n courtesy title
     echo "<input maxlength='100' name='forenames' size='15' title='Firstnames (or initials)' value='{$contactrow['forenames']}' />\n";
     echo "<input maxlength='100' name='surname' size='20' title='{$strSurname}' value='{$contactrow['surname']}' />";
     echo "</td></tr>\n";
     echo "<tr><th>{$strTags}:</th><td><textarea rows='2' cols='60' name='tags'>";
     echo list_tags($contact, TAG_CONTACT, false) . "</textarea></td></tr>\n";
     echo "<tr><th>{$strJobTitle}:</th><td>";
     echo "<input maxlength='255' name='jobtitle' size='40' value=\"{$contactrow['jobtitle']}\" />";
     echo "</td></tr>\n";
     echo "<tr><th>{$strSite}: <sup class='red'>*</sup></th><td>";
     echo site_drop_down('siteid', $contactrow['siteid']) . "</td></tr>\n";
     echo "<tr><th>{$strDepartment}:</th><td>";
     echo "<input maxlength='100' name='department' size='40' value='{$contactrow['department']}' />";
     echo "</td></tr>\n";
     echo "<tr><th>{$strEmail}: <sup class='red'>*</sup></th><td>";
     echo "<input maxlength='100' name='email' size='40' value='{$contactrow['email']}' />";
     echo "<label>";
     echo html_checkbox('dataprotection_email', $contactrow['dataprotection_email']);
     echo "{$strEmail} {$strDataProtection}</label>";
     echo "</td></tr>\n";
     echo "<tr><th>{$strTelephone}:</th><td>";