Login   Register  
PHP Classes
elePHPant
Icontem

File: JSutil.lib

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Giancarlo Pinerolo  >  Javascript includer (document.writer)  >  JSutil.lib  >  Download  
File: JSutil.lib
Role: ???
Content type: text/plain
Description: the Javascript Utility library, which as of now does one or more 'document.writes' of the requested url
Class: Javascript includer (document.writer)
Author: By
Last change:
Date: 2000-02-05 08:54
Size: 680 bytes
 

Contents

Class file image Download
<%
##########################
##
##   JSutil
##
##########################
class JSutil
{

function JSinclude($handle,$separate=1)	
	{
	$warr=file($handle);
	$i=0;
	if (!separate)
		{
		while ($i < count($warr)):
		    $str.=trim(addslashes($warr[$i]));
		    $i++;
		endwhile;
		%>
		document.write('<%=$str%>');                 
		<%
		}
	else
		{
		while ($i < count($warr)):
			$str=trim(addslashes($warr[$i]));
			 %>
			document.write('<%=$str%>');                 
			<%
			$i++;
		endwhile;
		}
	}

function explode_things($thing)
	{
    	$things = explode(",",$thing);
	return $things;
	}


} /* *** end of class JSutil */	

%>