<?php Yii::app()->clientScript->registerScript('autoLoad', " var status= '".$params['type']."'; var sdate = '".$params['sdate']."'; var edate = '".$params['edate']."'; var word = '".Yii::app()->request->getParam('word')."'; $('#ShopInfo_shop_products').val(word); if(status == 'osub') { $('#shop_launch_start_time').val(sdate); $('#shop_launch_end_time').val(edate); $.fn.yiiGridView.update('report-grids', { data: $('#form').serialize() }); } var currentUser = '".Yii::app()->user->getName()."'; if(currentUser== 'admin') $('<option value=\"0\">其他</option>').insertAfter('#ShopInfo_shop_area_id option:last'); "); ?>