コード例 #1
0
 echo "<input value='amount' type='radio' name='contacts' checked='checked' />";
 echo "{$strLimitTo} <input size='2' name='numcontacts' ";
 if ($_SESSION['formdata']['add_contract']['numcontacts'] != '') {
     echo "value='{$_SESSION['formdata']['add_contract']['numcontacts']}'";
 } else {
     echo "value='0'";
 }
 echo " /> {$strSupportedContacts} ({$str0MeansUnlimited})<br />";
 echo "<input type='radio' value='all' name='contacts' />";
 echo "{$strAllSiteContactsSupported}";
 echo "</td></tr>\n";
 echo "<tr><th>{$strProduct} <sup class='red'>*</sup></th><td>";
 if ($_SESSION['formdata']['add_contract']['product'] != '') {
     echo product_drop_down("product", $_SESSION['formdata']['add_contract']['product']) . "</td></tr>\n";
 } else {
     echo product_drop_down("product", 0) . "</td></tr>\n";
 }
 echo "<tr><th>{$strServiceLevel}</th><td>";
 if ($_SESSION['formdata']['add_contract']['servicelevelid'] != '') {
     $slid = $_SESSION['formdata']['add_contract']['servicelevelid'];
 } else {
     $slid = 0;
     // Default to first service level
 }
 echo servicelevel_drop_down('servicelevelid', $slid, TRUE, "onchange=\"addcontract_sltimed(\$F('servicelevelid'));\"") . "</td></tr>\n";
 // check the initially selected service level to decide whether to show the extra hiddentimed section
 $sltag = servicelevel_id2tag($slid);
 $timed = servicelevel_timed($sltag);
 echo "<tr><th colspan='2' style='text-align: left;'><br />{$strServicePeriod}</th></tr>\n";
 echo "<tr><th>{$strStartDate}</th>";
 echo "<td><input type='text' name='startdate' id='startdate' size='10' value='" . date('Y-m-d', $now) . "' /> ";
