View Full Version : New User Login Error
Parablood
03-27-2007, 03:44 PM
I'm back! to the msg boards where your questions are answerd and problems actually fixed! Looks like when a new user logs into the site it gives off this error anyone ever seen it?
Parse error: syntax error, unexpected T_STRING in /home/pvptecom/public_html/invite_signup.php on line 1
Thanks!
- Parablood
Cirtex Joshua
03-27-2007, 03:46 PM
Can you paste a copy of /home/pvptecom/public_html/invite_signup.php the file, it's not a server error, that's a messup in coding usually.
Parablood
03-27-2007, 03:51 PM
<H1 class=tableSubTitle>Welcome to {$site_name}, {$smarty.session.USERNAME}!</H1>
<P>We hope you enjoy your experience. Write anytime to let us know how we
can serve you better.<BR>- <I>The {$site_name} Team</I> </P>
<TABLE class=roundedTable cellSpacing=0 cellPadding=0 width=777
align=center bgColor=#e5ecf9 border=0>
<TBODY>
<TR>
<TD><IMG height=1 src="{$site_name} - Broadcast Yourself_files/pixel.gif" width=5></TD>
<TD width=767>
<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
<TBODY>
<TR vAlign=top>
<TD class=highLight
style="PADDING-RIGHT: 10px; PADDING-LEFT: 10px; FONT-WEIGHT: bold; PADDING-BOTTOM: 13px; PADDING-TOP: 3px; BORDER-RIGHT-STYLE: none">What
would you like to do next?</TD>
<TD
style="PADDING-RIGHT: 10px; PADDING-LEFT: 10px; PADDING-BOTTOM: 0px; PADDING-TOP: 0px"> </TD></TR>
<TR vAlign=top>
<TD
style="BORDER-RIGHT: #369 1px dashed; PADDING-RIGHT: 10px; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; PADDING-TOP: 0px"
width="50%">
<DIV style="FONT-SIZE: 13px; MARGIN-BOTTOM: 5px">
<UL>
<LI><A
href="{$baseurl}/my_profile.php"><STRONG>Complete
your profile page</STRONG></A>
<DIV
style="PADDING-RIGHT: 4px; PADDING-LEFT: 4px; PADDING-BOTTOM: 15px; PADDING-TOP: 4px">The PvP
{$site_name} community wants to know about you.</DIV>
<LI><A
href="{$baseurl}/upload.php"><STRONG>Upload
your videos</STRONG></A>
<DIV
style="PADDING-RIGHT: 4px; PADDING-LEFT: 4px; PADDING-BOTTOM: 15px; PADDING-TOP: 4px">Share
your vids with the world.</DIV></LI></UL></DIV></TD>
<TD
style="PADDING-RIGHT: 10px; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; PADDING-TOP: 0px"
width="50%">
<DIV style="FONT-SIZE: 13px; MARGIN-BOTTOM: 0px">
<UL>
<LI><A href="{$baseurl}/channels.php"><STRONG>Browse
the channels</STRONG></A>
<DIV
style="PADDING-RIGHT: 4px; PADDING-LEFT: 4px; PADDING-BOTTOM: 15px; PADDING-TOP: 4px">Watch
videos organized into categories.</DIV>
<LI><A href="{$baseurl}/video.php"><STRONG>Start
watching videos </STRONG></A>
<DIV
style="PADDING-RIGHT: 4px; PADDING-LEFT: 4px; PADDING-BOTTOM: 15px; PADDING-TOP: 4px">Search
and browse 1000's of streaming
videos.</DIV></LI></UL></DIV></TD></TR></TBODY></TABLE></TD>
<TD><IMG height=1 src="{$site_name} - Broadcast Yourself_files/pixel.gif"
width=5></TD></TR>
</TBODY></TABLE>
<P><H1 class=tableSubTitle>{$site_name} is...</H1><BR><SPAN class=highLight><I>For
PvPers:</I></SPAN> <I>Have friends or guidies that you wish to share
videos with? Invite them to join!</I> <BR><BR>
<FORM action="{$baseurl}/invite_signup.php" method=post>
<TABLE cellSpacing=5 cellPadding=0 border=0>
<TBODY>
<TR>
<TD align=right><SPAN class=label><NOBR>Email Address:</NOBR>
</SPAN></TD>
<TD><input type="hidden" name="type[]" value="Family"><INPUT maxLength=60 size=30 name=friends_email[]>
<SPAN class=label style="MARGIN-LEFT: 3em"><NOBR>First Name:</NOBR>
</SPAN><INPUT maxLength=30 name=friends_fname[]></TD></TR>
<TR>
<TD align=right><SPAN class=label><NOBR>Email Address:</NOBR>
</SPAN></TD>
<TD><input type="hidden" name="type[]" value="Family"><INPUT maxLength=60 size=30 name=friends_email[]>
<SPAN class=label style="MARGIN-LEFT: 3em"><NOBR>First Name:</NOBR>
</SPAN><INPUT maxLength=30 name=friends_fname[]></TD></TR>
<TR>
<TD align=right><SPAN class=label><NOBR>Email Address:</NOBR>
</SPAN></TD>
<TD><input type="hidden" name="type[]" value="Family"><INPUT maxLength=60 size=30 name=friends_email[]>
<SPAN class=label style="MARGIN-LEFT: 3em"><NOBR>First Name:</NOBR>
</SPAN><INPUT maxLength=30 name=friends_fname[]></TD></TR>
<TR>
<TD align=right><SPAN class=label><NOBR>Email Address:</NOBR>
</SPAN></TD>
<TD><input type="hidden" name="type[]" value="Family"><INPUT maxLength=60 size=30 name=friends_email[]>
<SPAN class=label style="MARGIN-LEFT: 3em"><NOBR>First Name:</NOBR>
</SPAN><INPUT maxLength=30 name=friends_fname[]></TD></TR>
<TR>
<TD colSpan=2> </TD></TR>
<TR>
<TD colSpan=2><SPAN class=highLight><I>For Friends and
Yo MaMa:</I></SPAN> <I>Have Yo Mama come watch me PK your Azz
Invite them to join!</I></TD></TR>
<TR>
<TD align=right colSpan=2> </TD></TR>
<TR>
<TD align=right><SPAN class=label><NOBR>Email Address:</NOBR>
</SPAN></TD>
<TD><input type="hidden" name="type[]" value="Friends"><INPUT maxLength=60 size=30 name=friends_email[]>
<SPAN class=label style="MARGIN-LEFT: 3em"><NOBR>First Name:</NOBR>
</SPAN><INPUT maxLength=30 name=friends_fname[]></TD></TR>
<TR>
<TD align=right><SPAN class=label><NOBR>Email Address:</NOBR>
</SPAN></TD>
<TD><input type="hidden" name="type[]" value="Friends"><INPUT maxLength=60 size=30 name=friends_email[]>
<SPAN class=label style="MARGIN-LEFT: 3em"><NOBR>First Name:</NOBR>
</SPAN><INPUT maxLength=30 name=friends_fname[]></TD></TR>
<TR>
<TD align=right><SPAN class=label><NOBR>Email Address:</NOBR>
</SPAN></TD>
<TD><input type="hidden" name="type[]" value="Friends"><INPUT maxLength=60 size=30 name=friends_email[]>
<SPAN class=label style="MARGIN-LEFT: 3em"><NOBR>First Name:</NOBR>
</SPAN><INPUT maxLength=30 name=friends_fname[]></TD></TR>
<TR>
<TD align=right><SPAN class=label><NOBR>Email Address:</NOBR>
</SPAN></TD>
<TD><input type="hidden" name="type[]" value="Friends"><INPUT maxLength=60 size=30 name=friends_email[]>
<SPAN class=label style="MARGIN-LEFT: 3em"><NOBR>First Name:</NOBR>
</SPAN><INPUT maxLength=30 name=friends_fname[]></TD></TR>
<TR>
<TD style="FONT-SIZE: 1px" colSpan=2> </TD></TR>
<TR vAlign=top>
<TD align=right><SPAN class=label>Your Message:</SPAN></TD>
<TD>
<DIV class=formHighlight>Hey yo [{$first_name}], <BR><BR>{$site_name} is a
new site for sharing and hosting gaming PvP and PKing videos. I have been
<BR>using {$site_name} to show off my videos. I
would like to add <BR>you to my share list
. <BR><BR>Personal message from [first name]: <BR><BR>
<TEXTAREA name=message rows=5 cols=45>Have you heard about {$site_name}? I love this site. You can watch me eat my buggers...</TEXTAREA>
<BR><BR>Thanks, <BR>{$smarty.session.USERNAME} <BR><BR></DIV></TD></TR>
<TR>
<TD> </TD>
<TD><INPUT type=submit value="Send Invite" name="invite_signup">
<INPUT onclick="document.location='{$baseurl}/index.php';" type=button value=Skip name=cancel>
</TD>
</TR>
</TBODY>
</TABLE>
</FORM>
</DIV>
</TD>
</TR>
</TBODY>
</TABLE>
I'm scanning not seeing where I screw'd it up
Cirtex Joshua
03-27-2007, 03:53 PM
Gotta be on line 1
<H1 class=tableSubTitle>Welcome to {$site_name}, {$smarty.session.USERNAME}!</H1> but I'm not a programming guy, so not sure :(
chri$
03-27-2007, 03:54 PM
hmm maybe im wrong but that file looks like a html file not a php file did you open the file with a webbrowser , if you did you cant see the php because php is serverside script
Parablood
03-27-2007, 03:55 PM
I used jEdit what line exactly?
Is that the entire page? It is suppose to be a php file so it should start with <?php
Looks like a lot of it is missing - have you changed anything?
Parablood
03-27-2007, 04:55 PM
<H1 class=tableSubTitle>Welcome to {$site_name}, {$smarty.session.USERNAME}!</H1>
<P>We hope you enjoy your experience. Write anytime to let us know how we
can serve you better.<BR>- <I>The {$site_name} Team</I> </P>
<TABLE class=roundedTable cellSpacing=0 cellPadding=0 width=777
align=center bgColor=#e5ecf9 border=0>
<TBODY>
<TR>
<TD><IMG height=1 src="{$site_name} - Broadcast Yourself_files/pixel.gif" width=5></TD>
<TD width=767>
<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
<TBODY>
<TR vAlign=top>
<TD class=highLight
style="PADDING-RIGHT: 10px; PADDING-LEFT: 10px; FONT-WEIGHT: bold; PADDING-BOTTOM: 13px; PADDING-TOP: 3px; BORDER-RIGHT-STYLE: none">What
would you like to do next?</TD>
<TD
style="PADDING-RIGHT: 10px; PADDING-LEFT: 10px; PADDING-BOTTOM: 0px; PADDING-TOP: 0px"> </TD></TR>
<TR vAlign=top>
<TD
style="BORDER-RIGHT: #369 1px dashed; PADDING-RIGHT: 10px; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; PADDING-TOP: 0px"
width="50%">
<DIV style="FONT-SIZE: 13px; MARGIN-BOTTOM: 5px">
<UL>
<LI><A
href="{$baseurl}/my_profile.php"><STRONG>Complete
your profile page</STRONG></A>
<DIV
style="PADDING-RIGHT: 4px; PADDING-LEFT: 4px; PADDING-BOTTOM: 15px; PADDING-TOP: 4px">The PvP
{$site_name} community wants to know about you.</DIV>
<LI><A
href="{$baseurl}/upload.php"><STRONG>Upload
your videos</STRONG></A>
<DIV
style="PADDING-RIGHT: 4px; PADDING-LEFT: 4px; PADDING-BOTTOM: 15px; PADDING-TOP: 4px">Share
your vids with the world.</DIV></LI></UL></DIV></TD>
<TD
style="PADDING-RIGHT: 10px; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; PADDING-TOP: 0px"
width="50%">
<DIV style="FONT-SIZE: 13px; MARGIN-BOTTOM: 0px">
<UL>
<LI><A href="{$baseurl}/channels.php"><STRONG>Browse
the channels</STRONG></A>
<DIV
style="PADDING-RIGHT: 4px; PADDING-LEFT: 4px; PADDING-BOTTOM: 15px; PADDING-TOP: 4px">Watch
videos organized into categories.</DIV>
<LI><A href="{$baseurl}/video.php"><STRONG>Start
watching videos </STRONG></A>
<DIV
style="PADDING-RIGHT: 4px; PADDING-LEFT: 4px; PADDING-BOTTOM: 15px; PADDING-TOP: 4px">Search
and browse 1000's of streaming
videos.</DIV></LI></UL></DIV></TD></TR></TBODY></TABLE></TD>
<TD><IMG height=1 src="{$site_name} - Broadcast Yourself_files/pixel.gif"
width=5></TD></TR>
</TBODY></TABLE>
<P><H1 class=tableSubTitle>{$site_name} is...</H1><BR><SPAN class=highLight><I>For
PvPers:</I></SPAN> <I>Have friends or guidies that you wish to share
videos with? Invite them to join!</I> <BR><BR>
<FORM action="{$baseurl}/invite_signup.php" method=post>
<TABLE cellSpacing=5 cellPadding=0 border=0>
<TBODY>
<TR>
<TD align=right><SPAN class=label><NOBR>Email Address:</NOBR>
</SPAN></TD>
<TD><input type="hidden" name="type[]" value="Family"><INPUT maxLength=60 size=30 name=friends_email[]>
<SPAN class=label style="MARGIN-LEFT: 3em"><NOBR>First Name:</NOBR>
</SPAN><INPUT maxLength=30 name=friends_fname[]></TD></TR>
<TR>
<TD align=right><SPAN class=label><NOBR>Email Address:</NOBR>
</SPAN></TD>
<TD><input type="hidden" name="type[]" value="Family"><INPUT maxLength=60 size=30 name=friends_email[]>
<SPAN class=label style="MARGIN-LEFT: 3em"><NOBR>First Name:</NOBR>
</SPAN><INPUT maxLength=30 name=friends_fname[]></TD></TR>
<TR>
<TD align=right><SPAN class=label><NOBR>Email Address:</NOBR>
</SPAN></TD>
<TD><input type="hidden" name="type[]" value="Family"><INPUT maxLength=60 size=30 name=friends_email[]>
<SPAN class=label style="MARGIN-LEFT: 3em"><NOBR>First Name:</NOBR>
</SPAN><INPUT maxLength=30 name=friends_fname[]></TD></TR>
<TR>
<TD align=right><SPAN class=label><NOBR>Email Address:</NOBR>
</SPAN></TD>
<TD><input type="hidden" name="type[]" value="Family"><INPUT maxLength=60 size=30 name=friends_email[]>
<SPAN class=label style="MARGIN-LEFT: 3em"><NOBR>First Name:</NOBR>
</SPAN><INPUT maxLength=30 name=friends_fname[]></TD></TR>
<TR>
<TD colSpan=2> </TD></TR>
<TR>
<TD colSpan=2><SPAN class=highLight><I>For Friends and
Yo MaMa:</I></SPAN> <I>Have Yo Mama come watch me PK your Azz
Invite them to join!</I></TD></TR>
<TR>
<TD align=right colSpan=2> </TD></TR>
<TR>
<TD align=right><SPAN class=label><NOBR>Email Address:</NOBR>
</SPAN></TD>
<TD><input type="hidden" name="type[]" value="Friends"><INPUT maxLength=60 size=30 name=friends_email[]>
<SPAN class=label style="MARGIN-LEFT: 3em"><NOBR>First Name:</NOBR>
</SPAN><INPUT maxLength=30 name=friends_fname[]></TD></TR>
<TR>
<TD align=right><SPAN class=label><NOBR>Email Address:</NOBR>
</SPAN></TD>
<TD><input type="hidden" name="type[]" value="Friends"><INPUT maxLength=60 size=30 name=friends_email[]>
<SPAN class=label style="MARGIN-LEFT: 3em"><NOBR>First Name:</NOBR>
</SPAN><INPUT maxLength=30 name=friends_fname[]></TD></TR>
<TR>
<TD align=right><SPAN class=label><NOBR>Email Address:</NOBR>
</SPAN></TD>
<TD><input type="hidden" name="type[]" value="Friends"><INPUT maxLength=60 size=30 name=friends_email[]>
<SPAN class=label style="MARGIN-LEFT: 3em"><NOBR>First Name:</NOBR>
</SPAN><INPUT maxLength=30 name=friends_fname[]></TD></TR>
<TR>
<TD align=right><SPAN class=label><NOBR>Email Address:</NOBR>
</SPAN></TD>
<TD><input type="hidden" name="type[]" value="Friends"><INPUT maxLength=60 size=30 name=friends_email[]>
<SPAN class=label style="MARGIN-LEFT: 3em"><NOBR>First Name:</NOBR>
</SPAN><INPUT maxLength=30 name=friends_fname[]></TD></TR>
<TR>
<TD style="FONT-SIZE: 1px" colSpan=2> </TD></TR>
<TR vAlign=top>
<TD align=right><SPAN class=label>Your Message:</SPAN></TD>
<TD>
<DIV class=formHighlight>Hey yo [{$first_name}], <BR><BR>{$site_name} is a
new site for sharing and hosting gaming PvP and PKing videos. I have been
<BR>using {$site_name} to show off my videos. I
would like to add <BR>you to my share list
. <BR><BR>Personal message from [first name]: <BR><BR>
<TEXTAREA name=message rows=5 cols=45>Have you heard about {$site_name}? I love this site. You can watch me eat my buggers...</TEXTAREA>
<BR><BR>Thanks, <BR>{$smarty.session.USERNAME} <BR><BR></DIV></TD></TR>
<TR>
<TD> </TD>
<TD><INPUT type=submit value="Send Invite" name="invite_signup">
<INPUT onclick="document.location='{$baseurl}/index.php';" type=button value=Skip name=cancel>
</TD>
</TR>
</TBODY>
</TABLE>
</FORM>
</DIV>
that look right now?
Parablood
03-27-2007, 04:57 PM
I'm just not all that happy with this script I think I've found a better one for $550.00 guess i wasted $200.00 on this one. However I learned alot thanks to all the bugs and the horrible css lol
Eeks I'd be v.careful before spending anymore money. Most users here use http://www.clip-share.com/ as Cirtex is a hosting affiliate with these.
luis.sg
06-12-2007, 11:25 AM
I'm back! to the msg boards where your questions are answerd and problems actually fixed! Looks like when a new user logs into the site it gives off this error anyone ever seen it?
Parse error: syntax error, unexpected T_STRING in /home/pvptecom/public_html/invite_signup.php on line 1
Thanks!
- Parablood
Hi dudes,
I have exactly the same problem. The code posted by Parablood is the rendered HTML (HTML code resulting after the execution of the PHP code).
The file invite_signup.php is like this:
<?php
/************************************************** ************************************************
| Software Name : ClipShare - Video Sharing Community Script
| Software Author : Clip-Share.Com / ScriptXperts.Com
| Website : http://www.clip-share.com
| E-mail : office@clip-share.com
|************************************************* *************************************************
| This source file is subject to the ClipShare End-User License Agreement, available online at:
| http://www.clip-share.com/video-sharing-script-eula.html
| By using this software, you acknowledge having read this Agreement and agree to be bound thereby.
|************************************************* *************************************************
| Copyright (c) 2006-2007 Clip-Share.com. All rights reserved.
|************************************************* *************************************************/
session_start();
include("include/config.php");
include("include/function.php");
chk_member_login();
if($_REQUEST[invite_signup]!="")
{
for($i=0;$i<count($_REQUEST[friends_email]);$i++)
{
if($_REQUEST[friends_email][$i]!="")
{
$tag='yes';
$emails[]=$_REQUEST[friends_email][$i];
if($_REQUEST[friends_fname][$i]==""){$err="Please provide the firstname of your email.";break;}
$fnames[]=$_REQUEST[friends_fname][$i];
$rtype[]=$type[$i];
}
}
if($tag!="yes")$err="Please provide at least an e-mail";
if($err=="")
{
$to=$_SESSION[EMAIL];
$name=$_SESSION[USERNAME];
$from=$config[admin_email];
$subj="Invitation";
STemplate::assign('sender_name',$name);
STemplate::assign('message',$_REQUEST[message]);
STemplate::assign('freqkey',base64_encode($_SESSIO N[UID]));
for($i=0;$i<count($emails);$i++)
{
$sql = "insert into friends set UID=$_SESSION[UID], friends_name='".$emails[$i]."', friends_type='All|".$rtype[$i]."', invite_date='".date("Y-m-d")."'";
$conn->execute($sql);
if(mysql_affected_rows()==1)$id=mysql_insert_id();
else
{
$sql="select id from friends WHERE UID=$_SESSION[UID] and friends_name='".$emails[$i]."'";
$rs=$conn->execute($sql);$id=$rs->fields['id'];}
STemplate::assign('id',base64_encode($id));
STemplate::assign('receiver_name',$fnames[$i]);
$mailbody=STemplate::fetch('emails/invite_email.tpl');
$mailbody=nl2br($mailbody);
mailing($emails[$i],$name,$from,$subj,$mailbody);
}
}
$msg="Invitation sent successfully";
}
$sql = "select fname from signup where UID='$_SESSION[UID]'";
$rs = $conn->execute($sql);
$first_name = $rs->fields['fname'];
STemplate::assign('first_name', $first_name);
STemplate::assign(err,$err);
STemplate::assign('msg',$msg);
STemplate::display('head1.tpl');
STemplate::display('err_msg.tpl');
STemplate::display('invite_signup.tpl');
STemplate::display('footer.tpl');
?>
I don't understand why it fails at line 1, I bet the error is in some other file (an include, maybe), or there is an error opening a template.
If someone comes up with a solution, please post the code.
By the way, it's my first day using clipshare and I'm almost there! I got a couple of set up problems and a first "argue" with support, but finally they sent the solution. Happy ending. Or happy beginning!
Anyways, I'll keep an eye on this.
Catch up later.
Luis
luis.sg
06-13-2007, 07:54 AM
Hey, this must be a huge problem to solve, since support are not saying a word about my ticket regarding the issue... It's been almost a day...
Maybe they've went to visit the Oracle? :D :D
Cirtex Joshua
06-13-2007, 11:35 AM
Again, we do not support 3rd party programming :)
luis.sg
06-13-2007, 12:33 PM
I was talking about ClipShare support, not you... :cool:
Andan
06-14-2007, 01:46 AM
Well here's the real line 1:
<P>We hope you enjoy your experience. Write anytime to let us know how we
can serve you better.<BR>- <I>The {$site_name} Team</I> </P>
Simple remove the offending '-' (within the ' ') between <BR> and <I>, save, reupload, and refresh.
From experience with coding and editors, line numbers begin at 0 not 1. ;)
At least is the solution for the original poster's code.
As for the actual pasted file above, line 1 is commenting. And it has been properly commented, so why would the software refer to line 1?
Andan
06-14-2007, 01:52 AM
Luis, I noticed near the bottom of the code you included:
STemplate::assign(err,$err);
Should it not be this: STemplate::assign('err',$err); ?
luis.sg
06-14-2007, 04:42 AM
After more than 24 hours without saying a word, I have received this file from support:
invite_signup.php
<?php
/************************************************** ************************************************
| Software Name : ClipShare - Video Sharing Community Script
| Software Author : Clip-Share.Com / ScriptXperts.Com
| Website : http://www.clip-share.com
| E-mail : office@clip-share.com
|************************************************* *************************************************
| This source file is subject to the ClipShare End-User License Agreement, available online at:
| http://www.clip-share.com/video-sharing-script-eula.html
| By using this software, you acknowledge having read this Agreement and agree to be bound thereby.
|************************************************* *************************************************
| Copyright (c) 2006-2007 Clip-Share.com. All rights reserved.
|************************************************* *************************************************/
session_start();
include("include/config.php");
include("include/function.php");
chk_member_login();
if($_REQUEST[invite_signup]!="")
{
for($i=0;$i<count($_REQUEST[friends_email]);$i++)
{
if($_REQUEST[friends_email][$i]!="")
{
$tag='yes';
$emails[]=$_REQUEST[friends_email][$i];
if($_REQUEST[friends_fname][$i]==""){$err="Please provide the firstname of your email.";break;}
$fnames[]=$_REQUEST[friends_fname][$i];
$rtype[]=$type[$i];
}
}
if($tag!="yes")$err="Please provide at least an e-mail";
if($err=="")
{
$to=$_SESSION[EMAIL];
$name=$_SESSION[USERNAME];
$from=$config[admin_email];
$subj="Invitation";
STemplate::assign('sender_name',$name);
STemplate::assign('message',$_REQUEST[message]);
STemplate::assign('freqkey',base64_encode($_SESSIO N[UID]));
for($i=0;$i<count($emails);$i++)
{
$sql = "insert into friends set UID=$_SESSION[UID], friends_name='".$emails[$i]."', friends_type='All|".$rtype[$i]."', invite_date='".date("Y-m-d")."'";
$conn->execute($sql);
if(mysql_affected_rows()==1)$id=mysql_insert_id();
else
{
$sql="select id from friends WHERE UID=$_SESSION[UID] and friends_name='".$emails[$i]."'";
$rs=$conn->execute($sql);$id=$rs->fields['id'];}
STemplate::assign('id',base64_encode($id));
STemplate::assign('receiver_name',$fnames[$i]);
$mailbody=STemplate::fetch('emails/invite_email.tpl');
$mailbody=nl2br($mailbody);
mailing($emails[$i],$name,$from,$subj,$mailbody);
}
}
$msg="Invitation sent successfully";
}
$sql = "select fname from signup where UID='$_SESSION[UID]'";
$rs = $conn->execute($sql);
$first_name = $rs->fields['fname'];
STemplate::assign('first_name', $first_name);
STemplate::assign(err,$err);
STemplate::assign('msg',$msg);
STemplate::display('head1.tpl');
STemplate::display('err_msg.tpl');
STemplate::display('invite_signup.tpl');
STemplate::display('footer.tpl');
?>
I have just tested it. Now I am going to test Andan's suggestions, since he is quite right by pointing out that STemplate::assign(err,$err); doesn't look ok. It looks like err should be quoted. Let me try.
But anyway, isn't it funny that after almost two days waiting for an answer from support I get another failing file...?
luis.sg
06-14-2007, 04:57 AM
Have a look at this:
It has lines of code such:
if($_REQUEST[invite_signup]!="")
That was line 23 ...where are the quotes for the invite_signup variable? No wonder it fails!
And what about line 37:
if($_REQUEST[friends_email][$i]!="")
Or line 71:
$to=$_SESSION[EMAIL];
No quotes in variables. I will have to do it myself, but this is not what I call support.
Luis
I don't think
if($_REQUEST[invite_signup]!="")
Is actually wrong, the != is saying is equal to, so I think it is just saying is the invited person field/whatever field it is looking at, empty?
luis.sg
06-14-2007, 10:47 AM
Yes that line checks whether a value has been set for the "invite_signup" variable.
But the important thing is that, when you want to retrieve a value from an array object (and REQUEST is an array), the syntax is:
// If you want to retrieve the array value by its index number:
$_REQUEST[0]
// If you want to retrieve the array value by its literal name:
$_REQUEST['variable name']
// If you want to retrieve the array value using a variable which contains either the index or name of the value you want:
$_REQUEST[$identifier]
So in their line:
if($_REQUEST[invite_signup]!="")
Something is missing.
Anyways, I have tried overwriting this invite_signup.php file with this code:
<?php
?>
And I get the same error. And support is still quiet...
I am very disappointed. I have other things to do, that's why I bought this script... If I had time to go all over it fixing stupid bugs, I might as well have written my own script, and at least I'd be responsible for those bugs.
I've asked them this morning to solve it by today, or I'll ask a refund for the script.
HeadMetal
06-18-2007, 10:14 PM
try this out guys...I just added to my clipshare and works fine
<?php
/************************************************** ************************************************
| Software Name : ClipShare - Video Sharing Community Script
| Software Author : Clip-Share.Com
| Website : http://www.clip-share.com
| E-mail : office@clip-share.com
|************************************************* *************************************************
| This source file is subject to the ClipShare End-User License Agreement, available online at:
| http://www.clip-share.com/video-sharing-script-eula.html
| By using this software, you acknowledge having read this Agreement and agree to be bound thereby.
|************************************************* *************************************************
| Copyright (c) 2006-2007 Clip-Share.com. All rights reserved.
|************************************************* *************************************************/
session_start();
include("include/config.php");
include("include/function.php");
chk_member_login();
if($_REQUEST[invite_signup]!="")
{
for($i=0;$i<count($_REQUEST[friends_email]);$i++)
{
if($_REQUEST[friends_email][$i]!="")
{
$tag='yes';
$emails[]=$_REQUEST[friends_email][$i];
if($_REQUEST[friends_fname][$i]==""){$err="Please provide the firstname of your email.";break;}
$fnames[]=$_REQUEST[friends_fname][$i];
$rtype[]=$type[$i];
}
}
if($tag!="yes")$err="Please provide at least an e-mail";
if($err=="")
{
$to=$_SESSION[EMAIL];
$name=$_SESSION[USERNAME];
$from=$config[admin_email];
$subj="Invitation";
STemplate::assign('sender_name',$name);
STemplate::assign('message',$_REQUEST[message]);
STemplate::assign('freqkey',base64_encode($_SESSIO N[UID]));
for($i=0;$i<count($emails);$i++)
{
$sql = "insert into friends set UID=$_SESSION[UID], friends_name='".$emails[$i]."', friends_type='All|".$rtype[$i]."', invite_date='".date("Y-m-d")."'";
$conn->execute($sql);
if(mysql_affected_rows()==1)$id=mysql_insert_id();
else
{
$sql="select id from friends WHERE UID=$_SESSION[UID] and friends_name='".$emails[$i]."'";
$rs=$conn->execute($sql);$id=$rs->fields['id'];}
STemplate::assign('id',base64_encode($id));
STemplate::assign('receiver_name',$fnames[$i]);
$mailbody=STemplate::fetch('emails/invite_email.tpl');
$mailbody=nl2br($mailbody);
mailing($emails[$i],$name,$from,$subj,$mailbody);
}
}
$msg="Invitation sent successfully";
}
$sql = "select fname from signup where UID='$_SESSION[UID]'";
$rs = $conn->execute($sql);
$first_name = $rs->fields['fname'];
STemplate::assign('first_name', $first_name);
STemplate::assign(err,$err);
STemplate::assign('msg',$msg);
STemplate::display('head1.tpl');
STemplate::display('err_msg.tpl');
STemplate::display('invite_signup.tpl');
STemplate::display('footer.tpl');
?>
please let me know if you get a different error after using this script...I did not overwrite any other files too btw
luis.sg
06-19-2007, 04:24 AM
Mates...
I just got it working using the original file. It seems it has to be uploaded using binary mode. They claim it is documented in the instructions, but it is not. I guess they want people to pay those 25$ to avoid all this issues.
But I have finally set up my script and it works. The hell of slow but it works :)
vBulletin® v3.7.0, Copyright ©2000-2008, Jelsoft Enterprises Ltd.