Location: PHPKode > projects > Yup! - Yii based filehoster > yup/protected/controllers/ConfigurationController.php
<?php

class ConfigurationController extends Controller
{
    
    public function actionMisc()
    {
        // Zugriffsberechtigung pruefen
        if (!Yii::app()->user->checkAccess('configuration')) {
            throw new CHttpException(401);
        }        

        // Form erstellen
        $form = new MiscConfigurationForm();

        // Formular wurde abgeschickt
        if (isset($_POST['MiscConfigurationForm'])) {
            // Attribute zuweisen
            $form->attributes = $_POST['MiscConfigurationForm'];
            
            // Form validieren und dann Config speichern
            if ($form->validate()) {
                Configuration::model()->updateByPk('waitingTime', array('value' => $form->waitingTime));
                Configuration::model()->updateByPk('waitingTimeIsActive', array('value' => $form->waitingTimeIsActive));
            }
        }
        
        $this->render('misc', array('form' => $form));
    }

}
Return current item: Yup! - Yii based filehoster