home *** CD-ROM | disk | FTP | other *** search
/ Chip 2004 April / CMCD0404.ISO / Software / Freeware / Programare / groupoffice-com-2.01 / modules / cms / subscribed.inc < prev    next >
Text File  |  2004-03-08  |  2KB  |  58 lines

  1. <?php
  2. /*
  3. Copyright Intermesh 2003
  4. Author: Merijn Schering <mschering@intermesh.nl>
  5. Version: 1.0 Release date: 08 July 2003
  6.  
  7. This program is free software; you can redistribute it and/or modify it
  8. under the terms of the GNU General Public License as published by the
  9. Free Software Foundation; either version 2 of the License, or (at your
  10. option) any later version.
  11. */
  12.  
  13. if (isset($_REQUEST['delete_site']) && $site = $cms->get_site($_REQUEST['delete_site']))
  14. {
  15.     if ($GO_SECURITY->user_id == $site['user_id'] || $GO_SECURITY->has_permission($GO_SECURITY->user_id, $site['acl_write']))
  16.     {
  17.         $cms->delete_site($_REQUEST['delete_site']);
  18.     }else
  19.     {
  20.         $feedback = '<p class="Error">'.$strAccessDenied.'</p>';
  21.     }
  22. }
  23. ?>
  24. <input type="hidden" name="task" value="site" />
  25. <input type="hidden" name="site_id" value="0" />
  26. <table border="0" cellspacing="5" cellpadding="0">
  27. <tr>
  28.     <td colspan="2">
  29.     <a href="site.php" class="normal"><?php echo $cms_cmd_new_site; ?></a><br /><br />
  30.     <?php
  31.     if(isset($feedback)) echo $feedback.'<br /><br />';
  32.  
  33.     echo '<table border="0">';
  34.     $count = $cms->get_subscribed_sites($GO_SECURITY->user_id);
  35.  
  36.     echo '<tr><td></td>';
  37.     echo '<td><h3>'.$strName.'</h3></td>';
  38.     echo '<td><h3>'.$strOwner.'</h3></td>';
  39.     echo '<td colspan="3"></td></tr>';
  40.  
  41.     while($cms->next_record())
  42.     {
  43.         echo '<tr><td width="16" height="16"><img src="'.$GO_THEME->images['site'].'" border="0" widht="16" height="16" /></td>';
  44.         echo '<td><a class="normal" href="browse.php?site_id='.$cms->f('id').'">'.$cms->f('name').'</a></td>';
  45.         echo '<td>'.show_profile($cms->f('user_id')).'</td>';
  46.         echo '<td><a target="_blank" href="view.php?site_id='.$cms->f('id').'" title="'.$cms_preview.' \''.$cms->f('name').'\'"><img src="'.$GO_THEME->images['magnifier'].'" border="0" /></a></td>';
  47.         echo '<td><a href="site.php?site_id='.$cms->f('id').'" title="'.$strEdit.' \''.$cms->f('name').'\'"><img src="'.$GO_THEME->images['edit'].'" border="0" /></a></td>';
  48.         echo "<td><a href='javascript:confirm_action(\"".$_SERVER['PHP_SELF']."?delete_site=".$cms->f('id')."\",\"".rawurlencode($strDeletePrefix."'".$cms->f('name')."'".$strDeleteSuffix)."\")' title=\"".$strDeleteItem." '".$cms->f('name')."'\"><img src=\"".$GO_THEME->images['delete']."\" border=\"0\"></a></td></tr>\n";
  49.     }
  50.  
  51.     echo '<tr><td colspan="99"><i>'.$count.' '.$cms_sites.'</i></td></tr>';
  52.     echo '</table>';
  53.     ?>
  54.     </td>
  55. </tr>
  56. </table>
  57.  
  58.