$data = base64_decode($data); $file = uniqid(''); mkdirs(ONEZ_ROOT . './onezdata/pic'); writeover(ONEZ_ROOT . './onezdata/pic/' . $file, $data); $msg = '[P/����.jpg/' . $file . ']'; AddMsg_User($userid, "\n4\t1\t{$onezid}\t{$msg}"); break; case 'pub': if (!$ChannelId) { exit('Channel Error!'); } $ti = Char_Cv('ti'); $co = Char_Cv('co'); $ti = oiconv('utf-8', 'gbk', $ti); $co = oiconv('utf-8', 'gbk', $co); $api = API_Pub($ti, $co); if (!$api) { WriteLog($api); echo '<font color=red>�����Ч</font>'; } else { list($tid, $url) = $api; if (!is_numeric($tid)) { echo '<font color=red>����ʧ��</font>'; } else { $msg = '<span class="url" onclick="top.OpenUserDialog(\'' . $userid . '\')">' . $username . '</span> �����������ӣ�<a class="url" href="' . $url . '" target="_blank">' . $ti . '</a> [<span class="url" onclick="Re(' . $tid . ')">�ظ�</span>]'; AddMsg_Public("1\t0\t{$msg}", $ChannelId); echo 'Y'; } } break; case 're':
include_once "check.php"; $only = intval(Char_Cv('only', 'get')); $client = intval(Char_Cv('client', 'get')); $channelid = intval(Char_Cv('channel', 'get')); Channel($channelid); if ($Channel['allowguest'] == 0 && $userid == $guestname) { exit('<script>top.location.href="login.php?channel=' . $Channel['id'] . '";</script>'); } if ($Channel['maxusr'] != -1 && Online($channelid) >= $Channel['maxusr']) { API_Logout(); exit('<script>alert("本群人数已满"); if(top!==self)top.location.reload();</script>'); } $today = date('Ymd'); if ($Channel['forumid'] && $Channel['lastday'] != $today) { $api = API_Pub($bbsTitle, $bbsContent); list($tid, $url) = $api; $arr = array('lasttid' => $tid, 'lastday' => $today); if (!$db) { include_once ONEZ_ROOT . './include/db_mysql.class.php'; db_local(); $db = new onez_db(); } $db->reset(); $db->update("channel", $arr, "id='{$Channel['id']}'"); if ($Conn) { $Conn->reset(); } @unlink('onezdata/cache/channel/' . $Channel['id'] . '.php'); } if ($Channel['username'] == $username) {