Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Update users with partial

  • Loading branch information...
commit b4dd6a3523ac7376a94e7818fab99fc9188462d0 1 parent c3d97d6
@simonewebdesign authored
Showing with 3 additions and 62 deletions.
  1. +3 −62 users.php
View
65 users.php
@@ -13,70 +13,11 @@
<?php include_once 'menu.php'; ?>
-<?php if ($users) { ?>
+<?php if ($users) {
-<table>
-
- <thead>
- <tr>
- <th><?=ID?></th>
- <th><?=NAME?></th>
- <th><?=EMAIL?></th>
- <th><?=IS_ACTIVE?></th>
- <th><?=IS_SUBSCRIBED?></th>
- <th><?=CREATED_AT?></th>
- <th><?=UPDATED_AT?></th>
- <th><?=LAST_SEEN_AT?></th>
- <th colspan=3><?=ACTIONS?></th>
- </tr>
- </thead>
-
- <tbody>
- <?php foreach ($users as $u) { ?>
- <tr>
- <td><?=$u->id?></td>
- <td><?=$u->name?></td>
- <td><?=$u->email?></td>
-
- <?php if ($u->is_active) { ?>
- <td><?=YES?></td>
- <?php } else { ?>
- <td><?=NO?></td>
- <?php } ?>
-
- <?php if ($u->is_subscribed) { ?>
- <td><?=YES?></td>
- <?php } else { ?>
- <td><?=NO?></td>
- <?php } ?>
-
- <td><?=date(PHP_DATE, strtotime($u->created_at))?></td>
-
- <?php if ($u->updated_at == '0000-00-00 00:00:00') { ?>
- <td><?=NEVER?></td>
- <?php } else { ?>
- <td><?=date(PHP_DATE, strtotime($u->updated_at))?></td>
- <?php } ?>
-
- <?php if ($u->last_seen_at == '0000-00-00 00:00:00') { ?>
- <td><?=NEVER?></td>
- <?php } else { ?>
- <td><?=date(PHP_DATE, strtotime($u->last_seen_at))?></td>
- <?php } ?>
+include_once '_users_table.php';
- <td><a href="<?=$cfg['root']?>user_read.php?id=<?=$u->id?>"><?=READ_USER?></a></td>
- <td><a href="<?=$cfg['root']?>user_update.php?id=<?=$u->id?>"><?=UPDATE_USER?></a></td>
- <td><a href="<?=$cfg['root']?>user_delete.php?id=<?=$u->id?>" class="delete"><?=DELETE_USER?></a></td>
- </tr>
- <?php } ?>
- </tbody>
-
- <tfoot>
- </tfoot>
-
-</table>
-
-<?php } else { ?>
+} else { ?>
<p><?=NO_USERS?></p>
Please sign in to comment.
Something went wrong with that request. Please try again.