Пример #1
0
         $ipIsInInstitute = FALSE;
         $ip = $_SERVER[REMOTE_ADDR];
         // check if our IP is in inst_ips
         if (is_array($cfg[inst_ips])) {
             foreach ($cfg[inst_ips] as $i) {
                 if (ereg("^{$i}", $ip)) {
                     $ipIsInInstitute = TRUE;
                 }
             }
         }
         // if we are in the institute IPs, use the institute
         // cache.
         if ($ipIsInInstitute) {
             CarpCacheShow($rss_url, '', 1, 'institute');
         } else {
             CarpCacheShow($rss_url);
         }
     }
     $content = ob_get_contents();
     ob_clean();
     /******************************************************************************
      * Heading type pages 
      ******************************************************************************/
 } else {
     if ($o->getField("type") == 'heading') {
         $url = '';
         /******************************************************************************
          * Divider type pages 
          ******************************************************************************/
     } else {
         if ($o->getField("type") == 'divider') {
Пример #2
0
    $ipIsInInstitute = FALSE;
    $ip = $_SERVER[REMOTE_ADDR];
    // check if our IP is in inst_ips
    if (is_array($cfg[inst_ips])) {
        foreach ($cfg[inst_ips] as $i) {
            if (ereg("^{$i}", $ip)) {
                $ipIsInInstitute = TRUE;
            }
        }
    }
    // if we are in the institute IPs, use the institute
    // cache.
    if ($ipIsInInstitute) {
        CarpCacheShow($url, '', 1, 'institute');
    } else {
        CarpCacheShow($url);
    }
}
printc("<div class='story'>");
printc(ob_get_contents());
printc("</div>");
ob_clean();
if ($o->getField("title")) {
    printc("\n\n<div class='contentinfo'>" . spchars($o->getField("title")) . "</div>\n");
    // printc("<div><a href='".$o->getField("url")."' target='_blank'>".$o->getField("url")."</a></div>");
    // if ($o->getField("shorttext")) printc("<div class='desc'>".stripslashes($o->getField("shorttext"))."</div>");
}
if ($o->getField("longertext") && !ereg("^[\n\r]*<br />\$", $o->getField("longertext"))) {
    if ($action == 'viewsite') {
        $discussAction = 'viewsite';
    } else {
Пример #3
0
function CarpCacheFilter($url, $cachefile)
{
    CarpCacheShow($url, $cachefile, 0);
}