Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- const PAGE_SIZE = 30;
- function human_filesize($bytes, $decimals = 2) {
- $sz = 'BKMGTP';
- $factor = floor((strlen($bytes) - 1) / 3);
- return sprintf("%.{$decimals}f", $bytes / pow(1024, $factor)) . @$sz[$factor];
- }
- $repo = "repo/addons.xml";
- $zip_folder = "repo/";
- $packs = Array();
- $xml = simplexml_load_file($repo);
- $packs_xml = $xml->xpath("//addon");
- $i=1;
- foreach ($packs_xml as $pack_xml)
- {
- $pack = Array();
- $pack["name"] = trim($pack_xml[0]->attributes()->id);
- $pack["version"] = trim($pack_xml[0]->attributes()->version);
- $pack["file"] = $zip_folder.$pack["name"]."/".$pack["name"]."-".$pack["version"].".zip";
- if (is_file($pack["file"]))
- {
- $pack["size"] = human_filesize(filesize($pack["file"]));
- $pack["timestamp"] = filemtime($pack["file"]);
- $pack["date"] = date ("d/m/Y", $pack["timestamp"]);
- }
- $packs[] = $pack;
- }
- //ksort($packs);
- function cmp($a, $b) {
- return strcmp($b['timestamp'], $a['timestamp']);
- }
- usort($packs, "cmp");
- $items = PAGE_SIZE;
- $page = (isset($_GET['page'])) ? $_GET['page'] : 1;
- $page = (int) $page;
- $total = count($packs);
- $packs = array_slice($packs, $page - 1, $items);
- ?>
- <!DOCTYPE html>
- <html xmlns="http://www.w3.org/1999/xhtml" lang="en">
- <head>
- <meta charset="UTF-8">
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- <meta name="keywords" content="kodi, קודי, קודי ישראל, ריפו, סורס, טלוויזיה">
- <meta name="description" content="הרחבות, קודי ישראל, הקוסם, thewiz, מקורות, סורסים">
- <title>Abeksis - Kodi Addons List</title>
- <style type="text/css" media="screen"> @import url("style.css"); </style>
- <link rel="stylesheet" type="text/css" href="http://www.abeksis.com/css/jquery.smarticker.css">
- <script type="text/javascript" src="../lib/jquery-1.10.2.min.js"></script>
- <script type="text/javascript" src="../lib/jquery.smarticker.js"></script>
- </head>
- <script>
- (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
- (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
- m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
- })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
- ga('create', 'UA-61825601-2', 'auto');
- ga('send', 'pageview');
- </script>
- <body id="sp">
- <div class="container">
- <div id="header">
- <a href="http://abeksis.com/" class="logo">
- <img src="../images/logo.png" alt="" />
- </a>
- <div style="float: right; margin-right: -20px;">
- <script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
- <ins class="adsbygoogle"
- style="display:inline-block;width:728px;height:90px"
- data-ad-client="ca-pub-1765760546116873"
- data-ad-slot="3733614851"></ins>
- <script>
- (adsbygoogle = window.adsbygoogle || []).push({});
- </script></div>
- </div>
- </div></div>
- <div id="MainNav">
- <div id="menu">
- <div style="float: right; margin-right: 10px;">
- <a class="menu" href="/">ראשי</a> |
- <a class="menu" target="_blank" href="https://www.facebook.com/groups/kodiisrael/?ref=bookmarks">פייסבוק</a> |
- <a class="menu" href="mailto:zivhad@gmail.com?Subject=שלום%20זיו.%20 מהאתר של אבקסיס">זיו חדד - מעצב גרפי לקודי</a> |
- <a class="menu" target="_blank" href="http://repo.thewiz.info/">הקוסם</a>
- </div></ul></div>
- <div id="date">
- <p class="update">עדכון אחרון: <? echo date("d/m/Y H:i", filemtime("repo/update.txt")+1*60*60); ?></p></div>
- </div>
- <!-- news Start -->
- <div class="target">
- <ul>
- <li><a href="#">ההרחבה MorePower ( סרטי 1080p, 5.1, 3D movies ) התווספה לריפו. </a></li>
- <li><a href="#">ההרחבה dexterTv עודכנה לגרסה חדשה</a></li>
- <li><a href="#">BBTS חזרה לפעילות מלאה</a></li>
- <li><a href="#">SportsDevil - עודכן לגרסה חדשה</a></li>
- <li><a href="#">הסקין htpt התווסף לריפו</a></li>
- </ul>
- </div>
- <script type="text/javascript" src="../lib/jquery-1.10.2.min.js"></script>
- <script type="text/javascript" src="../lib/jquery.smarticker.js"></script>
- <script type="text/javascript">
- (function(){
- $('.target').smarticker();
- })();
- </script>
- <!-- news and -->
- <center>
- <table id="main">
- <tr>
- <td valign='top'>
- <div id="table">
- <div id="sidebar" style="float: right; margin-right: -219px;">
- <p>לחצו להורדת הריפו<p>
- <a href="../repo/repository.abeksis/repository.abeksis.zip"><img src="images/download-button.png"></a>
- </div>
- <table width="770" align='center' id='searchResult' valign='top'>
- <tr><th width='100px'><img src="images/list.png" alt="#"/></th><th><img src="images/database.png" alt="Addon" /></th><th width='150px'><img src="images/Version.png" alt="גרסה"/></th><th width='150px'> <img src="images/disc.png" alt="גודל" /></th><th width='150px'><img src="images/Calendar.png" alt="תאריך" /></th>
- </tr>
- <?
- $i=1;
- foreach ($packs as $pack)
- {
- echo "<tr>";
- echo "<td>".((($page-1) * $items) + $i++)."</td><td>".$pack["name"].'</td>';
- echo "<td>".'<a href="'.$pack["file"].'">'.$pack["version"]."</a>";
- echo '</td>';
- if (is_file($pack["file"]))
- echo "<td>".$pack["size"]."</td><td class=\"date-col\">".$pack["date"];
- if (time()-filemtime($pack["file"]) < 3*24*60*60)
- echo '<img src="../images/new.png">';
- echo "</td>";
- echo "</tr>";
- }
- ?>
- </tr></table></center></div>
- <div id="footer">
- <a class="home" target="_blank" href="http://kodisrael.net">פורום</a> |
- <a class="home" target="_blank" href="http://kodi.tv/download/">הורדת קודי</a>
- </div>
- </body>
- </HTML>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement