function ajax_js_help_get_help($opt_name, $tools) { $str = $tools->get_hm_strings(); $opt_name2 = $tools->display_safe($opt_name); $opt_name3 = $tools->display_safe(decode_unicode_url($opt_name), 'UTF-8'); $opt_name4 = decode_unicode_url($opt_name); $trans = array_keys($tools->str); $res = ''; foreach ($trans as $i) { if (strstr($i, 'plugin')) { continue; } $v = $str[$i]; if (matches($opt_name, $v) || matches($opt_name2, $v) || matches($opt_name3, $v)) { $res = sprintf($tools->str[$i], '<b>' . $v . '</b>'); break; } } if (!$res) { $str_list = array(); $plugin_vals = $tools->get_from_global_store('help_strings'); foreach ($plugin_vals as $plugin => $vals) { if (isset($tools->str[$plugin . '_plugin'])) { foreach ($vals as $i => $v) { if (matches($opt_name, $v) || matches($opt_name2, $v) || matches($opt_name3, $v) || matches($opt_name4, $v)) { if (isset($tools->str[$plugin . '_plugin'][$i])) { $res = sprintf($tools->str[$plugin . '_plugin'][$i], '<b>' . $v . '</b>'); } } } } } if (!$res) { $res = 'Could not find that setting!'; } } return $res; }
} echo "<BODY marginwidth=0 leftmargin=0 border=0 onload='doOnload();' background=assets/bg.gif>"; #echo '<DIV id="Migoicons" style="visibility:hidden;position:absolute;z-index:1000;top:-100"></DIV><SCRIPT language="JavaScript1.2" type="text/javascript">var TipId="Migoicons";var FiltersEnabled = 1;mig_clay();'; echo '<DIV id="Migoicons" style="visibility:hidden;position:absolute;z-index:1000;top:-100"></DIV>'; echo "<TABLE width=100% height=100% border=0 cellpadding=0 align=center><TR><TD valign=top align=center>"; } if ($_REQUEST['modname']) { if ($_REQUEST['_CENTRE_PDF'] == 'true') { ob_start(); } if (strpos($_REQUEST['modname'], '?') !== false) { $vars = substr($_REQUEST['modname'], strpos($_REQUEST['modname'], '?') + 1); $modname = substr($_REQUEST['modname'], 0, strpos($_REQUEST['modname'], '?')); $vars = explode('?', $vars); foreach ($vars as $code) { $code = decode_unicode_url("\$_REQUEST['" . str_replace('=', "']='", $code) . "';"); eval($code); } } else { $modname = $_REQUEST['modname']; } if ($_REQUEST['LO_save'] != '1' && !isset($_REQUEST['_CENTRE_PDF']) && (strpos($modname, 'misc/') === false || $modname == 'misc/Registration.php' || $modname == 'misc/Export.php' || $modname == 'misc/Portal.php')) { $_SESSION['_REQUEST_vars'] = $_REQUEST; } $allowed = false; include 'Menu.php'; foreach ($_CENTRE['Menu'] as $modcat => $programs) { if ($_REQUEST['modname'] == $modcat . '/Search.php') { $allowed = true; break; }
function POSTSTR($key){ $val=decode_unicode_url($_POST[$key]); return noapos($val); }
function ajax_save_outgoing_message($subject, $body, $to, $cc, $from, $id, $reply_to, $refs, $priortiy, $mdn, $c_session, $content_type) { global $user; global $hastymail_version; global $imap; global $conf; global $include_path; global $fd; global $message; if ($user->user_action->gpc) { $to = stripslashes($to); $cc = stripslashes($cc); $from = stripslashes($from); $body = stripslashes($body); $subject = stripslashes($subject); } $path = $conf['attachments_path']; if ($user->logged_in) { $select_res = false; $_SESSION['compose_sessions'][$c_session] = time(); if (trim($body)) { if (isset($_SESSION['user_settings']['draft_folder'])) { $mailbox = $_SESSION['user_settings']['draft_folder']; $select_res = $imap->select_mailbox($mailbox, false, false, true); } else { $mailbox = 'INBOX'; } require_once $include_path . 'lib' . $fd . 'smtp_class.php'; $message = hm_new('mime', $c_session); if ($to) { $message->to = $to; } if ($cc) { $message->cc = $cc; } if ($refs) { $message->references = $refs; } if ($reply_to) { $message->in_reply_to = $reply_to; } if ($id) { $message->message_id = $id; } if (isset($_SESSION['user_settings']['profiles'][$from])) { $from_atts = $_SESSION['user_settings']['profiles'][$from]; $message->from = '"' . $from_atts['profile_name'] . '" <' . $from_atts['profile_address'] . '> '; $message->from_address = $from_atts['profile_address']; if (isset($from_atts['profile_reply_to']) && $from_atts['profile_reply_to']) { $message->reply_to = '<' . $from_atts['profile_address'] . '>'; } } $existing_id = false; if ($select_res) { $search_res = $imap->simple_search('header message-id', false, $message->message_id); if (isset($search_res[0])) { $existing_id = $search_res[0]; } } if ($message->from_address) { $message->subject = decode_unicode_url($subject); $message->body = decode_unicode_url($body); if (!isset($_SESSION['user_settings']['compose_hide_mailer']) || !$_SESSION['user_settings']['compose_hide_mailer']) { $message->set_header('x_Mailer', $hastymail_version); } if ($priortiy && $priortiy != 3) { $message->set_header('x_Priority', $priortiy); } if ($mdn) { $message->set_header('disposition_Notification_To', $message->from_address); } do_work_hook('message_save', array($message->body)); $status = stream_imap_append($message, $c_session, $mailbox); if ($status && $existing_id) { $imap->message_action(array($existing_id), 'DELETE'); $imap->message_action(array($existing_id), 'EXPUNGE'); $_SESSION['uid_cache_refresh'][$mailbox] = 1; $_SESSION['header_cache_refresh'][$mailbox] = 1; } } } } if (isset($message->message_id)) { return $message->message_id; } else { return ''; } }
function ajax_utf8_decode($string) { return decode_unicode_url($string); }