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.

addSite.php 1.4KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <?php
  2. $url = $_POST['newLink'];
  3. if($url == '' || !isset($_POST['newLink']))
  4. header('Location: index.php');
  5. ?>
  6. <html>
  7. <head>
  8. <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
  9. <link rel="SHORTCUT ICON" href="../favicon.ico"/>
  10. <link rel="stylesheet" type="text/css" href="css/main.css">
  11. <link rel="stylesheet" type="text/css" href="css/jquery.fancybox-1.3.0.css">
  12. <script type="text/javascript" src="js/jquery-1.3.1.min.js"></script>
  13. <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/jquery-ui.min.js"></script>
  14. <title>Ma Page d'accueil</title>
  15. <style>img{max-width:100px;max-height:100px;padding:5px;} img:hover{border:5px solid #00AAFF;padding:0;}</style>
  16. <script>
  17. $(document).ready(function(){
  18. $('.choose').click(function(){
  19. var id = $(this).attr('id');
  20. var url = "<?php echo $url; ?>";
  21. var name = 'test';
  22. $.post('addSiteXML.php', {number: id, url: url, name: name}, function(data){
  23. document.location.href="index.php"
  24. });
  25. });
  26. });
  27. </script>
  28. </head>
  29. <body>
  30. <?php
  31. echo 'URL : '.$url.'<br/>';
  32. require('blogs_last_post.php');
  33. $opts = array(CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, CURLOPT_TIMEOUT => 10);
  34. $blogs = new Blogs_last_post();
  35. $blogs->addSession($url, $opts);
  36. $result = $blogs->exec();
  37. echo $blogs->getAllImagesToChoose($result);
  38. $blogs->clear();