コード例 #2
0
$action = cleanvar($_REQUEST['action']);
include APPLICATION_INCPATH . 'htmlheader.inc.php';
// show search incidents form
if (empty($action)) {
    echo "<h2>" . icon('search', 32) . " ";
    echo "{$strSearch} ({$strAdvanced})</h2>";
    echo "<form action=\"{$_SERVER['PHP_SELF']}\" method='get'>";
    echo "<table class='vertical'>";
    echo "<tr><th colspan='2'>{$strIncidents}</th><tr>\n";
    echo "<tr><th>{$strTitle}:</th><td><input maxlength='100' name='search_title' size='30' type='text' /></td></tr>\n";
    echo "<tr><th>{$strIncident} ID:</th><td><input maxlength='100' name='search_id' size='30' type='text' /></td></tr>\n";
    echo "<tr><th>{$strExternalID}:</th><td><input maxlength='100' name='search_externalid' size='30' type='text' /></td></tr>\n";
    echo "<tr><th>{$strServiceLevel}:</th><td>" . serviceleveltag_drop_down('search_servicelevel', 0, TRUE) . "</td></tr>\n";
    echo "<tr><th>{$strContact}:</th><td><input maxlength='100' name='search_contact' size='30' type='text' /></td></tr>\n";
    echo "<tr><th>{$strPriority}:</th><td>" . priority_drop_down('search_priority', 0) . "</td></tr>\n";
    echo "<tr><th>{$strProduct}:</th><td>" . product_drop_down('search_product', 0) . "</td></tr>\n";
    echo "<tr><th>{$strDetails}:</th><td><input maxlength='100' name='search_details' size='30' type='text' /></td></tr>\n";
    echo "<tr><th>{$strStatus}<br />{$strOpen}/{$strClosed}:</th><td>";
    echo "<select size='1' name='search_range'>";
    echo "<option selected='selected' value='All'>{$strAll}</option>";
    echo "<option value='Open'>{$strAllOpen}</option>";
    echo "<option value='Closed'>{$strAllClosed}</option>";
    echo "</select>\n";
    echo "</td></tr>\n";
    echo "<tr><th>{$strLastUpdated}:</th><td width='300'>";
    echo "<select size='1' name='search_date'>";
    echo "<option selected='selected' value='All'>{$strAll}</option>";
    echo "<option value='Recent180'>" . sprintf($strPreviousXMonths, 6) . "</option>";
    echo "<option value='Recent90'>" . sprintf($strPreviousXMonths, 3) . "</option>";
    echo "<option value='Recent30'>" . sprintf($strPreviousXMonths, 30) . "</option>";
    echo "<option value='Recent14'>" . sprintf($strPreviousXMonths, 14) . "</option>";
コード例 #3
0
ファイル: contracts.php プロジェクト: sitracker/sitracker_old
include APPLICATION_INCPATH . 'htmlheader.inc.php';
echo "<h2>" . icon('contract', 32) . " ";
echo "{$title}</h2>";
echo "<table summary='alphamenu' align='center'><tr><td align='center'>";
echo "<form action='{$_SERVER['PHP_SELF']}' method='get'>";
echo "{$strBrowseContractsBySite}:";
// <!--<input type="text" name="search_string" />-->
echo "<input type='text' id='search_string' style='width: 300px;' name='search_string' />";
echo autocomplete('search_string', 'contract');
echo "<label><input type='checkbox' name='activeonly' value='yes' ";
if ($activeonly == 'yes') {
    echo "checked='checked' ";
}
echo "/> {$strShowActiveOnly}</label>";
echo "<br />{$strByProduct}: ";
echo product_drop_down('productid', $productid);
echo "{$strByReseller}: ";
echo reseller_drop_down('resellerid', $resellerid);
echo "<input type='submit' value=\"{$strGo}\" />";
echo "</form>";
echo "</td>";
echo "</tr>";
echo "<tr>";
echo "<td valign='middle'>";
echo "<a href='contract_add.php'>{$strAddContract}</a> | ";
echo alpha_index("{$_SERVER['PHP_SELF']}?search_string=");
echo "<a href='{$_SERVER['PHP_SELF']}?search_string=*'>{$strAll}</a>";
echo "</td>";
echo "</tr>";
echo "</table>";
// check input
コード例 #4
0
require APPLICATION_LIBPATH . 'functions.inc.php';
// This page requires authentication
require APPLICATION_LIBPATH . 'auth.inc.php';
// External variables
$product = cleanvar($_REQUEST['product']);
$information = cleanvar($_POST['information']);
$moreinformation = cleanvar($_POST['moreinformation']);
$title = $strAddProductInformation;
// Show add product information form
if (empty($_REQUEST['submit'])) {
    include APPLICATION_INCPATH . 'htmlheader.inc.php';
    echo "<h2>{$strAddProductQuestion}</h2>";
    echo "<h5>" . sprintf($strMandatoryMarked, "<sup class='red'>*</sup>") . "</h5>";
    echo "<form action='{$_SERVER['PHP_SELF']}' method='post' onsubmit='return confirm_action(\"{$strAreYouSureAdd}\")'>";
    echo "<table class='vertical' align='center'>";
    echo "<tr><th>{$strProduct}: <sup class='red'>*</sup></th><td>" . product_drop_down("product", $product) . "</td></tr>";
    echo "<tr><th>{$strQuestion}: <sup class='red'>*</sup></th><td><input name='information' size='30' /></td></tr>";
    echo "<tr><th>{$strAdditionalInfo}:</th><td><input name='moreinformation' size='30' /></td></tr>";
    echo "</table>";
    echo "<p align='center'><input name='submit' type='submit' value='{$strAdd}' /></p>";
    echo "</form>";
    include APPLICATION_INCPATH . 'htmlfooter.inc.php';
} else {
    // FIXME these errors need tidying INL 9Jun08
    // Add product information
    $errors = 0;
    include APPLICATION_INCPATH . 'htmlheader.inc.php';
    // check for blank product
    if ($product == 0) {
        $errors = 1;
        echo user_alert(sprintf($strFieldMustNotBeBlank, "'{$strProduct}'"), E_USER_ERROR);
コード例 #5
0
 echo "<thead>\n";
 echo "<tr><th>{$strSite}: <sup class='red'>*</sup></th><td>";
 echo site_name($maint["site"]) . "</td></tr>";
 echo "<tr><th>{$strContacts}:</th><td>";
 echo "<input value='amount' type='radio' name='contacts' checked='checked' />";
 echo "{$strLimitTo} <input size='2' value='{$maint[supportedcontacts]}' name='amount' /> {$strSupportedContacts} ({$str0MeansUnlimited})<br />";
 echo "<input type='radio' value='all' name='contacts'";
 if ($maint[allcontactssupported] == 'yes') {
     echo "checked='checked'";
 }
 echo " />{$strAllSiteContactsSupported}</td></tr>";
 echo "<tr><th>{$strProduct}: <sup class='red'>*</sup></th><td>";
 $productname = product_name($maint["product"]);
 if (user_permission($sit[2], 22)) {
     if ($changeproduct == 'yes') {
         echo product_drop_down("product", $maint['product']);
     } else {
         echo "{$productname} (<a href='{$_SERVER['PHP_SELF']}?action=edit&amp;maintid={$maintid}&amp;changeproduct=yes'>{$strChange}</a>)";
     }
 } else {
     echo "{$productname}";
 }
 echo "</td></tr>\n";
 echo "<tr><th>{$strExpiryDate}: <sup class='red'>*</sup></th>";
 echo "<td><input name='expirydate' size='10' value='";
 if ($maint['expirydate'] > 0) {
     echo ldate('Y-m-d', $maint['expirydate']);
 }
 echo "' /> " . date_picker('maintform.expirydate');
 if ($maint['expirydate'] == '-1') {
     echo "<input type='checkbox' checked='checked' name='noexpiry' /> {$strUnlimited}";
コード例 #6
0
$return = cleanvar($_REQUEST['return']);
if (empty($action) or $action == "showform") {
    $title = $strAddLink;
    include APPLICATION_INCPATH . 'htmlheader.inc.php';
    echo "<h2>{$title}</h2>";
    echo "<form action='{$_SERVER['PHP_SELF']}?action=add' method='post'>\n";
    echo "<input type='hidden' name='context' value='{$context}' />\n";
    if (empty($productid)) {
        if (!empty($softwareid)) {
            $name = db_read_column('name', $dbSoftware, $softwareid);
            echo "<h3>" . icon('skill', 16) . " ";
            echo "{$strSkill}: {$name}</h3>";
        }
        echo "<input name=\"softwareid\" type=\"hidden\" value=\"{$softwareid}\" />\n";
        echo "<p align='center'>{$strProduct}: " . icon('product', 16) . " ";
        echo product_drop_down("productid", 0);
        echo "</p>";
    } else {
        $sql = "SELECT name FROM `{$dbProducts}` WHERE id='{$productid}' ";
        $result = mysql_query($sql);
        if (mysql_error()) {
            trigger_error("MySQL Query Error " . mysql_error(), E_USER_WARNING);
        }
        list($product) = mysql_fetch_row($result);
        echo "<h3>{$strProduct}: {$product}</h3>";
        echo "<input name=\"productid\" type=\"hidden\" value=\"{$productid}\" />\n";
    }
    if (empty($softwareid)) {
        echo "<p align='center'>{$strSkill}: " . icon('skill', 16) . " ";
        echo skill_drop_down("softwareid", 0);
        echo "</p>\n";