Posted 6 августа, 201311 yr comment_38709 Добрый день. Когда я выдаю предупреждение указываю количество баллов а потом нажимаю предупредить у меня выходит вот это netwars.uz ошибка базы данных Возникла ошибка при работе с базой данных. К сожалению, на данный момент из-за технических проблем с базой данных, форум не может обработать ваш запрос. О проблеме уже сообщено администрации форума. Приносим свои извинения за причиненные неудобства. Вы можете попробовать обновить страницу нажав сюда и так у всех пользователей, помогите пожалуйста в чем проблема не могу понять
6 августа, 201311 yr comment_38711 исходя из вашей манеры отвечать и оффтопить на данном ресурсе () могу сказать, что здесь не сообщество гадалок и экстрасенсов, подобными способностями никто не обладает, шанс на похожие проблемы не велик и без логов ошибок и подробного описания установленных хуков/компонентов до появления ошибки возможно никто не сможет помочь. Edited 6 августа, 201311 yr by Lordbl4
6 августа, 201311 yr Author comment_38723 Sorry, вот ошибки SQL Date: Tue, 06 Aug 2013 20:45:45 +0000 Error: 1146 - Table 'newforum.members_warn_actions' doesn't exist IP Address: 213.230.94.224 - /forum/index.php?app=members&module=profile§ion=warnings&do=save&member=3404 ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- mySQL query error: SELECT * FROM members_warn_actions WHERE wa_points<=0 ORDER BY wa_points DESC .--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------. | File | Function | Line No. | |----------------------------------------------------------------------------+-------------------------------------------------------------------------------+-------------------| | D:Dedicated_Serverxampphtdocsforumadminapplicationsmembersmodules_publicprofilewarnings.php| [public_members_profile_warnings].save | 166 | '----------------------------------------------------------------------------+-------------------------------------------------------------------------------+-------------------' | D:Dedicated_ServerxampphtdocsforumadminsourcesbaseipsController.php| [public_members_profile_warnings].doExecute | 306 | Вот внутренность warnings.php <?php /** * <pre> * Invision Power Services * IP.Board v3.3.1 * Warnings Management * Last Updated: $Date: 2012-04-10 05:51:42 -0400 (Tue, 10 Apr 2012) $ * </pre> * * @author $Author: ips_terabyte $ (Original: Mark) * @copyright © 2001 - 2009 Invision Power Services, Inc. * @license __www.invisionpower.com/community/board/license.html * @package IP.Board * @subpackage Members * @link __www.invisionpower.com * @since 9th November 2011 * @version $Revision: 10582 $ * */ if ( ! defined( 'IN_IPB' ) ) { print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files."; exit(); } class public_members_profile_warnings extends ipsCommand { /** * Can the member warn other users? * * @var $canWarn */ public $canWarn = false; /** * Class entry point * * @param object Registry reference * @return @e void [Outputs to screen] */ public function doExecute( ipsRegistry $registry ) { //----------------------------------------- // Init //----------------------------------------- /* Do we even have warnings enabled? */ if ( !$this->settings['warn_on'] ) { $this->registry->output->showError( 'no_permission', 10260, null, null, 403 ); } /* Load the member */ $memberId = intval( $this->request['member'] ); $this->_member = IPSMember::load( $memberId ); if ( !$this->_member['member_id'] ) { $this->_member = $this->memberData; } /* Is this user protected? */ if ( $this->settings['warn_protected'] ) { if ( IPSMember::isInGroup( $this->_member, explode( ',', $this->settings['warn_protected'] ) ) ) { $this->registry->output->showError( 'warn_protected_member', 10265, null, null, 403 ); } } /* Can we view? */ $pass = FALSE; $this->canWarn = FALSE; $modType = NULL; if( $this->memberData['member_id'] ) { if( $this->memberData['g_is_supmod'] ) { $pass = TRUE; $this->canWarn = TRUE; $modType = 'warn_gmod_day'; } elseif( $this->memberData['is_mod'] ) { $other_mgroups = array(); $_other_mgroups = IPSText::cleanPermString( $this->memberData['mgroup_others'] ); if( $_other_mgroups ) { $other_mgroups = explode( ",", $_other_mgroups ); } $other_mgroups[] = $this->memberData['member_group_id']; $this->DB->build( array( 'select' => '*', 'from' => 'moderators', 'where' => "(member_id='" . $this->memberData['member_id'] . "' OR (is_group=1 AND group_id IN(" . implode( ",", $other_mgroups ) . ")))" ) ); $this->DB->execute(); while ( $this->moderator = $this->DB->fetch() ) { if ( $this->moderator['allow_warn'] ) { $pass = TRUE; $this->canWarn = TRUE; $modType = 'warn_mod_day'; break; } } } if( ! $pass && $this->memberData['member_id'] == $this->_member['member_id'] ) { if ( $this->settings['warn_show_own'] || $this->canWarn || in_array( $this->request['do'], array( 'acknowledge', 'do_acknowledge' ) ) ) { $pass = TRUE; } } } if ( !$pass ) { $this->registry->output->showError( 'no_permission', 10262, null, null, 403 ); } /* Are we limited per day? */ if ( $this->canWarn and !$this->memberData['g_access_cp'] and $this->settings[ $modType ] != -1 ) { $count = $this->DB->buildAndFetch( array( 'select' => 'count(*) as dracula', 'from' => 'members_warn_logs', 'where' => "wl_moderator={$this->memberData['member_id']} AND wl_member={$this->_member['member_id']} AND wl_date>" . ( time() - 86400 ) ) ); if ( $count['dracula'] >= $this->settings[ $modType ] ) { $this->canWarn = FALSE; } } /* Load reasons */ $this->reasons = array(); $this->DB->build( array( 'select' => '*', 'from' => 'members_warn_reasons', 'order' => 'wr_order' ) ); $this->DB->execute(); while ( $row = $this->DB->fetch() ) { $this->reasons[ $row['wr_id'] ] = $row; } /* Output init */ $this->registry->class_localization->loadLanguageFile( array( 'public_profile' ), 'members' ); $this->registry->output->addNavigation( "{$this->lang->words['page_title_pp']}: {$this->_member['members_display_name']}", "showuser={$this->_member['member_id']}", $this->_member['members_seo_name'], 'showuser' ); $this->registry->output->addNavigation( $this->lang->words['warnings'], "app=members&module=profile§ion=warnings&member={$this->_member['member_id']}" ); //----------------------------------------- // What are we doing? //----------------------------------------- switch ( $this->request['do'] ) { case 'add': $this->form(); break; case 'save': $this->save(); break; case 'acknowledge': $this->acknowledge(); break; case 'do_acknowledge': $this->doAcknowledge(); break; default: $this->viewWarnings(); break; } //----------------------------------------- // Output //----------------------------------------- $this->registry->output->sendOutput(); } /** * Action: View Warnings */ public function viewWarnings() { $warnings = array(); /* Get the count */ $count = $this->DB->buildAndFetch( array( 'select' => 'count(*) as dracula', 'from' => 'members_warn_logs', 'where' => "wl_member={$this->_member['member_id']}" ) ); /* Sort out pagination */ $st = intval($this->request['st']) >=0 ? intval($this->request['st']) : 0; $pagination = $this->registry->output->generatePagination( array( 'totalItems' => $count['dracula'], 'itemsPerPage' => 25, 'currentStartValue' => $st, 'baseUrl' => "app=members&module=profile&section=warnings&member={$this->_member['member_id']}&from_app={$this->request['from_app']}&from_id1={$this->request['from_id1']}&from_id2={$this->request['from_id2']}", 'seoTemplate' => '', 'seoTitle' => '', ) ); /* Fetch 'em */ $this->DB->build( array( 'select' => '*', 'from' => 'members_warn_logs', 'where' => "wl_member={$this->_member['member_id']}", 'order' => 'wl_date DESC' ) ); $e = $this->DB->execute(); while ( $row = $this->DB->fetch( $e ) ) { $row['wl_moderator'] = IPSMember::load( $row['wl_moderator'] ); $warnings[ $row['wl_id'] ] = $row; } /* Display */ $this->registry->output->addContent( $this->registry->output->getTemplate('profile')->listWarnings( $this->_member, $warnings, $pagination, $this->reasons, $this->canWarn ) ); $this->registry->output->setTitle( sprintf( $this->lang->words['warnings_member'], $this->_member['members_display_name'] ) ); } /** * Show Form: Warning */ public function form( $errors=array() ) { //----------------------------------------- // Permission Check //----------------------------------------- if ( !$this->canWarn ) { $this->registry->output->showError( 'no_permission', 10263, null, null, 403 ); } //----------------------------------------- // Work out current punishments //----------------------------------------- $currentPunishments = array(); foreach ( array( 'mq' => 'mod_posts', 'rpa' => 'restrict_post', 'suspend' => 'temp_ban' ) as $k => $mk ) { if ( $this->_member[ $mk ] ) { if ( $this->_member[ $mk ] == 1 ) { $currentPunishments[ $k ] = sprintf( $this->lang->words['warnings_already_'.$k.'_perm'], $this->_member['members_display_name'] ); } else { $_processed = IPSMember::processBanEntry( $this->_member[ $mk ] ); $currentPunishments[ $k ] = sprintf( $this->lang->words['warnings_already_'.$k.'_time'], $this->_member['members_display_name'], $this->lang->getDate( $_processed['date_end'], 'SHORT' ) ); } } } //----------------------------------------- // Editor //----------------------------------------- $editor = array(); $classToLoad = IPSLib::loadLibrary( IPS_ROOT_PATH . 'sources/classes/editor/composite.php', 'classes_editor_composite' ); $editor['member'] = new $classToLoad(); if( $this->request['note_member'] ) { $editor['member']->setContent( $editor['member']->process( $_POST['note_member'] ) ); } $editor['member'] = $editor['member']->show( 'note_member', array( 'autoSaveKey' => "warn-member", 'type' => 'mini', 'minimize' => TRUE ) ); $editor['mod'] = new $classToLoad(); if( $this->request['note_mods'] ) { $editor['mod']->setContent( $editor['mod']->process( $_POST['note_mods'] ) ); } $editor['mod'] = $editor['mod']->show( 'note_mods', array( 'autoSaveKey' => "warn-mod", 'type' => 'mini', 'minimize' => TRUE ) ); //----------------------------------------- // Display //----------------------------------------- $this->registry->output->addContent( $this->registry->output->getTemplate('profile')->addWarning( $this->_member, $this->reasons, $errors, $editor, $currentPunishments ) ); $this->registry->output->setTitle( sprintf( $this->lang->words['warnings_member_add'], $this->_member['members_display_name'] ) ); } /** * Action: Issue Warning */ public function save() { //----------------------------------------- // Init //----------------------------------------- $points = 0; $mq = 0; $mq_unit = 'd'; $rpa = 0; $rpa_unit = 'd'; $suspend = 0; $suspend_unit = 'd'; $banGroup = 0; $removePoints = 0; $removePointsUnit = 'd'; //----------------------------------------- // Validate //----------------------------------------- $errors = array(); if ( $this->request['reason'] === '' ) { /* No reason selected */ $errors['reason'] = $this->lang->words['warnings_err_reason']; } else { $reason = intval( $this->request['reason'] ); /* "Other" reason selected */ if ( !$reason ) { /* Check we're actually allowed to use it */ if ( !$this->memberData['g_access_cp'] and !$this->settings['warnings_enable_other'] ) { /* Nope */ $errors['reason'] = $this->lang->words['warnings_err_reason']; } else { /* If we select "Other", we determine the number of points and when they expire */ $points = floatval( $this->request['points'] ); $removePoints = intval( $this->request['remove'] ); $removePointsUnit = $this->request['remove_unit'] == 'h' ? 'h' : 'd'; } } /* Defined reason selected */ else { $reason = $this->reasons[ $reason ]; /* Check it's valid */ if ( !$reason['wr_id'] ) { /* Nope */ $errors['reason'] = $this->lang->words['warnings_err_reason']; } else { /* Can we override the number of points for this reason? */ if ( $this->memberData['g_access_cp'] or $reason['wr_points_override'] ) { // Yes, get value from input $points = floatval( $this->request['points'] ); } else { // No, take whatever the reason has set $points = $reason['wr_points']; } /* Can we override when the points expire? */ if ( $this->memberData['g_access_cp'] or $reason['wr_remove_override'] ) { // Yes, get value from input $removePoints = intval( $this->request['remove'] ); $removePointsUnit = $this->request['remove_unit'] == 'h' ? 'h' : 'd'; } else { // No, take whatever the reason has set $removePoints = intval( $reason['wr_remove'] ); $removePointsUnit = $reason['wr_remove_unit']; } } $reason = $reason['wr_id']; } /* Now let's get the action */ $newPointLevel = floatval( $this->_member['warn_level'] + $points ); $action = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'members_warn_actions', 'where' => "wa_points<={$newPointLevel}", 'order' => 'wa_points DESC', 'limit' => 1 ) ); if ( $action ) { /* We have an action. Can we override it's punishment? */ if ( $action['wa_override'] ) { // Yes, get values from input $mq = $this->request['mq_perm'] ? -1 : intval( $this->request['mq'] ); $mq_unit = $this->request['mq_unit']; $rpa = $this->request['rpa_perm'] ? -1 : intval( $this->request['rpa'] ); $rpa_unit = $this->request['rpa_unit']; $suspend = $this->request['suspend_perm'] ? -1 : intval( $this->request['suspend'] ); $suspend_unit = $this->request['suspend_unit']; $banGroup = $this->request['ban_group'] ? intval( $this->request['ban_group_id'] ) : 0; } else { // No, do whatever the action says $mq = intval( $action['wa_mq'] ); $mq_unit = $action['wa_mq_unit']; $rpa = intval( $action['wa_rpa'] ); $rpa_unit = $action['wa_rpa_unit']; $suspend = intval( $action['wa_suspend'] ); $suspend_unit = $action['wa_suspend_unit']; $banGroup = intval( $action['wa_ban_group'] ); } } else { /* We don't have an action - are we allowed to give a custom punishment? */ if ( $this->memberData['g_access_cp'] or $this->settings['warning_custom_noaction'] ) { // Yes, get values from input $mq = $this->request['mq_perm'] ? -1 : intval( $this->request['mq'] ); $mq_unit = $this->request['mq_unit']; $rpa = $this->request['rpa_perm'] ? -1 : intval( $this->request['rpa'] ); $rpa_unit = $this->request['rpa_unit']; $suspend = $this->request['suspend_perm'] ? -1 : intval( $this->request['suspend'] ); $suspend_unit = $this->request['suspend_unit']; $banGroup = $this->request['ban_group'] ? intval( $this->request['ban_group_id'] ) : 0; } else { // We're not allowed to give a punishment so this is a verbal warning only. // The values we set earlier during init are fine } } } if ( !empty( $errors ) ) { return $this->form( $errors ); } //----------------------------------------- // Parse //----------------------------------------- $classToLoad = IPSLib::loadLibrary( IPS_ROOT_PATH . 'sources/classes/editor/composite.php', 'classes_editor_composite' ); $editor = new $classToLoad(); $noteForMember = $editor->process( $_POST['note_member'] ); $noteForMods = $editor->process( $_POST['note_mods'] ); //----------------------------------------- // Save Log //----------------------------------------- /* If our points are going to expire, woprk out exactly when */ $expireDate = 0; if ( $removePoints ) { IPSTime::setTimestamp( time() ); if ( $removePointsUnit == 'h' ) { IPSTime::add_hours( $removePoints ); } else { IPSTime::add_days( $removePoints ); } $expireDate = IPSTime::getTimestamp(); } /* Log */ $warning = array( 'wl_member' => $this->_member['member_id'], 'wl_moderator' => $this->memberData['member_id'], 'wl_date' => time(), 'wl_reason' => $reason, 'wl_points' => $points, 'wl_note_member' => $noteForMember, 'wl_note_mods' => $noteForMods, 'wl_mq' => $mq, 'wl_mq_unit' => $mq_unit, 'wl_rpa' => $rpa, 'wl_rpa_unit' => $rpa_unit, 'wl_suspend' => $suspend, 'wl_suspend_unit' => $suspend_unit, 'wl_ban_group' => $banGroup, 'wl_expire' => $removePoints, 'wl_expire_unit' => $removePointsUnit, 'wl_acknowledged' => ( $this->settings['warnings_acknowledge'] ? 0 : 1 ), 'wl_content_app' => trim( $this->request['from_app'] ), 'wl_content_id1' => $this->request['from_id1'], 'wl_content_id2' => $this->request['from_id2'], 'wl_expire_date' => $expireDate, ); $this->DB->insert( 'members_warn_logs', $warning ); $warning['wl_id'] = $this->DB->getInsertId(); //----------------------------------------- // Actually do it //----------------------------------------- $update = array(); /* Add Points */ if ( $points ) { $update['warn_level'] = $this->_member['warn_level'] + $points; } /* Set Punishments */ if ( $mq ) { $update['mod_posts'] = ( $mq == -1 ? 1 : IPSMember::processBanEntry( array( 'unit' => $mq_unit, 'timespan' => $mq ) ) ); } if ( $rpa ) { $update['restrict_post'] = ( $rpa == -1 ? 1 : IPSMember::processBanEntry( array( 'unit' => $rpa_unit, 'timespan' => $rpa ) ) ); } if ( $suspend ) { if ( $suspend == -1 ) { $update['member_banned'] = 1; } else { $update['temp_ban'] = IPSMember::processBanEntry( array( 'unit' => $suspend_unit, 'timespan' => $suspend ) ); } if ( $banGroup > 0 ) { $update['member_group_id'] = $banGroup; } } if ( $this->settings['warnings_acknowledge'] ) { $update['unacknowledged_warnings'] = 1; } /* Save */ if ( !empty( $update ) ) { IPSMember::save( $this->_member['member_id'], array( 'core' => $update ) ); } //----------------------------------------- // Work out where this warning came from //----------------------------------------- if ( $warning['wl_content_app'] and IPSLib::appIsInstalled( $warning['wl_content_app'] ) ) { $file = IPSLib::getAppDir( $warning['wl_content_app'] ) . '/extensions/warnings.php'; if ( is_file( $file ) ) { $classToLoad = IPSLib::loadLibrary( $file, 'warnings_' . $warning['wl_content_app'], $warning['wl_content_app'] ); if ( class_exists( $classToLoad ) and method_exists( $classToLoad, 'getContentUrl' ) ) { $object = new $classToLoad(); $content = $object->getContentUrl( $warning ); } } } //----------------------------------------- // Send notifications //----------------------------------------- /* Init */ $classToLoad = IPSLib::loadLibrary( IPS_ROOT_PATH . '/sources/classes/member/notifications.php', 'notifications' ); $notifyLibrary = new $classToLoad( $this->registry ); /* Send to member being warned */ if ( $this->settings['warnings_acknowledge'] OR $noteForMember ) { try { $notifyLibrary->setMember( $this->_member ); $notifyLibrary->setFrom( $this->memberData ); $notifyLibrary->setNotificationKey( 'warning' ); $notifyLibrary->setNotificationUrl( "app=members&module=profile§ion=warnings&member={$this->_member['member_id']}" ); $notifyLibrary->setNotificationTitle( sprintf( $this->lang->words['warnings_notify'], $this->registry->output->buildUrl( "app=members&module=profile§ion=warnings&member={$this->_member['member_id']}" ) ) ); $notifyLibrary->setNotificationText( sprintf( $this->lang->words['warnings_notify_text'], $this->_member['members_display_name'], $this->memberData['members_display_name'], $reason ? $this->reasons[ $reason ]['wr_name'] : $this->lang->words['warnings_reasons_other'], $noteForMember ? sprintf( $this->lang->words['warnings_notify_member_note'], $noteForMember ) : '', $this->settings['warn_show_own'] ? sprintf( $this->lang->words['warnings_notify_view_link'], $this->registry->output->buildUrl( "app=members&module=profile§ion=warnings&member={$this->_member['member_id']}" ) ) : '' ) ); $notifyLibrary->sendNotification(); } catch ( Exception $e ) {} } /* And all mods */ $mods = array(); $this->DB->build( array( 'select' => 'm.*', 'from' => array( 'members' => 'm' ), 'add_join' => array( array( 'select' => 'g.*', 'from' => array( 'groups' => 'g' ), 'where' => 'm.member_group_id=g.g_id', ), array( 'select' => 's.allow_warn', 'from' => array( 'moderators' => 's' ), 'where' => '( s.is_group=0 AND s.member_id=m.member_id ) OR ( s.is_group=1 AND s.group_id=m.member_group_id )', ), ), 'where' => 'g.g_is_supmod=1 OR s.allow_warn=1' ) ); $this->DB->execute(); while ( $row = $this->DB->fetch() ) { if ( $row['member_id'] == $this->memberData['member_id'] ) { continue; } $mods[ $row['member_id'] ] = $row; } $notifyLibrary = new $classToLoad( $this->registry ); $notifyLibrary->setMultipleRecipients( $mods ); $notifyLibrary->setFrom( $this->memberData ); $notifyLibrary->setNotificationKey( 'warning_mods' ); $notifyLibrary->setNotificationUrl( "app=members&module=profile§ion=warnings&member={$this->_member['member_id']}" ); $notifyLibrary->setNotificationTitle( sprintf( $this->lang->words['warnings_notify_mod'], $this->_member['members_display_name'], $this->registry->output->buildUrl( "app=members&module=profile§ion=warnings&member={$this->_member['member_id']}" ), $this->memberData['members_display_name'] ) ); $notifyLibrary->setNotificationText( sprintf( $this->lang->words['warnings_notify_text_mod'], $this->_member['members_display_name'], $this->memberData['members_display_name'], $this->registry->output->buildUrl( "app=members&module=profile§ion=warnings&member={$this->_member['member_id']}" ) ) ); $notifyLibrary->sendNotification(); //----------------------------------------- // Boink //----------------------------------------- if ( empty( $content['url'] ) ) { $this->registry->getClass('output')->redirectScreen( $this->lang->words['warnings_done'] , $this->settings['base_url'] . 'app=members&module=profile&section=warnings&member=' . $this->_member['member_id'] ); } else { $this->registry->getClass('output')->redirectScreen( $this->lang->words['warnings_done'] , $content['url'] ); } } /** * Show Form: Acknowledge */ public function acknowledge() { $id = intval( $this->request['id'] ); $warning = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'members_warn_logs', 'where' => "wl_id={$id}" ) ); if ( !$warning['wl_id'] or $warning['wl_member'] != $this->memberData['member_id'] ) { $this->registry->output->showError( 'no_permission', 10264, null, null, 403 ); } $warning['wl_moderator'] = IPSMember::load( $warning['wl_moderator'] ); $warning['wl_reason'] = $this->reasons[ $warning['wl_reason'] ]; $warning['content'] = NULL; if ( $warning['wl_content_app'] and IPSLib::appIsInstalled( $warning['wl_content_app'] ) ) { $file = IPSLib::getAppDir( $warning['wl_content_app'] ) . '/extensions/warnings.php'; if ( is_file( $file ) ) { $classToLoad = IPSLib::loadLibrary( $file, 'warnings_' . $warning['wl_content_app'], $warning['wl_content_app'] ); if ( class_exists( $classToLoad ) and method_exists( $classToLoad, 'getContentUrl' ) ) { $object = new $classToLoad(); $content = $object->getContentUrl( $warning ); if ( !is_null( $content ) ) { $warning['content'] = "<a href='{$content['url']}'>{$content['title']}</a>"; } } } } $this->registry->output->addContent( $this->registry->output->getTemplate('profile')->acknowledgeWarning( $warning ) ); $this->registry->output->setTitle( $this->lang->words['warnings_acknowledge'] ); } /** * Action: Acknowledge */ public function doAcknowledge() { $id = intval( $this->request['id'] ); $warning = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'members_warn_logs', 'where' => "wl_id={$id}" ) ); if ( !$warning['wl_id'] or $warning['wl_member'] != $this->_member['member_id'] or $this->request['secure_key'] != $this->member->form_hash ) { $this->registry->output->showError( 'no_permission', 10264, null, null, 403 ); } $this->DB->update( 'members_warn_logs', array( 'wl_acknowledged' => 1 ), "wl_id={$warning['wl_id']}" ); $count = array( 'count' => 0 ); if ( $this->settings['warnings_acknowledge'] ) { $count = $this->DB->buildAndFetch( array( 'select' => 'count(*) as count', 'from' => 'members_warn_logs', 'where' => "wl_member={$this->_member['member_id']} AND wl_acknowledged=0" ) ); } if ( !$count['count'] and $this->memberData['unacknowledged_warnings'] ) { IPSMember::save( $this->_member['member_id'], array( 'core' => array( 'unacknowledged_warnings' => 0 ) ) ); } if ( $this->request['ref'] ) { $this->registry->output->silentRedirect( $this->request['ref'] ); } else { $this->registry->output->redirectScreen( $this->lang->words['warnings_acknowledged'], $this->settings['board_url'] ); } } } вот внутренность ipsController <?php /** * <pre> * Invision Power Services * IP.Board v3.3.1 * Primary controller * Last Updated: $LastChangedDate: 2012-03-20 18:21:37 -0400 (Tue, 20 Mar 2012) $ * </pre> * * @author $Author: ips_terabyte $ * @copyright © 2001 - 2009 Invision Power Services, Inc. * @license __www.invisionpower.com/community/board/license.html * @package IP.Board * @link __www.invisionpower.com * @since 14th May 2003 * @version $Rev: 10460 $ */ /** * Class "Controller" * A very simple public facing interface to resolve incoming data into * a command class * * @author Matt Mecham * @since Wednesday 14th May 2008 * @package IP.Board */ class ipsController { /** * Registry reference * * @access protected * @var object */ protected $registry; /** * Command * * @access public * @var string */ static public $cmd; /** * Constructor * * @access private * @return @e void */ private function __construct() { } /** * Public facing function to run the controller * * @access public * @return @e void */ static public function run() { $instance = new ipsController(); $instance->init(); $instance->handleRequest(); } /** * Initialize ipsRegistry and this class * * @access protected * @return @e void */ protected function init() { $this->registry = ipsRegistry::instance(); $this->registry->init(); } /** * Handle the incoming request using the command resolver * * @access protected * @return @e void */ protected function handleRequest() { $cmd_r = new ipsController_CommandResolver(); try { self::$cmd = $cmd_r->getCommand( $this->registry ); } catch( Exception $e ) { $msg = $e->getMessage(); /* An error occured, so throw a 404 */ try { /* The following patch prevents links such as /admin/index.php?adsess=123&app=anyrandomnamehere&module=login&do=login-complete from loading an ACP error screen complete with wrapper, which may expose the applications that are installed to an end user. This issue was reported by Christopher Truncer via the IPS ticket system. */ if( IN_ACP AND !$this->registry->member()->getProperty('member_id') ) { $this->registry->getClass('output')->silentRedirect( ipsRegistry::$settings['base_url'] ); } $this->registry->getClass('output')->showError( 'incorrect_furl', 404, null, null, 404 ); } catch( Exception $e ) { print $msg; exit(); } } IPSDebug::setMemoryDebugFlag( "Everything up until execute call", 0 ); self::$cmd->execute( $this->registry ); } } /** * Class "Command Resolver" * Resolves the incoming data * * @author Matt Mecham * @since Wednesday 14th May 2008 * @package IP.Board */ class ipsController_CommandResolver { /**#@+ * Internal strings to remember * * @access protected * @var string */ protected static $base_cmd; protected static $default_cmd; protected static $modules_dir = 'modules_public'; protected static $class_dir = 'public'; /**#@-*/ /** * Constructor * * @access public * @return @e void */ public function __construct() { if ( ! self::$base_cmd ) { self::$base_cmd = ipsRegistry::$current_module == 'ajax' ? new ReflectionClass( 'ipsAjaxCommand' ) : new ReflectionClass( 'ipsCommand' ); self::$default_cmd = new ipsCommand_default(); self::$modules_dir = ( IPS_AREA != 'admin' ) ? 'modules_public' : 'modules_admin'; self::$class_dir = ( IPS_AREA != 'admin' ) ? 'public' : 'admin'; } } /** * Retreive the command * * @access public * @param object ipsRegistry reference * @return object */ public function getCommand( ipsRegistry $registry ) { $_NOW = IPSDebug::getMemoryDebugFlag(); $module = ipsRegistry::$current_module; $section = ipsRegistry::$current_section; $filepath = IPSLib::getAppDir( IPS_APP_COMPONENT ) . '/' . self::$modules_dir . '/' . $module . '/'; /* Bug Fix #21009 */ if ( ! ipsRegistry::$applications[ IPS_APP_COMPONENT ]['app_enabled'] ) { throw new Exception( "The specified application has been disabled" ); } if ( !IN_ACP and !IPSLib::moduleIsEnabled( $module, IPS_APP_COMPONENT ) and $module != 'ajax' ) { throw new Exception( "The specified module has been disabled" ); } /* Got a section? */ if ( ! $section ) { if ( is_file( $filepath . 'defaultSection.php' ) ) { $DEFAULT_SECTION = ''; include( $filepath . 'defaultSection.php' );/*noLibHook*/ if ( $DEFAULT_SECTION ) { $section = $DEFAULT_SECTION; ipsRegistry::$current_section = $section; } } } $_classname = self::$class_dir . '_' . IPS_APP_COMPONENT . '_' . $module . '_'; /* Rarely used, let's leave file_exists which is faster for non-existent files */ if ( file_exists( $filepath . 'manualResolver.php' ) ) { $classname = IPSLib::loadActionOverloader( $filepath . 'manualResolver.php' , $_classname . 'manualResolver' ); } else if ( is_file( $filepath . $section . '.php' ) ) { $classname = IPSLib::loadActionOverloader( $filepath . $section . '.php' , $_classname . $section ); } IPSDebug::setMemoryDebugFlag( "Controller getCommand executed" ); if ( class_exists( $classname ) ) { $cmd_class = new ReflectionClass( $classname ); if ( $cmd_class->isSubClassOf( self::$base_cmd ) ) { return $cmd_class->newInstance(); } else { throw new Exception( "$section в $module не существует!" ); } } else { throw new Exception( "$classname does not exist!" ); } # Fudge it to return just the default object return clone self::$default_cmd; } } abstract class ipsCommand { /**#@+ * Registry Object Shortcuts * * @access protected * @var object */ protected $registry; protected $DB; protected $settings; protected $request; protected $lang; protected $member; protected $memberData; protected $cache; protected $caches; /**#@-*/ /** * Constructor * * @access public * @return @e void */ final public function __construct() { } /** * Make the registry shortcuts * * @access public * @param object ipsRegistry reference * @return @e void */ public function makeRegistryShortcuts( ipsRegistry $registry ) { /* Make registry objects */ $this->registry = $registry; $this->DB = $this->registry->DB(); $this->settings =& $this->registry->fetchSettings(); $this->request =& $this->registry->fetchRequest(); $this->lang = $this->registry->getClass('class_localization'); $this->member = $this->registry->member(); $this->memberData =& $this->registry->member()->fetchMemberData(); $this->cache = $this->registry->cache(); $this->caches =& $this->registry->cache()->fetchCaches(); $this->memberData = IPSMember::setUpModerator( $this->memberData ); } /** * Execute the command (call doExecute) * * @access public * @param object ipsRegistry reference * @return @e void */ public function execute( ipsRegistry $registry ) { //$registry->getClass('class_permissions') $this->makeRegistryShortcuts( $registry ); $this->doExecute( $registry ); } /** * Do execute method (must be overriden) * * @access protected * @param object ipsRegistry reference * @return @e void */ protected abstract function doExecute( ipsRegistry $registry ); } /** * Abstract class for handling ajax requests */ abstract class ipsAjaxCommand { /**#@+ * Registry Object Shortcuts * * @access protected * @var object */ protected $registry; protected $DB; protected $settings; protected $request; protected $lang; protected $member; protected $memberData; protected $cache; protected $caches; protected $ajax; /**#@-*/ /** * Constructor * * @access public * @return @e void */ final public function __construct() { } /** * Magic function to catch all the ajax methods * * @access public * @param string $func Function name being called * @param array $arguments Array of parameters * @return mixed */ public function __call( $func, $arguments ) { if( method_exists( $this->ajax, $func ) ) { return call_user_func_array( array( $this->ajax, $func ), $arguments ); } } /** * Creates all the registry shorctus * * @access public * @param object ipsRegistry reference * @return @e void */ public function makeRegistryShortcuts( ipsRegistry $registry ) { /* Make registry objects */ $this->registry = $registry; $this->DB = $this->registry->DB(); $this->settings =& $this->registry->fetchSettings(); $this->request =& $this->registry->fetchRequest(); $this->lang = $this->registry->getClass('class_localization'); $this->member = $this->registry->member(); $this->memberData =& $this->registry->member()->fetchMemberData(); $this->cache = $this->registry->cache(); $this->caches =& $this->registry->cache()->fetchCaches(); $this->memberData = IPSMember::setUpModerator( $this->memberData ); $classToLoad = IPSLib::loadLibrary( IPS_KERNEL_PATH . 'classAjax.php', 'classAjax' ); $this->ajax = new $classToLoad(); IPSDebug::fireBug( 'registerExceptionHandler' ); IPSDebug::fireBug( 'registerErrorHandler' ); } /** * Executes the ajax request, checks secure key * * @access public * @param object ipsRegistry reference * @return @e void */ public function execute( ipsRegistry $registry ) { /* Setup Shortcuts First */ $this->makeRegistryShortcuts( $registry ); /* Check the secure key */ $this->request['secure_key'] = $this->request['secure_key'] ? $this->request['secure_key'] : $this->request['md5check']; if( $this->request['secure_key'] != $this->member->form_hash ) { IPSDebug::fireBug( 'error', array( "The security key did not match the member's form hash" ) ); $this->returnString( 'nopermission' ); } $this->doExecute( $registry ); } /** * Do execute method (must be overriden) * * @access protected * @param object ipsRegistry reference * @return @e void */ protected abstract function doExecute( ipsRegistry $registry ); } class ipsCommand_default extends ipsCommand { /** * Do execute method * * @access protected * @param object ipsRegistry reference * @return @e void */ protected function doExecute( ipsRegistry $registry ) { $modules_dir = ( IPS_AREA != 'admin' ) ? 'modules_public' : 'modules_admin'; $filepath = IPSLib::getAppDir( IPS_APP_COMPONENT ) . '/' . $modules_dir . '/' . ipsRegistry::$current_module . '/' . ipsRegistry::$current_section . '.php'; $filepath = str_replace( DOC_IPS_ROOT_PATH, '', $filepath ); //----------------------------------------- // Redirect to board index //----------------------------------------- if ( ! (IPS_APP_COMPONENT == 'forums' AND ipsRegistry::$current_module == 'forums' AND ipsRegistry::$current_section == 'boards') ) { if( IPB_THIS_SCRIPT == 'admin' ) { $registry->output->silentRedirect( ipsRegistry::$settings['_base_url'] ); } else { $registry->output->silentRedirect( ipsRegistry::$settings['_original_base_url'] ); } } //----------------------------------------- // Uh oh, this is a big one.. (no forums app) //----------------------------------------- if ( ! is_file( $filepath ) ) { $this->registry->getClass('output')->showError( array( 'command_file_missing', $filepath ), 401100, null, null, 404 ); } else { $this->registry->getClass('output')->showError( array( 'command_class_incorrect', $filepath ), 401200, null, null, 404 ); } } } Вот строки 165 - 166 - 167 из warnings.php 165// case 'save': 166// $this->save(); 167// break; Вот строки 302 - 303 - 304 - 305 - 306 - 307 из ipsController.php 302// public function execute( ipsRegistry $registry ) 303// { 304// //$registry->getClass('class_permissions') 305// $this->makeRegistryShortcuts( $registry ); 306// $this->doExecute( $registry ); 307// } Заранее благодарю за помощь! Edited 6 августа, 201311 yr by Alan_Francis
7 августа, 201311 yr comment_38737 Таблица newforum.members_warn_actions не существует. newforum это имя БД. Открывайте phpmyadmin и ищите таблицу members_warn_actions, она может быть повреждена.
7 августа, 201311 yr Author comment_38804 Таблица newforum.members_warn_actions не существует. newforum это имя БД. Открывайте phpmyadmin и ищите таблицу members_warn_actions, она может быть повреждена. Спасибо большое все получилось! Создали таблицу и все заработало
7 августа, 201311 yr comment_38808 Alan_Francis, а как создали и куда она пропала? Она при установке форума по идее создаётся. А заполняется при настройке предупреждений.
7 августа, 201311 yr Author comment_38842 я незнаю, я отправил сис. администратору ваш пост он сказал что такой таблицы нету, а я сказал создайте её после чего он создал и вся система заработала =)
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.