Ejemplo n.º 1
0
 public function actionSubastas()
 {
     $products = Product::findAll(['status' => 'ACTIVE', 'auction' => 'YES']);
     $auctions = Auction::findAll(['status' => 'ACTIVE']);
     $time = Params::findOne(['name' => 'auction_time'])->value;
     return $this->render('auction', ['auctions' => $auctions, 'time' => $time]);
 }
Ejemplo n.º 2
0
                $replyTo .= '<a href="user.php?uid=' . $last_uid . '">' . $last_name . '</a> ';
            } else {
                $replyTo = '';
            }
            $GLOBALS['arr'][1] .= '<p>[#' . $id . '楼]<a href="usr.php?uid=' . $uid . '">' . $username . '</a>' . $replyTo . date('Y-m-d H:i:s', $comment_time);
            $GLOBALS['arr'][1] .= ':</p>';
            $GLOBALS['arr'][1] .= $content;
            $GLOBALS['arr'][1] .= '</div>' . "\n\n";
            showAllComment(1, $id, $id);
            $len--;
        }
    }
}
$script = '<script> aCommentList=[];' . "\n\n" . $GLOBALS['arr'][0];
$script .= '</script>';
$product = Product::findAll(['aid' => $aid]);
// var_dump($product);
// $size = Product:
$sizes = ArrayHelper::map($product, 'id', 'size');
// var_dump($sizes);
foreach ($sizes as $k => $v) {
    if (!is_array($v)) {
        $sizes[$k] = explode(',', $v);
    }
}
$colors = ArrayHelper::map($product, 'id', 'color');
foreach ($colors as $ke => $cv) {
    if (!is_array($cv)) {
        $colors[$ke] = explode(',', $cv);
    }
}