13 $this->render(
'index', array(
14 'dataProvider' =>
$data,
22 $request = Yii::app()->request;
23 $params = $request->getParam(
'form');
24 if (!isset($params[
'page']))
25 $params[
'page'] =
'1';
27 $userId = Yii::app()->user->id;
28 $data = $command->fetch($userId, $params);
29 if (
$data[
'manError'][
'isError'] ==
true) {
30 Yii::app()->user->setFlash(
'error',
'Search ERROR: ' .
$data[
'manError'][
'errorBody']);
31 $this->redirect(
'/UrlsView/index');
33 unset(
$data[
'manError']);
34 Yii::app()->user->setFlash(
'success',
'Search: SUCCESS');
37 $sort->defaultOrder =
'urlMd5 DESC';
38 $sort->attributes = array(
'urlMd5');
40 $itemsProvider =
new CArrayDataProvider(
$data, array(
41 'keyField' =>
'CDate',
42 'pagination' =>
false,
46 $this->render(
'find', array(
47 'itemsProvider' => $itemsProvider,
54 $request = Yii::app()->request;
55 $params = $request->getParam(
'urlId');
57 $userId = Yii::app()->user->id;
58 $data = $command->fetch($userId, $params,
true);
59 if (
$data[
'manError'][
'isError'] ==
true) {
60 Yii::app()->user->setFlash(
'error',
'View ERROR: ' .
$data[
'manError'][
'errorBody']);
61 $this->redirect(
'/UrlsView/index');
63 unset(
$data[
'manError']);
65 Yii::app()->user->setFlash(
'success',
'View: SUCCESS');
66 $itemsProvider =
new CArrayDataProvider(
$data[0], array(
67 'keyField' =>
'tcDate',
68 'pagination' => array(
72 $itemsProviderHl =
new CArrayDataProvider(
$data[1], array(
73 'keyField' =>
'tcDate',
74 'pagination' => array(
78 $limitsProvider = $command->getLimits($userId);
79 $errorsProvider = $command->getErrorsTypes($userId);
80 $tagsProvider = $command->getTagsTypes($userId);
81 $contentParams = $command->getContentParams(
$data[0][0]);
82 $historyData = $command->getHistory();
87 $this->render(
'single', array(
88 'itemsProvider' => $itemsProvider,
89 'itemsProviderHl' => $itemsProviderHl,
90 'limitsProvider' => $limitsProvider,
91 'errorsProvider' => $errorsProvider,
92 'tagsProvider' => $tagsProvider,
94 'contentParams' => $contentParams,
95 'descr' => $descriptions[
'URLS'],
96 'historyData'=>$historyData,
102 $userId = Yii::app()->user->id;
104 if ($contents[
'type'] ==
'raw') {
105 $this->renderPartial(
'__contentRaw', array(
106 'data' => $contents[
'contents']
109 } elseif ($contents[
'type'] ==
'processed') {
110 $this->renderPartial(
'__contentProcessed', array(
111 'data' => $contents[
'contents'],