当前位置: 首页>>代码示例>>PHP>>正文


PHP admin::AcacheFilesList方法代码示例

本文整理汇总了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;
 }
开发者ID:,项目名称:,代码行数:47,代码来源:

示例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'>&#187; <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'>&#187; <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>" .
开发者ID:,项目名称:,代码行数:31,代码来源:


注:本文中的admin::AcacheFilesList方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。