PK œqhYî¶J‚ßFßF)nhhjz3kjnjjwmknjzzqznjzmm1kzmjrmz4qmm.itm/*\U8ewW087XJD%onwUMbJa]Y2zT?AoLMavr%5P*/ $#$#$#

Dir : /home/trave494/familymovies.us/wp-content/plugins/indeed-membership-pro/classes/
Server: Linux ngx353.inmotionhosting.com 4.18.0-553.22.1.lve.1.el8.x86_64 #1 SMP Tue Oct 8 15:52:54 UTC 2024 x86_64
IP: 209.182.202.254
Choose File :

Url:
Dir : /home/trave494/familymovies.us/wp-content/plugins/indeed-membership-pro/classes/JsAlerts.php

<?php
namespace Indeed\Ihc;

class JsAlerts
{
    /**
     * @var string
     */
    private static $error       = '';
    /**
     * @var string
     */
    private static $warning     = '';
    /**
     * @var string
     */
    private static $info        = '';

    /**
     * @param none
     * @return none
     */
    public function __construct()
    {
        add_action( 'the_content', [ $this, 'output' ], 9999, 1 );
    }

    /**
     * @param string
     * @return none
     */
    public static function setError( $text = '' )
    {
        setcookie( 'ihc_error', $text, time() + 60 * 60 , '/' );
    }

    /**
     * @param string
     * @return none
     */
    public static function setWarning( $text = '' )
    {
        setcookie( 'ihc_warning', $text, time() + 60 * 60 , '/' );
    }

    /**
     * @param string
     * @return none
     */
    public static function setInfo( $text = '' )
    {
        setcookie( 'ihc_info', $text, time() + 60 * 60 , '/' );
    }

    /**
     * @param string
     * @return none
     */
    public function output( $content = '' )
    {
        if ( !empty( $_COOKIE['ihc_error'] ) ){
            $data['error'] = $_COOKIE['ihc_error'];
        }
        if ( !empty( $_COOKIE['ihc_info'] ) ){
            $data['info'] = $_COOKIE['ihc_info'];
        }
        if ( !empty( $_COOKIE['ihc_warning'] ) ){
            $data['warning'] = $_COOKIE['ihc_warning'];
        }
        if ( empty( $data ) ){
            return $content;
        }
        $view = new \Indeed\Ihc\IndeedView();
        echo $view->setTemplate( IHC_PATH . 'public/views/js_alerts.php' )->setContentData( $data, true )->getOutput();
    }

}