hi all i need to display detail using cjuidialogbox; for that i create the action and send id to that action
this is my ajaxlink
<?php echo CHtml::ajaxLink('',array('findlocum/showdrdetails','u.id'=>$data['id']),array(
'success'=>'js:function(data){
$("#drdetails").dialog("open"); document.getElementById("dr_detail_continer").innerHTML=data;}'),
array('class' => 'social_icon form'));
?>
now i need to get the id within that action
this is my contraller
public function actionshowdrdetails(){
if (Yii::app ()->request->isAjaxRequest) {
Yii::app ()->clientScript->scriptMap ['jquery.js'] = false;
if (isset ( $_GET ['id'] )) {
//$userview=Users::model()->findByPk($_GET ['id']);
//$UserView=$userview->search();
//$speciality=Speciality::model()->findAll();
//$arry=array_merge($speciality,$UserView);
//$dataprovider=new CActiveDataProvider($arry);
$userview=new Users();
$userview->id=$_GET['id'];
$userview=$userview->search();
$this->renderPartial ('drdetailview', array (
'userview=' => $userview,
//'UserView' => $UserView
) );
}
}
}
my data provider conatain
public function actionIndex() {
$gsmodel=new UserGradesSpecialty('search');
$userprofdetail=new UserProfDetails('search');
$crumbs = array (
array (
'name' => "Home",
'url' => array (
'site/index'
)
),
array (
'name' => 'FindLocum'
)
);
$title = "Find Locum";
$criteria = new CDbCriteria ();
if (isset ( $_POST ['UserGradesSpecialty'], $_POST['UserProfDetails'] ) ) {
if ($_POST ['UserGradesSpecialty'] ['specialty_id'] != "-1") {
$gsmodel->specialty_id = $_POST ['UserGradesSpecialty'] ['specialty_id'];
}
if ($_POST ['UserProfDetails'] ['pref_location_id'] != "-1") {
$userprofdetail->pref_location_id = $_POST ['UserProfDetails'] ['pref_location_id'];
}
if ($_POST ['UserGradesSpecialty'] ['grade_id'] != "-1") {
$gsmodel->grade_id = $_POST ['UserGradesSpecialty'] ['grade_id'];
}
}
$sql = "a.itemname=:nid AND
u.status=:id";
if (isset($_POST ['UserGradesSpecialty'] ) && $_POST ['UserProfDetails'] ['pref_location_id'] != "-1") {
$sql .= " AND p.pref_location_id=:pid";
}
if (isset($_POST ['UserProfDetails'] ) && $_POST ['UserGradesSpecialty'] ['specialty_id'] != "-1") {
$sql.=" AND g.specialty_id=:sid";
}
if (isset($_POST ['UserProfDetails'] ) && $_POST ['UserGradesSpecialty'] ['grade_id'] != "-1") {
$sql.=" AND g.grade_id=:gid ";
}
$arr=array(':nid'=>'member',':id'=>5);
if (isset($_POST ['UserGradesSpecialty'] ) && $_POST ['UserProfDetails'] ['pref_location_id'] != "-1") {
$arr[':pid']= $userprofdetail->pref_location_id;
}
if(isset($_POST ['UserProfDetails'] ) && $_POST ['UserGradesSpecialty'] ['specialty_id'] != "-1"){
$arr[':sid'] = $gsmodel->specialty_id;
}
if (isset($_POST ['UserProfDetails'] ) && $_POST ['UserGradesSpecialty'] ['grade_id'] != "-1"){
$arr[':gid']= $gsmodel->grade_id;
}
$users= Yii::app()->db->createCommand()
->select('u.id,u.first_name,u.preferred_name,u.gender,u.date_of_birth,u.email,u.last_name,r.name,s.specialty,l.name as location')
->from('users u')
->join('user_prof_details p', 'u.id = p.users_id')
->join('user_grades_specialty g', 'u.id = g.users_id')
->join('speciality s','s.id=g.specialty_id')
->join('grades r','r.id=g.grade_id')
->join('locations l','l.id=p.pref_location_id')
->join('assignments a', 'u.id = a.userid')
->where($sql, $arr)
->queryAll();
$dataProvider=new CArrayDataProvider($users,
array('keyField' =>FALSE )
);
$this->render ( 'index', array (
'crumbs' => $crumbs,
'title' => $title,
'users' => $users,
'userprofdetail'=>$userprofdetail,
'gsmodel' => $gsmodel,
'dataProvider'=>$dataProvider
) );
}
bt I cannot get the id .pls help me
thanx in advavce.