Example #1
0
    function __destruct()
    {
        if (!isset($mtg)) {
            require_once __DIR__ . '/class/class_mtg_functions.php';
            $mtg = mtg_functions::getInstance();
        }
        $year = date('Y');
        ?>
			</div>
					<div class="footer">
						Running MTG Codes <?php 
        echo $mtg->codeVersion('installed');
        ?>
<br />
						Copyright &copy;2015<?php 
        echo $year > 2015 ? ' - ' . $year : '';
        ?>
, <a href="http://magictallguy.tk" target="new">Magictallguy</a>.
					</div>
				</div>
			</div>
			<script src="js/ui.js"></script>
			</body>
		</html><?php 
    }
                $ret = '<span class="green">' . $set['engine_version'] . '</span>';
            } else {
                if ($count > $set['engine_version']) {
                    $ret = '<span class="orange">' . $count . '</span>';
                } else {
                    if ($count < $set['engine_version']) {
                        $ret = '<span class="blue">' . $count . '</span>';
                    } else {
                        $ret = 'What?';
                    }
                }
            }
        }
        return $format ? $ret : strip_tags($ret);
    }
    function _ip()
    {
        if (!empty($_SERVER['HTTP_CLIENT_IP'])) {
            return $_SERVER['HTTP_CLIENT_IP'];
        } else {
            if (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) {
                $ips = explode(',', $_SERVER['HTTP_X_FORWARDED_FOR']);
                return count($ips) > 1 ? $ips[0] : $_SERVER['HTTP_X_FORWARDED_FOR'];
            } else {
                return $_SERVER['REMOTE_ADDR'];
            }
        }
    }
}
$mtg = mtg_functions::getInstance();