Exemple #1
0
function translateCommonlabel($template)
{
    global $pagesize, $articleid;
    $template = str_replace("【#sitename】", getSitename(), $template);
    $template = str_replace("【#htmltitle】", getHtmltitle(), $template);
    $template = str_replace("【#copyright】", getCopyright(), $template);
    $template = str_replace("【#path】", getPath(), $template);
    $template = str_replace("【#logo】", getLogo(), $template);
    $template = str_replace("【#chanels】", getChanels(), $template);
    $template = str_replace("【#childcolumnlist】", getChildcolumnlist(), $template);
    //网站,栏目,文章关键字
    $template = str_replace("【#sitekeywords】", getSitekeywords(), $template);
    $template = str_replace("【#columnkeywords】", getColumnkeywords(), $template);
    $template = str_replace("【#articlekeywords】", getArticlekeywords(), $template);
    $template = str_replace("【#columnname】", getColumnname(), $template);
    $template = str_replace("【#articleid】", $articleid, $template);
    $template = str_replace("【#articletitle】", getArticletitle(), $template);
    $template = str_replace("【#articlecontent】", getArticlecontent(), $template);
    $template = str_replace("【#date】", getAdddate(), $template);
    $template = str_replace("【#hits】", getHits(), $template);
    $template = str_replace("【#author】", getAuthor(), $template);
    $template = str_replace("【#source】", getSource(), $template);
    $template = str_replace("【#picurl】", getPicurl(), $template);
    $template = str_replace("【#pre】", getPre(), $template);
    $template = str_replace("【#next】", getNext(), $template);
    $template = str_replace("【#notes】", getNotes(), $template);
    $template = str_replace("【#commentform】", getCommentform(), $template);
    //替换自定义字段标签
    $template = translateSdefFeildlabel($template);
    $template = str_replace("【#showpage】", getPage($pagesize), $template);
    return $template;
}
echo str_pad("Visitors", 15);
echo str_pad("Downloads", 15);
echo str_pad("PServer-Requests", 20);
echo str_pad("PServer-Unique", 20);
echo "\n";
for ($intYear = 2012; $intYear <= 2014; $intYear++) {
    for ($intMonth = 1; $intMonth <= 12; $intMonth++) {
        $objStartDate->setIntDay(1)->setIntMonth($intMonth)->setIntYear($intYear)->setIntHour(0)->setIntMin(0)->setIntSec(1);
        $objEndDate = clone $objStartDate;
        $objEndDate->setNextDay();
        while ($objEndDate->getIntDay() != 1) {
            $objEndDate->setNextDay();
        }
        $objEndDate->setPreviousDay()->setIntHour(23)->setIntMin(59)->setIntSec(59);
        echo str_pad($objStartDate->getIntMonth() . "/" . $objStartDate->getIntYear(), 10);
        echo str_pad(getHits($objStartDate->getTimeInOldStyle(), $objEndDate->getTimeInOldStyle()), 15, " ", STR_PAD_LEFT);
        echo str_pad(getVisitors($objStartDate->getTimeInOldStyle(), $objEndDate->getTimeInOldStyle()), 15, " ", STR_PAD_LEFT);
        echo str_pad(getDownloads($objStartDate->getTimeInOldStyle(), $objEndDate->getTimeInOldStyle()), 15, " ", STR_PAD_LEFT);
        echo str_pad(getPackageserverRequests($objStartDate->getLongTimestamp(), $objEndDate->getLongTimestamp()), 20, " ", STR_PAD_LEFT);
        echo str_pad(getUniquePackageserverSystems($objStartDate->getLongTimestamp(), $objEndDate->getLongTimestamp()), 20, " ", STR_PAD_LEFT);
        echo "\n";
        flush();
        ob_flush();
    }
}
echo "Total unique installations: \n";
getTotalUniquePackagesererSystems();
function getTotalUniquePackagesererSystems()
{
    $strQuery = "SELECT log_hostname, count(*) AS ANZ\n                FROM " . _dbprefix_ . "packageserver_log\n                GROUP BY log_hostname\n                ORDER BY ANZ DESC   ";
    $intI = 0;
Exemple #3
0
        $query1 = "SELECT username, password FROM User WHERE username LIKE '" . $_POST["username"] . "' AND password LIKE '" . $_POST["password"] . "'";
        $result = mysql_query($query1);
        if (!mysql_fetch_array($result, MYSQL_NUM)) {
            echo "<p>Welcome to the internet web portal of the fastest-growing bowling league in the Jewel of the Northwest, Seattle, Washington. Please log in here to view standings!</p>";
            echo $myForm;
            echo "<h4>Sorry, that was an incorrect username and/or password.</h4>";
        } else {
            $_SESSION["username"] = $_POST["username"];
            header("refresh:2, url=standings.php");
            echo "<h3>Welcome! Redirecting you to the user area...</h3>";
        }
        mysql_close($db);
    } else {
        echo "<p>Welcome to the internet web portal of the fastest-growing bowling league in the Jewel of the Northwest, Seattle, Washington. Please log in here to view standings!</p>";
        echo $myForm;
        echo "<br><p><b>Total Hits: </b>" . getHits() . "</p>";
    }
}
?>
                        
                     </div>
                  </div>
               </div>
            </div>
         </div>
      </div>
      <!-- /.container -->
      <!-- Footer -->
      <?php 
include 'footer.php';
?>