Accueil/class/Blogs.php

35 lines
1.1 KiB
PHP
Raw Normal View History

<?php
class blogs {
private $params = array();
public function __construct($params){
$this->setParams($params);
require('blogs_last_post.php');
echo '<script type="text/javascript" src="js/jquery.blogs.js"></script>';
echo '<a href="#blogLinksManager" id="blog-links-manager">Manage blog links</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/delete.png" id="link-'.$link['name'].'"/></li>';
echo '</ul>
<h4>Insert Site feed</h4>
<form action="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>';
}
private function setParams($params){
$this->params = $params;
}
public static function start($params){
$blogs = new blogs($params);
}
}