3 * @link https://datagram.co.jp/source/bksj for the canonical source repository
4 * @copyright Copyright (c) 2006-2019 Datagram Ltd. (https://datagram.co.jp)
5 * @license https://datagram.co.jp/source/bksj/license.txt
10 $basic = $ctrl->basic;
11 $list = $ctrl->dat['list'];
13 <script type="text/javascript">
22 gotoNext: function(func) {
30 this.func.val('UserEra');
31 this.act.val('create');
36 drop: function(id, name) {
40 if (!confirm("'" + name + "' を削除しますか?")) {
56 eval("this.ans = " + data);
59 this.ans = {"sts": "NG", "err": "ajax error"};
62 if (this.ans.sts == 'NG') {
67 this.gotoNext('UserEra');
73 this.func.val('UserEra');
81 this.next = $('#next');
82 this.func = $('#func');
94 <form method="post" name="next" id="next" action="<?= $base ?>">
95 <input type="hidden" name="func" id="func">
96 <input type="hidden" name="act" id="act">
97 <input type="hidden" name="id" id="id">
98 <input type="hidden" name="bid" id="bid" value="<?= $bid ?>">
101 <table id="my_header" width="100%">
104 <a onclick="return my.gotoNext('UserMenu');">メニュー</a>
107 <td style="text-align: right;">
108 <button type="button" class="my_magenta" style="width: 120px;" onclick="return my.gotoNext('Login');">ログアウト</button>
112 <td colspan="2" style="text-align: center;">
113 <?= $view->strBasic($basic) ?>
118 <div style="height: 5px;"> </div>
123 <table class="my_table" width="100%">
125 <th class="my_border">年号</th>
129 <div style="height: 1px;"> </div><hr>
131 <table class="my_table" width="100%">
133 <td class="my_border" id="my_create">
134 <button type="button" class="my_cyan" style="width: 150px;" onclick="return my.create();">新規作成</button>
139 <div style="height: 20px;"> </div>
141 <table class="my_list">
153 foreach ($list as $rec) {
156 $ymd = $view->strDate($rec['ymd']);
157 $era = $view->str($rec['era']);
158 $abr = $view->str($rec['abr']);
159 $delete_flg = $view->str($rec['delete_flg']);
162 <td style="text-align: center;">
163 <button type="button" class="my_green" onclick="return my.edit('<?= $id ?>');">編集</button>
167 <td style="text-align: center;"><?= $abr ?></td>
172 <button type="button" class="my_magenta" onclick="return my.drop('<?= $id ?>', '<?= $era ?>');">削除</button>