Exemple #1
0
 public function index()
 {
     if (!$this->ion_auth->logged_in() or !$this->ion_auth->is_admin()) {
         redirect('auth/login', 'refresh');
     } else {
         /* Title Page */
         $this->page_title->push(lang('menu_dashboard'));
         $this->data['pagetitle'] = $this->page_title->show();
         /* Breadcrumbs */
         $this->data['breadcrumb'] = $this->breadcrumbs->show();
         /* Data */
         $this->data['count_users'] = $this->dashboard_model->get_count_record('users');
         $this->data['count_groups'] = $this->dashboard_model->get_count_record('groups');
         $this->data['disk_totalspace'] = $this->dashboard_model->disk_totalspace(DIRECTORY_SEPARATOR);
         $this->data['disk_freespace'] = $this->dashboard_model->disk_freespace(DIRECTORY_SEPARATOR);
         $this->data['disk_usespace'] = $this->data['disk_totalspace'] - $this->data['disk_freespace'];
         $this->data['disk_usepercent'] = $this->dashboard_model->disk_usepercent(DIRECTORY_SEPARATOR, FALSE);
         $this->data['memory_usage'] = $this->dashboard_model->memory_usage();
         $this->data['memory_peak_usage'] = $this->dashboard_model->memory_peak_usage(TRUE);
         $this->data['memory_usepercent'] = $this->dashboard_model->memory_usepercent(TRUE, FALSE);
         /* TEST */
         $this->data['url_exist'] = is_url_exist('http://www.domprojects.com');
         /* Load Template */
         $this->template->admin_render('admin/dashboard/index', $this->data);
     }
 }
 public function index()
 {
     if (!$this->ion_auth->logged_in() or !$this->ion_auth->is_admin()) {
         redirect('auth/login', 'refresh');
     } else {
         /* Title Page */
         $this->page_title->push(lang('menu_dashboard'));
         $this->data['pagetitle'] = $this->page_title->show();
         /* Breadcrumbs */
         $this->data['breadcrumb'] = $this->breadcrumbs->show();
         /* Data */
         $this->data['count_users'] = $this->dashboard_model->get_count_record('users');
         $this->data['count_groups'] = $this->dashboard_model->get_count_record('groups');
         $this->data['disk_use'] = $this->dashboard_model->disk_space_use();
         /* TEST */
         $this->data['url_exist'] = is_url_exist('http://www.domprojects.com');
         /* Load Template */
         $this->template->admin_render('admin/dashboard/index', $this->data);
     }
 }
Exemple #3
0
    function widget($args, $instance)
    {
        ?>
	
      <div class="container text-center item_bottom">
        <?php 
        $logo = get_option('header_logo_light');
        ?>
                <?php 
        if (!empty($logo) && is_url_exist($logo)) {
            ?>
                    <img src="<?php 
            echo $logo;
            ?>
" class="footer-logo" alt="footer logo"/>
                <?php 
        }
        ?>
    <!-- Social Icon -->
	<div class="social_icons">
		<ul>
			<?php 
        if (!empty($instance['widget_face'])) {
            ?>
			<li><a href="<?php 
            echo $instance['widget_face'];
            ?>
"><i class="fa fa-facebook"></i></a></li>
			<?php 
        }
        if (!empty($instance['widget_astro'])) {
            ?>
			<li><a href="<?php 
            echo $instance['widget_astro'];
            ?>
"><i class="fa fa-dribbble"></i></a></li>
			<?php 
        }
        if (!empty($instance['widget_twitter'])) {
            ?>
			<li><a href="<?php 
            echo $instance['widget_twitter'];
            ?>
"><i class="fa fa-twitter"></i></a></li>
			<?php 
        }
        if (!empty($instance['widget_gplus'])) {
            ?>
			<li><a href="<?php 
            echo $instance['widget_gplus'];
            ?>
"><i class="fa fa-google-plus"></i></a></li>
			<?php 
        }
        if (!empty($instance['widget_instagram'])) {
            ?>
			<li><a href=<?php 
            echo $instance['widget_instagram'];
            ?>
><i class="fa fa-instagram"></i></a></li>
			<?php 
        }
        if (!empty($instance['widget_youtube'])) {
            ?>
			<li><a href="<?php 
            echo $instance['widget_youtube'];
            ?>
"><i class="fa fa-youtube"></i></a></li>
			<?php 
        }
        if (!empty($instance['widget_dribble'])) {
            ?>
			<li><a href="<?php 
            echo $instance['widget_dribble'];
            ?>
"><i class="fa fa-dribbble"></i></a></li>
			<?php 
        }
        if (!empty($instance['widget_linkedin'])) {
            ?>
			<li><a href="<?php 
            echo $instance['widget_linkedin'];
            ?>
"><i class="fa fa-linkedin"></i></a></li>
			<?php 
        }
        ?>
		</ul>
	</div>
	<!-- End Social Icon -->
	
</div>
      <?php 
    }
