Skip to content

Instantly share code, notes, and snippets.

@EVIL-SnaKe
Created October 29, 2010 14:21
Show Gist options
  • Save EVIL-SnaKe/653640 to your computer and use it in GitHub Desktop.
Save EVIL-SnaKe/653640 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">
<? require_once ('db_login.php');
require_once ('db_connect.php');
?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1251" />
<title>Расписание АСП</title>
<script src="SpryAssets/SpryEffects.js" type="text/javascript"></script>
<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]+"'");
}
</script>
<style type="text/css" media="all">
<!--
@import url("file:///D|/My Dropbox/Учёба/5 курс/Web-дизайн/Online конфернеция/CSS/colors2.css");
-->
</style>
<link href="file:///C|/raspisanie asp html/CSS/tablerasp.css" rel="stylesheet" type="text/css" />
<meta name="Description" content="123" />
<style type="text/css">
<!--
.style1 {
color: #000000;
font-weight: bold;
}
.cursor {
color: #33CC00;
list-style-type: circle;
cursor: crosshair;
}
-->
</style>
</head>
<body alink="#F0F0F0">
<script type="text/javascript" src="/jquery.js"></script>
<label></label><form id="form1" name="form1" method="post" action="updatemain.php">
<label></label>
<label></label>
<h1 align="center" class="style1">Расписание АСП</h1>
<h1 align="left" onclick="MM_effectShake('form1')">
<select name="selectform" class="cursor" id="selectform">
<option>статус</option>
<option>заказ</option>
<option>технич</option>
</select>
</h1>
<table width="572" height="216" border="1" align="center">
<tr bordercolor="#33FF00" bgcolor="#F0F0F0" id="form1">
<th nowrap="nowrap">Дата</th>
<th nowrap="nowrap">Время начала</th>
<th nowrap="nowrap">Время окончания</th>
<th nowrap="nowrap">Аппартаная Видеозаписи</th>
<th nowrap="nowrap"><p>Название</p>
</th>
<th nowrap="nowrap">Техническая информация</th>
</tr>
<div id="result"></div>
</table>
<p>
<label></label>
<label></label>
<label></label>
<label>
<div align="left">
</label>
<fieldset>
<label></label>
<div align="right">
<label>
<div align="left">
<input name="addzapis" type="button" id="addzapis" onclick="MM_goToURL('parent','input.html');return document.MM_returnValue" value="Добавить запись" />
<br />
</div>
</label>
<input name="loadfrombd" type="submit" id="loadfrombd" value="go" />
<input type="button" value="Обновить" onclick="$.get('/updatemain.php', function(data) {$('#result').html(data);})">
</div>
</fieldset>
<p>&nbsp;</p>
</form>
</body>
</html>
<?php
require_once ('db_login.php');
require_once ('db_connect.php');
/*$connection=mysql_connect($db_host, root, doom);
if (!$connection) {
die ("Невозможно подключиться к базе данных: <br/ >".mysql_error());
}
$db_select=mysql_select_db($db_database);
if (!$db_select) {
die ("Невозможно выбрать базу данных: <br/ >".mysql_error());
} */
function query_all($connection) {
// Записать текст запроса в переменную
$query= "SELECT * FROM main2";
// Исполнить запрос
$result= mysql_query($query);
if (!$result) {
die("Ошибка запроса: <br />".mysql_error());
}
//Получить и отобразить результаты
while ($row=mysql_fetch_array($result, MYSQL_ASSOC)) {
$date=$row["date"];
$start=$row["start"];
$end=$row["end"];
$name=$row["name"];
$avz=$row["avz"];
$tech=$row["tech"];
echo "<tr><td>$date</td>";
echo "<td>$start</td>";
echo "<td>$end</td>";
echo "<td>$name</td>";
echo "<td>$avz</td>";
echo "<td>$tech</td></tr>";
//</table>
}
mysql_close($connection);
}
query_all ($connection);
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment