public function index()
 {
     $root = array();
     $email = strim($GLOBALS['request']['email']);
     //用户名或邮箱
     $pwd = strim($GLOBALS['request']['pwd']);
     //密码
     //检查用户,用户密码
     $user = user_check($email, $pwd);
     $user_id = intval($user['id']);
     if ($user_id > 0) {
         $root['user_login_status'] = 1;
         $id = intval($_REQUEST['id']);
         $paypassword = strim($GLOBALS['request']['paypassword']);
         $id = intval($GLOBALS['request']['id']);
         $status = dotrans($id, $paypassword);
         if ($status['status'] != 1) {
             $root['response_code'] = 0;
             $root['show_err'] = $status['show_err'];
         } else {
             $root['response_code'] = 1;
             $root['show_err'] = $GLOBALS['lang']['DEAL_BID_SUCCESS'];
             $root['id'] = $id;
         }
     } else {
         $root['response_code'] = 0;
         $root['show_err'] = "未登录";
         $root['user_login_status'] = 0;
     }
     output($root);
 }
 public function dotrans()
 {
     $ajax = intval($_REQUEST['ajax']);
     $paypassword = strim(FW_DESPWD($_REQUEST['paypassword']));
     $id = intval($_REQUEST['id']);
     $status = dotrans($id, $paypassword);
     if ($status['status'] == 2) {
         ajax_return($status);
     } elseif ($status['status'] == 1) {
         showSuccess($status['show_err'], $ajax);
     } else {
         showErr($status['show_err'], $ajax);
     }
 }
Example #3
0
function clean1($fn)
{
    global $trans;
    $newfn = $fn;
    $newfn = strtolower($newfn);
    if (isset($trans) && !empty($trans)) {
        $newfn = dotrans($newfn);
    }
    if (stristr($newfn, ".mp3")) {
        $parts = explode(".mp3", $newfn);
        $ext = ".mp3";
    } else {
        $parts = explode(".ogg", $newfn);
        $ext = ".ogg";
    }
    $newfn = $parts[0];
    //$newfn=str_replace("." , "-", $newfn);
    $newfn = str_replace("]", " ", $newfn);
    $newfn = str_replace("[", " ", $newfn);
    $newfn = str_replace("(", "-", $newfn);
    $newfn = str_replace(")", "", $newfn);
    $newfn = str_replace("_", " ", $newfn);
    /*
      $newfn=ereg_replace("-" , " - ", $newfn);
      $newfn=ereg_replace("-[ ]+-" , " -  ", $newfn);
      $newfn=ereg_replace("[ ]+" , " ", $newfn);
      $newfn=ereg_replace("^[ ]+" , "", $newfn);
    */
    $newfn = preg_replace("/-/", " - ", $newfn);
    $newfn = preg_replace("/-[ ]+-/", " -  ", $newfn);
    $newfn = preg_replace("/[ ]+/", " ", $newfn);
    $newfn = preg_replace("/^[ ]+/", "", $newfn);
    $newfn = str_replace("\\\\", "", $newfn);
    $newfn = strtolower($newfn);
    return $newfn . $ext;
}