Beispiel #1
0
 public function __construct($count)
 {
     /*{{{*/
     $this->count = intval($count);
     $this->current = 1;
     $this->size = FConfig::item('config.pageSize');
     $this->_minSize = FConfig::item('config.pageSize');
     $this->previous = false;
     $this->next = false;
     $this->first = false;
     $this->last = false;
     $this->baseurl = '';
     $this->_selectType = array($this->size, 30, 50);
 }
Beispiel #2
0
    $greetings = "上午好,";
} elseif (12 <= date('G') && date('G') < 18) {
    $greetings = "下午好,";
} elseif (18 <= date('G') && date('G') < 24) {
    $greetings = "晚上好,";
}
$userHeadInfo['greetings'] = $greetings . Fn::wsubstr($this->user['nick_name'], 0, 10);
$userHeadInfo['email_check'] = $this->userInfo['email_check'];
$userHeadInfo['person_id'] = $this->userInfo['person_id'];
if ($this->user['phone_num']) {
    $userHeadInfo['phone_check'] = 1;
} else {
    $userHeadInfo['phone_check'] = 0;
}
$userHeadInfo['level'] = $userHeadInfo['email_check'] + $userHeadInfo['person_id'] + $userHeadInfo['phone_check'];
$levels = FConfig::item("config.user_level");
$userHeadInfo['level_name'] = $levels[$userHeadInfo['level']];
?>
<div class="g-sd2 sidebar">
    <!-- 个人信息 -->
    <div class="profile">
        <div class="pf-hd">
            <img src="<?php 
echo FF_DOMAIN;
?>
/upload/images/user_head.png" width="95" height="95" />
        </div>
        <div class="pf-name"><?php 
echo $userHeadInfo['greetings'];
?>
</div>
Beispiel #3
0
    ?>
</p>
                                </td>
                                <td>转入</td>
                                <td><?php 
    echo $v->buy_val;
    ?>
</td>
                                <td>0.00</td>
                                <td><?php 
    echo $v->buy_val - 0;
    ?>
</td>
                                <td>0.00</td>
                                <td><?php 
    echo FConfig::item('config.buy_status_mess.' . $v->buy_status);
    ?>
</td>
                                <td><a href="#">查看</a> </td>
                            </tr>
                            <?php 
}
?>
                        </table>
                    </div>
                </div>
            </div>

        </div>
        <!-- end投资记录 -->
    </div>
Beispiel #4
0
 public function actionUpdatePwd()
 {
     $response = array();
     $user_phone = $this->request->getParam('user_phone');
     $new_pwd = trim($this->request->getParam('new_pwd'));
     $phone_code = trim($this->request->getParam('phone_code'));
     $verifyCode = FCookie::get(FConfig::item('config.cookie.phone_key'));
     $verifyCode = Fn::crypt($verifyCode, FConfig::item('config.cookie.phone_code'), 'decode');
     if ($phone_code != $verifyCode) {
         $response['status'] = 100001;
         $response['content'] = '短信验证失败!';
     } else {
         $res = $this->user_model->updateAll(array('password' => md5($new_pwd)), 'phone_num=:phone', array(':phone' => $user_phone));
         if ($res) {
             $response['status'] = 100000;
             $response['content'] = '修改密码成功!';
         } else {
             $response['status'] = 100002;
             $response['content'] = '修改密码失败!';
         }
     }
     Yii::app()->end(FHelper::json($response['content'], $response['status']));
 }
Beispiel #5
0
        ?>
</td>
                                <td><?php 
        if ($v['product_type_val'] == 2) {
            echo $xintuo[$v['product_id']]['xintuo_name'];
        } elseif ($v['product_type_val'] == 3) {
            echo $fund[$v['product_id']]['fund_name'];
        }
        ?>
</td>
                                <td><?php 
        echo $proType[$v['product_type_val']]['type_name'];
        ?>
</td>
                                <td><?php 
        echo FConfig::item('config.appoint_status.' . $v['appoint_status']);
        ?>
</td>
                                <td><?php 
        echo date('Y-m-d', strtotime($v['create_time']));
        ?>
</td>
                            </tr>
                            <?php 
    }
}
?>
                        </table>
                    </div>
                </div>
            </div>
Beispiel #6
0
 public function actionSendMsgPhone()
 {
     $sendMessage = new SendMessage();
     $response = array();
     $code = FHelper::generate_code();
     $content = FConfig::item('siteMessage.register.first') . $code . FConfig::item('siteMessage.register.end');
     $user = FConfig::item('config.ws_mobile.userName');
     $pass = FConfig::item('config.ws_mobile.passWord');
     $today = date('Y-m-d 0:0:0', time());
     $condition = array('condition' => "mobile_no = '{$this->user['phone_num']}' and send_time >= '{$today}'");
     $messageCount = $sendMessage->count($condition);
     if ($messageCount < 5) {
         Yii::import('ext.wsMobile.ws.*');
         require_once 'ws-demo.php';
         $engine = WS_SDK::getInstance($user, $pass);
         $res = $engine->sendSmsAsNormal($this->user['phone_num'], $content, '', 0);
         if (intval($res) === 0) {
             $cryRes = Fn::crypt($code, FConfig::item('config.cookie.phone_code'));
             FCookie::set(FConfig::item('config.cookie.phone_key'), $cryRes);
             $response['status'] = 100000;
             $response['content'] = '短信发送成功';
             $telArr = array('mobile_no' => $this->user['phone_num'], 'mess_code' => $code, 'send_time' => FF_DATE_TIME);
             $sendMessage->attributes = $telArr;
             $sendMessage->save();
         } else {
             $response['status'] = 100001;
             $response['content'] = '短信发送失败,请重试';
         }
     } else {
         $response['status'] = 100002;
         $response['content'] = '该手机号码今天发送验证码过多';
     }
     Yii::app()->end(FHelper::json($response['content'], $response['status']));
 }
Beispiel #7
0
 public function actionCheckUnion()
 {
     $condition_trade = array('condition' => 'trade_time>=:trade_time', 'params' => array(':trade_time' => date('Y-m-d', strtotime('-1 day'))));
     $res_trade_arr = $this->tradingRecord_model->findAll($condition_trade);
     foreach ($res_trade_arr as $k => $res_trade) {
         $trade_record = $res_trade->getAttributes();
         $res_search = FUnionPay::search($trade_record, FConfig::item('config.payType.' . $res_trade['pay_type']));
         if ($res_search['origRespCode'] === '00') {
             $is_equal = $res_trade['trade_status'] == 1 ? 1 : 0;
         } else {
             $is_equal = $res_trade['trade_status'] == 0 ? 1 : 0;
         }
         $condition_attr_union = array('trade_code' => $res_search['orderId'], 'trade_status' => $res_trade['trade_status'], 'trade_fee' => $res_search['trade_fee'], 'origRespCode' => $res_search['origRespCode'], 'origRespMsg' => $res_search['origRespMsg'], 'check_time' => date('Y-m-d H:i:s'), 'respCode' => $res_search['respCode'], 'respMsg' => $res_search['respMsg'], 'txnAmt' => $res_search['txnAmt'], 'settleAmt' => $res_search['settleAmt'], 'is_equal' => $is_equal);
         $unionCheck = new UnionCheck();
         $unionCheck->attributes = $condition_attr_union;
         $unionCheck->save();
     }
 }
Beispiel #8
0
                                </tr>

                            <?php 
    }
} else {
    ?>
                            <tr>
                                <th>交易流水号<em class="arrow-icon"></em></th>
                                <th>交易类型<em class="arrow-icon"></em></th>
                                <th>账户余额<em class="arrow-icon"></em></th>
                                <th>交易金额<em class="arrow-icon"></em></th>
                                <th>交易状态<em class="arrow-icon"></em></th>
                                <th>交易时间<em class="arrow-icon"></em></th>
                            </tr>
                            <?php 
    $trade_mess = FConfig::item("config.trade_type_mess");
    if (is_array($tradeList)) {
        foreach ($tradeList as $val) {
            $trade = $val->getAttributes();
            $tradeStatus = $trade['trade_status'] ? "成功" : "未完成";
            $u_account_val = floatval($trade['user_account_val'] + $trade['trade_fee']);
            echo "<tr>\n                                <td>{$trade['trade_code']}</td>\n                                <td>{$trade_mess[$trade['trade_type']]}</td>\n                                <td>{$u_account_val}</td>\n                                <td>{$trade['trade_fee']}</td>\n                                <td>{$tradeStatus}</td>\n                                <td>{$trade['trade_time']}</td>\n                                </tr>";
        }
    }
}
?>

                        </table>

                        <?php 
if (is_array($tradeList)) {
Beispiel #9
0
 protected function dealParam($isMobileRequest = null)
 {
     //获取全部标签
     $mc_tag_tree1 = md5('mc_tag_tree_key1');
     $mc_tag_tree2 = md5('mc_tag_tree_key2');
     $mc_tag_tree3 = md5('mc_tag_tree_key3');
     $typeId = $this->request->getParam('typeId');
     if (empty($typeId)) {
         $productType = Yii::app()->db->createCommand('select * from ff_product_type order by type_sort limit 1')->queryAll();
         $typeId = $productType[0]['id'];
     }
     $proTypes = $this->getProductType();
     $type_val = $proTypes[$typeId]['type_val'];
     if ($type_val == 1) {
         $tree = Yii::app()->cache->get($mc_tag_tree1);
     } elseif ($type_val == 2) {
         $tree = Yii::app()->cache->get($mc_tag_tree2);
     } elseif ($type_val == 3) {
         $tree = Yii::app()->cache->get($mc_tag_tree3);
     }
     if (!$tree) {
         $tree = new FTree(Yii::app()->db->createCommand("select * from ff_tag where type_val = {$type_val} order by tag_sort")->queryAll());
         $key = "mc_tag_tree_key" . $type_val;
         Yii::app()->cache->set(md5($key), $tree, 600);
     }
     $param = array('cate' => trim($this->request->getParam('cate')), 'tags' => $tree->getArray(), 'seo_year' => date("Y"), 'parameters' => '', 'basePath' => '');
     $param['typeId'] = $typeId;
     if ($isMobileRequest) {
         $_url_prefix = '';
         //FF_DOMAIN . "/w/index/caseList/"
     } else {
         //生成标签展示URL
         $_url_prefix = FF_DOMAIN . "/s/{$typeId}/";
     }
     //获取参数相关配置文件
     $p_config = FConfig::item("tags.param.{$type_val}");
     $rs = $param['cate'] ? $this->dealCate($param['cate']) : '';
     foreach ($p_config as $k => $v) {
         //设置参数
         $param[$v['short']] = isset($rs[$v['short']]) && in_array($rs[$v['short']], array_keys($tree->get_child($v['id']))) ? $rs[$v['short']] : 0;
         //SEO title,keyword,desc拼接
         $seo_show_tmp = $param[$v['short']] > 0 ? $param['tags'][$param[$v['short']]]['name'] : '';
         if ($v['short'] == 'a') {
             $a = $seo_show_tmp;
             $a1 = isset($rs['a']) ? 'a' . $rs['a'] : '';
         }
         if ($v['short'] == 'b') {
             $b = $seo_show_tmp;
             $b1 = isset($rs['b']) ? 'b' . $rs['b'] : '';
         }
         if ($v['short'] == 'c') {
             $c = $seo_show_tmp;
             $c1 = isset($rs['c']) ? 'c' . $rs['c'] : '';
         }
         if ($v['short'] == 'd') {
             $d = $seo_show_tmp;
             $d1 = isset($rs['d']) ? 'd' . $rs['d'] : '';
         }
         if ($v['short'] == 'e') {
             $e = $seo_show_tmp;
             $e1 = isset($rs['e']) ? 'e' . $rs['e'] : '';
         }
         if ($v['short'] == 'f') {
             $f = $seo_show_tmp;
             $f1 = isset($rs['f']) ? 'f' . $rs['f'] : '';
         }
     }
     //搜索参数拼接
     $param['parameters'] = $a1 . $b1 . $c1 . $d1 . $e1 . $f1;
     $param['pname'] = $a . $b . $c . $d . $e . $f;
     foreach ($param['tags'] as $k => &$v) {
         $v['url'] = $_url_prefix;
         foreach ($p_config as $pc_k => $pc_v) {
             if ($pc_v['id'] == $v['id']) {
                 $v['url'] .= '';
             } elseif ($pc_v['id'] == $v['parent_id']) {
                 $v['url'] .= $pc_v['short'] . $v['id'];
             } else {
                 //组合查询打开
                 if ($param[$pc_v['short']] > 0) {
                     $v['url'] .= $pc_v['short'] . $param[$pc_v['short']];
                     $param['tags'][$param[$pc_v['short']]]['class'] = 'current';
                 } else {
                     //$param['tags'][$v['parent_id']]['class'] = 'current';
                     $param['tags'][$pc_v['id']]['class'] = 'current';
                 }
             }
         }
         if (substr($v['url'], strlen($v['url']) - 1) !== '/') {
             $v['url'] .= '/';
         }
     }
     $param['basePath'] = FF_DOMAIN . "/s/";
     return $param;
 }