Exemplo n.º 1
0
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>article</title>
<link type="text/css" rel="stylesheet" href="css/article.css" />
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript" src="js/front.js"></script>
</head>
<body>
<?php 
include "conn.php";
include 'frontshowfunction/frontbasefunction.php';
$articleid = $_GET["id"];
?>
<div id="article">
<?php 
getresult("update I_article set hits=hits+1 where id = {$articleid}");
showarticle($articleid);
?>
</div>
</body>
</html>
Exemplo n.º 2
0
    $sql = "SELECT * FROM " . $list_prefix . "articles WHERE id = '" . $id . "';";
    $result = db_query($sql);
    $rows = db_num_rows($result);
    if ($rows != 0) {
        $row = db_fetch_array($result);
        $postedby = getuser($row['posted_by']);
        //lets insert the prayerrequest into our working copy of this template.
        $WORK = insert_into_template($ARTICLE, "{ARTICLETITLE}", stripslashes($row['article_title']));
        $WORK = insert_into_template($WORK, "{TEASER}", stripslashes($row['teaser']));
        $WORK = insert_into_template($WORK, "{ARTICLEID}", $row['id']);
        $WORK = insert_into_template($WORK, "{POSTEDBY}", $postedby);
        $WORK = insert_into_template($WORK, "{BYLINE}", $row['byline']);
        $WORK = insert_into_template($WORK, "{DATE}", date("m/d/Y", $row['date']));
        $WORK = insert_into_template($WORK, "{CATEGORY}", getcatname($row['category']));
        $WORK = insert_into_template($WORK, "{ARTICLE}", stripslashes($row['article']));
        //now lets add this request to the CONTENT.
        $WORK = insert_into_template($MAIN, "{CONTENT}", $WORK);
        $WORK = filltemplate($WORK, striphtml($row['article_title']));
        printf("%s", striptemplate($WORK));
    }
}
//===Main code================================================================
if (isset($HTTP_GET_VARS['article']) && is_numeric($HTTP_GET_VARS['article'])) {
    showarticle($HTTP_GET_VARS['article']);
} else {
    $CONTENT = "ERROR: An invalid article was requested.";
    $WORK = insert_into_template($MAIN, "{CONTENT}", $CONTENT);
    $WORK = filltemplate($WORK, "ERROR INVALID ARTICLE.");
    //when we output this lets make sure that the output is stripped of any template elements that are not used.
    printf("%s", striptemplate($WORK));
}
Exemplo n.º 3
0
    default:
        echo "<div id='navigation'>" . gettext_r("quickLink") . ":";
        echo "<a href=\"admin_article.php?action=add&columnid=" . $columnid . "\">" . gettext_r("add") . gettext_r("article") . "</a>\n";
        echo "</div>";
        echo "<table width='100%' border='0' cellpadding='0' cellspacing='1' class='function'>\n";
        echo "<tr class='header'>\n";
        echo "<td align='center' width='40'>" . gettext_r("checkIn") . "</td>\n";
        echo "<td align='center' width='40'>" . gettext_r("serialNumber") . "</td>\n";
        echo "<td align='center' width='100'>" . gettext_r("column") . "</td>\n";
        echo "<td align='center'>" . gettext_r("articleTitle") . "</td>\n";
        echo "<td align='center' width='100'>" . gettext_r("author") . "</td>\n";
        echo "<td align='center' width='60'>" . gettext_r("hits") . "</td>\n";
        echo "<td align='center' width='80'>" . gettext_r("ifPass") . "</td>\n";
        echo "<td align='center' width='100'>" . gettext_r("operate") . "</td>\n";
        echo "</tr>\n";
        showarticle($columnid, $currentpage);
        echo "</table>\n";
        echo "<div style='height:5px;'></div>";
        echo "<input type='checkbox' id='checkall' onclick='checkall()' value='全选' /><span>" . gettext_r("checkAll") . "  </span> ";
        echo "<input type='button' onclick=\"deleteall('admin_article.php')\" value='" . gettext_r("deleteAll") . "' />";
        if ($functionarray[$columnid] === "2" || getlogininfo("adminrole") === "0") {
            echo "<input type='button' onclick='passall(1)' value='" . gettext_r("pass") . "' />";
            echo "<input type='button' onclick='passall(0)' value='" . gettext_r("canclePass") . "' />";
        }
        echo "<div id='showpage'>";
        showpage($columnid, $currentpage);
        echo "</div>";
}
?>
</body>
</html>