HEX
Server: Apache
System: Linux sg241.singhost.net 2.6.32-896.16.1.lve1.4.51.el6.x86_64 #1 SMP Wed Jan 17 13:19:23 EST 2018 x86_64
User: honghock (909)
PHP: 8.0.30
Disabled: passthru,system,shell_exec,show_source,exec,popen,proc_open
Upload Files
File: //opt/cloudlinux/alt-php54/root/usr/share/pear/RVSeagullMod/modules/blogweb/www/wfwcomment.php
<?php # $Id: wfwcomment.php 1055 2006-04-06 09:14:11Z garvinhicking $
# Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity Developer Team)
# All rights reserved.  See LICENSE file for licensing details

define('RVS_COMPONENT_NAME', 'blogweb');
//define('SGL_BASE_URL', dirname(dirname($_SERVER['SCRIPT_NAME'])));
if (is_file(dirname(dirname($_SERVER['SCRIPT_FILENAME'])) . '/rvsStaticWeb.php')) {
    require_once  dirname(dirname($_SERVER['SCRIPT_FILENAME'])) . '/rvsStaticWeb.php';
}

include('serendipity_config.inc.php');

if ($_REQUEST['cid'] != '' && $HTTP_RAW_POST_DATA != '') {
    $comment = array();

    if (!preg_match('@<author[^>]*>(.*)</author[^>]*>@i', $HTTP_RAW_POST_DATA, $name)) {
        preg_match('@<dc:creator[^>]*>(.*)</dc:creator[^>]*>@i', $HTTP_RAW_POST_DATA, $name);
    }

    if (isset($name[1]) && !empty($name[1])) {
        if (preg_match('@^(.*)\((.*)\)@i', $name[1], $names)) {
            $comment['name'] = utf8_decode($names[2]);
            $comment['email'] = utf8_decode($names[1]);
        } else {
            $comment['name'] = utf8_decode($name[1]);
        }
    }

    if (preg_match('@<link[^>]*>(.*)</link[^>]*>@i', $HTTP_RAW_POST_DATA, $link)) {
        $comment['url'] = utf8_decode($link[1]);
    }

    if (preg_match('@<description[^>]*>(.*)</description[^>]*>@ims', $HTTP_RAW_POST_DATA, $description)) {
        if (preg_match('@^<!\[CDATA\[(.*)\]\]>@ims', $description[1], $cdata)) {
            $comment['comment'] = utf8_decode($cdata[1]);
        } else {
            $comment['comment'] = utf8_decode($description[1]);
        }

        if (!empty($comment['comment'])) {
            serendipity_saveComment($_REQUEST['cid'], $comment, 'NORMAL', 'API');
        }
    }
}

?>