Exemplo n.º 1
0
 if ('users' == $_GET['uri'] && isset($_GET['id'])) {
     send_headers();
     $user = get_user_by_uid($_GET['id']);
     unset($user['password']);
     unset($user['locale']);
     $response = array("version" => $version, "response" => $user);
     echo json_encode($response);
 } elseif ('users' == $_GET['uri']) {
     send_headers();
     $users = get_all_users();
     $response = array("version" => $version, "response" => $users);
     echo json_encode($response);
 } elseif ('tags' == $_GET['uri'] && isset($_GET['id'])) {
     send_headers();
     $tag = get_tag_by_uid($_GET['id']);
     $tag['type'] = get_tag_type($tag['type']);
     unset($tag['keya']);
     $response = array("version" => $version, "response" => $tag);
     echo json_encode($response);
 } elseif ('tags' == $_GET['uri']) {
     send_headers();
     $tags = get_all_tags();
     $response = array("version" => $version, "response" => $tags);
     echo json_encode($response);
 } elseif ('readers' == $_GET['uri'] && isset($_GET['id'])) {
     send_headers();
     $reader = get_reader_by_id($_GET['id']);
     $reader['services'] = get_reader_services_by_id($reader['id']);
     $services = [];
     foreach (get_reader_services_by_id($reader['id']) as $service_id) {
         $services[] = get_reader_service($service_id);
Exemplo n.º 2
0
echo _('Actions');
?>
</th>
		    	</tr>
  			</thead>
  			<tbody>
  				<?php 
foreach ($tags as $tag) {
    ?>
  					<tr>
  						<td><?php 
    echo $tag['uid'];
    ?>
</td>
  						<td><?php 
    echo get_tag_icon_html($tag['type']) . ' ' . get_tag_type($tag['type']);
    ?>
</td>
  						<td><?php 
    echo $tag['owner'];
    ?>
</td>
  						<td>
  							<a href="tag?uid=<?php 
    echo $tag['uid'];
    ?>
"><button class="ink-button"><i class="icon-pencil"></i></button></a>
  							<a href="tag/delete?uid=<?php 
    echo $tag['uid'];
    ?>
"><button class="ink-button red"><i class="icon-trash"></i></button></a>