本文整理汇总了PHP中admin::AcacheFilesList方法的典型用法代码示例。如果您正苦于以下问题:PHP admin::AcacheFilesList方法的具体用法?PHP admin::AcacheFilesList怎么用?PHP admin::AcacheFilesList使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类admin
的用法示例。
在下文中一共展示了admin::AcacheFilesList方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Acron
static function Acron($onlycaches = array())
{
$stdout = "";
$newcache = $updatedRecords = array();
// ----------------------
// -- Update current event data from Agenda
// ----------------------
if (!class_exists("fromdb_nwevents", FALSE)) {
require_once PATH_CLASSES . "/fromdb/nwevents.php";
}
if (!isset($dbEv) || !is_object($dbEv)) {
$dbEv = new fromdb_nwevents();
}
$updatedRecords = $dbEv->updateCurrentEventsFromAgenda();
// ----------------------
// -- Recreate all caches
// ----------------------
if (!class_exists("fromcache", FALSE)) {
require_once PATH_CLASSES . "/lib/fromcache.php";
}
$cachesCallback = fromcache::get_cache_callback();
foreach (array_reverse($cachesCallback) as $cachename => $callback) {
$callback = str_replace("URL_PREFIX", URL_PREFIX, $callback);
eval("\$c = functions::callMethod(" . $callback . ");");
if ($c) {
$newcache[] = $cachename . "\r\n";
}
}
// ----------------------
// -- Output confirmation
// ----------------------
$thecache = is_array($onlycaches) || !empty($onlycaches) ? $onlycaches : $newcache;
$stdout .= "<div class='col-content-left' style='width:30%'>\r\n";
if (count($updatedRecords)) {
$stdout .= "<h3>Updated data for events:</h3>" . " <ul>\r\n";
foreach ($updatedRecords as $confId) {
$stdout .= " <li><a href='http://agenda.albanova.se/conferenceDisplay.py?confId=" . $confId . "'>" . $dbEv->getEventTitle($confId) . "</a></li>\r\n";
}
$stdout .= " </ul>\r\n";
}
$stdout .= "<h3>Recreated Caches:</h3>" . "<ul>\r\n";
foreach ($thecache as $c) {
$stdout .= "<li>" . $c . "</li>\r\n";
}
$stdout .= "</ul>\r\n" . "\r\n</div><div class='col-content-right' style='width:60%'>\r\n" . admin::AcacheFilesList() . "</div>\r\n";
return $stdout;
}
示例2: array
$out = array();
foreach ($files as $file) {
if (file_exists(INCLEVEL . $file)) {
$out[] = "<strong class='green'>SUCCESS</strong> - The source file <strong style='margin:0 0.5em'>" . $file . "</strong> exists on the local server.";
} else {
$out[] = "<strong class='red'>ERROR</strong> - The soruce file <strong style='margin:0 0.5em'>" . $file . "</strong> does not exist on the local server.";
}
}
print "<p>" . join("\r\n<br>", $out) . "</p>\r\n";
print "<div style='float:left;width:45%;padding:0 1em 0.5em 1.5em;margin:0 0 1.5em 0;border:1px solid black'>\r\n" . "<h4>On a local Mac</h4>\r\n" . "<ul>\r\n" . " <li><code>sudo cp ./_cron/<strong>createcache.sh</strong> /usr/local/bin/createcache.sh</code></li>\r\n" . " <li><code>sudo chmod 644 /usr/local/bin/createcache.sh</code></li>\r\n" . "</ul>\r\n" . "<ul>\r\n" . " <li><code>sudo bbedit /usr/local/bin/createcache.sh</code></li>\r\n" . "</ul>\r\n" . "<ul>\r\n" . " <li><code>sudo cp ./_cron/<strong>org.nordita.createcache.plist</strong> /Users/hvzm/Library/LaunchAgents/org.nordita.createcache.plist</code></li>\r\n" . " <li><code>sudo chmod 644 /Users/hvzm/Library/LaunchAgents/org.nordita.createcache.plist</code></li>\r\n" . "</ul>\r\n" . "<ul>\r\n" . " <li><code>sudo bbedit /Users/hvzm/Library/LaunchAgents/org.nordita.createcache.plist</code></li>\r\n" . "</ul>\r\n" . "<ul>\r\n" . "<li><code><strong>launchctl load</strong> /Users/hvzm/Library/LaunchAgents/org.nordita.createcache.plist</code></li>\r\n" . " <li><code>launchctl list | grep ordita</code></li>\r\n" . "</ul>\r\n" . "</div>\r\n";
print "<div style='float:left;width:45%;padding:0 1em 0.5em 1.5em;margin:0 0 1.5em 2em;border:1px solid black'>\r\n" . "<h4>On a server running Scientific Linux</h4>\r\n" . "<p>TBA...</p>\r\n" . "</div>\r\n" . "<div style='clear:both'></div>\r\n";
// ------------------------------------------
print "<hr>\r\n";
print "<div style='float:left;padding:0 1em 0.5em 1.5em;margin:0 0 1.5em 0'>\r\n" . "<p style='font-weight:bold;font-size:2em; margin-top:0'>» <a href='" . URL_PREFIX . "/_cron/index.php'>RUN CRON MANUALLY</a></p>\r\n" . "</div>\r\n";
require_once PATH_CLASSES . "/lib/admin.php";
print "<div style='float:left;padding:0 1em 0.5em 2.5em;margin:0 0 1.5em 5em;border-left:1px solid black'>\r\n" . admin::AcacheFilesList('0') . "</div>\r\n";
print "<div style='clear:both'></div>\r\n";
/* SEEMS TO BE TOO MANY THINGS MISSING TO RUN CACHE UPDATE FROM HERE
print "<hr>\r\n" .
"<p style='font-weight:bold;font-size:2em; margin-top:0'>» <a href='" . $_SERVER["PHP_SELF"] . "?doit=1'>RUN CRON MANUALLY</a></p>\r\n";
if (isset($_REQUEST["doit"])) {
if (!class_exists("admin",FALSE)) {
require_once PATH_CLASSES . "/document.php";
require_once PATH_CLASSES . "/lib/functions.php";
require_once PATH_CLASSES . "/lib/fromcache.php";
require_once PATH_CLASSES . "/lib/admin.php";
$GLOBALS["documentClass"] = new document();
print "<style>.col-content-left,.col-content-right{display:block;position:relative;float:left;padding:0 1em 1em 1em;border:1px solid black;margin: -1em 0 1em 2em;}.col-content-left{clear: both;width: 45%;}.col-content-right{width: 45%;}</style>\r\n" .
//"<div style='width:auto;padding:0 1em 1em 1em;margin:-1em 0 1em 2em;border:1px solid black'>\r\n" .
admin::Acron() .
//"</div>" .