function WarningMsg() { $pt = 0; if (!empty($_GET['prof']) == 1) { $pt = 1; } elseif (!empty($_GET['emp']) == 1) { $pt = 2; } elseif (!empty($_GET['worker']) == 1) { $pt = 3; } elseif (!empty($_GET['gharardadi']) == 1) { $pt = 5; } $where = " (1=1) and p.person_type = " . $pt; $whereParam["PT"] = $pt; $no = manage_staff::CountWarningMsg($where, $whereParam); $temp = manage_staff::SelectWarningMsg($where, $whereParam); echo dataReader::getJsonData($temp, $no, $_GET["callback"]); die; }