Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Update users with partial

  • Loading branch information...
commit b4dd6a3523ac7376a94e7818fab99fc9188462d0 1 parent c3d97d6
Simone Vittori authored February 09, 2013

Showing 1 changed file with 3 additions and 62 deletions. Show diff stats Hide diff stats

  1. 65  users.php
65  users.php
@@ -13,70 +13,11 @@
13 13
 
14 14
 <?php include_once 'menu.php'; ?>
15 15
     
16  
-<?php if ($users) { ?>
  16
+<?php if ($users) {
17 17
 
18  
-<table>
19  
-  
20  
-  <thead>
21  
-    <tr>
22  
-      <th><?=ID?></th>
23  
-      <th><?=NAME?></th>
24  
-      <th><?=EMAIL?></th>
25  
-      <th><?=IS_ACTIVE?></th>
26  
-      <th><?=IS_SUBSCRIBED?></th>
27  
-      <th><?=CREATED_AT?></th>
28  
-      <th><?=UPDATED_AT?></th>
29  
-      <th><?=LAST_SEEN_AT?></th>
30  
-      <th colspan=3><?=ACTIONS?></th>
31  
-    </tr>
32  
-  </thead>
33  
-  
34  
-  <tbody>
35  
-    <?php foreach ($users as $u) { ?>
36  
-    <tr>
37  
-      <td><?=$u->id?></td>
38  
-      <td><?=$u->name?></td>
39  
-      <td><?=$u->email?></td>
40  
-      
41  
-      <?php if ($u->is_active) { ?>
42  
-      <td><?=YES?></td>
43  
-      <?php } else { ?>
44  
-      <td><?=NO?></td>
45  
-      <?php } ?>
46  
-      
47  
-      <?php if ($u->is_subscribed) { ?>
48  
-      <td><?=YES?></td>
49  
-      <?php } else { ?>
50  
-      <td><?=NO?></td>
51  
-      <?php } ?>
52  
-      
53  
-      <td><?=date(PHP_DATE, strtotime($u->created_at))?></td> 
54  
-      
55  
-      <?php if ($u->updated_at == '0000-00-00 00:00:00') { ?>    
56  
-      <td><?=NEVER?></td>
57  
-      <?php } else { ?>    
58  
-      <td><?=date(PHP_DATE, strtotime($u->updated_at))?></td>    
59  
-      <?php } ?>
60  
-      
61  
-      <?php if ($u->last_seen_at == '0000-00-00 00:00:00') { ?>    
62  
-      <td><?=NEVER?></td>
63  
-      <?php } else { ?>    
64  
-      <td><?=date(PHP_DATE, strtotime($u->last_seen_at))?></td>    
65  
-      <?php } ?>
  18
+include_once '_users_table.php';
66 19
 
67  
-      <td><a href="<?=$cfg['root']?>user_read.php?id=<?=$u->id?>"><?=READ_USER?></a></td>
68  
-      <td><a href="<?=$cfg['root']?>user_update.php?id=<?=$u->id?>"><?=UPDATE_USER?></a></td>
69  
-      <td><a href="<?=$cfg['root']?>user_delete.php?id=<?=$u->id?>" class="delete"><?=DELETE_USER?></a></td>
70  
-    </tr>
71  
-    <?php } ?>
72  
-  </tbody>
73  
-  
74  
-  <tfoot>
75  
-  </tfoot>
76  
-
77  
-</table>
78  
-
79  
-<?php } else { ?>
  20
+} else { ?>
80 21
 
81 22
 <p><?=NO_USERS?></p>
82 23
 

0 notes on commit b4dd6a3

Please sign in to comment.
Something went wrong with that request. Please try again.