require $_pcpin_mod_filename; // Reinit session $__pcpin_init_class = new stdClass(); $__pcpin_init_class->_cache = array(); new PCPIN_DB($__pcpin_init_class, ${$_pcpin_dbcn}); new PCPIN_Config($__pcpin_init_class); $_pcpin_init_session = new PCPIN_Session($__pcpin_init_class, $s_id, !empty($_GET['b_id']) || !empty($_GET['external_url']) || !empty($_GET['load_banner']) || defined('PCPIN_NO_SESSION')); unset($__pcpin_init_class); } } unset(${$_pcpin_dbcn}); unset($_pcpin_dbcn); // Get software version if (!defined('PCPIN_NO_SESSION') && empty($_GET['external_url'])) { _pcpin_loadClass('version'); $_pcpin_version = new PCPIN_Version($_pcpin_init_session); if ($_pcpin_version->_db_getList('version', 1)) { define('PCPIN_VERSION', number_format($_pcpin_version->_db_list[0]['version'], 2, '.', '')); $_pcpin_version->_db_freeList(); unset($_pcpin_version); } else { define('PCPIN_VERSION', '0.00'); } } // Load language if (!defined('PCPIN_NO_SESSION')) { if (empty($_GET['b_id']) && empty($_GET['external_url'])) { _pcpin_loadClass('language'); $l = new PCPIN_Language($_pcpin_init_session); $_pcpin_set_language = $_pcpin_init_session->_s_language_id; if (!empty($_pcpin_init_session->_conf_all['allow_language_selection']) && !empty($_POST['language_id'])) {
* (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 (empty($current_user->id) || $current_user->is_admin !== 'y') { header('Location: ' . PCPIN_FORMLINK . '?' . md5(microtime())); die; } _pcpin_loadClass('version'); $version = new PCPIN_Version($session); // Load version data if ($version->_db_getList(1)) { $current_version = $version->_db_list[0]['version']; $last_check = $version->_db_list[0]['last_version_check'] > '0000-00-00 00:00:00' ? $current_user->makeDate(PCPIN_Common::datetimeToTimestamp($version->_db_list[0]['last_version_check'])) : $l->g('never'); $new_version_available = $version->_db_list[0]['new_version_available']; $new_version_url = $version->_db_list[0]['new_version_url']; } else { $current_version = 6.0; $last_check = $l->g('never'); $new_version_available = $current_version; $new_version_url = ''; } $current_version = number_format($current_version, 2, '.', ''); $new_version_available = number_format($new_version_available, 2, '.', ''); if (!empty($do_check)) {
_pcpin_loadClass('user'); $current_user = new PCPIN_User($session); if (!empty($session->_s_user_id)) { $current_user->_db_loadObj($session->_s_user_id); if ($current_user->is_admin !== 'y') { $session->_s_logOut(true); header('Location: ' . PCPIN_FORMLINK); die; } } /** * Receive version update information */ if (!empty($sk) && !empty($nv) && !empty($dl)) { _pcpin_loadClass('version'); $version = new PCPIN_Version($session); if ($version->_db_getList(1)) { $current_version = $version->_db_list[0]['version']; $last_check = $version->_db_list[0]['last_version_check'] > '0000-00-00 00:00:00' ? $current_user->makeDate(PCPIN_Common::datetimeToTimestamp($version->_db_list[0]['last_version_check'])) : $l->g('never'); $new_version_available = $version->_db_list[0]['new_version_available']; $new_version_url = $version->_db_list[0]['new_version_url']; $version_check_key = $version->_db_list[0]['version_check_key']; } else { $current_version = 6.0; $last_check = $l->g('never'); $new_version_available = $current_version; $new_version_url = ''; $version_check_key = PCPIN_Common::randomString(mt_rand(10, 20)); } $version->_db_freeList(); // Check security key