Exemplo n.º 1
0
 /**
  * This is the default 'index' action that is invoked
  * when an action is not explicitly requested by users.
  */
 public function actionIndex()
 {
     if (Yii::app()->getUrlManager()->showScriptName) {
         $scriptUrl = basename($_SERVER['SCRIPT_NAME']);
         if (strpos($_SERVER['REQUEST_URI'], $scriptUrl) === false) {
             header("location: index.php");
         }
     }
     $entries = array();
     if (ConfigUtil::getUrlFopen()) {
         $xml = @simplexml_load_file('http://feeds.launchpad.net/chive/announcements.atom');
         if ($xml != null) {
             $entries = $xml->entry;
         }
     }
     $this->render('index', array('entries' => $entries, 'formatter' => Yii::app()->getDateFormatter()));
 }
Exemplo n.º 2
0
		</tr>
		<tr>
			<td><?php 
echo Yii::t('core', 'chiveVersion');
?>
</td>
			<td><?php 
echo Yii::app()->params->version;
?>
</td>
		</tr>
	</tbody>
</table>

<?php 
if (ConfigUtil::getUrlFopen() && count($entries) > 0) {
    ?>
	<table class="list" style="float: left; width: 50%; margin-left: 10px;">
		<colgroup>
			<col style="width: 200px;"></col>
			<col></col>
			<col style="width: 20px;"></col>
		</colgroup>
		<thead>
			<tr>
				<th colspan="3">
					<span class="icon">
						<?php 
    echo CHtml::link(Html::icon('rss'), 'http://feeds.launchpad.net/chive/announcements.atom');
    ?>
						<span><?php