<?php /* YaPCaS is a Content Admins System written in PHP * Copyright (C) 2005 Nathan Samson * This program 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 2 of the License, or * any later version. * This program 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 Library General Public License for more details. * 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(); $skin->loadSkinFile('about.html'); $database->close();
<?php /* YaPCaS is a Content Admins System written in PHP * Copyright (C) 2005 Nathan Samson * This program 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 2 of the License, or * any later version. * This program 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 Library General Public License for more details. * 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(); $skin->loadSkinFile('index.html');
} break; case 'logout': try { $user->logout(); $database->close(); $skin->redirect('index.php?note=' . $lang->translate('You are logged out')); } catch (exceptionlist $e) { $database->close(); $link = $skin->catchError($e, 'index.php?', $lang->translate('You are not logged out'), $errorrep); $skin->redirect($link); } break; case 'registerform': try { $skin->loadSkinFile('registerform.html'); $database->close(); } catch (exceptionlist $e) { $link = $skin->catchError($e, 'index.php?', $lang->translate('You can\'t open this page'), $errorrep); $skin->redirect($link); } break; case 'register': try { $activatemail = $config->getConfigByNameType('user/activatemail', TYPE_BOOL); if ($activatemail == true) { $mail['subject'] = $lang->translate('You must activate your email'); $mail['message'] = $lang->translate('Hello %n. ' . NL . 'Thanks for registering on %s. ' . NL . 'Click on the following link to activate your mail %d .' . NL); } else { $mail['subject'] = $lang->translate('Thanks for registering'); $mail['message'] = $lang->translate('Hello %n. ' . NL . 'Thanks for registering on %s. ' . NL . ' We hope to see you soon on our website');
} } 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': try { $skin->loadSkinFile('postcommentform.html', true); $database->close(); } catch (exceptionlist $e) { $link = $skin->catchError($e, 'index.php?', $lang->translate('You can\'t open this page'), $errorrep); $database->close(); $skin->redirect($link);
} 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 { $skin->loadSkinFile('viewpolls.html'); } catch (exceptionlist $e) { $skin->redirect($skin->catchError($e, 'index.php?', $lang->translate('Your action is not accepted'), $errorrep)); } break; default: $skin->redirect('index.php'); }
<?php /* YaPCaS is a Content Admin System written in PHP * Copyright (C) 2005 Nathan Samson * This program 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 2 of the License, or * any later version. * This program 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 Library General Public License for more details. * 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(); $skin->loadSkinFile('help.html');