public function actionC()
 {
     $id = $this->sGet('id');
     $type = $this->sGet('type', 'winners');
     $types = Competitions::getResultsTypes();
     $competition = Competitions::model()->findByAttributes(array('id' => $id));
     if ($competition == null) {
         $this->redirect(array('/results/competition'));
     }
     if (!array_key_exists($type, $types)) {
         $type = 'winners';
     }
     if (($c = Competition::model()->findByAttributes(array('wca_competition_id' => $id))) !== null) {
         $competition->name = $c->getAttributeValue('name');
         $competition->location = $c->isMultiLocation() ? $c->getLocationInfo('venue') : $c->location[0]->getFullAddress(false);
         $competition->c = $c;
     }
     $data = Yii::app()->cache->getData(array('Competitions', 'getResults'), $id);
     if (empty($data['scrambles']) && $type !== 'scrambles') {
         unset($types['scrambles']);
     }
     $data['competition'] = $competition;
     $data['type'] = $type;
     $data['types'] = $types;
     $this->breadcrumbs = array('Results' => array('/results/index'), 'Competitions' => array('/results/competition'), $competition->name);
     $this->pageTitle = array($competition->name, 'Competition Results');
     $this->title = $competition->name;
     // $this->setWeiboShareDefaultText($competition->name . '选手的魔方速拧成绩页 - 粗饼·中国魔方赛事网', false);
     $this->render('c', $data);
 }