示例#1
0
        $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_detail_id);
        }
        if ($result_quest == 1) {
            $cheker_sale = mysql_num_rows(mysql_query("SELECT id FROM `elva_sale_new` WHERE task_id = {$task_detail_id}"));
            if ($cheker_sale == 0) {
                SaveElvaGe($person_n, $first_name, $mail, $addres, $phone, $phone1, $send_date, $call_content, '', '', $task_detail_id);
            } else {
                SaveElvaGeUp($person_n, $first_name, $mail, $addres, $phone, $phone1, $send_date, $call_content, '', '', $task_detail_id);
            }
        }
        $res = mysql_fetch_row(mysql_query("SELECT `phone_base_id`, `phone_base_inc_id`\r\n\t\t\t\t\t\t\t\t\t\t\t\tFROM `task_detail`\r\n\t\t\t\t\t\t\t\t\t\t\t\tWHERE `id` = '{$task_detail_id}' "));
        $res_cheker = mysql_fetch_row(mysql_query(" SELECT id\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tFROM `task_scenar`\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tWHERE task_detail_id = '{$task_detail_id}' "));
        UpPerson($res[0], $res[1]);
        if ($res_cheker[0] == '') {
            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, '', $get_gift, $b1, $b2, $result_quest1, $result_comment1, $hello_comment1);
        } else {
            Savetask1Up($status, $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, '', $get_gift, $b1, $b2, $result_quest1, $result_comment1, $hello_comment1);
        }
        Savetask2($task_detail_id, $call_content, $status);
        break;
    default:
        $error = 'Action is Null';
}
示例#2
0
                $get_prod_price = mysql_fetch_row(mysql_query("SELECT SUM(price)\r\n\t\t\t            FROM `production`\r\n\t\t\t            WHERE id in({$get_prod})"));
                $get_prod_row = mysql_query("SELECT CONCAT(`name`,' + ')\r\n\t\t\t            FROM `production`\r\n\t\t\t            WHERE id in({$get_prod})");
                $row_name_prod = '';
                while ($get_prod_name = mysql_fetch_row($get_prod_row)) {
                    $row_name_prod .= $get_prod_name[0];
                }
                SaveElvaGe($person_n, $first_name, $mail, $addres, $phone, $phone1, $send_date, $call_content, $get_prod_price[0], substr($row_name_prod, 0, -3), $task_id);
            } else {
                $get_prod = substr($get_gift_chek, 1);
                $get_prod_price = mysql_fetch_row(mysql_query("SELECT SUM(price)\r\n\t\t\t            FROM `production`\r\n\t\t\t            WHERE id in({$get_prod})"));
                $get_prod_row = mysql_query("SELECT CONCAT(`name`,' + ')\r\n\t\t\t            FROM `production`\r\n\t\t\t            WHERE id in({$get_prod})");
                $row_name_prod = '';
                while ($get_prod_name = mysql_fetch_row($get_prod_row)) {
                    $row_name_prod .= $get_prod_name[0];
                }
                SaveElvaGeUp($person_n, $first_name, $mail, $addres, $phone, $phone1, $send_date, $call_content, $get_prod_price[0] * $_REQUEST[prod_count], substr($row_name_prod, 0, -3), $SaveElvaChek[0]);
            }
        } else {
            mysql_query("DELETE FROM elva_sale\r\n                             WHERE task_id = '{$task_id}'");
        }
        $res = mysql_fetch_row(mysql_query("SELECT `phone_base_id`, `phone_base_inc_id`\r\n\t\t\t\t\t\t\t\t\t\t\t\tFROM `task_detail`\r\n\t\t\t\t\t\t\t\t\t\t\t\tWHERE `id` = '{$task_id}' "));
        UpPerson($res[0], $res[1]);
        Savetask2($task_detail_id, $call_content, $status);
        break;
    default:
        $error = 'Action is Null';
}
$data['error'] = $error;
echo json_encode($data);
/* ******************************
 *	task Functions