Exemplo n.º 1
0
function post_params($phpvars)
{
    global $config, $editpostparamid, $FormMethod;
    $postprocessconfig = LoadPostProcessConfig($config);
    if (!isset($postprocessconfig)) {
        return;
    }
    echo '<form action="status.php" method=' . $FormMethod . '">';
    echo '<input type="hidden" name="save" value="1">';
    echo '<input type="hidden" name="editpostparam" value="1">';
    echo '<input type="hidden" name="id" value="' . $editpostparamid . '">';
    $hasparams = false;
    $cur_queued = null;
    if (isset($phpvars['activegroup']) && $phpvars['activegroup']['LastID'] == $editpostparamid) {
        $cur_queued = $phpvars['activegroup'];
    } else {
        foreach ($phpvars['queuedgroups'] as $cur) {
            if ($cur['LastID'] == $editpostparamid) {
                $cur_queued = $cur;
                break;
            }
        }
    }
    if ($cur_queued != null) {
        echo '<div class = "block"><center>Postprocessing parameters</center><br>';
        echo '<table width="100%">';
        echo '<tr><td></td><td>name</td><td width="20">category</td><td width="60" align="right">total</td><td width="60" align="right">left</td><td width="100" align="right">estimated time</td></tr>';
        $grouppaused = $cur_queued['PausedSizeLo'] != 0 && $cur_queued['RemainingSizeLo'] == $cur_queued['PausedSizeLo'];
        if ($grouppaused) {
            echo '<tr class="pausedgroup">';
        } else {
            echo '<tr class="unpausedgroup">';
        }
        echo '<td width="10"><a href="javascript:updatestatus(\'status.php?action=groupdelete&offset=0&id=' . $cur_queued['LastID'] . '\')"><IMG src=images/cancel.gif width=15 height=15 alt="remove nzb" title="remove nzb"></a></td>';
        echo '<td>' . namereplace($cur_queued['NZBNicename']) . '</td>';
        echo '<td width="20">';
        add_category_combo($cur_queued['Category'], $cur_queued['LastID'], false);
        echo '</td>';
        echo '<td align="right">' . formatSizeMB($cur_queued['FileSizeMB']) . '</td>';
        echo '<td align="right">' . formatSizeMB($cur_queued['RemainingSizeMB'] - $cur_queued['PausedSizeMB']) . '</td>';
        if ($phpvars['status']['DownloadRate'] > 0) {
            echo '<td align="right">' . sec2hms(($cur_queued['RemainingSizeMB'] - $cur_queued['PausedSizeMB']) / ($phpvars['status']['DownloadRate'] / 1024 / 1024)) . '</td>';
        } else {
            echo '<td align="right"></td>';
        }
        echo '</tr>';
        echo '<tr><td>&nbsp;</td></tr>';
        echo '<tr><td colspan="6">';
        MergePostValues($config, $cur_queued['Parameters']);
        $hasparams = count($config) > 0;
        BuildOptionsContent($config, null, false);
        echo '</td></tr>';
        echo '</table>';
        echo '</div>';
    }
    if (!$hasparams) {
        echo '<div class="block"><table width="100%"><tr><td>';
        echo '<span class="INFO">INFO</span> Current postprocessing-script does not have any postprocessing parameters.';
        echo '</td></tr></table></div>';
    }
    echo '<div class="block"><table width="100%"><tr><td>';
    if ($hasparams) {
        echo '<input type="submit" value="Save changes">&nbsp;&nbsp;';
    }
    echo '<input type="button" value="Cancel" onClick="location=\'?\'">';
    // TIP: uncomment for debug purposes
    //echo '&nbsp;&nbsp;<input type="button" value="Reload (for testing)" onClick="javascript:updatestatus(\'status.php?editpostparam=1&id='.$editpostparamid.'\')">';
    echo '</td></tr></table></div>';
    echo '</form><br>';
}
Exemplo n.º 2
0
 public function gredelay()
 {
     if (session('userid')) {
         $oid = $_GET['oid'];
         if ($oid) {
             $order_db = M('Order');
             $userid = session('userid');
             $map['oid'] = $oid;
             $map['cuserid'] = $userid;
             $oinfo = $order_db->table(C('DB_PREFIX') . 'order O')->join(C('DB_PREFIX') . 'Users U on O.userid = U.userid')->join(C('DB_PREFIX') . 'Users CU on O.cuserid = CU.userid')->join(C('DB_PREFIX') . 'Province P on U.province = P.code')->join(C('DB_PREFIX') . 'City CT on U.city = CT.code')->join(C('DB_PREFIX') . 'Car C on O.cid = C.cid')->join(C('DB_PREFIX') . 'Carbrand CB on C.cbrand = CB.brandid')->join(C('DB_PREFIX') . 'Carmodel CM on C.cmodel = CM.modelid')->field("O.*,C.cppro,C.cpzm,C.cpnum,U.name as username, U.sex, U.tel as usertel,CU.name as cusername,CU.tel as cusertel, CU.sex as csex, P.name as provincename,CT.name as cityname,CB.brandname,CM.name as modelname")->where($map)->find();
             $data['is_delay'] = '3';
             $ress = $order_db->where($map)->save($data);
             if ($ress) {
                 $oinfo['username'] = namereplace($oinfo['username'], $oinfo['sex']);
                 $oinfo['cusername'] = namereplace($oinfo['cusername'], $oinfo['csex']);
                 $ccontent = "您已经同意" . $oinfo['username'] . "将订单延迟1天还车,延迟时间按正常费率计算费用;感谢您的配合!";
                 sendmsg($oinfo['cusertel'], $ccontent);
                 $content = "车主" . $oinfo['cusername'] . "已经同意您的换驾单延迟1天还车,平台将同时为您购买相应的保险(最少为1天);祝您用车愉快!";
                 sendmsg($oinfo['usertel'], $content);
             }
             $this->redirect('Index/morder', array('oid' => $oid, 'shuaxin' => rand()));
         } else {
             $this->redirect('User/myorder');
         }
     } else {
         $this->redirect('User/login');
     }
 }
