質問編集履歴
4
現在の会員登録画面です。
title
CHANGED
File without changes
|
body
CHANGED
File without changes
|
3
ATOMとphpMyAdminを変更しました
title
CHANGED
File without changes
|
body
CHANGED
@@ -15,7 +15,10 @@
|
|
15
15
|
//connection.php(データベース連携)userform.php(登録画面)からの出力結果
|
16
16
|
include ('connection.php');//
|
17
17
|
|
18
|
+
$q = "SELECT company,
|
18
|
-
|
19
|
+
id,password,last_name,first_name,gender,age,zip,prefecture,city,
|
20
|
+
addressnam,bill,tell,fax,email,registration_date, id
|
21
|
+
FROM users ORDER BY registration_date ASC";
|
19
22
|
/*$q =mysqli_query($dbc , "UPDATE `users`
|
20
23
|
SET id='$id_user',company=[value-2],
|
21
24
|
`first_name`=[value-3],
|
@@ -137,4 +140,4 @@
|
|
137
140
|
課題に対してアプローチしたことを記載してください
|
138
141
|
元のデータから表のレイアウトを変更してあります。
|
139
142
|
###補足情報(言語/FW/ツール等のバージョンなど)
|
140
|
-
php,
|
143
|
+
php,phpMyAdmin
|
2
これでよいでしょうか?
title
CHANGED
File without changes
|
body
CHANGED
@@ -11,16 +11,29 @@
|
|
11
11
|
PHPとMYSQLが得意な方よろしくお願いします
|
12
12
|
|
13
13
|
###該当のソースコード
|
14
|
-
``
|
15
|
-
<?php
|
14
|
+
```<?php
|
16
15
|
//connection.php(データベース連携)userform.php(登録画面)からの出力結果
|
17
16
|
include ('connection.php');//
|
18
17
|
|
19
18
|
$q = "SELECT company,id,password,last_name,first_name,gender,age,zip,prefecture,city,addressnam,bill,tell,fax,email,registration_date, id FROM users ORDER BY registration_date ASC";
|
20
19
|
/*$q =mysqli_query($dbc , "UPDATE `users`
|
21
|
-
SET id='$id_user',company=[value-2],
|
20
|
+
SET id='$id_user',company=[value-2],
|
21
|
+
`first_name`=[value-3],
|
22
|
+
`last_name`=[value-4],
|
23
|
+
`tell`=[value-5],
|
24
|
+
`fax`=[value-6],
|
25
|
+
`email`=[value-7],
|
26
|
+
`gender`=[value-8],
|
27
|
+
`age`=[value-9],
|
28
|
+
`zip`=[value-10],
|
22
|
-
|
29
|
+
`prefecture`=[value-11],
|
30
|
+
`city`=[value-12],
|
31
|
+
`addressnam`=[value-13],
|
32
|
+
`bill`=[value-14],
|
33
|
+
`coments`=[value-15],
|
34
|
+
`password`=[value-16],
|
23
|
-
|
35
|
+
`registration_date`=[value-17]
|
36
|
+
WHERE 1);*/
|
24
37
|
|
25
38
|
$r = mysqli_query($dbc, $q);
|
26
39
|
|
1
問題のphpだけを修正しました
title
CHANGED
File without changes
|
body
CHANGED
@@ -12,126 +12,9 @@
|
|
12
12
|
|
13
13
|
###該当のソースコード
|
14
14
|
``
|
15
|
-
<!DOCTYPE HTML PUBLIC >
|
16
|
-
<html lang="ja">
|
17
|
-
<head>
|
18
|
-
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
19
|
-
<link rel="stylesheet" type="text/css" href="exzample.css">
|
20
|
-
<link rel="stylesheet" type="text/css" href="CSS/body.css">
|
21
|
-
<link rel="stylesheet" type="text/css" href="img">
|
22
|
-
<title>労務管理システム 登録者一覧表</title>
|
23
|
-
</head>
|
24
|
-
<body>
|
25
|
-
|
26
|
-
<!-- コンテナ開始 -->
|
27
|
-
<div id="container">
|
28
|
-
<div id="containerInner">
|
29
|
-
<!-- ヘッダ開始 -->
|
30
|
-
|
31
|
-
<div id="header"><h1>労務管理システム</h1></div>
|
32
|
-
<div class="globalnavi">
|
33
|
-
<ul class="nl clearFix">
|
34
|
-
<li><a href="http://localhost/roumu/management/mgList.php">登録者一覧表</a></li>
|
35
|
-
<li><a href="http://localhost/roumu/management/mgMyPage.php">マイページ</a></li>
|
36
|
-
<li><a href="#">支店登録情報</a></li>
|
37
|
-
</ul>
|
38
|
-
</div>
|
39
|
-
|
40
|
-
<!-- ヘッダ終了 -->
|
41
|
-
<div id="wrapper">
|
42
|
-
<ol class="topicPath">
|
43
|
-
<li><a href="http://localhost/roumu/management/login.php">管理者ログイン</a>></li>
|
44
|
-
<li><a href="../Diligence.php">登録者一覧表</a>></li>
|
45
|
-
</ol>
|
46
|
-
<!-- ナビゲーション開始 左サイドバー -->
|
47
|
-
<aside>
|
48
|
-
<div id="nav">
|
49
|
-
<div class="section">
|
50
|
-
<h3>メニュー</h3>
|
51
|
-
|
52
|
-
<form name="form1">
|
53
|
-
<table>
|
54
|
-
<tbody>
|
55
|
-
<th>現在時刻</th>
|
56
|
-
<td>
|
57
|
-
<p id="RealtimeClockArea2"></p>
|
58
|
-
<script type="text/javascript">
|
59
|
-
function set2fig(num) {
|
60
|
-
// 桁数が1桁だったら先頭に0を加えて2桁に調整する
|
61
|
-
var ret;
|
62
|
-
if( num < 10 ) { ret = "0" + num; }
|
63
|
-
else { ret = num; }
|
64
|
-
return ret;
|
65
|
-
}
|
66
|
-
function showClock2() {
|
67
|
-
var nowTime = new Date();
|
68
|
-
var nowHour = set2fig( nowTime.getHours() );
|
69
|
-
var nowMin = set2fig( nowTime.getMinutes() );
|
70
|
-
var nowSec = set2fig( nowTime.getSeconds() );
|
71
|
-
var msg = nowHour + "時" + nowMin + "分" + nowSec+ "秒";
|
72
|
-
document.getElementById("RealtimeClockArea2").innerHTML = msg;
|
73
|
-
}
|
74
|
-
setInterval('showClock2()',1000);
|
75
|
-
</script>
|
76
|
-
</td>
|
77
|
-
<tr>
|
78
|
-
<th>会員番号</th>
|
79
|
-
<td><input type="text" name="number" id="number1"placeholder="00000"></td>
|
80
|
-
</tr>
|
81
|
-
<tr>
|
82
|
-
<th>名前</th>
|
83
|
-
<td><input type="text" name="number" id="uname" placeholder="田具 太郎"></td>
|
84
|
-
</tr>
|
85
|
-
<tr>
|
86
|
-
<th>日付</th>
|
87
|
-
<td><?php echo $today = date("Y年m月d日");
|
88
|
-
//曜日番号に対応する日本語の曜日リスト
|
89
|
-
$weekjp_array = array('日', '月', '火', '水', '木', '金', '土');
|
90
|
-
//今日の曜日
|
91
|
-
$weekno = date('w');
|
92
|
-
$weekjp = $weekjp_array[$weekno];
|
93
|
-
echo $weekjp . '曜日';?></td>
|
94
|
-
</tr>
|
95
|
-
</tbody>
|
96
|
-
</table>
|
97
|
-
</form>
|
98
|
-
|
99
|
-
<h3>勤怠登録</h3>
|
100
|
-
<form name="form1">
|
101
|
-
<table>
|
102
|
-
<tbody>
|
103
|
-
<tr>
|
104
|
-
<th>出勤</th>
|
105
|
-
<td><input type="submit" value="出勤登録"></td>
|
106
|
-
<td><input type="time" name="time3"></td>
|
107
|
-
</tr>
|
108
|
-
<tr>
|
109
|
-
<th>退勤</th>
|
110
|
-
<td><input type="submit" name="submit" value="退勤登録"></td>
|
111
|
-
<td><input type="time" name="time4"></td>
|
112
|
-
</tr>
|
113
|
-
<tr>
|
114
|
-
<th>退職手続</th>
|
115
|
-
<td><input type="submit" name="taisyoku1"value="退職手続"></td>
|
116
|
-
</tr>
|
117
|
-
</tbody>
|
118
|
-
</table>
|
119
|
-
</form>
|
120
|
-
</div>
|
121
|
-
</aside>
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
<!-- メインカラム開始 -->
|
126
|
-
<div id="content">
|
127
|
-
<div id="contentInner">
|
128
|
-
|
129
|
-
<div class="pagetitle">
|
130
|
-
<div class="pagetitles"><h3>-○マイページの編集○ー</h3></div>
|
131
|
-
</div><!-- pagetitle -->
|
132
15
|
<?php
|
133
16
|
//connection.php(データベース連携)userform.php(登録画面)からの出力結果
|
134
|
-
include ('connection.php');
|
17
|
+
include ('connection.php');//
|
135
18
|
|
136
19
|
$q = "SELECT company,id,password,last_name,first_name,gender,age,zip,prefecture,city,addressnam,bill,tell,fax,email,registration_date, id FROM users ORDER BY registration_date ASC";
|
137
20
|
/*$q =mysqli_query($dbc , "UPDATE `users`
|
@@ -143,15 +26,15 @@
|
|
143
26
|
|
144
27
|
$num = mysqli_num_rows($r);
|
145
28
|
|
146
|
-
if ($num > 0) {
|
29
|
+
if ($num > 0) {//出力結果を一覧表示
|
147
30
|
echo "<br><div class='dbs'>";
|
148
31
|
echo "<table border >
|
149
32
|
<tr>
|
150
33
|
";
|
151
34
|
while ($row = mysqli_fetch_array($r)) {
|
152
35
|
echo "<tr>
|
153
|
-
<th><a href='edit_user.php?user_id =". $row['id']."'>編集</a></th>
|
36
|
+
<th><a href='edit_user.php?user_id =". $row['id']."'>編集</a></th>//編集で内容を変更
|
154
|
-
<th><a href='delete.php?user_id =".$row['id']."&fname=".$row['first_name']."&lname=".$row['last_name']."'>削除</a></th>
|
37
|
+
<th><a href='delete.php?user_id =".$row['id']."&fname=".$row['first_name']."&lname=".$row['last_name']."'>削除</a></th>//削除で内容を削除
|
155
38
|
<tr>
|
156
39
|
<th colspan='2'>所属先企業名</th>
|
157
40
|
<td> ".$row['company']."</td>
|
@@ -234,27 +117,7 @@
|
|
234
117
|
|
235
118
|
?>
|
236
119
|
|
237
|
-
</table>
|
238
|
-
</div>
|
239
|
-
</div>
|
240
|
-
</div><!-- contentInner -->
|
241
|
-
</div><!-- content -->
|
242
|
-
<!-- メインカラム終了 -->
|
243
120
|
|
244
|
-
<!-- フッタ開始 -->
|
245
|
-
<div id="footer">
|
246
|
-
<p>Copyright© 2016 あいち福祉振興会 All Rights Reserved. by yuka umemura</p>
|
247
|
-
</div>
|
248
|
-
<!-- フッタ終了 -->
|
249
|
-
|
250
|
-
</div>
|
251
|
-
</div>
|
252
|
-
</div>
|
253
|
-
<!-- コンテナ終了 -->
|
254
|
-
|
255
|
-
</body>
|
256
|
-
</html>
|
257
|
-
|
258
121
|
```
|
259
122
|
|
260
123
|
###試したこと
|