示例#1
0
                        $cursec = $subj[$abs['section']];
                        echo "<h3>{$cursec}</h3>";
                    }
                    $loc = array_values(array_slice($abs, 0, 4));
                    $url = linkabs($loc);
                    $pdf = linkpdf($loc);
                    $edt = $user ? linkedt($loc, 'rht') : '';
                    echo '<div class="entry">';
                    echo $edt . '<h4>' . linker($url, $abs['title']) . '</h4>';
                    echo '<div>' . $abs['author'] . '</div>';
                    echo cite($loc) . ' ' . linker(mkdoi($abs['doi']));
                    if (file_exists($_SERVER['DOCUMENT_ROOT'] . $pdf)) {
                        echo '<div>' . linker($url, 'Abstract') . ' | Full text: ' . linker($pdf, 'PDF [' . getlang($abs['pdf']) . ']') . '</div>';
                    }
                    echo '</div>';
                }
            }
            echo '</div>';
        } else {
            echo '<div class="panel">';
            echo '<h3 class="h">' . "{$year}, Volume {$vol}" . '</h3>';
            echo '<div>';
            foreach (array_keys($issue) as $num) {
                echo '<a href="/archive/' . $vol . '/' . $num . '" class="issue btn">' . '<img src="/img/cover-' . $year . '-' . $num . '.jpg" alt="cover">' . '<span class="btn">Issue ' . $num . '</span>' . '</a>' . PHP_EOL;
            }
            echo '</div></div>';
        }
    }
} else {
    sethead('No records found', $xtra ? 200 : 404);
}
示例#2
0
 public function getcontent()
 {
     if (Action::$site_info['pubusersx'] == 1) {
         $condition = " AND user_head!='' AND live_city!='' AND live_city!='其他 其他' AND user_gender!='' AND user_info!='' AND auth_email='1'";
     } else {
         $condition = " AND live_city!='' AND live_city!='其他 其他'";
     }
     $lasttime = $_GET['lasttime'];
     $content = D('ContentView')->where('replyid=0' . $condition . ' AND posttime>' . $lasttime)->order("`content_id` DESC")->limit('30')->select();
     if ($content) {
         foreach ($content as $key => $val) {
             $result1[] = str_replace('海外 ', '', $val['live_city']);
             $result2[] = sethead($val['user_head']);
             $result3[] = "<div class=\"maps\"><a href=\"" . SITE_URL . "/{$val['user_name']}\" title=\"{$val['nickname']}\" target=\"_blank\" class=\"link\"><img src=\"" . sethead($val['user_head']) . "\" alt=\"{$val['nickname']}\"/></a><span class=\"body\"><span class=\"nickname " . setvip($val['user_auth']) . "\"><a href=\"" . SITE_URL . "/{$val['user_name']}\" title=\"{$val['nickname']}\" target=\"_blank\">{$val['nickname']}</a></span> " . daddslashes(D('Content')->ubb($val['content_body'])) . "<div class=\"other\">" . timeop($val['posttime']) . " {$val['live_city']}</div></span></div>";
             $lasttime = max($val['posttime'], $lasttime);
         }
         echo json_encode(array('res' => 'success', 'result1' => $result1, 'result2' => $result2, 'result3' => $result3, 'lasttime' => $lasttime));
     }
 }
示例#3
0
        }
    }
    if (!$prefix) {
        $prefix[] = $all[$path] ? $all[$path] : ucfirst($path);
    }
} else {
    $path = 'home';
}
$current = array($path => true);
$template = './pages/' . $path;
if (is_file($template . '.html')) {
    include $template . '.html';
} elseif (is_file($template . '.php')) {
    include $template . '.php';
} else {
    sethead('Page not found');
}
$output = ob_get_contents();
ob_end_clean();
if ($prefix) {
    $prefix[] = '- ';
}
isset($mysqli) && $mysqli->close();
?>
<!DOCTYPE html>
<html>
<head>
	<meta charset="UTF-8">
	<title><?php 
echo implode(' ', $prefix) . J_NAME;
?>