Accueil/modules/blogs/Blogs.php

38 lines
1.4 KiB
PHP
Raw Permalink Normal View History

<?php
class blogs extends Module
{
protected $moduleTitle = 'Blogs BD';
protected $paramsList = array(
2010-09-20 11:40:27 +02:00
'visibility',
'x',
'y'
);
public function __construct($params){
parent::__construct(__CLASS__, $params);
}
public function build(){
2010-09-27 12:48:53 +02:00
echo '<script type="text/javascript" src="'.$this->pathToModule.'js/'.$this->moduleName.'.js"></script>
<link rel="stylesheet" href="'.$this->pathToModule.'css/'.$this->moduleName.'.css" type="text/css" />';
require($this->pathToModule.'includes/blogs_last_post.php');
echo '<div id="blogs" style="top:'.$this->getParam('y').'; left :'.$this->getParam('x').';"></div>';
2010-09-17 15:38:57 +02:00
echo '<a href="#blogLinksManager" id="blog-links-manager"><img src="images/interface/blogs_edit.png" /></a>';
echo '<div style="display:none;">
<div id="blogLinksManager">
<h3>Blogs Management</h3><br/>
<h4>Delete Site feed</h4>
<ul>';
$blogs = new Blogs_last_post();
foreach($blogs->getLinks() as $link)
echo '<li>'.$link['url'].' <img src="images/interface/delete.png" id="link-'.$link['name'].'"/></li>';
echo '</ul>
<h4>Insert Site feed</h4>
2010-09-27 12:48:53 +02:00
<form action="modules/blogs/includes/addSite.php" method="POST">
<input type="text" id="newLink" name="newLink" value="url" />
<input type="submit" id="link-submit" class="green-button" value="Ajouter"></input>
</form>
</div>
</div>';
}
}