Exemplo n.º 3
0
 public function opaydeback()
 {
     if (isset($_POST['signature'])) {
         if (verify($_POST)) {
             if ($_POST['respCode'] == '00') {
                 $order_db = M('Order');
                 $order_sn = $_POST['orderId'];
                 $map['order_sn'] = $order_sn;
                 $oinfo = $order_db->table(C('DB_PREFIX') . 'order O')->join(C('DB_PREFIX') . 'Users U on O.userid = U.userid')->join(C('DB_PREFIX') . 'Users CU on O.cuserid = CU.userid')->join(C('DB_PREFIX') . 'Province P on U.province = P.code')->join(C('DB_PREFIX') . 'City CT on U.city = CT.code')->join(C('DB_PREFIX') . 'Car C on O.cid = C.cid')->join(C('DB_PREFIX') . 'Carbrand CB on C.cbrand = CB.brandid')->join(C('DB_PREFIX') . 'Carmodel CM on C.cmodel = CM.modelid')->field("O.*,C.cppro,C.cpzm,C.cpnum,U.name as username, U.sex, U.tel as usertel,CU.name as cusername,CU.tel as cusertel,CU.openid as cuopenid,P.name as provincename,CT.name as cityname,CB.brandname,CM.name as modelname")->where($map)->find();
                 if ($oinfo['status'] != '3') {
                     $odata['status'] = '3';
                     $omap['oid'] = $oinfo['oid'];
                     $odata['trade_no'] = $_POST['queryId'];
                     $ores = $order_db->where($omap)->save($odata);
                     $oinfo['username'] = namereplace($oinfo['username'], $oinfo['sex']);
                     $jycontent1 = $oinfo['provincename'] . $oinfo['cityname'] . $oinfo['username'] . "已经成功支付【" . $oinfo['bgtime'] . "-" . $oinfo['endtime'] . "】的换驾订单押金;您的车辆换驾订单已经生效;请按时准备换驾车辆,像对待老朋友一样,将带有您个人魅力的爱车按时交接给" . $oinfo['username'] . "。";
                     sendmsg($oinfo['cusertel'], $jycontent1);
                     $jycontent2 = "您已经成功支付换驾押金,您的换驾订单已经生效;请您及时登录网站支付违章押金,如无违章记录,违章押金将在还车后30天内全额返还。您可以采用共享豆(共享豆不足可充值)、信用卡(预授权)、储值卡进行支付。";
                     sendmsg($oinfo['usertel'], $jycontent2);
                     $sysmsg_db = D('Sysmsg');
                     $sysmsg_db->sendmsg($oinfo['cuserid'], "您有一个订单状态变更,驾友已支付完成订单和车辆押金,请查看。", '2', '0', $oinfo['oid']);
                     //模版消息推送
                     if ($oinfo['cuopenid']) {
                         @import("Wxapi.Wxpuch", APP_PATH, '.class.php');
                         $pushwx = new \Wxpuch();
                         $openid = $oinfo['cuopenid'];
                         $template_id = "alI51h9F3yYcJ9FQ6_z_-HTVcvKgjmmJi3ozFcGFRSY";
                         $url = "http://www.52huanjia.com/clyy/weixin/index/morder/oid/" . $oinfo['oid'];
                         $data = array('first' => array('value' => urlencode("您好,你有一个换驾单驾友已支付,换架单已生效,请查看。"), 'color' => "#000000"), 'orderNo' => array('value' => urlencode($oinfo['order_sn']), 'color' => '#000000'), 'orderStatus' => array('value' => urlencode('驾友已支付,待缴违章押金。'), 'color' => '#000000'), 'takeCarAt' => array('value' => urlencode($oinfo['bgtime']), 'color' => '#000000'), 'returnCarAt' => array('value' => urlencode($oinfo['endtime']), 'color' => '#000000'), 'carType' => array('value' => urlencode($oinfo['modelname'] . $oinfo['brandname'] . "(" . $oinfo['cppro'] . $oinfo['cpzm'] . substr_replace($oinfo['cpnum'], '****', 0, 4) . ")"), 'color' => '#000000'), 'remark' => array('value' => urlencode('您的车辆换驾订单已经生效;请按时准备换驾车辆,像对待老朋友一样,将带有您个人魅力的爱车按时交接给驾友。'), 'color' => '#000000'));
                         $pushwx->doSend($openid, $template_id, $url, $data);
                     }
                     echo "200";
                 } else {
                     echo "200";
                 }
             }
         }
     }
 }
