* @param boolean $pref_message_color Optional. Current message color */ _pcpin_loadClass('message'); $msg = new PCPIN_Message($session); _pcpin_loadClass('category'); $category = new PCPIN_Category($session); _pcpin_loadClass('nickname'); $nickname = new PCPIN_Nickname($session); _pcpin_loadClass('room'); $room = new PCPIN_Room($session); _pcpin_loadClass('invitation'); $invitation = new PCPIN_Invitation($session); _pcpin_loadClass('avatar'); $avatar = new PCPIN_Avatar($session); _pcpin_loadClass('badword'); $badword = new PCPIN_Badword($session); _pcpin_loadClass('banner'); $banner = new PCPIN_Banner($session); $default_nicknames = array(); // cached nicknames $last_sent_message_time = $session->_s_last_sent_message_time <= '0000-00-00 00:00:00' ? 0 : PCPIN_Common::datetimeToTimestamp($session->_s_last_sent_message_time); $last_sent_message_hash = $session->_s_last_sent_message_hash; $last_sent_message_repeats_count = $session->_s_last_sent_message_repeats_count; $last_message_id = $session->_s_last_message_id; if (!isset($room_id) || !is_scalar($room_id)) { $room_id = 0; } if (!empty($first_request)) { $full_request = 1; } $xml_data = array();
* (at your option) any later version. * * "PCPIN Chat 6" 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/>. */ _pcpin_loadClass('nickname'); $nickname = new PCPIN_Nickname($session); _pcpin_loadClass('message'); $msg = new PCPIN_Message($session); _pcpin_loadClass('badword'); $badword = new PCPIN_Badword($session); _pcpin_loadClass('disallowed_name'); $disallowed_name = new PCPIN_Disallowed_Name($session); $nicknames_xml = array(); $new_nickname_id = 0; if (empty($profile_user_id) || $profile_user_id != $current_user->id && $current_user->is_admin !== 'y') { $profile_user_id = $current_user->id; } if (!isset($nickname_id) || !is_scalar($nickname_id)) { $nickname_id = 0; } if (!isset($new_nickname) || !is_scalar($new_nickname)) { $new_nickname = ''; } if (!empty($nickname_id) && !$nickname->_db_getList('id', 'id = ' . $nickname_id, 'user_id = ' . $profile_user_id, 1)) { // Nickname does not exists or not belongs to user
* * "PCPIN Chat 6" is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * "PCPIN Chat 6" 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/>. */ _pcpin_loadClass('badword'); $badword = new PCPIN_Badword($session); $errortext = array(); if (!isset($word)) { $word = ''; } if (!isset($replacement)) { $replacement = ''; } if (!empty($current_user->id) && $current_user->is_admin === 'y') { if ($word == '') { $errortext[] = $l->g('word_empty_error'); } if ($badword->_db_getList('word = ' . $word, 1)) { $errortext[] = str_replace('[WORD]', $word, $l->g('word_already_exists_error')); $badword->_db_freeList(); }
* * "PCPIN Chat 6" is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * "PCPIN Chat 6" 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/>. */ _pcpin_loadClass('badword'); $badword = new PCPIN_Badword($session); if (!isset($word_id)) { $word_id = 0; } if (!empty($current_user->id) && $current_user->is_admin === 'y') { if (!empty($word_id)) { // Delete word if ($badword->deleteWord($word_id)) { $xmlwriter->setHeaderStatus(0); $xmlwriter->setHeaderMessage($l->g('word_deleted')); } else { $xmlwriter->setHeaderStatus(1); $xmlwriter->setHeaderMessage($l->g('error')); } } }
* "PCPIN Chat 6" is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * "PCPIN Chat 6" 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/>. */ if ($session->_conf_all['allow_user_registration']) { _pcpin_loadClass('badword'); $badword = new PCPIN_Badword($session); _pcpin_loadClass('disallowed_name'); $disallowed_name = new PCPIN_Disallowed_Name($session); if (!isset($login) || !is_scalar($login)) { $login = ''; } if (!isset($password) || !is_scalar($password)) { $password = ''; } if (!isset($email) || !is_scalar($email)) { $email = ''; } if (!isset($language_id) || !is_scalar($language_id)) { $language_id = $l->id; } // Load language
<?php /** * This file is part of "PCPIN Chat 6". * * "PCPIN Chat 6" is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * "PCPIN Chat 6" 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/>. */ /** * Get word blacklist */ _pcpin_loadClass('badword'); $badword = new PCPIN_Badword($session); $words = array(); if (is_object($session) && !empty($current_user->id)) { $xmlwriter->setHeaderMessage('OK'); $xmlwriter->setHeaderStatus(0); $words = $badword->getWords(); } $xmlwriter->setData(array('word' => $words));