10 $userId = Yii::app()->user->id;
15 $command->rmTmpData();
16 $this->render(
'index', array(
17 'dataProvider' =>
$data,
22 public function actionFind($uid, $limit, $state, $pattern, $pN, $sortBy, $sortDirection)
26 $userId = Yii::app()->user->id;
27 $command->
createRequest($pattern, $state, $limit, $uid, $pN, $sortBy, $sortDirection);
28 $data = $command->findSite($userId,
false);
29 if (
$data[
'manError'][
'isError'] ==
true) {
30 Yii::app()->user->setFlash(
'error',
'Search ERROR: ' .
$data[
'manError'][
'errorBody']);
33 unset(
$data[
'manError']);
34 Yii::app()->user->setFlash(
'success',
'Search: SUCCESS');
35 $itemsProvider =
new CArrayDataProvider(
$data, array(
36 'pagination' => array(
41 $command->rmTmpData();
42 $this->render(
'find', array(
43 'itemsProvider' => $itemsProvider,
45 'pattern' => $pattern,
51 'sortDirection' => $sortDirection
60 $userId = Yii::app()->user->id;
62 $itemsProvider = $command->findSite($userId, $reqFile, $n);
63 $resFile = $command->responseFile;
64 $filtersProvider = $command->getFilters($userId, $resFile, $n);
65 $propsProvider = $command->getProperties($userId, $resFile, $n);
66 $limitsProvider = $command->getLimits($userId, $resFile, $n);
67 $errorsProvider = $command->getErrorsTypes($userId, $resFile, $n);
69 Yii::app()->user->setFlash(
'success',
'View: SUCCESS');
72 $command->rmTmpData();
75 $this->render(
'findSingle', array(
76 'itemsProvider' => $itemsProvider,
77 'filtersProvider' => $filtersProvider,
78 'propsProvider' => $propsProvider,
79 'limitsProvider' => $limitsProvider,
80 'errorsProvider' => $errorsProvider,
81 'descr'=>$descriptions[
'SITES'],
83 'log' => print_r($this->log,
true)
88 $siteId = Yii::app()->request->getParam(
'id');
90 $res = $command->integrityCheck($siteId);
91 if (isset($res[
'code']) && $res[
'code'] == 0) {
92 $this->renderPartial(
'__integrityCheckOk');
94 $this->renderPartial(
'__integrityCheckFail', array(
95 'itemsProvider' =>
new CArrayDataProvider($res, array(
96 'keyField' =>
'Sites',
105 $this->renderPartial(
'__integrityCheckModal', array(
106 'id' => Yii::app()->request->getParam(
'id')
112 $command->updateSiteInfo(null, 0);
117 $propsArr = CJSON::encode($command->getTProps());