profile_list.php 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. <table width="100%" border="0" cellpadding="0" cellspacing="0">
  2. <tr>
  3. <td align='left'><b><?php echo $text['header-xmpp']?></b><br>
  4. <?php echo $text['description-xmpp-list']?>
  5. </td>
  6. </tr>
  7. </table>
  8. <br />
  9. <table class="tr_hover" width='100%' border='0' cellpadding='0' cellspacing='0'>
  10. <tr>
  11. <th><?php echo $text['label-profile_name']?></th>
  12. <th><?php echo $text['label-context']?></th>
  13. <th><?php echo $text['label-status']?></th>
  14. <th><?php echo $text['label-enabled']?></th>
  15. <th><?php echo $text['label-description']?></th>
  16. <td class='list_control_icons'>
  17. <?php if (permission_exists('xmpp_add')) { ?>
  18. <a href='xmpp_profile_edit.php' alt='<?php echo $text['button-add']?>'><?php echo $v_link_label_add; ?></a>
  19. <?php } ?>
  20. </td>
  21. </tr>
  22. <?php
  23. $c = 0;
  24. $row_style["0"] = "row_style0";
  25. $row_style["1"] = "row_style1";
  26. foreach($profiles_array as $profile){
  27. $tr_link = (permission_exists('xmpp_edit')) ? "href='xmpp_profile_edit.php?id=".escape($profile['xmpp_profile_uuid'])."'" : null;
  28. ?>
  29. <tr <?php echo $tr_link; ?>>
  30. <td class='<?php echo $row_style[$c]; ?>'>
  31. <?php
  32. if (permission_exists('xmpp_edit')) {
  33. ?><a href='xmpp_profile_edit.php?id=<?php echo escape($profile['xmpp_profile_uuid']); ?>'><?php echo $profile['profile_name']; ?></a><?php
  34. }
  35. else {
  36. echo escape($profile['profile_name']);
  37. }
  38. ?>
  39. </td>
  40. <td class='<?php echo $row_style[$c]; ?>'><?php echo escape($profile['context']); ?>&nbsp;</td>
  41. <td class='<?php echo $row_style[$c]; ?>'><?php echo escape($profile['status']); ?>&nbsp;</td>
  42. <td class='<?php echo $row_style[$c]; ?>'><?php echo escape(ucwords($profile['enabled'])); ?>&nbsp;</td>
  43. <td class='row_stylebg'><?php echo escape($profile['description']); ?>&nbsp;</td>
  44. <td class='list_control_icons'>
  45. <?php
  46. if (permission_exists('xmpp_edit')) {
  47. ?><a href='xmpp_profile_edit.php?id=<?php echo escape($profile['xmpp_profile_uuid']); ?>' alt='<?php echo $text['button-edit']?>'><?php echo $v_link_label_edit; ?></a><?php
  48. }
  49. if (permission_exists('xmpp_delete')) {
  50. ?><a href='profile_delete.php?id=<?php echo escape($profile['xmpp_profile_uuid']); ?>' onclick="return confirm('<?php echo $text['confirm-delete']?>')" alt='<?php echo $text['button-delete']?>'><?php echo $v_link_label_delete; ?></a><?php
  51. }
  52. ?>
  53. </td>
  54. </tr>
  55. <?php
  56. if ($c==0) { $c=1; } else { $c=0; }
  57. }
  58. ?>
  59. <tr>
  60. <td colspan='6' class='list_control_icons'>
  61. <?php if (permission_exists('xmpp_add')) { ?>
  62. <a href='xmpp_profile_edit.php' alt='<?php echo $text['button-add']?>'><?php echo $v_link_label_add; ?></a>
  63. <?php } ?>
  64. </td>
  65. </tr>
  66. </table>
  67. <br><br>