function explodeinfo($info, $item) { if (!is_array($item)) { $item = explodeopts($item); } $ln = explode("\n", preg_replace('/\\r/', '', $info)); $n = 0; $result = array(); while ($a = array_shift($ln)) { $lab = $item[$n]; if (preg_match("/^" . str_replace("/", '\\/', quotemeta($lab)) . ": (.*)\$/", $a, $m)) { $v = isset($m[1]) ? $m[1] : ""; if ($m[1] == "\\") { $v = ""; $x = "/^" . (isset($item[$n + 1]) ? quotemeta($item[$n + 1]) : "\n") . ": /"; while (count($ln) && !preg_match($x, $ln[0])) { $a = array_shift($ln); $v .= $v ? "\n{$a}" : $a; } } $result[$lab] = "{$v}"; } else { global $xoopsConfig; if (isset($xoopsConfig['debug']) && $xoopsConfig['debug']) { echo "<span class='error'>" . $item[$n] . ",{$a}</span>"; } break; } $n++; } return $result; }
$result = $xoopsDB->query('SELECT ' . $fields . ' FROM ' . EGTBL . ' e LEFT JOIN ' . OPTBL . ' o ON e.eid=o.eid LEFT JOIN ' . CATBL . ' ON topicid=catid LEFT JOIN ' . EXTBL . " x ON e.eid=eidref WHERE {$cond} ORDER BY edate"); if (isset($_GET['line'])) { $max_rows = intval($_GET['line']); $max_sect = max(1, intval(40 / $max_rows)); } elseif ($xoopsDB->getRowsNum($result) == 1) { // only one page $max_sect = 1; $max_rows = eguide_form_options('excel_max_rows', 0); // max line output } else { // multiple sections $max_sect = eguide_form_options('excel_multi_sections', 5); $max_rows = eguide_form_options('excel_multi_rows', 8); } $sheets = array(); $items = explodeopts($optfield); $outs = array(); if ($xoopsModuleConfig['export_field']) { $temp = $items; array_unshift($temp, _MD_ORDER_DATE, _MD_EMAIL, _MD_RVID, _MD_UNAME); $exports = preg_split('/\\s*,\\s*/', $xoopsModuleConfig['export_field']); foreach ($exports as $k) { if ($k == '*') { // left all foreach ($temp as $v) { if (!isset($outs[$v])) { $outs[$v] = true; } } break; } elseif (preg_match('/^\\d+$/', $k)) {
include XOOPS_ROOT_PATH . "/header.php"; assign_module_css(); if (count($extents) > 1) { $xoopsTpl->assign('extents', $extents); } $xoopsTpl->assign(array('title' => $title, 'eid' => $eid, 'exid' => $exid)); $paths = array(); $paths[$title] = "event.php?eid={$eid}" . ($exid ? "&sub={$exid}" : ""); $paths[_MD_RESERV_ADMIN] = "receipt.php?eid={$eid}" . ($exid ? "&sub={$exid}" : ""); set_eguide_breadcrumbs($head['topicid'], $paths); $evurl = EGUIDE_URL . "/event.php?eid={$eid}" . ($exid ? "&sub={$exid}" : ""); switch ($op) { case 'active': $result = $xoopsDB->query('SELECT optfield FROM ' . OPTBL . ' WHERE eid=' . $eid); list($optfield) = $xoopsDB->fetchRow($result); $labs = explodeopts($optfield); $isnum = in_array($nlab, $labs); $cnt = 0; echo "<p><a href='{$evurl}' class='evhead'>{$title}</a></p>\n"; foreach ($_POST['act'] as $i) { $rvid = intval($i); $yesno = param('yesno'); $result = $xoopsDB->query("SELECT * FROM " . RVTBL . " WHERE rvid={$rvid} AND status=" . _RVSTAT_ORDER); $data = $xoopsDB->fetchArray($result); if ($data) { $msg = param('msg', ''); $xoopsMailer =& getMailer(); $xoopsMailer->useMail(); $xoopsMailer->setSubject("Re: " . $title); $xoopsMailer->setBody($msg); $xoopsMailer->setFromEmail($poster->email());