public static function check_if_report($type, $obj, $obj_id, $uid, $to_uid) { global $_lang; $reportSql = sprintf(" select report_id from %switkey_report where report_type='%d' and obj='%s'\n\t\t and obj_id='%d' and uid='%d' and to_uid='%d'", TABLEPRE, $type, $obj, $obj_id, $uid, $to_uid); $resText = db_factory::get_count($reportSql); $trans_name = keke_report_class::get_transrights_name($type); if (!$resText) { return true; } else { return '您已成功提交了' . $trans_name . "信息,我们会尽快处理,请勿重复操作。"; } }
public static function set_report($order_id, $to_uid, $report_type, $file_name, $desc, $reason) { global $uid; global $_lang; $order_info = self::get_order_info($order_id); $transname = keke_report_class::get_transrights_name($report_type); if ($order_info['order_uid'] == $uid || $order_info['seller_uid'] == $uid) { if ($order_info['order_uid'] == $uid && $uid == $to_uid) { return $_lang['buyer_can_not_to_self'] . $transname; } elseif ($order_info['seller_uid'] == $uid && $uid == $to_uid) { return $_lang['seller_can_not_to_self'] . $transname; } } else { return $_lang['no_trans_not_to_order'] . $transname; } $uid == $order_info['order_uid'] and $user_type = '2' or $user_type = '1'; return keke_report_class::add_report('order', $order_id, $to_uid, $desc, $report_type, $order_info['order_status'], $order_info['obj_id'], $user_type, $file_name, $reason); }
public static function set_report($obj_id, $to_uid, $report_type, $file_name, $desc, $reason) { global $uid; global $_lang; $service_info = self::get_service_info($obj_id); $transname = keke_report_class::get_transrights_name($report_type); if ($service_info['uid'] == $uid) { return $_lang['can_not_to_self'] . $transname; } $user_type = '2'; return keke_report_class::add_report('product', $obj_id, $to_uid, $desc, $report_type, $service_info['service_status'], $obj_id, $user_type, $file_name, $reason); }
} else { $step = 'step5'; } break; case 'complete': case 'arbitral': $step = 'step6'; break; case 'close': kekezu::show_msg('订单已关闭', 'index.php?do=seller&id=' . $id, 3, '订单已关闭', 'warning'); break; default: break; } if ($action === 'rights') { $transname = keke_report_class::get_transrights_name($type); if ($type == '1') { if ($arrOrderInfo['order_uid'] == $gUid) { $objType = 'work'; } else { $objType = 'task'; } $report_reason = keke_report_class::getRightsType($objType); } else { $report_reason = keke_report_class::getReportType($objType); } if (isset($formhash) && kekezu::submitcheck($formhash)) { $resText = keke_order_class::set_report($objId, $toUid, $type, $filepath, $tarContent, $sltReason); if ($resText === true) { kekezu::show_msg('感谢您的' . $transname . ',管理员会尽快受理,请耐心等待处理结果。', $strUrl . "&orderId=" . $orderId, 3, NULL, 'ok'); } else {