public function execute($smarty, $params, $session)
 {
     $smarty->assign('name', $session['screen_name']);
     $artists = Artist::findAll();
     $smarty->assign('artists', $artists);
     $songs = Song::findAll();
     $smarty->assign('songs', $songs);
     $parts = Part::findAll();
     $smarty->assign('parts', $parts);
     $smarty->display('index.tpl');
 }
Esempio n. 2
0
 public function actionImusic()
 {
     Createmusiclist();
     $url = "http://" . Yii::app()->params['bucket'] . "." . Yii::app()->params['domain'] . "/";
     $songModel = new Song();
     $songInfo = $songModel->findAll('userid=:uid', array(':uid' => Yii::app()->session['uid']));
     $data = array('songInfo' => $songInfo, 'url' => $url);
     $this->render("imusic", $data);
 }
Esempio n. 3
0
 public function actionMusic($who)
 {
     $uid = $who;
     $this->Myaccess($uid);
     $songModel = new Song();
     $data['musiclist'] = $songModel->findAll('userid=:uid', array(':uid' => $uid));
     if (empty($data['musiclist'])) {
         $data['message'] = "Oh,Sorry~,Empty in Music List。~";
         $data['backup'] = "/index/index";
         $data['params'] = array();
         $this->layout = "//layouts/error";
         $this->render("error", $data);
         die;
     }
     $data['uid'] = $uid;
     $data['url'] = "http://" . Yii::app()->params['bucket'] . "." . Yii::app()->params['domain'] . "/";
     $this->layout = "//layouts/illokit";
     $this->render('music', $data);
 }