Beispiel #1
0
<?php

/**
 * @package   Trackback
 * @since     6.1.29
 * @version   9.2.5
 */
/**
 * Include Trackback Module class
 */
$pathToIndex = '../..';
require_once $pathToIndex . '/lib/Loggix/Module/Trackback.php';
$app = new Loggix_Module_Trackback();
$config = $app->getConfigArray();
$sessionState = $app->getSessionState();
try {
    $_SERVER['QUERY_STRING'] = htmlentities($_SERVER['QUERY_STRING']);
    $app->insertSafe();
    // (1) Keyword Search, or Archive By Date
    if (!empty($_GET['c']) || !empty($_GET['k']) || !empty($_GET['d'])) {
        $previousItemNumber = empty($_GET['p']) ? '0' : $_GET['p'];
        $date = empty($_GET['d']) ? '' : $_GET['d'];
        $expand = empty($_GET['ex']) ? '0' : $_GET['ex'];
        $pageNumberToShow = empty($_GET['pn']) ? '1' : $_GET['pn'];
        // Keyword Search
        if (isset($_GET['k'])) {
            $key = $_GET['k'];
            $q = array('fields' => '*', 'table' => TRACKBACK_TABLE . ' AS t', 'title' => 't.title', 'comment' => 't.excerpt', 'date' => 't.date', 'draft' => 't.trash', 'group_by' => 't.blog_id');
            $resultViewFile = 'search-result.html';
            $sql = $app->getSearchSQL($q);
            $sql2 = $app->getSearchHitsSQL($q);
Beispiel #2
0
<?php

/**
 * Delete Trackback Ping URI from SQLite Database.
 *
 * @package   Loggix_Module_Trackback
 * @since     5.6.9
 * @version   8.1.6
 */
/**
 * Include Session class
 */
$pathToIndex = '../..';
require_once $pathToIndex . '/lib/Loggix/Module/Trackback.php';
$trackback = new Loggix_Module_Trackback();
$sessionState = $trackback->getSessionState();
$trackback->insertSafe();
if ($sessionState == 'on') {
    if (empty($_REQUEST['ping_id']) || empty($_REQUEST['article_id'])) {
        header('Location: ' . $pathToIndex . '/index.php');
        exit;
    } else {
        $pingId = intval($_REQUEST['ping_id']);
        $articleId = intval($_REQUEST['article_id']);
        // Submit delete query
        $sql = 'DELETE FROM ' . TRACKBACK_TABLE . ' ' . 'WHERE ' . "id = '" . $pingId . "'";
        $res = $trackback->db->query($sql);
        if ($res) {
            header('Location: ' . $pathToIndex . '/index.php?id=' . $articleId . '#trackbacks');
        }
    }