Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- 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["date"] = date ("d/m/Y",filemtime($pack["file"]));
- }
- $packs[] = $pack;
- }
- ksort($packs);
- ?>
- <!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">
- <link rel="stylesheet" type="text/css" href="style.css">
- <title>Abeksis - Kodi Addons List </title>
- </head>
- <body>
- <div id="links_bar">
- <div style="float: right; margin-right: 10px;">
- <a class="home" href="/">ראשי</a> |
- <a class="home" target="_blank" href="https://www.facebook.com/groups/kodiisrael/?ref=bookmarks">פייסבוק</a> |
- <a class="home" href="mailto:zivhad@gmail.com?Subject=שלום%20זיו.%20 מהאתר של אבקסיס">זיו חדד - מעצב גרפי לקודי</a> |
- <a style="color:#000;" target="_blank" href="http://repo.thewiz.info/">הקוסם</a>
- </div>
- <div id="date">
- <SCRIPT LANGUAGE="JavaScript">
- var now = new Date();
- var days = new Array('ראשון','שני','שלישי','רביעי','חמישי','שישי','שבת');
- var months = new Array('ינואר','פברואר','מרץ','אפריל','מאי','יוני','יולי','אוגוסט','ספטמבר','אוקטובר','נובמבר','דצמבר');
- var date = ((now.getDate()<10) ? "0" : "")+ now.getDate();
- function fourdigits(number) {
- return (number < 1000) ? number + 1900 : number;
- }
- today = days[now.getDay()] + ", " +
- months[now.getMonth()] + " " +
- date + ", " +
- (fourdigits(now.getYear())) ;
- document.write(today);
- </script></div>
- </div>
- <center>
- <table id="main">
- <tr>
- <td valign='top'>
- <table valign='top' align='center' id='searchResult'>
- <div id="banner"><tr></th></tr></div>
- <div id="repo">
- <div id="repo-download" style="float: right; margin-right: 10px;">
- <a href="/">לחצו להורדת הריפו לקודי</a> <img id="down" src="http://www.abeksis.com/images/Download.png" alt="">
- </div>
- <p class="update">עדכון אחרון: <? echo date("d/m/Y H:i", filemtime("update.txt")+1*60*60); ?></p>
- <tr><th width='100px'><img src="http://www.abeksis.com/images/list.png" alt="#"/></th><th><img src="http://www.abeksis.com/images/database.png" alt="Addon" /></th><th width='150px'><img src="http://www.abeksis.com/images/Version.png" alt="גרסה"/></th><th width='150px'> <img src="http://www.abeksis.com/images/disc.png" alt="גודל" /></th><th width='150px'><img src="http://www.abeksis.com/images/Calendar.png" alt="תאריך" /></th>
- </tr>
- <?
- $i=1;
- foreach ($packs as $pack)
- {
- echo "<tr>";
- echo "<td>".$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>".$pack["date"]."</td>";
- echo "<img src='../images/new.png' width='18px'>";
- echo "</tr>";
- }
- ?>
- </tr></table></center>
- </body></HTML>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement