Mercurial > hg > fapweb
comparison admajax.php @ 111:ac1df74619cd
Add entry index numbers.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Tue, 22 Oct 2013 00:34:35 +0300 |
parents | a85f258f6beb |
children | 91660a9d50f0 |
comparison
equal
deleted
inserted
replaced
110:ff511f5351df | 111:ac1df74619cd |
---|---|
141 " <tr>\n". | 141 " <tr>\n". |
142 " <th colspan=\"5\">#".$id." - ".chentities($compo["name"])."</th>\n". | 142 " <th colspan=\"5\">#".$id." - ".chentities($compo["name"])."</th>\n". |
143 " </tr>\n". | 143 " </tr>\n". |
144 " <tr>\n". | 144 " <tr>\n". |
145 " <th style=\"width:1%;\">Compo</th>\n". | 145 " <th style=\"width:1%;\">Compo</th>\n". |
146 " <th style=\"width:1%;\">#</th>\n". | |
146 " <th>Title</th>\n". | 147 " <th>Title</th>\n". |
147 " <th>Author(s)</th>\n". | 148 " <th>Author(s)</th>\n". |
148 " <th>Filename</th>\n". | 149 " <th>Filename</th>\n". |
149 " <th>Actions</th>\n". | 150 " <th>Actions</th>\n". |
150 " </tr>\n"; | 151 " </tr>\n"; |
151 | 152 |
152 $prefix = "en"; | 153 $prefix = "en"; |
154 $index = 1; | |
153 foreach ($compo["entries"] as $eid => $entry) | 155 foreach ($compo["entries"] as $eid => $entry) |
154 { | 156 { |
155 echo | 157 echo |
156 " <tr id=\"entry".$eid."\">\n". | 158 " <tr id=\"entry".$eid."\">\n". |
157 " <td>".stGetFormTextInput(5, 5, "compo_id", $eid, "en", $id)."</td>\n". | 159 " <td>".stGetFormTextInput(5, 5, "compo_id", $eid, "en", $id)."</td>\n". |
160 " <td>".$index."</td>\n". | |
158 " <td>".stGetFormTextInput(30, 64, "name", $eid, "en", $entry["name"])."</td>\n". | 161 " <td>".stGetFormTextInput(30, 64, "name", $eid, "en", $entry["name"])."</td>\n". |
159 " <td>".stGetFormTextInput(30, 64, "author", $eid, "en", $entry["author"])."</td>\n". | 162 " <td>".stGetFormTextInput(30, 64, "author", $eid, "en", $entry["author"])."</td>\n". |
160 " <td>".stGetFormTextInput(20, 64, "filename", $eid, "en", $entry["filename"])."</td>\n". | 163 " <td>".stGetFormTextInput(20, 64, "filename", $eid, "en", $entry["filename"])."</td>\n". |
161 " <td>". | 164 " <td>". |
162 stGetFormButtonInput("update", $eid, $prefix, " Upd ", "updateEntry(".$eid.")"). | 165 stGetFormButtonInput("update", $eid, $prefix, " Upd ", "updateEntry(".$eid.")"). |
163 stGetFormButtonInput("delete", $eid, $prefix, " Del ", "deleteEntry(".$eid.")"). | 166 stGetFormButtonInput("delete", $eid, $prefix, " Del ", "deleteEntry(".$eid.")"). |
164 "</td>\n". | 167 "</td>\n". |
165 " </tr>\n"; | 168 " </tr>\n"; |
169 $index++; | |
166 } | 170 } |
167 | 171 |
168 $prefix = "ne"; | 172 $prefix = "ne"; |
169 echo | 173 echo |
170 " <tr>\n". | 174 " <tr>\n". |
171 " <td></td>\n". | 175 " <td></td>\n". |
176 " <td>".$index."</td>\n". | |
172 " <td>".stGetFormTextInput(30, 64, "name", $id, "ne", "")."</td>\n". | 177 " <td>".stGetFormTextInput(30, 64, "name", $id, "ne", "")."</td>\n". |
173 " <td>".stGetFormTextInput(30, 64, "author", $id, "ne", "")."</td>\n". | 178 " <td>".stGetFormTextInput(30, 64, "author", $id, "ne", "")."</td>\n". |
174 " <td>".stGetFormTextInput(20, 64, "filename", $id, "ne", "")."</td>\n". | 179 " <td>".stGetFormTextInput(20, 64, "filename", $id, "ne", "")."</td>\n". |
175 " <td>".stGetFormButtonInput("add", $id, $prefix, " Add new ", "addEntry(".$id.")")."</td>\n". | 180 " <td>".stGetFormButtonInput("add", $id, $prefix, " Add new ", "addEntry(".$id.")")."</td>\n". |
176 " </tr>\n". | 181 " </tr>\n". |