コード例 #1
0
ファイル: WsdPlugin.php プロジェクト: prosenjit-itobuz/upages
 public static function loadResources()
 {
     if (WsdUtil::canLoad()) {
         wp_enqueue_style('wss-css-base', WsdUtil::cssUrl('styles.base.css'));
         wp_enqueue_style('wss-css-alerts', WsdUtil::cssUrl('styles.alerts.css'));
         wp_enqueue_style('wss-css-general', WsdUtil::cssUrl('styles.general.css'));
         wp_enqueue_style('wss-css-status', WsdUtil::cssUrl('styles.status.css'));
         wp_enqueue_script('wss-js-util', WsdUtil::jsUrl('wsd-util.js'), array('jquery'));
     }
 }
コード例 #2
0
ファイル: wp-scan.php プロジェクト: prosenjit-itobuz/upages
?>
                <div id="lastScansWrapper">
                    <div class="wsdplugin_alert_section_title wsdplugin_alert_section_title_category"><p>Previous Scans</p></div>
                    <div class="inside" style="margin-left: 5px;">
                        <?php 
echo WsdUtil::loadTemplate('tpl-last-scans-list', array('showScanForm' => $showScanForm, 'scanState' => $scanState));
?>
                    </div>
                </div>
            </div>

        </div>
    </div>
