$readable_size = FS::normalizeSize($download_size); sendStatusToLobby("download_status", "Downloaded {$percent}% of {$readable_size}"); } else { /** * We couldn't find the percentage */ $GLOBALS['non_percent'] = 1; $downloaded = FS::normalizeSize($downloaded); sendStatusToLobby("download_status", "Downloaded {$downloaded}"); } /** * Show Install message when download is completed */ if ($percent == 100 && !isset($GLOBALS['install-msg-printed'])) { $GLOBALS['install-msg-printed'] = 1; $downloaded = FS::normalizeSize($downloaded); sendStatusToLobby("download_status", "Downloaded 100% of {$downloaded}"); sleep(2); sendStatusToLobby("install_status", "Installing <b>{$appID}</b>..."); sleep(2); } } }; try { /** * Update::app() will only return TRUE if download is completed */ if (Update::app($appID)) { $App = new Apps($appID); $App->enableApp(); sendStatusToLobby("install_finished", "Installed <b>{$appID}</b>.<cl/><a href='" . $App->info["url"] . "' class='btn green'>Open App</a>");
</ul> <div style="margin: 20px;text-align: center;"> <a data-path="/admin/lobby-store.php?app=<?php echo $appInfo["id"]; ?> " class="open-via-lobby btn orange btn-large" title="Open in Lobby" style="display: inline-block;"> <i class="material-icons">open_in_new</i> </a> <a style='display: inline-block;color: white;position:relative;line-height: 40px;' class='btn btn-large green' onclick="node = document.createElement('iframe');node.src = this.href;node.style.cssText = 'display:none;position: absolute;left:-1000px;';node.addEventListener('load', function(){$(this).remove();clog('c');}, true);document.body.appendChild(node);return false;" href="<?php echo L_URL; ?> /api/app/<?php echo $appInfo['id']; ?> /download">Download Zip<span style='position: absolute;font-weight: bold;bottom: 7px;left: 0;line-height: 14px;right: 0;font-size: 0.8rem;'><?php echo \Lobby\FS::normalizeSize($appInfo["download_size"]); ?> </span></a> <a style="display: inline-block;" class="btn"> <strong><?php echo $appInfo['downloads']; ?> Downloads</strong> </a> <a href="http://server.lobby.sim/docs/install-app" class="btn" target="_blank">Installation Help</a> </div> <?php require_once $this->dir . "/src/inc/Fr.star.php"; $this->addScript("Fr.star.js"); $star = new \Fr\Star(array(), "app-{$appInfo['id']}"); echo "<div class='ratings'>";
$dbSize = $App->getDBSize(); echo FS::normalizeSize($dbSize); ?> <a class="btn red" href="<?php echo \Lobby::u("/admin/apps.php?app={$appID}&action=clear-data" . CSRF::getParam()); ?> ">Clear Data</a> </h6> </td> </tr> </tbody> <tfoot> <tr> <td>Total size</td> <td><h5><?php echo FS::normalizeSize($folderSize + $dbSize); ?> </h5></td> </tr> </tfoot> </table> </div> </div> <style> .tab-contents{ padding: 10px 0; } </style> <?php } } else {