예제 #1
0
 function parse($args, $page)
 {
     global $pagestore, $LkTbl, $PgTbl;
     $text = '';
     $first = 1;
     $q1 = $pagestore->dbh->query("SELECT link, SUM(count) AS ct FROM {$LkTbl} " . "GROUP BY link ORDER BY ct DESC, link");
     while ($result = $pagestore->dbh->result($q1)) {
         $q2 = $pagestore->dbh->query("SELECT lastversion FROM {$PgTbl} " . "WHERE title='{$result['0']}'");
         if (!($r2 = $pagestore->dbh->result($q2)) || empty($r2[0])) {
             if (!$first) {
                 $text = $text . "\n";
             } else {
                 $first = 0;
             }
             $text = $text . '(' . html_url(findURL($result[0]), $result[1]) . ') ' . html_ref($result[0], $result[0]);
         }
     }
     return html_code($text);
 }
예제 #2
0
function template_common_prologue($args)
{
    global $WikiName, $HomePage, $WikiLogo, $MetaKeywords, $MetaDescription;
    global $StyleScript, $SeparateTitleWords, $SeparateHeaderWords, $SearchURL, $FindScript;
    //echo "<p>template_common_prologue(".print_r($args,True).")</p>";
    $keywords = ' ' . html_split_name($args['headlink']);
    $keywords = str_replace('"', '&quot;', $keywords);
    //ob_start();                           // Start buffering output.
    /*
      if($SeparateTitleWords)
        { $args['title'] = html_split_name($args['title']); }
    ?>
    <!DOCTYPE html
              PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
              "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html   xmlns   = "http://www.w3.org/1999/xhtml">
    <head>
    <meta name="KEYWORDS" content="<?php print $MetaKeywords . $keywords; ?>" />
    <meta name="DESCRIPTION" content="<?php print $MetaDescription; ?>" />
    <?php
      if($args['norobots'])
      {
    ?>
    <meta name="ROBOTS" content="NOINDEX, NOFOLLOW" />
    <?php
      }
    ?>
    <link rel="STYLESHEET" href="<?php print $StyleScript; ?>" type="text/css" />
    <title><?php print $args['title'] . ' - ' . $WikiName; ?></title>
    </head>
    <body>
    <?php
    */
    ?>
<link rel="stylesheet" href="<?php 
    echo $GLOBALS['phpgw_info']['server']['webserver_url'] . '/wiki/template/wiki.css';
    ?>
" type="text/css" />
<div align="left">
<div id="header">
  <?php 
    /* removed logo for now: TODO show it on extern site
      <div class="logo">
       <a href="<?php print viewURL($HomePage); ?>"><img
        src="<?php print $WikiLogo; ?>" alt="[Home]" /></a>
      </div> */
    ?>
  <h1 style="margin:0px;">
<?php 
    print $args['heading'];
    if ($args['headlink'] != '') {
        ?>
    <a class="title" href="<?php 
        print findURL($args['headlink']);
        ?>
">
<?php 
        $title = get_title($args['headlink']);
        if ($SeparateHeaderWords) {
            print html_split_name($title);
        } else {
            print $title;
        }
        ?>
</a>
<?php 
    }
    print $args['headsufx'];
    ?>
  </h1>
<?php 
    if ($args['toolbar']) {
        if (!$args['nosearch']) {
            echo '<form method="POST" action="' . $FindScript . '" name="thesearch">
				<input type="hidden" name="action" value="find"/>
				<div class="form">' . "\n";
        }
        print html_toolbar_top();
        if (!$args['nosearch']) {
            echo ' | ' . lang('Search') . ': <input type="text" name="find" size="20" />';
        }
        echo "\n<hr align=left width=99% />\n";
        if (!$args['nosearch']) {
            echo "</div>\n</form>\n";
        }
    }
    ?>
</div>
<?php 
}
예제 #3
0
function view_macro_refs()
{
    global $pagestore, $LkTbl, $PgTbl;
    $text = '';
    $first = 1;
    // It's not quite as straightforward as one would imagine to turn the
    // following code into a JOIN, since we want to avoid multiplying the
    // number of links to a page by the number of versions of that page that
    // exist.  If anyone has some efficient suggestions, I'd be welcome to
    // entertain them.  -- ScottMoonen
    $q1 = $pagestore->dbh->query("SELECT link, SUM(count) AS ct FROM {$LkTbl} " . "GROUP BY link ORDER BY ct DESC, link");
    while ($result = $pagestore->dbh->result($q1)) {
        $esc_page = addslashes($result[0]);
        $q2 = $pagestore->dbh->query("SELECT MAX(version) FROM {$PgTbl} " . "WHERE title='{$esc_page}'");
        if (($r2 = $pagestore->dbh->result($q2)) && !empty($r2[0])) {
            if (!$first) {
                $text = $text . "\n";
            } else {
                $first = 0;
            }
            $text = $text . '(' . html_url(findURL($result[0]), $result[1]) . ') ' . html_ref($result[0], $result[0]);
        }
    }
    return html_code($text);
}
예제 #4
0
function template_common_prologue($args)
{
    global $WikiName, $HomePage, $WikiLogo, $MetaKeywords, $MetaDescription;
    global $StyleScript, $SeparateTitleWords, $SeparateHeaderWords;
    $keywords = ' ' . html_split_name($args['headlink']);
    $keywords = str_replace('"', '&quot;', $keywords);
    preg_match("/^(.*)\\//", $args['headlink'], $path);
    // Find startpath of page
    ob_start();
    // Start buffering output.
    if ($SeparateTitleWords) {
        $args['title'] = html_split_name($args['title']);
    }
    ?>
<!DOCTYPE html
          PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
          "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html   xmlns   = "http://www.w3.org/1999/xhtml">
<head>
<meta name="KEYWORDS" content="<?php 
    print $MetaKeywords . $keywords;
    ?>
" />
<meta name="DESCRIPTION" content="<?php 
    print $MetaDescription;
    ?>
" />
<?php 
    if ($args['norobots']) {
        ?>
<meta name="ROBOTS" content="NOINDEX, NOFOLLOW" />
<?php 
    }
    ?>
<link rel="STYLESHEET" href="<?php 
    print $StyleScript;
    ?>
" type="text/css" />
<title><?php 
    print $args['title'] . ' - ' . $WikiName;
    ?>
</title>
</head>
<body>
<div id="header">
  <div class="logo">
  <a href="<?php 
    print viewURL($HomePage);
    ?>
"><img
    src="<?php 
    print $WikiLogo;
    ?>
" alt="[Home]" /></a>
  </div>
  <h1>
<?php 
    print $args['heading'];
    if ($args['headlink'] != '') {
        ?>
    <a class="title" href="<?php 
        print findURL($args['headlink']);
        ?>
">
<?php 
        if ($SeparateHeaderWords) {
            print html_split_name($args['headlink']);
        } else {
            print $args['headlink'];
        }
        ?>
</a>
<?php 
    }
    print $args['headsufx'];
    ?>
  </h1>
  <div id="toolbar-top">
<?php 
    if ($args['toolbar']) {
        if (isset($path[1])) {
            print html_toolbar_top($path[1]);
        } else {
            print html_toolbar_top("");
        }
    }
    ?>

</div>
<hr />
</div>
<?php 
}
예제 #5
0
파일: settings.php 프로젝트: hw-1/webproxy
<?php

// Site name
define('siteNAME', 'Web Proxy');
// Site skin
define('siteSKIN', 'proxywebpack');
// URL to proxy directory
// By default we try and determine this automatically.
// If you're having problems with generated URLs, you
// can manually set the URL here (this should point to the
// directory in which the proxy was uploaded and should finish
// with a trailing slash
define('optURL', findURL());
// Warn users before browsing an https site if the proxy is not also on https
define('optSSLWARN', true);
// Use gzip compression
define('optGZIP', true);
// Encode index page to avoid detection? Increases load and bandwidth usage
// but probably insignificantly compared with resources used by proxified pages
define('optENCODEINDEX', false);
// Prevent hotlinking - users who attempt to browse a proxified page without first
// visiting the index page will be redirected.
define('optSTOPHOTLINK', true);
// Allow the following domains to hotlink:
$allowedDomains = array();
// Max file size - preserve bandwidth by limiting the filesize of files downloaded
// / pages viewed through the proxy. This value is in bytes. Set to 0 for unlimited.
define('optMAXSIZE', 0);
// Do we want to use any plugins?
define('optPLUGINS', true);
// URL encoding options