Exemplo n.º 4
0
function filelist($phpvars, $page)
{
    global $FilesPerPage;
    $cnt = count($phpvars['files']);
    $pagecount = pagecount($cnt, $FilesPerPage);
    if ($page > $pagecount) {
        $page = $pagecount;
    }
    if ($page < 1) {
        $page = 1;
    }
    echo '<div class = "block"><center>Files for downloading</center><br>';
    echo '<table width="100%">';
    echo '<tr><td colspan="7">name</td><td align="right">total</td></tr>';
    foreach (array_slice($phpvars['files'], ($page - 1) * $FilesPerPage, $FilesPerPage) as $cur_queued) {
        $paused = $cur_queued['Paused'];
        echo '<tr><td colspan="8" width="100%"><table class="tableline" width="100%"><tr><td></td></tr></table></td></tr>';
        echo $paused ? '<tr class="pausedgroup">' : '<tr class="unpausedgroup">';
        echo '<td width="1"><a href="?action=filedelete&offset=0&id=' . $cur_queued['ID'] . '"><IMG src=images/cancel.gif width=15 height=15 alt="remove file" title="remove file"></a></td>';
        echo '<td width="1"><a href="?action=filemovetop&offset=0&id=' . $cur_queued['ID'] . '"><IMG src=images/first.gif width=15 height=15 alt="move file to top in queue" title="move file to top in queue"></a></td>';
        echo '<td width="1"><a href="?action=filemoveoffset&offset=-1&id=' . $cur_queued['ID'] . '"><IMG src=images/up.gif width=15 height=15 alt="move file up" title="move file up"></a></td>';
        echo '<td width="1"><a href="?action=filemoveoffset&offset=1&id=' . $cur_queued['ID'] . '"><IMG src=images/down.gif width=15 height=15 alt="move file down" title="move file down"></a></td>';
        echo '<td width="1"><a href="?action=filemovebottom&offset=0&id=' . $cur_queued['ID'] . '"><IMG src=images/last.gif width=15 height=15 alt="move file to bottom in queue" title="move file to bottom in queue"></a></td>';
        echo '<td width="1"><a href="?action=filepause&offset=0&id=' . $cur_queued['ID'] . '"><IMG src=images/pause.gif width=15 height=15 alt="pause file" title="pause file"></a></td>';
        echo '<td width="1"><a href="?action=fileresume&offset=0&id=' . $cur_queued['ID'] . '"><IMG src=images/resume.gif width=15 height=15 alt="resume file" title="resume file"></a></td>';
        echo '<td align="right" width="100%">' . round1($cur_queued['FileSizeLo'] / 1024 / 1024) . ' MB</td>';
        echo '</tr>';
        echo $paused ? '<tr class="pausedgroup">' : '<tr class="unpausedgroup">';
        echo '<td colspan="8">' . namereplace($cur_queued['NZBNicename']) . '/' . namereplace($cur_queued['Filename']) . '</td>';
        echo '</tr>';
    }
    echo '</table>';
    if ($cnt > $FilesPerPage) {
        pagelist($cnt, $page, $FilesPerPage, 'page');
    }
    echo '</div><br>';
}
Exemplo n.º 5
0
 public function checkget()
 {
     $order_db = M('Order');
     $user_db = M('Users');
     $car_db = M('Car');
     $ntime = time();
     $hour = date("H");
     $map['status'] = '4';
     $map['bgtime'] = date("Y-m-d");
     $map['sget'] = '0';
     $oinfo = $order_db->where($map)->select();
     foreach ($oinfo as $k => $v) {
         $xch = $v['gethour'] - intval($hour);
         if ($xch == 2) {
             $sdata['sget'] = '1';
             $smap['oid'] = $v['oid'];
             $res = $order_db->where($smap)->save($sdata);
             if ($res) {
                 $umap['userid'] = $v['userid'];
                 $uoinfo = $user_db->where($umap)->find();
                 $cmap['cid'] = $v['cid'];
                 $cinfo = $car_db->where($cmap)->find();
                 $brandmap['brandid'] = $cinfo['cbrand'];
                 $modelmap['modelid'] = $cinfo['cmodel'];
                 $brandinfo = M('Carbrand')->where($brandmap)->find();
                 $modelinfo = M('Carmodel')->where($modelmap)->find();
                 $cinfo['cpnum'] = substr_replace($cinfo['cpnum'], '****', 0, 4);
                 $uoinfo['name'] = namereplace($uoinfo['name'], $uoinfo['sex']);
                 $cumap['userid'] = $v['cuserid'];
                 $cuinfo = $user_db->where($cumap)->find();
                 $cuinfo['name'] = namereplace($cuinfo['name'], $cuinfo['sex']);
                 $ccontent = "还有二小时您将要交车给驾友,请提前联系驾友,确定交接车地点,您可以和车主约定平台授权的服务商处对车辆进行检查;请取走您车内的重要物品,准备好相应的证件,自行打印准备车辆交接单或在服务商处取用(如有),交车时请务必确认对方的身份证和行驶证原件,以确认为本人驾驶。";
                 sendmsg($cuinfo['tel'], $ccontent);
                 $content = "还有二小时即可驾驶" . $brandinfo['brandname'] . $modelinfo['name'] . "(" . $cinfo['cppro'] . $cinfo['cpzm'] . $cinfo['cpnum'] . "),请提前联系车主,确定交接车地点,您可以和车主约定平台授权的服务商处对车辆进行检查;您保证为本人用车,否则视为违约,取车时请务必拍摄车身四角清晰照片,以免不必要的纠纷。";
                 sendmsg($uoinfo['tel'], $content);
             }
         }
     }
 }