while ($increm_row = mysql_fetch_assoc($increm)) { $data1 .= '<tr style="border-bottom: 1px solid #85b1de;"> <td style="width:110px; display:block;word-wrap:break-word;">' . $increm_row[name] . '</td> <td ><button type="button" value="media/uploads/file/' . $increm_row[rand_name] . '" style="cursor:pointer; border:none; margin-top:25%; display:block; height:16px; width:16px; background:none;background-image:url(\'media/images/get.png\');" id="download" ></button><input type="text" style="display:none;" id="download_name" value="' . $increm_row[rand_name] . '"> </td> <td ><button type="button" value="' . $increm_row[id] . '" style="cursor:pointer; border:none; margin-top:25%; display:block; height:16px; width:16px; background:none; background-image:url(\'media/images/x.png\');" id="delete"></button></td> </tr>'; } $data = array('page' => $data1); break; case 'save_outgoing': $user_id = $_SESSION['USERID']; Savetask($task_id, $problem_comment, $file, $rand_file); break; case 'done_outgoing': $user_id = $_SESSION['USERID']; Savetask1($task_id, $problem_comment, $file, $rand_file); break; default: $error = 'Action is Null'; } $data['error'] = $error; echo json_encode($data); /* ****************************** * task Functions * ****************************** */ function checkgroup($user) { $res = mysql_fetch_assoc(mysql_query("\r\n\t\t\t\t\t\t\t\t\t\t\tSELECT users.group_id\r\n\t\t\t\t\t\t\t\t\t\t\tFROM users\r\n\t\t\t\t\t\t\t\t\t\t\tWHERE users.id = {$user}\r\n\t\t\t\t\t\t\t\t\t\t")); return $res['group_id']; }
$d1 = $_REQUEST['d1']; $d2 = $_REQUEST['d2']; $d3 = $_REQUEST['d3']; $d4 = $_REQUEST['d4']; $d5 = $_REQUEST['d5']; $d6 = $_REQUEST['d6']; $d7 = $_REQUEST['d7']; $d8 = $_REQUEST['d8']; $d9 = $_REQUEST['d9']; $d10 = $_REQUEST['d10']; $d11 = $_REQUEST['d11']; $d12 = $_REQUEST['d12']; $q1 = $_REQUEST['q1']; $call_content = $_REQUEST['call_content']; $status = $_REQUEST['status']; Savetask1($task_detail_id, $hello_quest, $hello_comment, $info_quest, $info_comment, $result_quest, $result_comment, $payment_quest, $payment_comment, $send_date, $preface_name, $preface_quest, $d1, $d2, $d3, $d4, $d5, $d6, $d7, $d8, $d9, $d10, $d11, $d12, $q1); Savetask2($task_detail_id, $call_content, $status); break; default: $error = 'Action is Null'; } $data['error'] = $error; echo json_encode($data); /* ****************************** * task Functions * ****************************** */ function checkgroup($user) { $res = mysql_fetch_assoc(mysql_query("\r\n\t\t\t\t\t\t\t\t\t\t\tSELECT users.group_id\r\n\t\t\t\t\t\t\t\t\t\t\tFROM users\r\n\t\t\t\t\t\t\t\t\t\t\tWHERE users.id = {$user}\r\n\t\t\t\t\t\t\t\t\t\t")); return $res['group_id'];
} if ($i == $count - 1) { $row[] = '<input type="checkbox" id="' . $aRow[$hidden] . '" name="check_' . $aRow[$hidden] . '" class="check" value="' . $aRow[$hidden] . '" />'; } } $data['aaData'][] = $row; } break; case 'save_outgoing': $user_id = $_SESSION['USERID']; $comment = $_REQUEST['comment']; Savetask($task_id, $client_name, $persons_id, $comment); break; case 'done_outgoing': $user_id = $_SESSION['USERID']; Savetask1($task_id, $ast_incomming_id, $persons_id, $comment); break; case 'get_add_info': $pin = $_REQUEST['pin']; $data = array('info' => get_addition_all_info($pin)); break; case 'get_add_info1': $personal_id = $_REQUEST['personal_id']; $data = array('info1' => get_addition_all_info1($personal_id)); break; default: $error = 'Action is Null'; } $data['error'] = $error; echo json_encode($data); /* ******************************
$set_task_department_id = $_REQUEST['set_task_department_id']; $set_persons_id = $_REQUEST['set_persons_id']; $set_priority_id = $_REQUEST['set_priority_id']; $set_start_time = $_REQUEST['set_start_time']; $set_done_time = $_REQUEST['set_done_time']; $set_body = $_REQUEST['set_body']; $task_type_id_seller = $_REQUEST['task_type_id_seller']; $set_shabloni = $_REQUEST['set_shabloni']; if ($set_task_department_id != 0) { TaskFromireba($set_task_department_id, $set_persons_id, $set_priority_id, $set_start_time, $set_done_time, $set_body, $task_type_id_seller, $set_shabloni, $task_id); } $res = mysql_fetch_row(mysql_query("SELECT `phone_base_id`, `phone_base_inc_id`\n\t\t\t\t\t\t\t\t\t\t\t\tFROM `task_detail`\n\t\t\t\t\t\t\t\t\t\t\t\tWHERE `id` = '{$task_id}' ")); $res_cheker = mysql_fetch_row(mysql_query(" SELECT id\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tFROM `task_scenar`\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tWHERE task_detail_id = '{$task_id}' ")); UpPerson($res[0], $res[1]); if ($res_cheker[0] == '') { Savetask1($task_detail_id, $status_1, $status_2, $status_3, $duration); } else { Savetask1Up($status, $task_detail_id, $status_1, $status_2, $status_3, $duration); } Savetask2($task_detail_id, $call_content, $status); break; default: $error = 'Action is Null'; } $data['error'] = $error; echo json_encode($data); /* ****************************** * task Functions * ****************************** */ function TaskFromireba($set_task_department_id, $set_persons_id, $set_priority_id, $set_start_time, $set_done_time, $set_body, $task_type_id_seller, $set_shabloni, $id)
$data = array('gauqmebuli' => $gauqmebuli[gauqmebuli], 'mogvarebuli' => $mogvarebuli[mogvarebuli], 'yvela' => $yvela[yvela], 'garkvevis_processhi' => $garkvevis_processhi[garkvevis_processhi], 'chemi_task' => $chemi_task[chemi_task]); break; case 'save_incomming': $incom_id = $_REQUEST['id']; $task_status_id = $_REQUEST['task_status_id']; $task_type_id = $_REQUEST['task_type_id']; $persons_id = $_REQUEST['persons_id']; $comment1 = $_REQUEST['comment1']; if ($incom_id == '') { Addtask($client_name, $task_type_id, $priority_id, $department_id, $phone, $call_content, $comment, $problem_coment, $task_status_id); } else { $row = mysql_fetch_assoc(mysql_query("SELECT task.incomming_call_id\r\n from task\r\n WHERE task.id={$incom_id}")); if ($row[incomming_call_id] != 0) { Savetask($incom_id, $persons_id, $task_type_id, $priority_id, $department_id, $task_status_id, $comment, $comment1); } else { Savetask1($incom_id, $client_name, $task_type_id, $priority_id, $department_id, $persons_id, $phone, $call_content, $comment1, comment1, $problem_coment, $task_status_id); } } break; case 'filt_task_type': $user = $_SESSION['USERID']; $dep_detail1_id = $_REQUEST['dep_detail1_id']; $task_type = Gettask_type1($dep_detail1_id); $data = array('task_type' => $task_type); break; case 'refresh': $data = array('date' => date('Y-m-d H:i:s')); break; default: $error = 'Action is Null'; }