示例#1
0
    include APPLICATION_INCPATH . 'htmlheader.inc.php';
    if ($user == $sit[2]) {
        echo "<h2>" . icon('holiday', 32) . " {$strBookHoliday}</h2>";
    } else {
        echo "<h2>" . icon('holiday', 32) . " {$strBookHoliday}: " . user_realname($user) . "</h2>";
    }
    echo "<form name='date' action='{$_SERVER['PHP_SELF']}' method='post'>\n";
    echo "<table class='vertical'>";
    echo "<tr><th>{$strHolidayType}:</th><td>" . holidaytype_drop_down('type', 1) . "</td></tr>";
    echo "<tr><th>{$strStartDate}:</th><td title='date picker'>";
    echo "<input name='start' size='10' value='{$date}' /> ";
    echo date_picker('date.start');
    echo "</td></tr>\n";
    echo "<tr><th>{$strEndDate}:</th><td align='left' class='shade1' title='date picker'>";
    echo "<input name='end' size='10' /> ";
    echo date_picker('date.end');
    echo "</td></tr>\n";
    echo "</table>\n";
    echo "<p align='center'>";
    echo "<input type='hidden' name='user' value='{$user}' />";
    echo "<input type='hidden' name='step' value='1' />";
    echo "<input type='submit' value=\"{$strBookHoliday}\" /></p>";
    echo "<p align='center'><a href='holidays.php?user={$user}'>{$strBackToList}</a></p>";
    echo "</form>";
    include APPLICATION_INCPATH . 'htmlfooter.inc.php';
} elseif ($step == '1') {
    include APPLICATION_INCPATH . 'htmlheader.inc.php';
    // External variables
    $start = cleanvar($_REQUEST['start']);
    $end = cleanvar($_REQUEST['end']);
    $type = cleanvar($_REQUEST['type']);
        }
        break;
    default:
        include APPLICATION_INCPATH . 'htmlheader.inc.php';
        echo "<h2>{$strSiteProductsMatrix}</h2>";
        echo "<form name='report' action='{$_SERVER['PHP_SELF']}' method='post'>";
        echo "<table class='vertical'>";
        echo "<tr><th>{$strVendor}</th>";
        echo "<td>" . vendor_drop_down('vendor', 0) . "</td></tr>\n";
        echo "<tr><th>{$strEarliestExpiry}</th>";
        echo "<td><input maxlength='100' id='min_expire' name='min_expire' size='10' type='text' value=\"" . date('Y-m-d') . "\" /> ";
        echo date_picker('report.min_expire');
        echo "</td></tr>\n";
        echo "<tr><th>{$strLatestExpiry}</th>";
        echo "<td><input maxlength='100' id='max_expire' name='max_expire' size='10' type='text' value=\"" . date('Y-m-d', mktime(0, 0, 0, date('m'), date('d'), date('Y') + 1)) . "\" /> ";
        echo date_picker('report.max_expire');
        echo "</td></tr>\n";
        echo "<tr><th>{$strOutput}:</th>";
        echo "<td>";
        echo "<select name='output'>";
        echo "<option value='screen'>{$strScreen}</option>";
        echo "<option value='csv'>{$strCSVfile}</option>";
        echo "</select>";
        echo "</td></tr>\n";
        echo "</table>";
        echo "<p><input name='submit' type='submit' value=\"{$strRunReport}\" /></p>";
        echo "<input type='hidden' name='action' value='runreport' />";
        echo "</form>\n";
        include APPLICATION_INCPATH . 'htmlfooter.inc.php';
        break;
}
示例#3
0
    }
    echo "<tr><th>{$strSkill}: <sup class='red'>*</sup></th><td><input maxlength='50' name='name' size='30' /></td></tr>\n";
    echo "<tr><th>{$strLifetime}:</th><td>";
    echo "<input type='text' name='lifetime_start' id='lifetime_start' size='10' ";
    if ($_SESSION['formdata']['add_software']['lifetime_start'] != '') {
        echo "value='{$_SESSION['formdata']['add_software']['lifetime_start']}'";
    }
    echo " /> ";
    echo date_picker('addsoftware.lifetime_start');
    echo " {$strTo}: ";
    echo "<input type='text' name='lifetime_end' id='lifetime_end' size='10'";
    if ($_SESSION['formdata']['add_software']['lifetime_end'] != '') {
        echo "value='{$_SESSION['formdata']['add_software']['lifetime_end']}'";
    }
    echo "/> ";
    echo date_picker('addsoftware.lifetime_end');
    echo "</td></tr>\n";
    echo "<tr><th>{$strTags}:</th>";
    echo "<td><textarea rows='2' cols='30' name='tags'></textarea></td></tr>\n";
    echo "</table>";
    echo "<p align='center'><input name='submit' type='submit' value='{$strAddSkill}' /></p>";
    echo "<p class='warning'>{$strAvoidDupes}</p>";
    echo "</form>\n";
    echo "<p align='center'><a href='products.php'>{$strReturnWithoutSaving}</a></p>";
    include APPLICATION_INCPATH . 'htmlfooter.inc.php';
    $_SESSION['formdata']['add_software'] = NULL;
} else {
    // External variables
    $name = cleanvar($_REQUEST['name']);
    $tags = cleanvar($_REQUEST['tags']);
    $vendor = cleanvar($_REQUEST['vendor']);
示例#4
0
echo date_picker("from", $from_tint_yr, $from_tint_mo, $from_tini_dy);
//         echo "&nbsp;&nbsp; \n";
//         echo time_picker("from");
?>
       </td>
      </tr>
      <tr>
       <td>Ending date:</td>
       <td>&nbsp;&nbsp;
         <?php 
//        $curr_time = time();
//        $cyr = date('Y',$curr_time);
//        $cmo = date('n',$curr_time);
//        $cdy = date('j',$curr_time);
//echo "$cyr - $cmo - $cdy <p> \n";
echo date_picker("to", $to_tint_yr, $to_tint_mo, $to_tini_dy);
//, $cyr, $cmo, $cdy);
//         echo "&nbsp;&nbsp; \n";
//         echo time_picker("to", 23, 59, 59);
?>
       </td>
      </tr>
     </tbody>
    </table>
<!--            -->
    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
    &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
   <i>Show Recs.:</i> &nbsp;&nbsp;&nbsp;
   <select name="n_show">
    <option value="" selected="selected">all</option>
示例#5
0
 echo "<tr><th>{$strStartDate}</th>";
 echo "<td><input type='text' name='startdate' id='startdate' size='10'";
 if ($_SESSION['formdata']['add_task']['startdate'] != '') {
     echo "value='{$_SESSION['formdata']['add_task']['startdate']}'";
 }
 echo "/> ";
 echo date_picker('addtask.startdate');
 echo " " . time_dropdown("starttime", date("H:i"));
 echo "</td></tr>";
 echo "<tr><th>{$strDueDate}</th>";
 echo "<td><input type='text' name='duedate' id='duedate' size='10'";
 if ($_SESSION['formdata']['add_task']['duedate'] != '') {
     echo "value='{$_SESSION['formdata']['add_task']['duedate']}'";
 }
 echo "/> ";
 echo date_picker('addtask.duedate');
 if ($_SESSION['formdata']['add_task']['duetime'] != '') {
     echo " " . time_dropdown("duetime", $_SESSION['formdata']['add_task']['duetime']);
 } else {
     echo " " . time_dropdown("duetime");
 }
 echo "</td></tr>";
 echo "<tr><th>{$strCompletion}</th>";
 echo "<td><input type='text' name='completion' size='3' maxlength='3'";
 if ($_SESSION['formdata']['add_task']['completion'] != '') {
     echo "value='{$_SESSION['formdata']['add_task']['completion']}'";
 } else {
     echo "value='0'";
 }
 echo "/>&#037;</td></tr>";
 //FIXME: should this be available?
示例#6
0
	  		<input type="text" size="80" name="task" id="task" />
	  		<div class="clear">&nbsp;</div>
			<h3><label for="adatum"><?php 
if ($type === '1') {
    ?>
Datum akce<?php 
} else {
    if ($type === '2') {
        ?>
Datum výslechu<?php 
    }
}
?>
:</label></h3>
	  		<?php 
echo date_picker("adatum");
?>
	  		<div class="clear">&nbsp;</div>
			<h3><label for="start">Začátek:</label></h3>
	  		<input type="text" name="start" id="start" />
	  		<div class="clear">&nbsp;</div>
			<h3><label for="end">Konec:</label></h3>
			<input type="text" name="end" id="end" />
	  		<div class="clear">&nbsp;</div>
			<h3><label for="secret">Přísně tajné:</label></h3>
			<select name="secret" id="secret">
				<option value="0">ne</option>
				<option value="1">ano</option>
			</select>
	  		<div class="clear">&nbsp;</div>
			<h3><label for="status">Stav:</label></h3>
require APPLICATION_LIBPATH . 'functions.inc.php';
// This page requires authentication
require APPLICATION_LIBPATH . 'auth.inc.php';
$title = $strIncidentsByVendor;
if (empty($_REQUEST['mode'])) {
    include APPLICATION_INCPATH . 'htmlheader.inc.php';
    echo "<h2>{$title}</h2>";
    echo "<form action='{$_SERVER['PHP_SELF']}' id='incidentsbyvendor' method='post'>";
    echo "<table class='vertical'>";
    echo "<tr><th>{$strStartDate}:</th>";
    echo "<td><input type='text' name='startdate' id='startdate' size='10' /> ";
    echo date_picker('incidentsbyvendor.startdate');
    echo "</td></tr>";
    echo "<tr><th>{$strEndDate}:</th>";
    echo "<td class='shade2'><input type='text' name='enddate' id='enddate' size='10' /> ";
    echo date_picker('incidentsbyvendor.enddate');
    echo "</td></tr>";
    echo "</table>";
    echo "<p align='center'>";
    echo "<input type='hidden' name='mode' value='report' />";
    echo "<input type='submit' value=\"{$strRunReport}\" />";
    echo "</p>";
    echo "</form>";
    include APPLICATION_INCPATH . 'htmlfooter.inc.php';
} else {
    $startdate = strtotime($_REQUEST['startdate']);
    $enddate = strtotime($_REQUEST['enddate']);
    $sql = "SELECT COUNT(i.id) AS volume, p.vendorid, p.name ";
    $sql .= "FROM `{$dbIncidents}` AS i, `{$dbProducts}` AS p, `{$dbVendors}` AS v WHERE i.product = p.id AND i.opened >= '{$startdate}' AND i.opened <= '{$enddate}' ";
    $sql .= "AND p.vendorid = v.id GROUP BY p.vendorid";
    $result = mysql_query($sql);
示例#8
0
 echo date_picker('scheduleform.startdate');
 echo " <input type='text' id='starttime' name='starttime' value='{$starttime}' size='5' /> ";
 echo "</td></tr>\n";
 echo "<tr><th><label for='enddate'>{$strEndDate}</label></th>";
 if (mysql2date($saction->end) > 0) {
     $enddate = date('Y-m-d', mysql2date($saction->end));
 } else {
     $enddate = '';
 }
 if (mysql2date($saction->end) > 0) {
     $endtime = date('H:i', mysql2date($saction->end));
 } else {
     $endtime = '';
 }
 echo "<td><input type='text' id='enddate' name='enddate' value='{$enddate}' size='10' /> ";
 echo date_picker('scheduleform.enddate');
 echo " <input type='text' id='endtime' name='endtime' value='{$endtime}' size='5' /> ";
 echo "</td></tr>\n";
 echo "<tr>";
 echo "<th>{$strType}</th><td>";
 if ($saction->type == 'interval') {
     $interval = "checked='checked'";
     $visibilitydate = "style='display:none'";
 } elseif ($saction->type == 'date') {
     $date = "checked='checked'";
     $visibilityinterval = "style='display:none'";
 }
 echo "<input type='radio' name='type' value='interval' id='interval' onclick=\"\$('intervalsection').show(); \$('datesection').hide();\" {$interval} />{$strInterval} ";
 echo "<input type='radio' name='type' value='date' id='date' onclick=\"\$('intervalsection').hide(); \$('datesection').show();\" {$date} />{$strFrequency} ";
 echo "</td></tr>";
 echo "<tbody id='intervalsection' {$visibilityinterval}>";
示例#9
0
 if ($duedate > 0) {
     echo date('Y-m-d', $duedate);
 }
 echo "' /> ";
 echo date_picker('edittask.duedate');
 echo " " . time_dropdown("duetime", date('H:i', $duedate));
 echo "</td></tr>";
 echo "<tr><th>{$strCompletion}</th>";
 echo "<td><input type='text' name='completion' size='3' maxlength='3' value='{$task->completion}' />&#037;</td></tr>";
 echo "<tr><th>{$strEndDate}</th>";
 echo "<td><input type='text' name='enddate' id='enddate' size='10' value='";
 if ($enddate > 0) {
     echo date('Y-m-d', $enddate);
 }
 echo "' /> ";
 echo date_picker('edittask.enddate');
 echo " " . time_dropdown("endtime", date('H:i', $enddate));
 echo "</td></tr>";
 echo "<tr><th>{$strValue}</th>";
 echo "<td><input type='text' name='value' size='6' maxlength='12' value='{$task->value}' /></td></tr>";
 echo "<tr><th>{$strUser}</th>";
 echo "<td>";
 echo user_drop_down('owner', $task->owner, FALSE);
 echo help_link('TaskUser') . "</td></tr>";
 echo "<tr><th>{$strPrivacy}</th>";
 echo "<td>";
 echo "<input type='radio' name='distribution' ";
 if ($task->distribution == 'public') {
     echo "checked='checked' ";
 }
 echo "value='public' /> {$strPublic}<br />";
示例#10
0
require APPLICATION_LIBPATH . 'functions.inc.php';
// This page requires authentication
require APPLICATION_LIBPATH . 'auth.inc.php';
$submit = cleanvar($_REQUEST['submit']);
if (empty($submit)) {
    include APPLICATION_INCPATH . 'htmlheader.inc.php';
    echo "<h2>{$strHolidayUsage}</h2>";
    echo "<form action='{$_SERVER['PHP_SELF']}' name='holiday_usage' id='holiday_usage' method='post'>";
    echo "<table class='vertical'>";
    echo "<tr><th>{$strStartDate}:</th>";
    echo "<td><input type='text' name='startdate' id='startdate' size='10' /> ";
    echo date_picker('holiday_usage.startdate');
    echo "</td></tr>\n";
    echo "<tr><th>{$strEndDate}:</th>";
    echo "<td><input type='text' name='enddate' id='enddate' size='10' /> ";
    echo date_picker('holiday_usage.enddate');
    echo "</td></tr>\n";
    echo group_user_selector($strGroup, "management", $_SESSION['groupid'], 'checkbox');
    echo "<tr><th>{$strOutput}</th>\n";
    echo "<td><select name='output' id='output'><option value='screen'>{$strScreen}</option>\n";
    echo "<option value='csv'>{$strCSVfile}</option></select></td></tr>\n";
    echo "</table>";
    echo "<p align='center'><input type='submit' name='submit' value='{$strRunReport}' /></p>";
    echo "</form>";
    include APPLICATION_INCPATH . 'htmlfooter.inc.php';
} else {
    $startdate = cleanvar($_REQUEST['startdate']);
    $enddate = cleanvar($_REQUEST['enddate']);
    $output = cleanvar($_REQUEST['output']);
    $users = cleanvar($_POST['users']);
    if (empty($enddate)) {
示例#11
0
/**
 * Output html for the 'time to next action' box
 * Used in add incident and update incident
 * @param string $formid. HTML ID of the form containing the controls
 * @return $html string html to output
 * @author Kieran Hogg
 * @TODO populate $id
 */
function show_next_action($formid)
{
    global $now, $strAM, $strPM;
    $html = "{$GLOBALS['strPlaceIncidentInWaitingQueue']}<br />";
    $oldtimeofnextaction = incident_timeofnextaction($id);
    //FIXME $id never populated
    if ($oldtimeofnextaction < 1) {
        $oldtimeofnextaction = $now;
    }
    $wait_time = $oldtimeofnextaction - $now;
    $na_days = floor($wait_time / 86400);
    $na_remainder = $wait_time % 86400;
    $na_hours = floor($na_remainder / 3600);
    $na_remainder = $wait_time % 3600;
    $na_minutes = floor($na_remainder / 60);
    if ($na_days < 0) {
        $na_days = 0;
    }
    if ($na_hours < 0) {
        $na_hours = 0;
    }
    if ($na_minutes < 0) {
        $na_minutes = 0;
    }
    $html .= "<label>";
    $html .= "<input checked='checked' type='radio' name='timetonextaction' ";
    $html .= "id='ttna_none' onchange=\"update_ttna();\" ";
    //     $html .= "onclick=\"$('timetonextaction_days').value = ''; window.document.updateform.";
    //     $html .= "timetonextaction_hours.value = ''; window.document.updateform."; timetonextaction_minutes.value = '';\"
    $html .= " value='None' />{$GLOBALS['strNo']}";
    $html .= "</label><br />";
    $html .= "<label><input type='radio' name='timetonextaction' ";
    $html .= "id='ttna_time' value='time' onchange=\"update_ttna();\" />";
    $html .= "{$GLOBALS['strForXDaysHoursMinutes']}</label><br />\n";
    $html .= "<span id='ttnacountdown'";
    if (empty($na_days) and empty($na_hours) and empty($na_minutes)) {
        $html .= " style='display: none;'";
    }
    $html .= ">";
    $html .= "&nbsp;&nbsp;&nbsp;<input name='timetonextaction_days' ";
    $html .= " id='timetonextaction_days' value='{$na_days}' maxlength='3' ";
    $html .= "onclick=\"\$('ttna_time').checked = true;\" ";
    $html .= "size='3' /> {$GLOBALS['strDays']}&nbsp;";
    $html .= "<input maxlength='2' name='timetonextaction_hours' ";
    $html .= "id='timetonextaction_hours' value='{$na_hours}' ";
    $html .= "onclick=\"\$('ttna_time').checked = true;\" ";
    $html .= "size='3' /> {$GLOBALS['strHours']}&nbsp;";
    $html .= "<input maxlength='2' name='timetonextaction_minutes' id='";
    $html .= "timetonextaction_minutes' value='{$na_minutes}' ";
    $html .= "onclick=\"\$('ttna_time').checked = true;\" ";
    $html .= "size='3' /> {$GLOBALS['strMinutes']}";
    $html .= "<br />\n</span>";
    $html .= "<label><input type='radio' name='timetonextaction' id='ttna_date' ";
    $html .= "value='date' onchange=\"update_ttna();\" />";
    $html .= "{$GLOBALS['strUntilSpecificDateAndTime']}</label><br />\n";
    $html .= "<div id='ttnadate' style='display: none;'>";
    $html .= "<input name='date' id='timetonextaction_date' size='10' value='{$date}' ";
    $html .= "onclick=\"\$('ttna_date').checked = true;\" /> ";
    $html .= date_picker("{$formid}.timetonextaction_date");
    $html .= " <select name='timeoffset' id='timeoffset' ";
    $html .= "onclick=\"\$('ttna_date').checked = true;\" >";
    $html .= "<option value='0'></option>";
    $html .= "<option value='0'>8:00 {$strAM}</option>";
    $html .= "<option value='1'>9:00 {$strAM}</option>";
    $html .= "<option value='2'>10:00 {$strAM}</option>";
    $html .= "<option value='3'>11:00 {$strAM}</option>";
    $html .= "<option value='4'>12:00 {$strPM}</option>";
    $html .= "<option value='5'>1:00 {$strPM}</option>";
    $html .= "<option value='6'>2:00 {$strPM}</option>";
    $html .= "<option value='7'>3:00 {$strPM}</option>";
    $html .= "<option value='8'>4:00 {$strPM}</option>";
    $html .= "<option value='9'>5:00 {$strPM}</option>";
    $html .= "</select>";
    $html .= "<br />\n</div>";
    return $html;
}
$type = cleanvar($_POST['type']);
$exc = cleanvar($_POST['exc']);
$inc = cleanvar($_POST['inc']);
$output = cleanvar($_POST['output']);
if (empty($_REQUEST['mode'])) {
    include APPLICATION_INCPATH . 'htmlheader.inc.php';
    echo "<h2>{$title}</h2>";
    echo "<form action='{$_SERVER['PHP_SELF']}' method='post' id='incidentsbyengineer'>";
    echo "<table align='center' class='vertical'>";
    echo "<tr><th>{$strStartDate}:</th>";
    echo "<td><input type='text' name='startdate' id='startdate' size='10' /> ";
    echo date_picker('incidentsbyengineer.startdate');
    echo "</td></tr>\n";
    echo "<tr><th>{$strEndDate}:</th>";
    echo "<td><input type='text' name='enddate' id='enddate' size='10' /> ";
    echo date_picker('incidentsbyengineer.enddate');
    echo "</td></tr>\n";
    echo "<tr><th>{$strDatesAre}:</th><td>";
    echo "<label><input type='radio' name='type' value='opened' />{$strOpened}</label> ";
    echo "<label><input type='radio' name='type' value='closed' />{$strClosed}</label> ";
    echo "<label><input type='radio' name='type' value='both' checked='checked' />{$strBoth}</label>";
    echo "</td></tr>";
    echo "<tr><th colspan='2'>{$strInclude}" . help_link('CTRLAddRemove') . "</th></tr>";
    echo "<tr><td align='center' colspan='2'>";
    $sql = "SELECT * FROM `{$dbUsers}` WHERE status > 0 ORDER BY username";
    $result = mysql_query($sql);
    if (mysql_error()) {
        trigger_error("MySQL Query Error " . mysql_error(), E_USER_WARNING);
    }
    echo "<select name='inc[]' multiple='multiple' size='20'>";
    while ($row = mysql_fetch_object($result)) {
示例#13
0
 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}";
 } else {
     echo "<input type='checkbox' name='noexpiry' /> {$strUnlimited}";
 }
 echo "</td></tr>\n";
 echo "<tr><th>{$strServiceLevel}:</th><td>";
 echo servicelevel_drop_down('servicelevelid', $maint['servicelevelid'], TRUE);
 echo "</td></tr>\n";
 echo "<tr><th>{$strAdminContact}: <sup class='red'>*</sup></th><td>";
 echo contact_drop_down("admincontact", $maint["admincontact"], true);
 echo "</td></tr>\n";
 echo "<tr><th>{$strNotes}:</th><td><textarea cols='40' name='notes' rows='5'>";
 echo $maint["notes"];
 echo "</textarea></td></tr>\n";
示例#14
0
        }
        ?>
<div id="obsah">
<fieldset><legend><h1>Organizační úprava osoby: <?php 
        echo StripSlashes($rec_p['surname']) . ', ' . StripSlashes($rec_p['name']);
        ?>
</h1></legend>
	<form action="procperson.php" method="post" id="inputform" enctype="multipart/form-data">
		<fieldset><legend><h2>Základní údaje</h2></legend>
			<div id="info">
				<div class="clear">&nbsp;</div>
				<div>
	  			<h3><label for="rdatum">Vytvořeno:</label></h3>
	  			</div>
				<?php 
        echo date_picker("rdatum", $rec_p['regdate']);
        ?>
				<div class="clear">&nbsp;</div>
				<div>
				<h3><label for="regusr">Vytvořil:</label></h3>
				<select name="regusr" id="regusr">
				<?php 
        $sql = "SELECT " . DB_PREFIX . "users.login AS 'login', " . DB_PREFIX . "users.id AS 'id' FROM " . DB_PREFIX . "users WHERE " . DB_PREFIX . "users.deleted=0 ORDER BY " . DB_PREFIX . "users.login ASC";
        $res = MySQL_Query($sql);
        while ($rec = MySQL_Fetch_Assoc($res)) {
            echo '<div>
						<option value="' . $rec['id'] . '" "' . ($rec['id'] == $rec_p['iduser'] ? ' checked="checked"' : '') . '>' . StripSlashes($rec['login']) . '</option>
						</div>';
        }
        ?>
				</select>
$output = cleanvar($_REQUEST['output']);
if (empty($output)) {
    $output = 'html';
}
if (empty($mode)) {
    include APPLICATION_INCPATH . 'htmlheader.inc.php';
    echo "<h2>{$strBillableIncidentsReport}</h2>";
    echo "<form action='{$_SERVER['PHP_SELF']}' method='post' id='billableincidents'>";
    echo "<table class='vertical'>";
    echo "<tr><th>{$strStartDate}:</th>";
    echo "<td><input type='text' name='startdate' id='startdate' size='10' /> ";
    echo date_picker('billableincidents.startdate');
    echo "</td></tr>\n";
    echo "<tr><th>{$strEndDate}:</th>";
    echo "<td><input type='text' name='enddate' id='enddate' size='10' /> ";
    echo date_picker('billableincidents.enddate');
    echo "</td></tr>\n";
    echo "</table>";
    echo "<p align='center'><input type='submit' name='runreport' value='{$strRunReport}' /></p>";
    echo "<input type='hidden' name='mode' id='mode' value='report' />";
    echo "</form>";
    include APPLICATION_INCPATH . 'htmlfooter.inc.php';
} elseif ($mode == 'report') {
    // Loop around all active sites - those with contracts
    // Need a breakdown of incidents so loop though each site and list the incidents
    /*
     SITE (total: x):
        Incident a - c
        Incident b - d
    */
    if ($output == 'html') {
     echo "{$strPerIncident}</label>";
 } else {
     echo "<label>";
     echo "<input type='radio' name='billtype' value='' checked='checked' disabled='disabled' /> ";
     echo "{$strNone}</label>";
 }
 echo "</td></tr>\n";
 if ($timed) {
     echo "</thead>\n";
     echo "<tbody id='billingsection'>\n";
     echo "<tr><th>{$strCustomerReference}</th>";
     echo "<td><input type='text' id='cust_ref' name='cust_ref' /></td></tr>\n";
     echo "<tr><th>{$strCustomerReferenceDate}</th>";
     echo "<td><input type='text' name='cust_ref_date' id='cust_ref_date' size='10' ";
     echo "value='" . date('Y-m-d', $now) . "' />";
     echo date_picker('serviceform.cust_ref_date');
     echo " </td></tr>\n";
     echo "<tr><th>{$strCreditAmount}</th>";
     echo "<td>{$CONFIG['currency_symbol']} ";
     echo "<input class='required' type='text' name='amount' size='5' />";
     echo " <span class='required'>{$strRequired}</span></td></tr>\n";
     echo "<tr id='unitratesection'><th>{$strUnitRate}</th>";
     echo "<td>{$CONFIG['currency_symbol']} ";
     echo "<input class='required' type='text' name='unitrate' size='5' />";
     echo " <span class='required'>{$strRequired}</span></td></tr>\n";
     echo "<tr id='incidentratesection' style='display:none'><th>{$strIncidentRate}</th>";
     echo "<td>{$CONFIG['currency_symbol']} ";
     echo "<input class='required' type='text' name='incidentrate' size='5' />";
     echo " <span class='required'>{$strRequired}</span></td></tr>\n";
     echo "<tr>";
     echo "<th>{$strFreeOfCharge}</th>";
示例#17
0
     <tbody>
      <tr>
       <td><p> &nbsp;&nbsp;&nbsp;&nbsp; Starting date:</p></td>
       <td>&nbsp;&nbsp;
         <?php 
echo date_picker("from", 2003, 10, 30);
echo "&nbsp;&nbsp; \n";
echo time_picker("from", 20, 00, 00);
?>
       </td>
      </tr>
      <tr>
       <td>&nbsp;&nbsp;&nbsp;&nbsp; Ending date:</td>
       <td>&nbsp;&nbsp;
         <?php 
echo date_picker("to", 2003, 11, 02);
echo "&nbsp;&nbsp; \n";
echo time_picker("to", 03, 59, 59);
?>
         &nbsp; <em><small>Only used for GOES lightcurve</small></em>
       </td>
      </tr>
     </tbody>
    </table>
   </p>
<!--               -->
   <p>
    &nbsp;&nbsp;&nbsp;&nbsp;
    <input value=" &nbsp;Send Request&nbsp; " type="submit" style="background-color:lightgreen; color:black;">
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    <input value="Reset" type="reset" style="background-color:#FFE065; color:black;">
示例#18
0
 default:
     include APPLICATION_INCPATH . 'htmlheader.inc.php';
     echo "<h2>{$title}</h2>";
     $sql = "SELECT * FROM `{$dbUsers}` WHERE status >= 1 ORDER BY realname ASC";
     $result = mysql_query($sql);
     if (mysql_error()) {
         trigger_error(mysql_error(), E_USER_WARNING);
     }
     echo "<form name='editholidays' action='{$_SERVER['PHP_SELF']}?action=save' method='post'>";
     echo "<p>{$strResetHolidayEntitlementCarryOverNDaysOfUnusedHoliday}</p>";
     echo "<div align='center'><label>{$strDefaultNewEntitlement}: ";
     echo "<input type='text' name='default_entitlement' value='{$CONFIG['default_entitlement']}' size='4' /></label>, ";
     echo sprintf($strMaxCarryOverXDays, "<input type='text' name='max_carryover' value='5' size='4' />");
     $str = "<input type='text' id='archivedate' name='archivedate' size='10' value='" . date('Y-m-d') . "' />";
     echo "<br />" . sprintf($strArchiveDaysBookedPriorToX, $str) . "\n ";
     echo date_picker('editholidays.archivedate');
     echo "</div>";
     echo "<table align='center'>";
     echo "<tr><th></th>";
     echo colheader('realname', $strName, FALSE);
     echo colheader('entitlement', $strEntitlement, FALSE);
     echo colheader('holidaysused', $strUsed, FALSE);
     echo colheader('holidaysremaining', sprintf($strRemaining, ''), FALSE);
     //echo colheader('resetdate', "Reset Date", FALSE); // FIXME i18n
     //echo colheader('newentitlement', $strNewEntitlement, FALSE);
     echo "</tr>";
     while ($users = mysql_fetch_object($result)) {
         // define class for table row shading
         if ($shade == 'shade1') {
             $shade = "shade2";
         } else {
require APPLICATION_LIBPATH . 'functions.inc.php';
// This page requires authentication
require APPLICATION_LIBPATH . 'auth.inc.php';
$title = $strIncidentsBySkill;
if (empty($_REQUEST['mode'])) {
    include APPLICATION_INCPATH . 'htmlheader.inc.php';
    echo "<h2>{$title}</h2>";
    echo "<form action='{$_SERVER['PHP_SELF']}' id='incidentsbysoftware' method='post'>";
    echo "<table class='vertical'>";
    echo "<tr><th>{$strStartDate}:</th>";
    echo "<td><input type='text' name='startdate' id='startdate' size='10' /> ";
    echo date_picker('incidentsbysoftware.startdate');
    echo "</td></tr>\n";
    echo "<tr><th>{$strEndDate}:</th>";
    echo "<td><input type='text' name='enddate' id='enddate' size='10' /> ";
    echo date_picker('incidentsbysoftware.enddate');
    echo "</td></tr>\n";
    echo "<tr><th>{$strMonthBreakdown}</th><td><input type='checkbox' name='monthbreakdown' /></td></tr>\n";
    echo "<tr><th>{$strSkill}</th><td>" . skill_drop_down('software', 0) . "</td></tr>\n";
    echo "</table>\n";
    echo "<p align='center'>";
    echo "<input type='hidden' name='mode' value='report' />";
    echo "<input type='submit' value=\"{$strRunReport}\" />";
    echo "</p>";
    echo "</form>\n";
    include APPLICATION_INCPATH . 'htmlfooter.inc.php';
} else {
    $monthbreakdownstatus = $_REQUEST['monthbreakdown'];
    $startdate = strtotime($_REQUEST['startdate']);
    $enddate = strtotime($_REQUEST['enddate']);
    $sql = "SELECT count(s.id) AS softwarecount, s.name, s.id ";
示例#20
0
    echo "/></td></tr>\n";
    if ($CONFIG['holidays_enabled']) {
        echo "<tr><th>{$strHolidayEntitlement}</th><td><input maxlength='3' name='holiday_entitlement' size='3' ";
        if ($_SESSION['formdata']['add_user']['holiday_entitlement'] != '') {
            echo "value='{$_SESSION['formdata']['add_user']['holiday_entitlement']}'";
        } else {
            echo "value='{$CONFIG['default_entitlement']}'";
        }
        echo " /> {$strDays}</td></tr>\n";
        echo "<tr><th>{$strStartDate} " . help_link('UserStartdate') . "</th>";
        echo "<td><input type='text' name='startdate' id='startdate' size='10'";
        if ($_SESSION['formdata']['add_user']['startdate'] != '') {
            echo "value='{$_SESSION['formdata']['add_user']['startdate']}'";
        }
        echo "/> ";
        echo date_picker('adduser.startdate');
        echo "</td></tr>\n";
    }
    plugin_do('add_user_form');
    echo "</table>\n";
    echo "<p><input name='submit' type='submit' value='{$strAddUser}' /></p>";
    echo "</form>\n";
    include APPLICATION_INCPATH . 'htmlfooter.inc.php';
    clear_form_data('add_user');
} else {
    // External variables
    $username = mysql_real_escape_string(strtolower(trim(strip_tags($_REQUEST['username']))));
    $realname = cleanvar($_REQUEST['realname']);
    $password = mysql_real_escape_string($_REQUEST['password']);
    $groupid = cleanvar($_REQUEST['groupid']);
    $roleid = cleanvar($_REQUEST['roleid']);
示例#21
0
        echo "<tr><th>{$strVendor}:</th><td>" . vendor_drop_down('vendor', $software->vendorid) . "</td></tr>\n";
        echo "<tr><th>{$strSkill}: <sup class='red'>*</sup></th><td><input maxlength='50' name='name' size='30' value='{$software->name}' /></td></tr>";
        echo "<tr><th>{$strLifetime}:</th><td>";
        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}'";
// This software may be used and distributed according to the terms
// of the GNU General Public License, incorporated herein by reference.
//
// Author:  Paul Heaney Paul Heaney <paulheaney[at]users.sourceforge.net>
// Prevent script from being run directly (ie. it must always be included
if (realpath(__FILE__) == realpath($_SERVER['SCRIPT_FILENAME'])) {
    exit;
}
echo "<form action='{$_SERVER['PHP_SELF']}' method='post' id='feedback'>";
echo "<table class='vertical'>";
echo "<tr><th>{$strStartDate}:</th>";
echo "<td><input type='text' name='startdate' id='startdate' size='10' /> ";
echo date_picker('feedback.startdate');
echo "</td></tr>\n";
echo "<tr><th>{$strEndDate}:</th>";
echo "<td><input type='text' name='enddate' id='enddate' size='10' /> ";
echo date_picker('feedback.enddate');
echo "</td></tr>\n";
echo "<tr><th>{$strDatesAre}:</th><td>";
echo "<input type='radio' name='dates' value='closedin' checked='checked' />{$strClosed} ";
echo "<input type='radio' name='dates' value='feedbackin' />{$strFeedback} ";
echo "</td></tr>";
echo "<tr><th>Type:</th><td>";
echo "<input type='radio' name='type' value='byengineer' checked='checked' />{$strUser} ";
echo "<input type='radio' name='type' value='bycustomer' />{$strContact} ";
echo "<input type='radio' name='type' value='bysite' />{$strSite} ";
echo "<input type='radio' name='type' value='byproduct' />{$strProduct} ";
echo "</td></tr>";
echo "</table>";
echo "<p><input type='submit' name='runreport' value=\"{$strRunReport}\" /></p>";
echo "</form>";
示例#23
0
 }
 echo "</td></tr>\n";
 echo "<tr><th>{$strQualifications} " . help_link('QualificationsTip') . "</th>";
 echo "<td><input maxlength='100' size='100' name='qualifications' value='{$user->qualifications}' /></td></tr>\n";
 echo "<tr><th>{$strEmailSignature} " . help_link('EmailSignatureTip') . "</th>";
 echo "<td><textarea name='signature' rows='4' cols='40'>" . strip_tags($user->signature) . "</textarea></td></tr>\n";
 $entitlement = user_holiday_entitlement($edituserid);
 if ($edituserpermission && $edituserid != $sit[2]) {
     echo "<tr><th>{$strHolidayEntitlement}</th><td>";
     echo "<input type='text' name='holiday_entitlement' value='{$entitlement}' size='2' /> {$strDays}";
     echo "</td></tr>\n";
     echo "<tr><th>{$strStartDate} " . help_link('UserStartdate') . "</th>";
     echo "<td><input type='text' name='startdate' id='startdate' size='10' ";
     echo "value='{$user->user_startdate}'";
     echo "/> ";
     echo date_picker('edituser.startdate');
     echo "</td></tr>\n";
 } elseif ($entitlement > 0) {
     $holiday_resetdate = user_holiday_resetdate($edituserid);
     $holidaystaken = user_count_holidays($edituserid, HOL_HOLIDAY, $holiday_resetdate);
     echo "<tr><th>{$strHolidayEntitlement}</th><td>";
     echo "{$entitlement} {$strDays}, ";
     echo "{$holidaystaken} {$strtaken}, ";
     echo sprintf($strRemaining, $entitlement - $holidaystaken);
     echo "</td></tr>\n";
     echo "<tr><th>{$strOtherLeave}</th><td>";
     echo user_count_holidays($edituserid, HOL_SICKNESS) . " {$strdayssick}, ";
     echo user_count_holidays($edituserid, HOL_WORKING_AWAY) . " {$strdaysworkingaway}, ";
     echo user_count_holidays($edituserid, HOL_TRAINING) . " {$strdaystraining}";
     echo "<br />";
     echo user_count_holidays($edituserid, HOL_FREE) . " {$strdaysother}";
 $timed = is_contract_timed($contractid);
 echo "<h2>{$strEditService}</h2>";
 echo "<form id='serviceform' name='serviceform' action='{$_SERVER['PHP_SELF']}' method='post' onsubmit='return confirm_submit(\"{$strAreYouSureMakeTheseChanges}\");'>";
 echo "<table align='center' class='vertical'>\n";
 if ($timed) {
     echo "<thead>\n";
 }
 echo "<tr><th>{$strStartDate}</th>";
 echo "<td><input class='required' type='text' name='startdate' id='startdate' size='10' ";
 echo "value='{$obj->startdate}' /> ";
 echo date_picker('serviceform.startdate');
 echo " <span class='required'>{$strRequired}</span></td></tr>";
 echo "<tr><th>{$strEndDate}</th>";
 echo "<td><input class='required' type='text' name='enddate' id='enddate' size='10' ";
 echo "value='{$obj->enddate}' /> ";
 echo date_picker('serviceform.enddate');
 echo " <span class='required'>{$strRequired}</span></td></tr>\n";
 echo "<tr><th>{$strNotes}</th><td>";
 echo "<textarea rows='5' cols='20' name='notes'>{$obj->notes}</textarea></td></tr>";
 echo "<tr><th>{$strBilling}</th>";
 if ($timed) {
     if ($obj->balance == $obj->creditamount) {
         echo "<td>";
         echo "<input type='hidden' name='editbilling' id='editbilling' value='true' />";
         echo "<input type='hidden' name='originalcredit' id='originalcredit' value='{$obj->creditamount}' />";
         echo "<label>";
         echo "<input type='radio' name='billtype' value='billperunit' onchange=\"addservice_showbilling('serviceform');\" ";
         if (!empty($obj->unitrate) and $obj->unitrate > 0) {
             echo "checked='checked' ";
             $unitstyle = "";
             $incidentstyle = "style='display:none'";
include APPLICATION_LIBPATH . 'functions.inc.php';
// This page requires authentication
require APPLICATION_LIBPATH . 'auth.inc.php';
$mode = cleanvar($_REQUEST['mode']);
if (empty($mode) or $mode == 'showform') {
    include APPLICATION_INCPATH . 'htmlheader.inc.php';
    echo "<h2>{$strMonthlyActivityTotals}</h2>";
    echo "<form name='report' action='{$_SERVER['PHP_SELF']}' method='post'>";
    echo "<table class='vertical'>";
    echo "<tr><th>{$strStartDate}:</th>";
    echo "<td><input type='text' name='startdate' id='startdate' size='10' /> ";
    echo date_picker('report.startdate');
    echo "</td></tr>\n";
    echo "<tr><th>{$strEndDate}:</th>";
    echo "<td><input type='text' name='enddate' id='enddate' size='10' /> ";
    echo date_picker('report.enddate');
    echo "</td></tr>\n";
    echo "<tr><th>{$strCalculateUnits}</th><td>";
    echo "<input type='checkbox' name='calcote' value='yes' />\n";
    echo "</td></tr>";
    echo "</table>";
    echo "<p align='center'>";
    echo "<input type='hidden' name='mode' value='report' />";
    echo "<input type='submit' value=\"{$strRunReport}\" />";
    echo "</p>";
    echo "<input type='hidden' id='mode' name='mode' value='runreport' />";
    echo "</form>";
    include APPLICATION_INCPATH . 'htmlfooter.inc.php';
} elseif ($mode == 'runreport') {
    $startdate = strtotime(cleanvar($_REQUEST['startdate']));
    $enddate = strtotime(cleanvar($_REQUEST['enddate']));
示例#26
0
 }
 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) . "' /> ";
 echo date_picker('add_contract.startdate');
 echo "</td></tr>\n";
 echo "<tr><th>{$strExpiryDate}</th>";
 echo "<td><input class='required' name='expiry' size='10' ";
 if ($_SESSION['formdata']['add_contract']['expiry'] != '') {
     echo "value='{$_SESSION['formdata']['add_contract']['expiry']}'";
 }
 echo "/> " . date_picker('add_contract.expiry');
 echo "<input type='checkbox' name='noexpiry' ";
 if ($_SESSION['formdata']['add_contract']['noexpiry'] == "on") {
     echo "checked='checked' ";
 }
 echo "onclick=\"this.form.expiry.value=''\" /> {$strUnlimited}";
 echo " <span class='required'>{$strRequired}</span></td></tr>\n";
 echo "<tr><th>{$strAdminContact}</th>";
 echo "<td>" . contact_drop_down("admincontact", 0, TRUE, TRUE);
 echo " <span class='required'>{$strRequired}</span></td></tr>\n";
 echo "<tr><th>{$strNotes}</th><td><textarea cols='40' name='notes' rows='5'>{$_SESSION['formdata']['add_contract']['notes']}</textarea></td></tr>\n";
 echo "<tr><th></th><td><a href=\"javascript:void(0);\" onclick=\"\$('hidden').toggle();\">{$strMore}</a></td></tr>\n";
 echo "</thead>";
 echo "<tbody id='hiddentimed'";
 if (!$timed) {
     echo " style='display:none'";
示例#27
0
echo "&nbsp;&nbsp; \n";
echo time_picker("from", 20, 00, 00);
?>
       </td>
      </tr>
      <tr>
       <td>&nbsp;&nbsp;&nbsp;&nbsp; Ending date:</td>
       <td>&nbsp;&nbsp;
         <?php 
//        $curr_time = time();
//        $cyr = date('Y',$curr_time);
//        $cmo = date('n',$curr_time);
//        $cdy = date('j',$curr_time);
//echo "$cyr - $cmo - $cdy <p> \n";
//         echo date_picker("to", $to_tint_yr, $to_tint_mo, $to_tini_dy);  //, $cyr, $cmo, $cdy);
echo date_picker("to", 2003, 10, 31);
echo "&nbsp;&nbsp; \n";
echo time_picker("to", 03, 59, 59);
?>
       </td>
      </tr>
     </tbody>
    </table>
   </p>
<!--               -->
   <p>
    &nbsp;&nbsp;&nbsp;&nbsp;
    <input value=" &nbsp; Search &nbsp; " type="submit" style="background-color:lightgreen; color:black;">
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    <input value="Reset" type="reset" style="background-color:#FFE065; color:black;">
<!--               -->