This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ define('IN_APP', true); require_once('./interfase/common.php'); require_once(ROOT . 'interfase/chat.php'); $keepalive = true; $user->init(); $chat = new _chat(); if ($chat->_setup()) { $mode = request_var('mode', ''); $csid = request_var('csid', ''); $s_process = in_array($mode, array('logout', 'send', 'get')); if (request_method() == 'post' && !$s_process) { redirect(s_link('chat', $chat->data['ch_int_name'])); } if (!$user->data['is_member']) { do_login('LOGIN_TO_CHAT'); }
'ch_ip' => $user->ip, 'ch_locked' => 0 ); sql_insert('chat_ch', $insert_data); redirect(s_link('chat', $ch_int_name)); } else { $template_vars += array( 'CH_NAME' => $ch_name, 'CH_DESC' => $ch_desc ); } } // IF $submit if ($user->data['is_founder']) { $chat = new _chat(); if ($cat = $chat->get_cats()) { $cat_list = ''; foreach ($cat as $cat_data) { $cat_list .= '<option value="' . $cat_data['cat_id'] . '"' . (($cat_data['cat_id'] == $ch_cat) ? ' selected' : '') . '>' . $cat_data['cat_name'] . '</option>'; } _style('select_cat', array( 'CHAT_SELECT_CAT' => $cat_list) ); } // IF $cat $type_ary = w('CHAT_CH_OFFICIAL CHAT_CH_ALL'); $type_list = ''; foreach ($type_ary as $i => $langkey) {