Browse Source

add admin view

andre 4 năm trước cách đây
mục cha
commit
069121cc85
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      admin.php

+ 1 - 1
admin.php

@@ -119,7 +119,7 @@ foreach($userlist as $user) {
     <input type="hidden" id="action" name="action" value="adduser">
     <input type="hidden" id="action" name="action" value="adduser">
     <td>
     <td>
         <input type='text' id='userid' name='userid' size='35' readonly value='<?php echo bin2hex(random_bytes(16)) ?>'>
         <input type='text' id='userid' name='userid' size='35' readonly value='<?php echo bin2hex(random_bytes(16)) ?>'>
-        <input type='button' id='createtoken' value='new token'>
+        <input type='button' id='createtoken' value='new token' onclick='window.location.href="admin.php?token=<?php echo $token; ?>"'>
     </td><td>
     </td><td>
         <input type='radio' id='reporter' name='role' value='reporter'>Reporter
         <input type='radio' id='reporter' name='role' value='reporter'>Reporter
         <input type='radio' id='consumer' name='role' value='consumer'>Consumer
         <input type='radio' id='consumer' name='role' value='consumer'>Consumer