Source for file rtl.inc.php
Documentation is available at rtl.inc.php
* This file is part of the VCL for PHP project
* Copyright (c) 2004-2007 qadram software <support@qadram.com>
* Checkout AUTHORS file for more information on the developers
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
* Redirects the browser to a project file
* @param string $file File to redirect to
$host = $_SERVER[ 'HTTP_HOST' ];
header( 'Location: http://' . $host . $uri . '/' . $file );
* Check if an object is not null
* @param object $var Object to check
class EAbort extends Exception
* Throws a silent exception
* Extracts the javascript code from an html document
* @param string $html HTML document to extract the javascript from
$pattern= '@<script[^>]*?>.*?</script>@si';
while(list ($key, $script)= each($out[0]))
$script= str_replace("<script language=\"Javascript\">","",$script);
$script= str_replace("<script language=\"JavaScript\">","",$script);
$script= str_replace('<script type="text/javascript">',"",$script);
$script= str_replace('<script type="text/javascript" language="JavaScript">',"",$script);
return(array($result,$onlyhtml));
* DBCS friendly unserialize, it modifies the length of all strings with the correct size
* @param string $sObject String to unserialize
$__ret = preg_replace('!s:(\d+):"(.*?)";!e', "'s:'.strlen('$2').':\"$2\";'", $sObject );
* Unserializes and if it gets an error, uses __unserialize
* @param string $input String to unserialize
|