Exemple #4
0
            $i++;
            $violation_count = isset($market_violations[$key]) ? $market_violations[$key] : 0;
            if ($violation_count > 0) {
                ?>
                        <a href="<?php 
                echo base_url() . 'violationoverview/report_marketplace/' . strtolower($key);
                ?>
" class="linkRow clear<?php 
                echo $i == $num_retailers ? ' last' : '';
                ?>
">
                        <?php 
                $url = frontImageUrl() . "/market_logos/{$key}.png";
                ?>
                            <?php 
                if (is_url_exist($url)) {
                    ?>
                                <img src="<?php 
                    echo frontImageUrl();
                    ?>
market_logos/<?php 
                    echo $key;
                    ?>
.png" alt="<?php 
                    echo marketplace_display_name($key);
                    ?>
">
                            <?php 
                } else {
                    ?>
                                <div style="float:left"><?php 
Exemple #5
0
    if ($_SERVER["SERVER_PORT"] != "80") {
        $pageURL .= $_SERVER["SERVER_NAME"] . ":" . $_SERVER["SERVER_PORT"] . $_SERVER["REQUEST_URI"];
    } else {
        $pageURL .= $_SERVER["SERVER_NAME"] . $_SERVER["REQUEST_URI"];
    }
    if (preg_match("/(.*)\\/recent\\.php/", $pageURL, $matches)) {
        define('LIBRARY_FOLDER_URL', $matches[1] . '/uploads/');
    }
}
$output = array();
$output["success"] = 1;
if (isset($_SESSION['SimpleImageManager']) and count($_SESSION['SimpleImageManager']) > 0) {
    $html = '';
    foreach ($_SESSION['SimpleImageManager'] as $s) {
        $me = false;
        $exists = is_url_exist($s);
        $url_host = parse_url($s, PHP_URL_HOST);
        if ($url_host == $_SERVER['HTTP_HOST']) {
            $me = true;
        }
        if ($me) {
            $html .= '<div class="item"><a href="" class="img-thumbs" rel="' . $s . '"><img src="timthumb.php?src=' . $s . '&w=130&h=90" class="img-polaroid" width="130" height="90"></a></div>';
        } elseif ($exists) {
            $html .= '<div class="item"><a href="" class="img-thumbs" rel="' . $s . '"><img src="' . $s . '" class="img-polaroid" width="130" height="90"></a></div>';
        }
    }
    if ($html != '') {
        $output["html"] = $html;
    } else {
        $output["success"] = 0;
    }
?>
<!--header-->
<header id="navigation">
    <div class="navbar main-nav" role="banner">
            <div class="container">
                <div class="navbar-header">
                    <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
                        <span class="sr-only">Toggle navigation</span>
                        <span class="icon-bar"></span>
                        <span class="icon-bar"></span>
                        <span class="icon-bar"></span>
                    </button>
                    <a class="navbar-brand" href="./">
                        <h1>
                        <?php 
if (!empty($options['main_logo']['url']) && is_url_exist($options['main_logo']['url'])) {
    ?>
                            <img class="img-responsive" src="<?php 
    echo $options['main_logo']['url'];
    ?>
"  alt="logo"/>
                        <?php 
} else {
    ?>
                            <?php 
    echo bloginfo('name');
    ?>
                        
                        <?php 
}
?>
require_once 'config.php';
require_once 'functions.php';
if (!defined('LIBRARY_FOLDER_PATH')) {
    define('LIBRARY_FOLDER_PATH', 'uploads/');
}
if (!defined('LIBRARY_FOLDER_PATH')) {
    $pageURL = 'http';
    if (isset($_SERVER["HTTPS"]) and $_SERVER["HTTPS"] == "on") {
        $pageURL .= "s";
    }
    $pageURL .= "://";
    if ($_SERVER["SERVER_PORT"] != "80") {
        $pageURL .= $_SERVER["SERVER_NAME"] . ":" . $_SERVER["SERVER_PORT"] . $_SERVER["REQUEST_URI"];
    } else {
        $pageURL .= $_SERVER["SERVER_NAME"] . $_SERVER["REQUEST_URI"];
    }
    if (preg_match("/(.*)\\/update_recent\\.php/", $pageURL, $matches)) {
        define('LIBRARY_FOLDER_URL', $matches[1] . '/uploads/');
    }
}
if (isset($_POST["src"]) and is_url_exist(clean($_POST["src"]))) {
    if (!isset($_SESSION['SimpleImageManager'])) {
        $_SESSION['SimpleImageManager'] = array();
        $_SESSION['SimpleImageManager'][] = clean($_POST["src"]);
    } else {
        if (!in_array(clean($_POST["src"]), $_SESSION['SimpleImageManager'])) {
            $_SESSION['SimpleImageManager'][] = clean($_POST["src"]);
        }
    }
}
        $pswd = $app->setUserState('pswd', $pass1);
    }
}
$filiala =& JRequest::getVar('filiala', '', 'post', 'string');
//echo '>>>> '.$filiala;
if ($filiala == 1) {
    $query = "SELECT * FROM #__sa_profiles WHERE `cod_fiscal` = '" . $cf . "' AND `f_principal` = '1'";
    $db->setQuery($query);
    $dates = $db->loadObject();
    $app->setUserState('company_name', $dates->companie);
    $app->setUserState('nr_reg', $dates->nr_registru);
    $app->setUserState('filiala', $filiala);
    //echo '>>>> '.$app->getUserState('filiala');
    $app->redirect($link_redirect, JText::_('SAUTO_SUCCES_PRECOMPLETARE'));
} else {
    $xml_exist = is_url_exist('http://openapi.ro/api/companies/' . $cf . '.xml');
    if ($xml_exist == true) {
        $old_cf = $cf;
        $filtru = array('RO', 'ro', 'Ro', 'rO');
        $cf = str_ireplace($filtru, '', $cf);
        //echo '<br />???? > '.$cf;
        $result = JFactory::getXML('http://openapi.ro/api/companies/' . $cf . '.xml', true);
        $g_firma = $result->name;
        $g_adresa = $result->address;
        $g_city = $result->city;
        $g_phone = $result->phone;
        $var = 'registration-id';
        $g_reg = $result->{$var};
        $g_region = $result->state;
        $g_zip = $result->zip;
        $query = "INSERT INTO #__sa_temp_firme (`cui`, `firma`, `sediu`, `city`, `phone`, `nr_reg`, `judet`, `cp`) \n\tVALUES ('" . $old_cf . "', '" . $g_firma . "', '" . $g_adresa . "', '" . $g_city . "', '" . $g_phone . "', '" . $g_reg . "', '" . $g_region . "', '" . $g_zip . "')";
Exemple #9
0
function db_select($query, $type)
{
    $rows = array();
    $result = db_query($query);
    if ($result === false) {
        return false;
    }
    $aaData = array();
    $dbres = '';
    while ($row = mysqli_fetch_assoc($result)) {
        switch ($_GET['type']) {
            case 'roku':
                $dbres .= '<item type="' . $row['type'] . '" title="' . $row['title'] . '" sdposterurl="' . $GLOBALS['cdn'] . $row['sd_image'] . '" hdposterurl="' . $GLOBALS['cdn'] . $row['hd_image'] . '" genre1="' . $row['region'] . '" url="' . $row['streamurl'] . '" ishd="' . $row['ishd'] . '" bitrate="512" shortdesc="' . $row['description'] . '" streamformat="' . $row['streamformat'] . '" live="true" ></item>';
                break;
            case 'kodi':
                $dbres .= "<item>\r\n<title>" . $row['title'] . "</title>\r\n<link>" . $row['streamurl'] . "</link>\r\n<thumbnail>" . $GLOBALS['cdn'] . $row['sd_image'] . "</thumbnail>\r\n</item>\r\n\r\n";
                break;
            case 'tvos':
                $dbres .= '<lockup videoURL="' . $row['streamurl'] . '"><img src="' . $GLOBALS['cdn'] . $row['hd_image'] . '" width="250" height="150" /></lockup>';
                break;
            case 'web':
                $dbres .= '<item url="' . $row['streamurl'] . '" title="' . $row['title'] . '" shortdesc="' . $row['description'] . '" sdposterurl="' . $GLOBALS['cdn'] . $row['sd_image'] . '"  type="' . $row['type'] . '"></item>';
                break;
            case 'plex':
                $dbres .= '<item id="' . $row['id'] . '" url="' . $row['streamurl'] . '" title="' . $row['title'] . '" shortdesc="' . $row['description'] . '" sdposterurl="' . $GLOBALS['cdn'] . $row['sd_image'] . '" hdposterurl="' . $GLOBALS['cdn'] . $row['hd_image'] . '" type="' . $row['type'] . '" active="' . $row['active'] . '" genre1="' . $row['region'] . '" ishd="' . $row['ishd'] . '" ></item>';
                break;
            case 'unixml':
                $dbres .= '
        <item>
        <title>' . $row['title'] . '</title>
        <description>' . $row['description'] . '</description>
        <link>' . $row['streamurl'] . '</link>
        <category>' . $row['type'] . '</category>
        <image>' . $GLOBALS['cdn'] . $row['sd_image'] . '</image>
        <imagehd>' . $GLOBALS['cdn'] . $row['hd_image'] . '</imagehd>
        <pubDate>' . date('r', time()) . '</pubDate>
        <guid isPermaLink="false">' . $row['streamurl'] . '</guid>
        </item>';
                break;
            case 'unijson':
                $dbres .= '
        <a href="/upg_player.html?m3u8=' . $row['streamurl'] . '&poster=img/' . $row['hd_image'] . '&type=' . $row['type'] . '&channel=' . $row['title'] . '">
        <li class="clearfix">
        <img width="70px" height="70px" src="' . $GLOBALS['cdn'] . $row['sd_image'] . '" alt="' . $row['description'] . '" class="thumbnail">
        <h2>' . $row['title'] . '</h2>
        <p class="desc">' . $row['description'] . '</p>
        <span class="price">' . $row['type'] . '</span>
        </li>
        </a>';
                break;
            case 'vlc':
                $dbres .= "#EXTINF:0, logo=\"" . $row['sd_image'] . "\"," . $row['title'] . "\r\n" . $row['streamurl'] . "\r\n";
                break;
            case 'findactive':
                ini_set('default_socket_timeout', 2);
                if (is_url_exist($row['streamurl'])) {
                    //    $dbres = 'done - go check <a href="http://greektv.upg.gr/api/?type=all">all channels</a>';
                    $constquery = "UPDATE streams SET active=1,timesinactive = timesinactive-1 where id ='" . $row['id'] . "'";
                    echo $row['streamurl'] . 'set to active<br>';
                    db_query($constquery);
                } else {
                    $constquery = "UPDATE streams SET active=0, timesinactive = timesinactive+1 where id ='" . $row['id'] . "'";
                    db_query($constquery);
                }
                break;
            case 'removeinactive':
                if ($row['timesinactive'] > 250) {
                    //    $dbres = 'done - go check <a href="http://greektv.upg.gr/api/?type=all">all channels</a>';
                    $constquery = "delete from streams where id ='" . $row['id'] . "'";
                    echo $row['streamurl'] . ' has been inactive more than ' . $row['timesinactive'] . ' times - deleting<br>';
                    //    echo $constquery.'<br />';
                    db_query($constquery);
                } else {
                    echo 'nothing found';
                }
                break;
            case 'all':
                $dbres .= $row['title'] . ' - ' . $row['active'] . '<br>';
                break;
        }
    }
    return $dbres;
}
            $image = "logo";
        }
        //$image = is_array($img)&&count($img)>1?$img[1]:substr($imgs,2,strlen($imgs));
    }
}
if ($image && $h && $w) {
    if ($image == "logo") {
        $filename = "logo.png";
    } else {
        $image = "http://" . $image;
        $name = explode("/", $image);
        $name = strtolower(end($name));
        //$ext = pathinfo($name, PATHINFO_EXTENSION);
        $filename = "content/" . $id . "-" . $name;
        if (!file_exists($filename)) {
            $exists = is_url_exist($image);
            if (!$exists) {
                $filename = "logo.png";
            } else {
                copy($image, $filename);
            }
        }
    }
}
function headerCache()
{
    $cache_expire = 60 * 60 * 24 * 365;
    header("Pragma: public");
    header("Cache-Control: max-age=" . $cache_expire);
    header('Expires: ' . gmdate('D, d M Y H:i:s', time() + $cache_expire) . ' GMT');
}