<?php
/*
	DevSaver Web Framework
	Copyright (c) 2002-2018 DevSaver. 
	All rights reserved.
		web:  www.devsaver.com
		mail: support@devsaver.com
*/

if (!defined("STPBase")) {
	die("This file can't be accessed directly!");
}

require_once _LIBPATH . "include/sys.php";
require_once _LIBPATH . "include/creditcard.php";
require_once _LIBPATH . "include/file.php";
require_once _LIBPATH . "include/mime.php";
require_once _LIBPATH . "include/php_fix.php";
require_once _LIBPATH . "include/dir.php";
require_once _LIBPATH . "include/highlight.php";
require_once _LIBPATH . "include/date.php";


/**
* description
*
* @param
*
* @return
*
* @access
*/
function isMod($mod) {
	return (bool)($mod == $_GET["mod"]);
}


function isModSub($mod , $sub) {
	return (bool)(($mod == $_GET["mod"]) && ($sub == $_GET["sub"]));
}

function isModSubAct($mod , $sub , $act) {
	return ($mod == $_GET["mod"]) && ($sub == $_GET["sub"]) && ($act == $_GET["action"]) && isset($_GET["action"]);

}

function autoLink($text , $extra = "") {
 $reg_exUrl = "/((http|https|ftp|ftps)\:\/\/[a-zA-Z0-9\-\.]+\.[a-zA-Z]{2,3}(\/\S*)?)/";
 if(preg_match($reg_exUrl, $text)) {
  return preg_replace($reg_exUrl, '<a href="${1}" ' . $extra . ' target="”_blank”">${1}</a> ', $text);
 } else {
  return $text;
 }
}

?>