php-general Digest 1 Jan 2004 16:28:28 -0000 Issue 2506
Topics (messages 173589 through 173603):
No COOKIE Set?
173589 by: Cesar Aracena
173590 by: Aidan Lister
173591 by: Cesar Aracena
Hiding File Name & Site Search Question
173592 by: Naveed Ahmad
173596 by: Raditha Dissanayake
Having problems with a while loop
173593 by: Richard Kurth
173597 by: Raditha Dissanayake
Re: Session Variables Disappear and Reappear
173594 by: Jerry Kita
Re: Can't upload files > then 400K to MySQL
173595 by: ahmetax
Setting a 'life-time' clock to a displayed information
173598 by: ike strong
173599 by: Raditha Dissanayake
173602 by: Larry Brown
Re: urlencoding.
173600 by: Larry Brown
173601 by: John W. Holmes
ereg + performance problem
173603 by: Martin Helie
Administrivia:
To subscribe to the digest, e-mail:
[EMAIL PROTECTED]
To unsubscribe from the digest, e-mail:
[EMAIL PROTECTED]
To post to the list, e-mail:
[EMAIL PROTECTED]
----------------------------------------------------------------------
--- Begin Message ---
Hi all,
My head is about to explode here... I am trying to setup a cookie for every
new user that registers in my site and right after that, to send them to the
home page... is that so difficult? apparently yes... It does redirect, but
when I try to "echo" the $MemberId cookie with:
echo $_COOKIE["MemberId"];
Nothing happens... nothing is displayed... also, I can't find where these
cookies are being stored. I am developing under WinXP, latest PHP and latest
MySQL... other cookies are being stored very well, but I don-t know where...
I'm displaying at http://localhost/..... ¿¿¿???
Here's my script:
if ($use_same_data == "yes") // One kind of information stored
{
$query = "INSERT INTO members_info ....... )";
$result = mysql_query($query);
$id = mysql_insert_id();
}
elseif ($use_same_data == "") // Other kind of choice of information for
shipping address
{
$query = "INSERT INTO members_info .......)";
$result = mysql_query($query);
$id = mysql_insert_id();
}
if (!$result)
{
echo "Error code here";
}
else
{
setcookie ("MemberId", $id, time()+31536000);
header ("Location: $CFG->wwwroot");
exit();
}
Thax in advanced,
Cesar
--- End Message ---
--- Begin Message ---
Try putting the exit() before the redirect, and see if there's an error when
you attempt to set the cookie.
"Cesar Aracena" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hi all,
>
> My head is about to explode here... I am trying to setup a cookie for
every
> new user that registers in my site and right after that, to send them to
the
> home page... is that so difficult? apparently yes... It does redirect, but
> when I try to "echo" the $MemberId cookie with:
>
> echo $_COOKIE["MemberId"];
>
> Nothing happens... nothing is displayed... also, I can't find where these
> cookies are being stored. I am developing under WinXP, latest PHP and
latest
> MySQL... other cookies are being stored very well, but I don-t know
where...
> I'm displaying at http://localhost/..... ¿¿¿???
>
> Here's my script:
>
> if ($use_same_data == "yes") // One kind of information stored
> {
> $query = "INSERT INTO members_info ....... )";
> $result = mysql_query($query);
> $id = mysql_insert_id();
> }
>
> elseif ($use_same_data == "") // Other kind of choice of information
for
> shipping address
> {
> $query = "INSERT INTO members_info .......)";
> $result = mysql_query($query);
> $id = mysql_insert_id();
> }
>
> if (!$result)
> {
> echo "Error code here";
> }
> else
> {
> setcookie ("MemberId", $id, time()+31536000);
> header ("Location: $CFG->wwwroot");
> exit();
> }
>
> Thax in advanced,
>
> Cesar
--- End Message ---
--- Begin Message ---
Hi Aidan and thanx for the answer.
I placed the exit(); function below the setcookie() function and the page
just keeps blank. No error is displayed. I have NOTICES turned off but
that's no notice it should give me.
Thanks again,
Cesar
"Aidan Lister" <[EMAIL PROTECTED]> escribió en el mensaje
news:[EMAIL PROTECTED]
> Try putting the exit() before the redirect, and see if there's an error
when
> you attempt to set the cookie.
>
>
> "Cesar Aracena" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
> > Hi all,
> >
> > My head is about to explode here... I am trying to setup a cookie for
> every
> > new user that registers in my site and right after that, to send them to
> the
> > home page... is that so difficult? apparently yes... It does redirect,
but
> > when I try to "echo" the $MemberId cookie with:
> >
> > echo $_COOKIE["MemberId"];
> >
> > Nothing happens... nothing is displayed... also, I can't find where
these
> > cookies are being stored. I am developing under WinXP, latest PHP and
> latest
> > MySQL... other cookies are being stored very well, but I don-t know
> where...
> > I'm displaying at http://localhost/..... ¿¿¿???
> >
> > Here's my script:
> >
> > if ($use_same_data == "yes") // One kind of information stored
> > {
> > $query = "INSERT INTO members_info ....... )";
> > $result = mysql_query($query);
> > $id = mysql_insert_id();
> > }
> >
> > elseif ($use_same_data == "") // Other kind of choice of information
> for
> > shipping address
> > {
> > $query = "INSERT INTO members_info .......)";
> > $result = mysql_query($query);
> > $id = mysql_insert_id();
> > }
> >
> > if (!$result)
> > {
> > echo "Error code here";
> > }
> > else
> > {
> > setcookie ("MemberId", $id, time()+31536000);
> > header ("Location: $CFG->wwwroot");
> > exit();
> > }
> >
> > Thax in advanced,
> >
> > Cesar
--- End Message ---
--- Begin Message ---
Im developing a site in PHP. I have two questions:
1: how i can I hide file names so that visitors cannot see file names like
this: somefile.php?name=value. and
2: How I can develope a site search (IR) in PHP???
Please tell me, Thanks
--- End Message ---
--- Begin Message ---
The first one can be done with Apache URL rewrites. For the second
opinions vary. my own is that mnogosearch or aspseek would be best.
happy new year.
Naveed Ahmad wrote:
Im developing a site in PHP. I have two questions:
1: how i can I hide file names so that visitors cannot see file names like
this: somefile.php?name=value. and
2: How I can develope a site search (IR) in PHP???
Please tell me, Thanks
--
Raditha Dissanayake.
------------------------------------------------------------------------
http://www.radinks.com/sftp/ | http://www.raditha.com/megaupload
Lean and mean Secure FTP applet with | Mega Upload - PHP file uploader
Graphical User Inteface. Just 150 KB | with progress bar.
--- End Message ---
--- Begin Message ---
Way does this while loop not work.
It does not read anything in the file. If I add ! in front of feof it
will just loop forever but still it will not read the next line in the
file. The file has two lines in it that look like this.
tester3:$1$09BZpdge$b7TQcsYSsAP1hgiCuCWtS1
tester5:$1$5eq3i75D$XK9QzaS.7bHyWVf4bdyJs/
$filenum="test";
$fpHt = fopen($filenum, "r");
$fpLine = fgets($fpHt,512);
while(feof($fpHt)) {
$fpLine = trim($fpLine);
$fpData = explode(":", $fpLine);
$fpData[0] = trim($fpData[0]);
echo $fpData[0];
}
--- End Message ---
--- Begin Message ---
Hi,
your fgets should be inside the loop. else you are in an infite loop.
ps: are you brute forcing password file ;-)
Richard Kurth wrote:
Way does this while loop not work.
It does not read anything in the file. If I add ! in front of feof it
will just loop forever but still it will not read the next line in the
file. The file has two lines in it that look like this.
tester3:$1$09BZpdge$b7TQcsYSsAP1hgiCuCWtS1
tester5:$1$5eq3i75D$XK9QzaS.7bHyWVf4bdyJs/
$filenum="test";
$fpHt = fopen($filenum, "r");
$fpLine = fgets($fpHt,512);
while(feof($fpHt)) {
$fpLine = trim($fpLine);
$fpData = explode(":", $fpLine);
$fpData[0] = trim($fpData[0]);
echo $fpData[0];
}
--
Raditha Dissanayake.
------------------------------------------------------------------------
http://www.radinks.com/sftp/ | http://www.raditha.com/megaupload
Lean and mean Secure FTP applet with | Mega Upload - PHP file uploader
Graphical User Inteface. Just 150 KB | with progress bar.
--- End Message ---
--- Begin Message ---
For those interested I was able to get to the bottom of this issue. My
hosting supplier uses multiple servers to do load balancing. As such the
folder in which the session variables were stored was stored in a /tmp file
on each of the servers. That explained why the session variables would
randomly disappear and reappear. It also explained why my single-server
"test" system experienced no problems. The solution was to set up a /tmp
folder for the session variables in my public_html folder. When I did this
everything worked perfectly.
I'm not a professional programmer. I started this website very recently on
behalf of a project we do at our church. I'd be interested in others
opinions and thoughts regarding how other hosting services handle this
issue. Should I have expected to create the /tmp folder within my
public_html folder or do other hosting services provide a different
approach?
Thanks and Happy New Year to everyone.
Jerry Kita
"Jerry Kita" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> New to PHP and I've checked previous posts and haven't seen similar
problem.
> Any ideas would be appreciated.
>
> Have encounted an odd problem. Using session variables to allow users to
log
> in and out of my site. I've created a test system on my laptop. Apache
> 2.0.48,
> PHP 4.3.4, MySQL and Windows 2000. On my test system everything works
> perfectly. Sessions are created and maintained as long as the browser is
> open.
> I can also destroy sessions.
>
> However when I load everything up to my site via FTP the results are very
> sporadic. Sessions seem to drop and reappear. While a user is logged in I
> display a "Logged in as: XXXXX" message at the top of the page. I can
> continually refresh the page and occassionally the "Logged in as" XXXXX"
> message will disappear showing the "Please Login Form". If I refresh again
> (without logging in) the page shows the user is again "Logged in".
>
> Here's the script that I use to log users in:
>
> <?php
> error_reporting (E_ALL ^ E_NOTICE);
> //check for required fields from the form
> if ((!$_POST[userid]) || (!$_POST[password])) {
> header("Location: Salkehatchie_Home.php");
> exit;
> }
> session_start();
> //connect to server and select database
> $conn = mysql_connect("x.x.x.x", "xxxxxxxxxx", "xxxxxxxxx") or
> die(mysql_error());
> //echo "Connection is $conn <br>";
> mysql_select_db("xxxxxxxxxx_salkehatchie",$conn) or die(mysql_error());
> //create and issue the query
> $sql = "select userid, password, privs from userlist where userid =
> '$_POST[userid]' AND password = '$_POST[password]'";
> //echo "USERID is $_POST[userid]<br>";
> //echo "PASSWORD is $_POST[password]<br>";
> //echo "SQL is $sql<br>";
> $result = mysql_query($sql,$conn) or die(mysql_error());
> //echo "Result is $result<br>";
> $rows = mysql_num_rows($result);
> //echo "Number of Rows are $rows<br>";
> //get the number of rows in the result set; should be 1 if a match
> if (mysql_num_rows($result) == 1) {
> //if authorized, get the values set the $_SESSION Variables -- userid,
> password and privs
> $_SESSION[userid] = $_POST[userid];
> $_SESSION[password] = $_POST[password];
> $_SESSION[privs] = mysql_result($result, 0, 'privs');
> //Direct user to members page
> header("Location: Salkehatchie_Members_Home.php");
> exit;
> } else {
> //redirect back to login form if not authorized
> header("Location: Salkehatchie_Home.php");
> exit;
> }
> ?>
>
> I start off each webpage with the following script:
>
> <?php
> //Check for existence of Valid Login ID
> error_reporting (E_ALL ^ E_NOTICE);
> header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
> header("Expires: " . gmdate("D, d M Y H:i:s") . " GMT");
> header("Cache-Control: no-store, no-cache, must-revalidate ");
> header("Cache-Control: post-check=0, pre-check=0", false);
> header("Pragma: no-cache");
> session_start();
> if (isset($_SESSION[userid])) {
> $validlogon = "YES";
> } else {
> $validlogon = "NO";
> }
> echo $validlogon //test to see if user has previously logged on
>
> This all works perfectly on my test system but creates problems at my
site.
> If anyone would like to see this for themselves go to the following site:
>
> http://www.salkehatchiehuntersville.com/Salkehatchie_Home.php
>
> and log in using test/test as userid/password. When logged in go back to
the
> home page and then continually refresh that page. You will see that that
the
> user moves in and out of a logged in status. This will also show up on
other
> pages but since this site is under construction it's safest to stick to
the
> HOME page.
>
> Other possibly helpful information. Web Hosting site is BlueDomino.
>
> Thanks for your help.
>
> Jerry Kita
>
--- End Message ---
--- Begin Message ---
You're right Jeremy. I found that the limitation was because of default
max_packet_size of MySQL.
It was limited to 1MB by default. Also I found that 400K of data reached the
1MB boundary, when I applied
urlencode function to it.
Maybe, Chris has a similar limitation problem.
--
Ahmet Aksoy
www.axtelsoft.com
"Jeremy Johnstone" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Might want to check the MySQL configuration. The max allowed packet size
> might be set extremely low.
>
> -Jeremy
>
> On Mon, 2003-12-29 at 15:25, Chris wrote:
> > Have you taken a look at the post below: Can't upload files Greater than
> > 11KB?
> > We may have the same problem.
> >
> >
> > "Ahmetax" <[EMAIL PROTECTED]> wrote in message
> > news:[EMAIL PROTECTED]
> > > Hi,
> > >
> > > I have the following PHP code to upload files to a MySQL table.
> > >
> > > It works fine, but, I can't upload any files greater then 400K.
> > >
> > > What might be the problem?
> > >
> > > TIA
> > >
> > > ahmet
> > >
> > > <?
> > > if (isset($_POST["submit"]))
> > > {
> > > $fname= $_FILES["user_file"]["name"];
> > > $tmp= addslashes($_FILES["user_file"]["tmp_name"]);
> > > $size= $_FILES["user_file"]["size"];
> > > $type=$_FILES["user_file"]["type"];
> > > $tanim=$_FILES["user_file"]["file_desc"];
> > > $fd=fopen($tmp,"r") or die("Can't open file!");
> > > $fdata=urlencode(fread($fd,filesize($tmp)));
> > > $size=filesize($tmp);
> > > $tanim=$descript;
> > > include("baglan.inc");
> > >
> > > mysql_select_db("dosyalar");
> > > $sql="INSERT INTO files
(name,file_type,file_desc,file_data,file_size)".
> > > " VALUES('$fname','$type','$descr','$fdata','$size')";
> > > mysql_query($sql);
> > > }
> > > ?>
> > > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
> > > <html>
> > > <head>
> > > <title>AxTelSoft-Uploading a file </title>
> > > <meta http-equiv="Content-Type" content="text/html;
charset=windows-1254">
> > > <meta http-equiv="Content-Type" content="text/html;
charset=iso-8859-9">
> > > <meta http-equiv="Content-Language" content="tr">
> > > <meta http-equiv="description" content="axtelsoft, indir, download,
> > delphi,
> > > source code, kaynak kod">
> > > <meta http-equiv="Pragma" content="no-cache">
> > > <meta name="Generator" content="Ahmet Aksoy">
> > > </head>
> > > <body>
> > >
> > > <form enctype="multipart/form-data" action="<?php echo
> > > $SERVER["PHP_SELF"];?>" method="post">
> > > <input type="hidden" name="MAX_FILE_SIZE" value="16777215">
> > >
> > > Send this file: <input name="user_file" type="file">
> > > Explanations : <TEXTAREA NAME="descript" ROWS=10 COLS=45 WRAP><?php
> > > echo($descr);
> > > ?></TEXTAREA>
> > > <P><input type="submit" value="Send File" name="submit">
> > > </form>
> > >
> > > </body>
> > > </html>
--- End Message ---
--- Begin Message ---
Hi all,
I'm interested in finding out a way to set a time
limit to a displayed information - i.e. the displayed
information will sieze to appear to a viewer's browser
once a set time period is reached.
What I'm trying to achieve is a situation whereby a
certain 'info' (like an order!) would only appear to a
target viewer (like a supplier!) for example (say) 30
minutes and if that viewer did not react within the
set time, the information will sieze to appear to
his/her browser so that the same information could be
forwarded to the next viewer (supplier)on the list.
The setting of time approach is to avoid having two
people working on the same information at the same
time.
I'd really appreciate any hint/help
Thanks in advance
Ike
__________________________________
Do you Yahoo!?
New Yahoo! Photos - easier uploading and sharing.
http://photos.yahoo.com/
--- End Message ---
--- Begin Message ---
This is not a php question, the simplest way to do this is with meta
refresh.
ike strong wrote:
Hi all,
I'm interested in finding out a way to set a time
limit to a displayed information - i.e. the displayed
information will sieze to appear to a viewer's browser
once a set time period is reached.
What I'm trying to achieve is a situation whereby a
certain 'info' (like an order!) would only appear to a
target viewer (like a supplier!) for example (say) 30
minutes and if that viewer did not react within the
set time, the information will sieze to appear to
his/her browser so that the same information could be
forwarded to the next viewer (supplier)on the list.
The setting of time approach is to avoid having two
people working on the same information at the same
time.
I'd really appreciate any hint/help
Thanks in advance
Ike
__________________________________
Do you Yahoo!?
New Yahoo! Photos - easier uploading and sharing.
http://photos.yahoo.com/
--
Raditha Dissanayake.
------------------------------------------------------------------------
http://www.radinks.com/sftp/ | http://www.raditha.com/megaupload
Lean and mean Secure FTP applet with | Mega Upload - PHP file uploader
Graphical User Inteface. Just 150 KB | with progress bar.
--- End Message ---
--- Begin Message ---
The timer on the client browser would have to be done in some client-side
language.
On the server side you can place any order information that is out with a
supplier in a db field along with the time it was pulled. When the next
supplier submits a request, the db is parsed for pending jobs whose time has
gone over the 30 minutes. If it has, then provide the same information to
this supplier and update the record to show who it is out with. If there
are none that have gone over the 30 then generate a new set for this
supplier and record the time it was provided and the supplier it was given
to. When the supplier publishes the completed information, check to make
sure it was in time, if it was in time remove the entry from the db so that
it isn't given back out. If it is too late you can generate an error page
and start back over if he still wants to try.
Note there may be some additional steps necessary to make sure that two
suppliers aren't trying get an expired entry at the same instance where
there is a fraction of a second between checking the time on the record and
taking the record where both check the time and take the same record. You
will probably have to use locking on the db to avoid this.
Larry
-----Original Message-----
From: ike strong [mailto:[EMAIL PROTECTED]
Sent: Thursday, January 01, 2004 9:44 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Setting a 'life-time' clock to a displayed information
Hi all,
I'm interested in finding out a way to set a time
limit to a displayed information - i.e. the displayed
information will sieze to appear to a viewer's browser
once a set time period is reached.
What I'm trying to achieve is a situation whereby a
certain 'info' (like an order!) would only appear to a
target viewer (like a supplier!) for example (say) 30
minutes and if that viewer did not react within the
set time, the information will sieze to appear to
his/her browser so that the same information could be
forwarded to the next viewer (supplier)on the list.
The setting of time approach is to avoid having two
people working on the same information at the same
time.
I'd really appreciate any hint/help
Thanks in advance
Ike
__________________________________
Do you Yahoo!?
New Yahoo! Photos - easier uploading and sharing.
http://photos.yahoo.com/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
How about this one? Add it to an include for the site and use it whenever
you have an error check.
function goBack($newSite,$errMsg)
{
$send = "";
foreach($_GET as $key=>$value)
{
$send = $send."&".$key."=".$value;
}
$goTo = urlencode($newSite."?errMsg=".$errMsg.$send);
header("Location: $goTo");
die();
}
if(there is a problem with the data)
{
$errorMessage = "some error";
goBack($HTTP_REFERER,$errorMessage);
}
I'd have to test the $HTTP_REFERER part, but I don't see why it wouldn't
work. I like the die() in there so I can just use an if statement at the
beginning without having to indent the rest of the script. Especially if
you have a lot of error checks.
-----Original Message-----
From: Chris W [mailto:[EMAIL PROTECTED]
Sent: Monday, December 29, 2003 12:02 PM
To: [EMAIL PROTECTED]
Subject: [PHP] urlencoding.
Let me give a quick background. I am a very experienced programmer but
I haven't done much php and only a little web development in perl. I am
now creating a web site with Apache, php and MySQL.
I am having the user fill out a form and then save the data in MySQL.
Before I save the data I do a few checks and if there is a problem I do
a redirect back to the form and send all the data back so they don't
have to fill out the whole form again. Here is some sample code I use
to build my redirect url....
$UserID = $_POST['UserID'];
$Password1 = $_POST['Password1'];
$Password2 = $_POST['Password2'];
$Email = $_POST['Email'];
$FName = $_POST['FName'];
$LName = $_POST['LName'];
do checking of data here.
if(there is a problem with the data){
$ErrorMsg = "some error";
$redirectStr = "$httpHost/CreateAccount.php?";
$redirectStr .= "UserID=" . urlencode(stripslashes($UserID));
$redirectStr .= "&Password=" . urlencode(stripslashes($Password));
$redirectStr .= "&Email=" . urlencode(stripslashes($Email));
$redirectStr .= "&FName=" . urlencode(stripslashes($FName));
$redirectStr .= "&LName=" . urlencode(stripslashes($LName));
$redirectStr .= "&ErrorMsg=" . urlencode($ErrorMsg);
header("Location: $redirectStr");
exit;
}
My problem is that any field that contains a double quote, all data
after the first double quote is missing from the form field. When I
look at the long URL I do see a %22 where the " are supposed to be, and
all other data is there too.
Any Ideas? If there is a better way to do this feel free to suggest a
change in my whole method here. Just as a note validation of the UserID
has to be done on the server side, to check for duplicates in the MySQL db.
I would also welcome insight on standard techniques to make sure the
user isn't trying to break the code by sending bogus data. I am already
checking that the data isn't longer than I am expecting.
Chris W
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
Larry Brown wrote:
foreach($_GET as $key=>$value)
{
$send = $send."&".$key."=".$value;
}
Just use $_SERVER['QUERY_STRING'] instead of recreating it using this
loop (unless the data is coming from $_POST).
As for the original question, just throw $_GET into $_SESSION
($_SESSION['GET'] = $_GET;) and redirect back to the first page. On the
first page, check if $_SESSION['GET'] exists, if it does, reload $_GET (
$_GET = $_SESSION['GET'];) and proceed as normal.
--
---John Holmes...
Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/
php|architect: The Magazine for PHP Professionals – www.phparch.com
--- End Message ---
--- Begin Message ---
Hello,
I'm writing a routine that recursively reads an HTML document, looking for
"special tags". It's a template system, but contrary to what I've seen out
there so far, no template engines allow for any kind of customization from
within the document; they only seem to be variable replacement systems.
What I have in mind is something along the lines of:
<HTML>
blah blah
{MAGICTAG param1=a param2=b}some more {ANOTHERTAG}text{/ANOTHERTAG} here
{/MAGICTAG}
blah
</HTML>
The text between ANOTHERTAG would first be changed and then passed along
with the other text to MAGICTAG. ie, the data is treated from the inside
out, and nesting is obviously supported.
I've got everything working, but the problem is I'm using quite a few "ereg"
statements recursively, so performance is not so good.
Here's a simplified version of the core (it's part of a class, and I
modified the code for a "standalone" version here).
Thanks in advance for any ideas. Feel free to recycle this code.
function parse( $template ) {
//Look for (before*) {a tag} (after*) anything and store matches in
$regs
if( ereg( "(.*)[{]([a-zA-Z0-9]+)[}](.*)", $template, $regs ) ) {
$before = $regs[1];
$tag = $regs[2];
//Now look for (data*) {/closing tag} (after*) in the "after"
portion of first match
if( ereg( "(.*)[{][/]" . $tag. "[}](.*)", $regs[3], $regs ) ) {
$after = $regs[2];
$data = $regs[1];
$resolvedTag = initHandler( $tag, $data ); //handle this tag and
data
}
//support for "standalone" tags (no {/closing tag} )
else {
ereg( "(.*)", $regs[3], $regs );
$resolvedTag = getTagValue( $tag );
$after = $regs[1];
}
}
if( $resolvedTag ) {
$template =
$before
. $resolvedTag
. $after;
parse( $template );
}
else {
return $template;
}
}
--- End Message ---