You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

Blogs.php 1.4KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. <?php
  2. class blogs extends Module
  3. {
  4. protected $moduleTitle = 'Blogs BD';
  5. protected $paramsList = array(
  6. 'visibility',
  7. 'x',
  8. 'y'
  9. );
  10. public function __construct($params){
  11. parent::__construct(__CLASS__, $params);
  12. }
  13. public function build(){
  14. echo '<script type="text/javascript" src="'.$this->pathToModule.'js/'.$this->moduleName.'.js"></script>
  15. <link rel="stylesheet" href="'.$this->pathToModule.'css/'.$this->moduleName.'.css" type="text/css" />';
  16. require($this->pathToModule.'includes/blogs_last_post.php');
  17. echo '<div id="blogs" style="top:'.$this->getParam('y').'; left :'.$this->getParam('x').';"></div>';
  18. echo '<a href="#blogLinksManager" id="blog-links-manager"><img src="images/interface/blogs_edit.png" /></a>';
  19. echo '<div style="display:none;">
  20. <div id="blogLinksManager">
  21. <h3>Blogs Management</h3><br/>
  22. <h4>Delete Site feed</h4>
  23. <ul>';
  24. $blogs = new Blogs_last_post();
  25. foreach($blogs->getLinks() as $link)
  26. echo '<li>'.$link['url'].' <img src="images/interface/delete.png" id="link-'.$link['name'].'"/></li>';
  27. echo '</ul>
  28. <h4>Insert Site feed</h4>
  29. <form action="modules/blogs/includes/addSite.php" method="POST">
  30. <input type="text" id="newLink" name="newLink" value="url" />
  31. <input type="submit" id="link-submit" class="green-button" value="Ajouter"></input>
  32. </form>
  33. </div>
  34. </div>';
  35. }
  36. }