} function clean($text) { preg_match_all('/\\[(.*)\\](.*)\\[\\/(.*)\\]/si', $text, $matches); foreach ($matches[0] as $key => $match) { if ($matches[1][$key] == $matches[3][$key]) { $text = str_replace($match, $matches[2][$key], $text); } } return $text; } try { $errorrep = $config->getConfigByNameType('general/errorreporting', TYPE_INT); } catch (exceptionlist $e) { // this is a big errror so $errorep = true $link = $skin->catchError($e, 'index.php?', 'error in subsystem', true); $database->close(); $theme->redirect($link); } switch ($action) { case 'viewcomments': try { $skin->loadSkinFile('comments.html'); $database->close(); } catch (exceptionlist $e) { $link = $skin->catchError($e, 'index.php?', $lang->translate('Your action has no effect'), $errorrep); $database->close(); $skin > redirect($link); } break; case 'postcommentform':
* You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ include 'kernel/skin.class.php'; $skin = new CSkin(); if (!empty($_GET['action'])) { $action = $_GET['action']; } else { $skin->redirect('index.php'); } try { $errorrep = $config->getConfigByNameType('general/errorreporting', TYPE_INT); } catch (exceptionlist $e) { // this is a big errror so $errorep = true $link = $skin->catchError($e, 'index.php?', $lang->translate('You can\'t view this page'), true); $database->close(); $skin->redirect($link); } switch ($action) { case 'login': try { $exception = NULL; if (empty($_POST[POST_NAME])) { $e = new exceptionlist($lang->translate('You must fill in the username field')); if ($exception == NULL) { $exception = $e; } else { $exception->setNext($e); } }
* You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ include 'kernel/skin.class.php'; $skin = new CSkin(); if (!empty($_GET['action'])) { $action = $_GET['action']; } else { $theme->redirect('index.php'); } try { $errorrep = $config->getConfigByNameType('general/errorreporting', TYPE_INT); } catch (exceptionlist $e) { // this is a big errror so $errorep = true $link = $skin->catchError($e, 'index.php?', $lang->translate('Your action has no effect'), true); $database->close(); $skin->redirect($link); } switch ($action) { case 'vote': try { $return = $poll->vote($_POST, $user->getconfig('name')); $database->close(); $skin->redirect('index.php?note=' . $lang->translate('You have voted')); break; } catch (exceptionlist $e) { $skin->redirect($skin->catchError($e, 'index.php?', $lang->translate('Your vote is not saved'), $errorrep)); } case 'allpolls': try {