$user = Users::model()->findByPk($user_id); $useraccount = Account::model()->find("user_id=:user_id", array(":user_id" => $user_id)); ?> <div class="col-lg-12" style="padding:10px 25px 0px 25px;"> <div class="panel panel-default" style="margin-bottom: 0px;"> <div class="panel-body"> <div class="row"> <div class="col-lg-4 col-md-4 col-xs-4"> <img style="width:100px;height:100px;" class="img-rounded img-responsive" src="<?php echo Yii::app()->theme->baseUrl; ?> /images/wechat/huodong/product.jpg"/> </div> <div class="col-lg-8" style="text-align: left;"> <p style="font-size: 20px;"><small>用户名:</small><?php echo BaseTool::truncate_utf8_string($user->username, 4); ?> </p> <p style="font-size:18px;"><small>可用资金:</small><font style="color:red;"><?php echo $useraccount->use_money; ?> </font></p> <p style="font-size:18px;"><small>安全级别:</small><font style="color:red;"><?php echo $user->getSafeLevelLabel(); ?> </font></p> </div> </div> </div> </div> </div>
$dataProvider = new CActiveDataProvider('Tender', array('criteria' => array('select' => 't.*', 'condition' => 't.user_id=:user_id AND t.status =2', 'order' => 't.id DESC', 'params' => array(":user_id" => Yii::app()->user->getId())), 'pagination' => array('pageSize' => 20))); ?> <?php if ($dataProvider->getData()) { foreach ($dataProvider->getData() as $value) { ?> <tr> <td><?php echo $value->id; ?> </td> <td title="<?php echo $value->project->title; ?> "><?php echo BaseTool::truncate_utf8_string($value->project->title, 8); ?> </td> <td><?php echo $value->project->user->username; ?> </td> <td><?php echo Project::getTypeValue($value->project->type); ?> </td> <td><?php echo Project::getCollectionValue($value->project->collection_type); ?> </td> <td><?php
<?php if (isset($page)) { $page = intval($page); } else { $page = 1; } if (isset($id)) { #获得筹资记录 $startlog = ($page - 1) * 10; $thischoujilu = Tender::model()->findAll("project_id=:project_id order by id asc limit :startlog,10 ", array(":project_id" => intval($id), ":startlog" => $startlog)); if ($thischoujilu) { foreach ($thischoujilu as $choujiluvalue) { echo '<ul class="list-inline text-right qys_choujilu_list"><li><span style="color:red;">' . intval($choujiluvalue->money) . ' 元</span></li><li>' . BaseTool::truncate_utf8_string($choujiluvalue->user->username, 6) . '</li><li style="color:#777;">' . date("Y/m/d", $choujiluvalue->addtime) . '</li></ul>'; } } else { echo '没有数据'; } } else { echo '错误的数据'; }