$original = isset($_SESSION["mibew_captcha"]) ? $_SESSION["mibew_captcha"] : ""; if (empty($original) || empty($captcha) || $captcha != $original) { $errors[] = getlocal('errors.captcha'); } unset($_SESSION['mibew_captcha']); } if (count($errors) > 0) { setup_leavemessage($visitor_name, $email, $message, $groupid, $groupname, $info, $referrer, can_show_captcha()); setup_logo(); expand("styles", getchatstyle(), "leavemessage.tpl"); exit; } $message_locale = $settings['left_messages_locale']; if (!locale_exists($message_locale)) { $message_locale = $home_locale; } store_message($visitor_name, $email, $info, $message, $groupid, $referrer); $subject = getstring2_("leavemail.subject", array($visitor_name), $message_locale); $body = getstring2_("leavemail.body", array($visitor_name, $email, $message, $info ? "{$info}\n" : ""), $message_locale); if (isset($group) && !empty($group['vcemail'])) { $inbox_mail = $group['vcemail']; } else { $inbox_mail = $settings['email']; } if ($inbox_mail) { $link = connect(); webim_mail($inbox_mail, $email, $subject, $body, $link); mysql_close($link); } setup_logo(); expand("styles", getchatstyle(), "leavemessagesent.tpl");
if (empty($priuid)) { $back = isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : XOOPS_URL; redirect_header($back, 3, _NOPERM); exit; } else { $form['priuser'] = array('uid' => $priuser->getVar('uid'), 'uname' => $priuser->getVar('uname'), 'name' => $priuser->getVar('name')); } } $errors = array(); if ($op != "form") { $errors = assign_post_values($items); if (count($errors)) { $op = 'form'; assign_form_widgets($items); } elseif ($op == 'store') { $errors = store_message($items, $form); } elseif ($op == 'confirm') { assign_form_widgets($items, true); } } else { assign_form_widgets($items); } $cust = $form['custom']; $form['items'] =& $items; $action = "index.php?form=" . $form['formid']; if (!empty($form['priuser'])) { $action .= '&uid=' . $form['priuser']['uid']; } $form['action'] = $action; $title = htmlspecialchars($form['title'], ENT_QUOTES); $breadcrumbs->set($title, "index.php?form={$id}");
if (is_a($ret, 'PEAR_Error')) { die("Error in authentication: " . $ret->getMessage()); } // print number of messages found echo $pop3->numMsg() . " message(s) in mailbox\n"; // print message headers if ($pop3->numMsg() > 0) { for ($x = 1; $x <= $pop3->numMsg(); $x++) { $hdrs = $pop3->getParsedHeaders($x); print_r($hdrs); //echo $hdrs['From'] . "\n" . $hdrs['Subject'] . "\n" . $hdrs['Message-Id'] . "\n\n"; $count = 0; // Only process emails from xxx. // if (preg_match('/evoldir\@evol.biology.mcmaster.ca/', $pop3->getBody($x))) if (preg_match('/evoldir\\@evol.biology.mcmaster.ca/', $hdrs['From'])) { $id = store_message($hdrs, $pop3->getBody($x)); if ($id != '') { // It's a new message // geocode $latlng = geocode($pop3->getBody($x)); if ($latlng) { print_r($latlng); store_latlng($id, $latlng); } // generate Tinyurl $url = 'http://tinyurl.com/api-create.php?url=http://bioguid.info/services/evoldir/get.php?id=' . $id; $tiny = get($url); $status = $hdrs['Subject'] . ' ' . $tiny; echo $status . "\n"; // Send message to twitter if ($config['oauth']) {