public function init() { $this->mode = @$_POST['EventTypeModuleMode'] ? 'update' : 'create'; if (isset($_GET['ajax']) && preg_match('/^[a-zA-Z0-9_]+$/', $_GET['ajax'])) { if ($_GET['ajax'] == 'table_fields') { EventTypeModuleCode::dump_table_fields($_GET['table']); } else { if ($_GET['ajax'] == 'field_unique_values') { EventTypeModuleCode::dump_field_unique_values($_GET['table'], $_GET['field']); } else { if ($_GET['ajax'] == 'dump_field_unique_values_multi') { EventTypeModuleCode::dump_field_unique_values_multi($_GET['table'], $_GET['field']); } else { if ($_GET['ajax'] == 'getEyedrawSize') { EventTypeModuleCode::getEyedrawSize($_GET['class']); } else { if ($_GET['ajax'] == 'event_type_properties') { EventTypeModuleCode::eventTypeProperties($_GET['event_type_id']); } else { if (file_exists("protected/gii/EventTypeModule/views/{$_GET['ajax']}.php")) { Yii::app()->getController()->renderPartial($_GET['ajax'], $_GET); } } } } } } Yii::app()->end(); } if (!empty($_POST)) { $this->validate_form(); } parent::init(); }