Пример #1
0
                                                         if ($id && $kunena_db->query() && $kunena_db->getAffectedRows() == 1) {
                                                             $success_msg = _POST_LOCK_SET;
                                                         }
                                                         $app->redirect(CKunenaLink::GetLatestPageAutoRedirectURL($fbConfig, $id, $fbConfig->messages_per_page), $success_msg);
                                                     } else {
                                                         if ($do == "unlock") {
                                                             if (!$is_Moderator) {
                                                                 $app->redirect(htmlspecialchars_decode(JRoute::_(KUNENA_LIVEURLREL)), _POST_NOT_MODERATOR);
                                                             }
                                                             $id = (int) $id;
                                                             $success_msg = _POST_LOCK_NOT_UNSET;
                                                             $kunena_db->setQuery("update #__fb_messages set locked=0 where id={$id}");
                                                             if ($id && $kunena_db->query() && $kunena_db->getAffectedRows() == 1) {
                                                                 $success_msg = _POST_LOCK_UNSET;
                                                             }
                                                             $app->redirect(CKunenaLink::GetLatestPageAutoRedirectURL($fbConfig, $id, $fbConfig->messages_per_page), $success_msg);
                                                         }
                                                     }
                                                 }
                                             }
                                         }
                                     }
                                 }
                             }
                         }
                     }
                 }
             }
         }
     }
 }
Пример #2
0
                $kunena_db->query();
                if (KunenaError::checkDatabaseError()) {
                    return;
                }
                if ($pid) {
                    $kunena_app->enqueueMessage(JText::_('COM_KUNENA_KARMA_SELF_DECREASE'));
                    while (@ob_end_clean()) {
                    }
                    $kunena_app->redirect(CKunenaLink::GetMessageURL($pid, $catid, 0, false));
                } else {
                    $kunena_app->enqueueMessage(JText::_('COM_KUNENA_KARMA_SELF_DECREASE'));
                    while (@ob_end_clean()) {
                    }
                    $kunena_app->redirect(CKunenaLink::GetMyProfileURL($userid));
                }
            }
        }
    }
} else {
    //get outa here, you fraud!
    $kunena_app->enqueueMessage(JText::_('COM_KUNENA_USER_ERROR_KARMA'));
    while (@ob_end_clean()) {
    }
    $kunena_app->redirect(CKunenaLink::GetLatestPageAutoRedirectURL($pid, $kunena_config->messages_per_page));
}
?>
            </center>
        </td>
    </tr>
</table>
Пример #3
0
 protected function unlock()
 {
     if ($this->tokenProtection('get')) {
         return false;
     }
     if (!$this->load()) {
         return false;
     }
     if ($this->moderatorProtection()) {
         return false;
     }
     if ($this->isUserBanned()) {
         return false;
     }
     if ($this->isIPBanned()) {
         return false;
     }
     $success_msg = JText::_('COM_KUNENA_POST_LOCK_NOT_UNSET');
     $this->_db->setQuery("update #__kunena_messages set locked=0 where id={$this->_db->Quote($this->id)}");
     if ($this->id && $this->_db->query() && $this->_db->getAffectedRows() == 1) {
         $success_msg = JText::_('COM_KUNENA_POST_LOCK_UNSET');
         // Activity integration
         $activity = KunenaFactory::getActivityIntegration();
         $activity->onAfterLock($this->id, 0);
     }
     while (@ob_end_clean()) {
     }
     $this->_app->redirect(CKunenaLink::GetLatestPageAutoRedirectURL($this->id, $this->config->messages_per_page), $success_msg);
 }