SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    Non-Member
    Join Date
    Apr 2006
    Posts
    63
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Unterminated String Constant

    Code:
    <script type="text/javascript"><!--
    iDevAffiliate_BoxWidth = "220";
    iDevAffiliate_BoxHeight = "80";
    iDevAffiliate_OutlineColor = "#000099";
    iDevAffiliate_TitleTextColor = "#FFFFFF";
    iDevAffiliate_LinkColor = "#0033CC";
    iDevAffiliate_TextColor = "#000000";
    iDevAffiliate_TextBackgroundColor = "#F3F3F3";
    //-->
    </script>
    <script language="JavaScript" type="text/javascript" src="http://www.THEURLTOMYSITE.com/affiliates/idevads.php?id=100&ad=8&page=7"></script>
    I'm working on getting a small affiliate program set up. This is the code that needs to be on the page for the actual ad to display, however, nothing shows up and I get an error that says:
    Line: 3
    Char: 17
    Error: Unterminated String Constant

    Please note that i know it says URLTOMYSITE, I removed it on purpose. Let me know if I need to post anything in the idevads.php file.

    edit: here's the php file

    Code:
    <?PHP
    error_reporting(0);
    include ("config/config.php");
    $clickref = getenv("HTTP_REFERER");
    $ad = $_GET['ad'];
    $id = $_GET['id'];
    $page = $_GET['page'];
    $adinfo = mysql_query("select * from idevaff_ads where id = $ad");
    $getinfo = mysql_fetch_array($adinfo);
    $idevtitle=$getinfo[title];
    $idevtext=$getinfo[text];
    if (!get_magic_quotes_gpc()) {
    $idevtitle = addslashes($idevtitle);
    $idevtext = addslashes($idevtext); }
    $idevgroup=$getinfo[grp];
    $adgroupinfo = mysql_query("select location from idevaff_groups where id = $idevgroup");
    $getgroupinfo = mysql_fetch_array($adgroupinfo);
    $idevadurl=$getgroupinfo[location];
    if (!$idevadurl) {
    $stitle = eregi_replace("http://","",$siteurl);
    $stitle = str_replace("/", "", $stitle); } else {
    $idevvar = eregi_replace("http://","",$idevadurl);
    $pos = strpos($idevvar, '/');
    if ($pos === false) { $stitle = $idevvar; } else {
    $idevpos = strpos($idevvar, '/');
    $stitle = substr("$idevvar", 0, $idevpos); } }
    if ($page) { $pageloc = "_$page"; }
    ?>
    document.write('<style type="text/css"><!-- td { font-size: 70%; font-family: Arial; } --></style>');
    <?PHP
    print "document.write(\"
    \");"; print "document.write(\" \");"; print "document.write(\"\");"; print "document.write(\" \");"; print "document.write(\"$idevtitle
    \");"; print "document.write(\" <td width=100% height=95% valign=top\");"; document.write("");
    ?>
    document.write(' onClick=location.href=\'<?=$base_url?>/idevaffiliate.php?id=<?=$id?><?=$pageloc?>&curlad=<?=$curl?>&clickref=<?=$clickref?>&set=2&link=<?=$ad?>\' style=cursor:hand onmouseover=\"self.status=\'Visit <?=$stitle?>!\' ; return true\" onMouseout=\"window.status=\' \'; return true\">');
    <?PHP
    print "document.write(\"$idevtext\");"; document.write("");?>
    document.write('<BR><a href=\'<?=$base_url?>/idevaffiliate.php?id=<?=$id?><?=$pageloc?>&curlad=<?=$curl?>&set=2&link=<?=$ad?>\' onmouseover=\"self.status=\'Visit <?=$stitle?>!\' ; return true\" onMouseout=\"window.status=\' \'; return true\">');
    <?PHP
    print "document.write(\"<font color=\"+iDevAffiliate_LinkColor+\"><u>$stitle</u></font></a></td></tr></table></div></td></tr></table></center></div>\");";
    include("update.php");
    ?>
    Last edited by InetWorth; Jan 20, 2007 at 12:04. Reason: added mroe code

  2. #2
    SitePoint Wizard
    Join Date
    Mar 2001
    Posts
    3,537
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I get an error that says:
    Line: 3
    Char: 17
    Error: Unterminated String Constant
    In what file? And which line is line 3?


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •