function sendmsg_notice($msgid, $act) { global $_G; if (in_array($act, array('brand_pass', 'brand_pending', 'brand_refuse', 'brand_adminpass'))) { $bids = array(); if (!is_array($bid)) { $bids[] = $bid; } else { $bids = $bid; } foreach ($bids as $value) { $row = C::t('#sanree_brand#sanree_brand_businesses')->fetch_first_bybid($value); if ($row) { $welcomformat = srlang($act); $user1txt = '<a href="home.php?mod=space&uid=' . $row['uid'] . '">' . $row['username'] . '</a>'; $nametxt = '<a href="forum.php?mod=viewthread&tid=' . $row['tid'] . '">' . addslashes($row['name']) . '</a>'; $adminnametxt = '<a href="home.php?mod=space&uid=' . $_G['uid'] . '">' . $_G['username'] . '</a>'; $timetxt = dgmdate(TIMESTAMP); $welcomemsgtxt = str_replace('{user}', $user1txt, $welcomformat); $welcomemsgtxt = str_replace('{brand}', $nametxt, $welcomemsgtxt); $welcomemsgtxt = str_replace('{time}', $timetxt, $welcomemsgtxt); $welcomemsgtxt = str_replace('{price}', $row['regprice'], $welcomemsgtxt); $welcomemsgtxt = str_replace('{unit}', $row['creditunitname'], $welcomemsgtxt); $welcomemsgtxt = str_replace('{adminuser}', $adminnametxt, $welcomemsgtxt); $welcomemsgtxt = str_replace('{reason}', $row['reason'], $welcomemsgtxt); $welcomemsgtxt = nl2br(str_replace(':', ':', $welcomemsgtxt)); @notification_addex($row['uid'], 'system', $welcomemsgtxt, array(), 1); } } } }
showsubmenu($menustr); showformheader($thisurl . "&do=" . $do . "&msgid=" . $msgid . "&page=" . $page . '&control=' . $control . '&type=' . $_G['sr_type'], 'enctype'); showtableheader('', 'nobottom'); showsubtitle(array($langs['error_brand'] . $result['brandname'])); showsubtitle(array($langs['error_subject'] . $result['words'])); showsetting($langs['yichuli'], 'status', $result['status'], 'radio'); showsetting($langs['error_result'], 'refuse', $result['refuse'], 'textarea'); showsubmit('passsubmit', $langs['pass'], '', '<input onclick="javascript:history.back()" class="btn" type="button" value="' . $langs['back'] . '">'); showtablefooter(); showformfooter(); } } elseif ($control == 'refuse') { if (submitcheck('refusesubmit')) { C::t('#sanree_brand#sanree_brand_msg')->update($msgid, array('refuse' => dhtmlspecialchars(trim($_G['sr_refuse'])), 'status' => intval(dhtmlspecialchars(trim($_G['sr_status']))), 'opdate' => TIMESTAMP)); $welcomemsgtxt = $langs['renlingjujue'] . dhtmlspecialchars(trim($_G['sr_refuse'])); @notification_addex($result['uid'], 'system', $welcomemsgtxt, array(), 1); cpmsg($langs['succeed'], $gotourl . 'msg&type=' . $type . '&page=' . $_G['sr_page'], 'succeed'); } else { showsubmenu($menustr); showformheader($thisurl . "&do=" . $do . "&msgid=" . $msgid . "&page=" . $page . '&control=' . $control . '&type=' . $_G['sr_type'], 'enctype'); showtableheader('', 'nobottom'); showsubtitle(array($langs['error_brand'] . $result['brandname'])); showsubtitle(array($langs['error_subject'] . $result['words'])); showsetting($langs['yichuli'], 'status', $result['status'], 'radio'); showsetting($langs['refusereason'], 'refuse', $result['refuse'], 'textarea'); showsubmit('refusesubmit', $langs['refuse'], '', '<input onclick="javascript:history.back()" class="btn" type="button" value="' . $langs['back'] . '">'); showtablefooter(); showformfooter(); } } } elseif ($do == 'list') {