PHP Classes

File: contents/apps/ledit/src/ajax/saves.php

Recommend this page to a friend!
  Classes of Subin Siby   Lobby   contents/apps/ledit/src/ajax/saves.php   Download  
File: contents/apps/ledit/src/ajax/saves.php
Role: Auxiliary script
Content type: text/plain
Description: Auxiliary script
Class: Lobby
Web OS to install and run Web applications
Author: By
Last change: version 0.9.1 berly
Lobby 0.6
Date: 8 years ago
Size: 567 bytes
 

Contents

Class file image Download
<?php
$saves
= $this->getData("", "ledit");
if( !
$saves ){
  echo
'<div class="saveItem">You haven\'t saved anything.</div>';
}else{
  function
cmp($a, $b) {
    return
strtotime($b["updated"]) - strtotime($a["updated"]);
  }
 
usort($saves, "cmp");
  foreach(
$saves as $save){
   
$url = $this->url . "?id=" . urlencode($save['name']);
?>
<a href="<?php echo $url;?>">
      <div class="saveItem">
        <div class="title"><?php echo $save['name'];?></div>
        <div class="updated"><?php echo $save['updated'];?></div>
      </div>
    </a>
<?php
 
}
}
?>