0 and $dclose < 10) { $snipClose = $dclose; } if ($snipPrefix!= '') { configSetCookie('__snipprefix', $snipPrefix, $cookieLife, '/'); } else { configSetCookie('__snipprefix', '', 0, '/'); } if ($snipLang != '') { configSetCookie('__sniplang', $snipLang, $cookieLife, '/'); } else { configSetCookie('__sniplang', '', 0, '/'); } if ($snipPkey != '') { configSetCookie('__snippk', $snipPkey, $cookieLife, '/'); } else { configSetCookie('__snippk', '', 0, '/'); } if ($snipClip != '') { configSetCookie('__snipclip', $snipClip, $cookieLife, '/'); } else { configSetCookie('__snipclip', '', 0, '/'); } if ($snipSuffix!= '') { configSetCookie('__snipsuffix', $snipSuffix, $cookieLife, '/'); } else { configSetCookie('__snipsuffix', '', 0, '/'); } if ($snipTitleSuffix!= '') { configSetCookie('__sniptitlesuffix', $snipTitleSuffix, $cookieLife, '/'); } else { configSetCookie('__sniptitlesuffix', '', 0, '/'); } if ($snipClose != 0) { configSetCookie('__snipt', $snipClose, $cookieLife, '/'); } else { configSetCookie('__snipt', '', 0, '/'); } // Update profile.. $userId = strtolower(configGetCookie('__snippa')); if ($userId != '') { include('class.db.pg.php'); include('class.user.php'); $link = pgConnect('snipurl_snipurl'); $res = userUpdateProfile($link, $userId, $snipPkey, $snipLang, $snipClose, $snipPrefix, $snipSuffix, $snipTitleSuffix); pgClose($link); } // If email has been submitted, add it.. if ($_POST['subs'] != '') { // JAN 2009: First send a confirmation to user // if this is a real email or not! // 1. Enter into the subs table but with status "U" include('class.db.pg.php'); $link = pgConnect('snipurl_snipurl'); include('class.interest.php'); interestAddSubscriber($link, $_POST['subs']); pgClose($link); } // SEND AGAIN TO MAKE SURE COOKIES GET REFLECTED! header('location: ' . $_SERVER['PHP_SELF'] . '?s=done'); } // FOR CHECKING IF THE DOMAIN WAS DIFFERENT } else if ($_GET['s'] == 'done') { // THIS IS WHEN IT'S DONE $msg = formatMessage('SUCCESS', $WORDS[98]); } else if ($_GET['a'] != '') { // Just been forwarded from another domain, so set cookies here and initialize variables $aval = base64_decode($_GET['a']); $ar = explode('||', $aval); $snipPrefix = $ar[0]; $snipLang = $ar[1]; $snipPkey = $ar[2]; $snipClip = $ar[3]; $snipSuffix = $ar[5]; $snipTitleSuffix = $ar[6]; $snipClose = 0; $dclose = intval($ar[4]); if ($dclose == $ar[4] and $dclose > 0 and $dclose < 10) { $snipClose = $dclose; } $msg = formatMessage('INFO', $WORDS[103]); $autojs = ''; } // COMING FROM UPDATE PROFILE else if ($_GET['up'] != '') { if ($_GET['up'] == 'error') { $msg = formatMessage('ERROR', $WORDS[57]); } else if ($_GET['up'] == 'done') { $msg = formatMessage('SUCCESS', $WORDS[98]); } else if ($_GET['up'] == 'signed') { $msg = formatMessage('SUCCESS', $WORDS[115]); } // Signed up successfully } echo '