</div>
<script src="<?php 
echo WsdUtil::jsUrl('wsdplugin-wp-scan.js');
?>
" type="text/javascript"></script>
<script type="text/javascript">
jQuery(document).ready(function($){
    //#!++ Set the default dateScan
        var dateScan = 0; // default
        $('#dateScan').on('change', function(){ dateScan = $(this).val(); });
    //#!--
    <?php 
if ($enableSubmit) {
    ?>
        $('#inputFormScan').on('click', function(){ $('#wpScanForm').submit(); });
    <?php 
}
?>
コード例 #3
0
ファイル: live_traffic.php プロジェクト: yarwalker/ecobyt
        <thead style="height: 20px;">
        <tr>
            <th class="manage-column column-cb" scope="col">
                <span style="display: block; float: left; font-weight: 800;"><?php 
    echo __('Live activity');
    ?>
</span>
                <p id="loaderWrapper"></p>
            </th>
        </tr>
        </thead>
        <tbody id="the-list"></tbody>
    </table>
</div>
<script src="<?php 
    echo WsdUtil::jsUrl('live-traffic-queue.js');
    ?>
"></script>
<script type="text/javascript">
if(liveTrafficQueue != undefined)
{
    jQuery(document).ready(function($)
    {
        var maxEntries = ((<?php 
    echo $keepNumEntriesLiveTraffic;
    ?>
 > 100) ? 100 : <?php 
    echo $keepNumEntriesLiveTraffic;
    ?>
);
        var queue = new liveTrafficQueue(
コード例 #4
0
ファイル: WsdInfo.php プロジェクト: prosenjit-itobuz/upages
 public static function getServerInfo()
 {
     global $wpdb;
     $sqlversion = $wpdb->get_var("SELECT VERSION() AS version");
     $mysqlinfo = $wpdb->get_results("SHOW VARIABLES LIKE 'sql_mode'");
     if (is_array($mysqlinfo)) {
         $sql_mode = $mysqlinfo[0]->Value;
     }
     if (empty($sql_mode)) {
         $sql_mode = __('Not set', WpsSettings::TEXT_DOMAIN);
     }
     $sm = ini_get('safe_mode');
     if (strcasecmp('On', $sm) == 0) {
         $safe_mode = __('On', WpsSettings::TEXT_DOMAIN);
     } else {
         $safe_mode = __('Off', WpsSettings::TEXT_DOMAIN);
     }
     if (ini_get('allow_url_fopen')) {
         $allow_url_fopen = __('On', WpsSettings::TEXT_DOMAIN);
     } else {
         $allow_url_fopen = __('Off', WpsSettings::TEXT_DOMAIN);
     }
     if (ini_get('upload_max_filesize')) {
         $upload_max = ini_get('upload_max_filesize');
     } else {
         $upload_max = __('N/A', WpsSettings::TEXT_DOMAIN);
     }
     if (ini_get('post_max_size')) {
         $post_max = ini_get('post_max_size');
     } else {
         $post_max = __('N/A', WpsSettings::TEXT_DOMAIN);
     }
     if (ini_get('max_execution_time')) {
         $max_execute = ini_get('max_execution_time');
     } else {
         $max_execute = __('N/A', WpsSettings::TEXT_DOMAIN);
     }
     if (ini_get('memory_limit')) {
         $memory_limit = ini_get('memory_limit');
     } else {
         $memory_limit = __('N/A', WpsSettings::TEXT_DOMAIN);
     }
     if (function_exists('memory_get_usage')) {
         $memory_usage = round(memory_get_usage() / 1024 / 1024, 2) . __(' MByte', WpsSettings::TEXT_DOMAIN);
     } else {
         $memory_usage = __('N/A', WpsSettings::TEXT_DOMAIN);
     }
     if (is_callable('exif_read_data')) {
         $exif = __('Yes', WpsSettings::TEXT_DOMAIN) . " ( V" . substr(phpversion('exif'), 0, 4) . ")";
     } else {
         $exif = __('No', WpsSettings::TEXT_DOMAIN);
     }
     if (is_callable('iptcparse')) {
         $iptc = __('Yes', WpsSettings::TEXT_DOMAIN);
     } else {
         $iptc = __('No', WpsSettings::TEXT_DOMAIN);
     }
     if (is_callable('xml_parser_create')) {
         $xml = __('Yes', WpsSettings::TEXT_DOMAIN);
     } else {
         $xml = __('No', WpsSettings::TEXT_DOMAIN);
     }
     $sqlModeText = __('SQL Mode (sql_mode) is a MySQL system variable. By means of this variable the MySQL Server SQL Mode is controlled.
         Many operational characteristics of MySQL Server can be configured by setting the SQL Mode.
         By setting the SQL Mode appropriately, a client program can instruct the server how strict or forgiving to be about accepting input data, enable or disable behaviors relating to standard SQL conformance,
         or provide better compatibility with other database systems. By default, the server uses a sql_mode value of  \'\'  (the empty string), which enables no restrictions.
         Thus, the server operates in forgiving mode (non-strict mode) by default. In non-strict mode, the MySQL server converts erroneous input values to the closest legal
         values (as determined from column definitions) and continues on its way.', WpsSettings::TEXT_DOMAIN);
     $phpSafeModeText = __('The PHP Safe Mode (safe_mode) is an attempt to solve the shared-server security problem.
         It is architecturally incorrect to try to solve this problem at the PHP level, but since the alternatives at the web server and OS levels aren\'t
         very realistic, many people, especially ISP\'s, use safe mode for now.', WpsSettings::TEXT_DOMAIN);
     $phpAllowFopenText = __('PHP allow_url_fopen option, if enabled (allows PHP\'s file functions - such as \'file_get_contents()\' and the \'include\' and \'require\' statements),
         can retrieve data from remote locations, like an FTP or web site, which may pose a security risk.', WpsSettings::TEXT_DOMAIN);
     $phpMemoryLimitText = __('PHP memory_limit option sets the maximum amount of memory in bytes that a script is allowed to allocate.
         By enabling a realistic memory_limit you can protect your applications from certain types of Denial of Service attacks, and also from bugs in
         applications (such as infinite loops, poor use of image based functions, or other memory intensive mistakes).', WpsSettings::TEXT_DOMAIN);
     $phpMaxUploadSizeText = __('PHP upload_max_filesize option limits the maximum size of files that PHP will accept through uploads. Attackers may attempt to send grossly oversized files to exhaust your system resources;
         by setting a realistic value here you can mitigate some of the damage by those attacks.', WpsSettings::TEXT_DOMAIN);
     $phpMaxPostSizeText = __('PHP post_max_size option limits the maximum size of the POST request that PHP will process. Attackers may attempt to send grossly oversized POST requests to exhaust your system resources;
         by setting a realistic value here you can mitigate some of the damage by those attacks.', WpsSettings::TEXT_DOMAIN);
     $phpScriptExecTimeText = __('PHP max_execution_time option sets the maximum time in seconds a script is allowed to run before it is terminated by the parser.
         This helps prevent poorly written scripts from tying up the server.', WpsSettings::TEXT_DOMAIN);
     $exifText = __('PHP exif extension enables you to work with image meta data. For example, you may use exif functions to read meta data of pictures taken from digital cameras by working with
         information stored in the headers of the JPEG and TIFF images.', WpsSettings::TEXT_DOMAIN);
     $iptcText = __('IPTC data is a method of storing textual information in images defined by the International Press Telecommunications Council.
         It was developed for press photographers who need to attach information to images when they are submitting them electronically but it is useful for all photographers.
         It provides a standard way of storing information such as captions, keywords, location. Because the information is stored in the image in a standard way this information
         can be accessed by other IPTC aware applications.', WpsSettings::TEXT_DOMAIN);
     $xmlText = __('XML (eXtensible Markup Language) is a data format for structured document interchange on the Web. It is a standard defined by the World Wide Web Consortium (W3C).', WpsSettings::TEXT_DOMAIN);
     $str = '<script type="text/javascript" src="' . WsdUtil::jsUrl('wsdplugin_glossary_tooltip.js') . '"></script>';
     $str .= '<ul class="acx-common-list">';
     $str .= '<li>' . __('Operating System', WpsSettings::TEXT_DOMAIN) . ' : <strong> ' . PHP_OS . '</strong></li>';
     $str .= '<li>' . __('Server', WpsSettings::TEXT_DOMAIN) . ' : <strong>' . $_SERVER["SERVER_SOFTWARE"] . '</strong></li>';
     $str .= '<li>' . __('Memory usage', WpsSettings::TEXT_DOMAIN) . ' : <strong>' . $memory_usage . '</strong></li>';
     $str .= '<li>' . __('PHP Version', WpsSettings::TEXT_DOMAIN) . ' : <strong>' . PHP_VERSION . '</strong></li>';
     $str .= '<li>' . __('MYSQL Version', WpsSettings::TEXT_DOMAIN) . ' : <strong>' . $sqlversion . '</strong></li>';
     $str .= '</ul>';
     $str .= '<p class="clear" style="margin-top: 7px;"></p>';
     $str .= '<ul class="acx-common-list">';
     $str .= '<li class="wsdplugin-tooltip" onmouseover="wsdplugin_glossary_tooltip.show(this);" data-bind-title="' . $sqlModeText . '" onmouseout="wsdplugin_glossary_tooltip.hide();">' . __('SQL Mode', WpsSettings::TEXT_DOMAIN) . ' : <strong>' . $sql_mode . '</strong></li>';
     $str .= '<li class="wsdplugin-tooltip" onmouseover="wsdplugin_glossary_tooltip.show(this);" data-bind-title="' . $phpSafeModeText . '" onmouseout="wsdplugin_glossary_tooltip.hide();">' . __('PHP Safe Mode', WpsSettings::TEXT_DOMAIN) . ' : <strong>' . $safe_mode . '</strong></li>';
     $str .= '<li class="wsdplugin-tooltip" onmouseover="wsdplugin_glossary_tooltip.show(this);" data-bind-title="' . $phpAllowFopenText . '" onmouseout="wsdplugin_glossary_tooltip.hide();">' . __('PHP Allow URL fopen', WpsSettings::TEXT_DOMAIN) . ' : <strong>' . $allow_url_fopen . '</strong></li>';
     $str .= '<li class="wsdplugin-tooltip" onmouseover="wsdplugin_glossary_tooltip.show(this);" data-bind-title="' . $phpMemoryLimitText . '" onmouseout="wsdplugin_glossary_tooltip.hide();">' . __('PHP Memory Limit', WpsSettings::TEXT_DOMAIN) . ' : <strong>' . $memory_limit . '</strong></li>';
     $str .= '<li class="wsdplugin-tooltip"onmouseover="wsdplugin_glossary_tooltip.show(this);" data-bind-title="' . $phpMaxUploadSizeText . '" onmouseout="wsdplugin_glossary_tooltip.hide();">' . __('PHP Max Upload Size', WpsSettings::TEXT_DOMAIN) . ' : <strong>' . $upload_max . '</strong></li>';
     $str .= '<li class="wsdplugin-tooltip" onmouseover="wsdplugin_glossary_tooltip.show(this);" data-bind-title="' . $phpMaxPostSizeText . '" onmouseout="wsdplugin_glossary_tooltip.hide();">' . __('PHP Max Post Size', WpsSettings::TEXT_DOMAIN) . ' : <strong>' . $post_max . '</strong></li>';
     $str .= '<li class="wsdplugin-tooltip" onmouseover="wsdplugin_glossary_tooltip.show(this);" data-bind-title="' . $phpScriptExecTimeText . '" onmouseout="wsdplugin_glossary_tooltip.hide();">' . __('PHP Max Script Execute Time', WpsSettings::TEXT_DOMAIN) . ' : <strong>' . $max_execute . 's</strong></li>';
     $str .= '<li class="wsdplugin-tooltip" onmouseover="wsdplugin_glossary_tooltip.show(this);" data-bind-title="' . $exifText . '" onmouseout="wsdplugin_glossary_tooltip.hide();">' . __('PHP Exif support', WpsSettings::TEXT_DOMAIN) . ' : <strong>' . $exif . '</strong></li>';
     $str .= '<li class="wsdplugin-tooltip" onmouseover="wsdplugin_glossary_tooltip.show(this);" data-bind-title="' . $iptcText . '" onmouseout="wsdplugin_glossary_tooltip.hide();">' . __('PHP IPTC support', WpsSettings::TEXT_DOMAIN) . ' : <strong>' . $iptc . '</strong></li>';
     $str .= '<li class="wsdplugin-tooltip" onmouseover="wsdplugin_glossary_tooltip.show(this);" data-bind-title="' . $xmlText . '" onmouseout="wsdplugin_glossary_tooltip.hide();">' . __('PHP XML support', WpsSettings::TEXT_DOMAIN) . ' : <strong>' . $xml . '</strong></li>';
     $str .= '</ul>';
     return $str;
 }