Ejemplo n.º 1
0
if (isset($_GET['msg'])) {
    $alert = new Alert();
    $alert->printAlerts();
}
include_once "lib/modules/article.php";
$article = new NewsItem($mySQL);
$article->setID($_GET['a']);
$article->setPreview(false);
$article->setPublish(true);
print "<div class=\"row pane\">\n";
print "  <div class=\"col-xs-12\">\n";
if ($article->createArticle(1)) {
    if ($article->getPublishState()) {
        print "    <div class=\"row\">\n";
        print "      <div class=\"col-md-3\">\n";
        print "        <small>Article by: " . $article->getAuthor() . "</small>\n";
        print "      </div>\n";
        print "      <div class=\"col-md-3\">\n";
        print "        " . $article->getPublish() . "\n";
        print "      </div>\n";
        print "      <div class=\"col-md-3 hidden-xs\">\n";
        if ($article->getEdited() !== false) {
            print "        <small>Edited by: " . $article->getEdited() . "</small>\n";
        }
        print "      </div>\n";
        print "      <div class=\"col-md-3 hidden-xs\">\n";
        print "        " . $article->getEdit() . "\n";
        print "      </div>\n";
        print "    </div>\n";
    }
    print "    <div class=\"row\">\n";