Beispiel #1
0
 *
 * @package   Trackback
 * @uses      Loggix_Application
 * @since     4.5.9
 * @version   9.3.24
 */
/**
 * Include Core Module class
 */
$pathToIndex = '../..';
require_once $pathToIndex . '/lib/Loggix/Module/Trackback.php';
$trackback = new Loggix_Module_Trackback();
$config = $trackback->getConfigArray();
$error = 0;
$message = '';
$trackback->insertSafe();
if (!isset($_GET['id'])) {
    $error = 1;
    $message = 'You must set blog id!';
} else {
    $id = $_GET['id'];
    // Check if trackback is allowed
    $checkSql = 'SELECT ' . 'allow_pings ' . 'FROM ' . LOG_TABLE . ' ' . 'WHERE ' . 'id = :id';
    $stmt = $trackback->db->prepare($checkSql);
    $stmt->execute(array(':id' => $id));
    $checkRes = $stmt->fetchColumn();
    //    echo var_dump($checkRes);
    $receiveTrackback = $checkRes == '1' ? 'allowed' : 'not_allowed';
    //    echo var_dump($receiveTrackback);
    if ($_SERVER['REQUEST_METHOD'] == "POST") {
        $title = $_POST['title'];
Beispiel #2
0
/**
 * @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);
        }
        if ($res = $app->db->query($sql)) {