Esempio n. 1
0
            <div class="bd" style="display: block;">
                <div class="bk time"><h3>在线时间</h3><span>09:00-23:00</span></div>
                <div class="kf bk">
                    <?php 
$category = Category::model()->findByPk('104');
$service_category = $category->children()->findAll();
foreach ($service_category as $sc) {
    ?>
                        <h3><?php 
    echo $sc->name;
    ?>
</h3>
                        <ul>
                            <?php 
    $cri = new CDbCriteria(array('condition' => 'category_id =' . $sc->id));
    $CustomerService = CustomerService::model()->findAll($cri);
    foreach ($CustomerService as $cs) {
        ?>
                            <li><span><?php 
        echo $cs->nick_name;
        ?>
</span>
                                <?php 
        if ($cs->type == 1) {
            ?>
                                <a target="_blank" href="http://wpa.qq.com/msgrd?v=3&uin=<?php 
            echo $cs->account;
            ?>
&site=qq&menu=yes"><img border="0" src="http://wpa.qq.com/pa?p=2:<?php 
            echo $cs->account;
            ?>
 /**
  * Returns the data model based on the primary key given in the GET variable.
  * If the data model is not found, an HTTP exception will be raised.
  * @param integer the ID of the model to be loaded
  */
 public function loadModel($id)
 {
     $model = CustomerService::model()->findByPk($id);
     if ($model === null) {
         throw new CHttpException(404, 'The requested page does not exist.');
     }
     return $model;
 }
Esempio n. 3
0
 public function run()
 {
     $cri = new CDbCriteria(array('condition' => 'is_show = 1', 'order' => 'sort_order asc, id desc'));
     $CustomerService = CustomerService::model()->findAll($cri);
     $this->render('customerService', array('CustomerService' => $CustomerService));
 }