Skip to content

Instantly share code, notes, and snippets.

@EVIL-SnaKe
Created November 22, 2010 09:11
Show Gist options
  • Save EVIL-SnaKe/709712 to your computer and use it in GitHub Desktop.
Save EVIL-SnaKe/709712 to your computer and use it in GitHub Desktop.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Добавление данных АСП</title>
<style type="text/css">
<!--
.style5 {
color: #33CC00;
text-shadow: 2;
font-style: inherit;
word-spacing: normal;
}
body,td,th {
font-family: Times New Roman, Times, serif;
}
-->
</style>
<script type="text/javascript">
<!--
function MM_goToURL() { //v3.0
var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
}
<?php
$start_hour = 00;
$start_minute = 0;
$end_hour = 24;
$end_minute = 59;
$interval_minutes = 5;
if($start_hour > $end_hour) { die('ошибка времени'); }
if($end_hour == 24) {
$interpret_end_hour_as = '00';
}
?>
//-->
</script>
</head>
<body>
<form id="form1" name="form1" method="post" action="input_obr.php">
<label>
<div align="center">
<h2>Ввод новых данных<br />
</h2>
<table width="812" height="167" border="1" align="center" cellpadding="1" cellspacing="1">
<tr bordercolor="#33FF00" bgcolor="#F0F0F0" id="form2">
<th width="90" nowrap="nowrap">Дата</th>
<th width="60" align="left">Время начала</th>
<th width="69" align="center" valign="middle"><div align="center">Время окончания</div></th>
<th width="144" nowrap="nowrap"><div align="center">АВЗ</div></th>
<th width="161" nowrap="nowrap"><div align="center">Название</div></th>
<th width="469" nowrap="nowrap"><div align="center">Техническая информация</div></th>
</tr>
<tr bgcolor="#0000CC">
<td height="115"><input name="input_date" type="text" id="input_date" value="yyyy-mm-dd" size="15" maxlength="10" /></td>
<td><div align="center">
<select name="time">
<?php for($h = $start_hour; $h <= $end_hour; $h++): ?>
<?php for($m = $start_minute; $m <= $end_minute; $m += $interval_minutes): ?>
<?php if($h == $end_hour && isset($interpret_end_hour_as)): ?>
<?php $value = sprintf('%d:%02d', $interpret_end_hour_as, $m); ?>
<?php else: ?>
<?php $value = sprintf('%d:%02d', $h, $m); ?>
<?php endif; ?>
<option value="<?php echo $value; ?>"><?php echo $value; ?></option>
<?php endfor; ?>
<?php endfor; ?>
</select>
</div></td>
<td><div align="center">
<input name="input_end" type="text" id="inputend" value="hh:mm" size="10" />
</div></td>
<td><input name="input_avz" type="text" id="inputavz" value="" /></td>
<td><textarea name="input_title" rows="4" id="input_title"></textarea></td>
<td><textarea name="input_tech" cols="40" rows="7" wrap="virtual" id="input_tech"></textarea></td>
</tr>
</table>
<br />
<label>
<input name="home" type="button" id="home" onclick="MM_goToURL('parent','index.html');return document.MM_returnValue" value="на главную" />
</label>
<br />
<input name="input_submit" type="submit" id="input_submit" value="подтвердить" />
<br />
</div>
</label>
<div align="center"></div>
</form>
</body>
</html>
<?
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment