ЛИСТИНГ
«Ўзбек тилининг омоним луғати» ЭҲМ дастури
Фойдаланувчилар учун
ЭҲМ дастури
Ҳуқуқ эгаси:
Урганч Давлат университети
Муаллифлар:
Рўзимбойев Сарвар Сапарбойевич
Мадатов Хабибулла Aхмедович
Тахиров Юлдаш Ражабович
Худайберганова Дилдора Кулмаматовна
Рахимбаев Мусобек Комилжон ўғли
Дастурни кўриниши:
SiteContraoller.php
namespace app\controllers;
use app\models\Word;
use app\models\Words;
use Yii;
use yii\data\Pagination;
use yii\filters\AccessControl;
use yii\web\Controller;
use yii\web\Response;
use yii\filters\VerbFilter;
use app\models\LoginForm;
use app\models\ContactForm;
class SiteController extends Controller
{
/**
* {@inheritdoc}
*/
public function behaviors()
{
return [
'access' => [
'class' => AccessControl::className(),
'only' => ['logout'],
'rules' => [
[
'actions' => ['logout'],
'allow' => true,
'roles' => ['@'],
],
],
],
'verbs' => [
'class' => VerbFilter::className(),
'actions' => [
'logout' => ['post'],
],
],
];
}
/**
* {@inheritdoc}
*/
public function actions()
{
return [
'error' => [
'class' => 'yii\web\ErrorAction',
],
'captcha' => [
'class' => 'yii\captcha\CaptchaAction',
'fixedVerifyCode' => YII_ENV_TEST ? 'testme' : null,
],
];
}
/**
* Displays homepage.
*
* @return string
*/
public function actionIndex()
{
$post = Yii::$app->request->post('post');
$tahlil = Word::find()->where(['suz'=>$post])->one();
$model = Word::find()->count();
$model1 = Word::find()->where(['turkum'=>1])->count();
$model2 = Word::find()->where(['turkum'=>2])->count();
$model3 = Word::find()->where(['turkum'=>3])->count();
$model4 = Word::find()->where(['turkum'=>4])->count();
$model5 = Word::find()->where(['turkum'=>5])->count();
$model6 = Word::find()->where(['turkum'=>6])->count();
$model7 = Word::find()->where(['turkum'=>7])->count();
$model8 = Word::find()->where(['turkum'=>8])->count();
$model9 = Word::find()->where(['turkum'=>9])->count();
Word::updateAll(['turkum'=>'9'],['turkum'=>"Modal. s"]);
return $this->render('index',[
'model'=>$model,
'model1'=>$model1,
'model2'=>$model2,
'model3'=>$model3,
'model4'=>$model4,
'model5'=>$model5,
'model6'=>$model6,
'model7'=>$model7,
'model8'=>$model8,
'model9'=>$model9,
'tahlil'=>$tahlil,
]);
}
public function actionOmonim()
{
$post = Yii::$app->request->post('post');
$tahlil = Words::find()->where(['word'=>$post])->one();
$model = Word::find()->count();
$model1 = Word::find()->where(['turkum'=>1])->count();
$model2 = Word::find()->where(['turkum'=>2])->count();
$model3 = Word::find()->where(['turkum'=>3])->count();
$model4 = Word::find()->where(['turkum'=>4])->count();
$model5 = Word::find()->where(['turkum'=>5])->count();
$model6 = Word::find()->where(['turkum'=>6])->count();
$model7 = Word::find()->where(['turkum'=>7])->count();
$model8 = Word::find()->where(['turkum'=>8])->count();
$model9 = Word::find()->where(['turkum'=>9])->count();
Word::updateAll(['turkum'=>'9'],['turkum'=>"Modal. s"]);
return $this->render('omonim',[
'model'=>$model,
'model1'=>$model1,
'model2'=>$model2,
'model3'=>$model3,
'model4'=>$model4,
'model5'=>$model5,
'model6'=>$model6,
'model7'=>$model7,
'model8'=>$model8,
'model9'=>$model9,
'tahlil'=>$tahlil,
]);
}
public function actionStatistic()
{
$post = Yii::$app->request->post('post');
$tahlil = Word::find()->where(['suz'=>$post])->one();
$model = Word::find()->count();
$model1 = Word::find()->where(['turkum'=>1])->count();
$model2 = Word::find()->where(['turkum'=>2])->count();
$model3 = Word::find()->where(['turkum'=>3])->count();
$model4 = Word::find()->where(['turkum'=>4])->count();
$model5 = Word::find()->where(['turkum'=>5])->count();
$model6 = Word::find()->where(['turkum'=>6])->count();
$model7 = Word::find()->where(['turkum'=>7])->count();
$model8 = Word::find()->where(['turkum'=>8])->count();
$model9 = Word::find()->where(['turkum'=>9])->count();
Word::updateAll(['turkum'=>'9'],['turkum'=>"Modal. s"]);
return $this->render('statistic',[
'model'=>$model,
'model1'=>$model1,
'model2'=>$model2,
'model3'=>$model3,
'model4'=>$model4,
'model5'=>$model5,
'model6'=>$model6,
'model7'=>$model7,
'model8'=>$model8,
'model9'=>$model9,
'tahlil'=>$tahlil,
]);
}
public function actionOt()
{
$model = Word::find()->count();
$model1 = Word::find()->where(['turkum'=>1])->count();
$model2 = Word::find()->where(['turkum'=>2])->count();
$model3 = Word::find()->where(['turkum'=>3])->count();
$model4 = Word::find()->where(['turkum'=>4])->count();
$model5 = Word::find()->where(['turkum'=>5])->count();
$model6 = Word::find()->where(['turkum'=>6])->count();
$model7 = Word::find()->where(['turkum'=>7])->count();
$model8 = Word::find()->where(['turkum'=>8])->count();
$model9 = Word::find()->where(['turkum'=>9])->count();
Word::updateAll(['turkum'=>'9'],['turkum'=>"Modal. s"]);
$name = Word::find()->where(['turkum'=>1])->one();
$models = Word::find()->where(['turkum'=>1]);
$pages = new Pagination(['totalCount' => $models->count(), 'pageSize' => 12]);
$pages->pageSizeParam = false;
$models = $models->offset($pages->offset)->limit($pages->limit)->all();
return $this->render('words',[
'models'=>$models,
'model'=>$model,
'model1'=>$model1,
'model2'=>$model2,
'model3'=>$model3,
'model4'=>$model4,
'pages'=>$pages,
'model5'=>$model5,
'model6'=>$model6,
'model7'=>$model7,
'model8'=>$model8,
'model9'=>$model9,
'name'=>$name,
]);
}
public function actionSifat()
{
$model = Word::find()->count();
$model1 = Word::find()->where(['turkum'=>1])->count();
$model2 = Word::find()->where(['turkum'=>2])->count();
$model3 = Word::find()->where(['turkum'=>3])->count();
$model4 = Word::find()->where(['turkum'=>4])->count();
$model5 = Word::find()->where(['turkum'=>5])->count();
$model6 = Word::find()->where(['turkum'=>6])->count();
$model7 = Word::find()->where(['turkum'=>7])->count();
$model8 = Word::find()->where(['turkum'=>8])->count();
$model9 = Word::find()->where(['turkum'=>9])->count();
Word::updateAll(['turkum'=>'9'],['turkum'=>"Modal. s"]);
$name = Word::find()->where(['turkum'=>2])->one();
$models = Word::find()->where(['turkum'=>2]);
$pages = new Pagination(['totalCount' => $models->count(), 'pageSize' => 12]);
$pages->pageSizeParam = false;
$models = $models->offset($pages->offset)->limit($pages->limit)->all();
return $this->render('words',[
'models'=>$models,
'model'=>$model,
'model1'=>$model1,
'model2'=>$model2,
'model3'=>$model3,
'model4'=>$model4,
'pages'=>$pages,
'model5'=>$model5,
'model6'=>$model6,
'model7'=>$model7,
'model8'=>$model8,
'model9'=>$model9,
'name'=>$name,
]);
}
public function actionSon()
{
$model = Word::find()->count();
$model1 = Word::find()->where(['turkum'=>1])->count();
$model2 = Word::find()->where(['turkum'=>2])->count();
$model3 = Word::find()->where(['turkum'=>3])->count();
$model4 = Word::find()->where(['turkum'=>4])->count();
$model5 = Word::find()->where(['turkum'=>5])->count();
$model6 = Word::find()->where(['turkum'=>6])->count();
$model7 = Word::find()->where(['turkum'=>7])->count();
$model8 = Word::find()->where(['turkum'=>8])->count();
$model9 = Word::find()->where(['turkum'=>9])->count();
Word::updateAll(['turkum'=>'9'],['turkum'=>"Modal. s"]);
$name = Word::find()->where(['turkum'=>3])->one();
$models = Word::find()->where(['turkum'=>3]);
$pages = new Pagination(['totalCount' => $models->count(), 'pageSize' => 12]);
$pages->pageSizeParam = false;
$models = $models->offset($pages->offset)->limit($pages->limit)->all();
return $this->render('words',[
'models'=>$models,
'model'=>$model,
'model1'=>$model1,
'model2'=>$model2,
'model3'=>$model3,
'model4'=>$model4,
'pages'=>$pages,
'model5'=>$model5,
'model6'=>$model6,
'model7'=>$model7,
'model8'=>$model8,
'model9'=>$model9,
'name'=>$name,
]);
}
public function actionFel()
{
$model = Word::find()->count();
$model1 = Word::find()->where(['turkum'=>1])->count();
$model2 = Word::find()->where(['turkum'=>2])->count();
$model3 = Word::find()->where(['turkum'=>3])->count();
$model4 = Word::find()->where(['turkum'=>4])->count();
$model5 = Word::find()->where(['turkum'=>5])->count();
$model6 = Word::find()->where(['turkum'=>6])->count();
$model7 = Word::find()->where(['turkum'=>7])->count();
$model8 = Word::find()->where(['turkum'=>8])->count();
$model9 = Word::find()->where(['turkum'=>9])->count();
Word::updateAll(['turkum'=>'9'],['turkum'=>"Modal. s"]);
$name = Word::find()->where(['turkum'=>4])->one();
$models = Word::find()->where(['turkum'=>4]);
$pages = new Pagination(['totalCount' => $models->count(), 'pageSize' => 12]);
$pages->pageSizeParam = false;
$models = $models->offset($pages->offset)->limit($pages->limit)->all();
return $this->render('words',[
'models'=>$models,
'model'=>$model,
'model1'=>$model1,
'model2'=>$model2,
'model3'=>$model3,
'model4'=>$model4,
'pages'=>$pages,
'model5'=>$model5,
'model6'=>$model6,
'model7'=>$model7,
'model8'=>$model8,
'model9'=>$model9,
'name'=>$name,
]);
}
public function actionRavish()
{
$model = Word::find()->count();
$model1 = Word::find()->where(['turkum'=>1])->count();
$model2 = Word::find()->where(['turkum'=>2])->count();
$model3 = Word::find()->where(['turkum'=>3])->count();
$model4 = Word::find()->where(['turkum'=>4])->count();
$model5 = Word::find()->where(['turkum'=>5])->count();
$model6 = Word::find()->where(['turkum'=>6])->count();
$model7 = Word::find()->where(['turkum'=>7])->count();
$model8 = Word::find()->where(['turkum'=>8])->count();
$model9 = Word::find()->where(['turkum'=>9])->count();
Word::updateAll(['turkum'=>'9'],['turkum'=>"Modal. s"]);
$name = Word::find()->where(['turkum'=>5])->one();
$models = Word::find()->where(['turkum'=>5]);
$pages = new Pagination(['totalCount' => $models->count(), 'pageSize' => 12]);
$pages->pageSizeParam = false;
$models = $models->offset($pages->offset)->limit($pages->limit)->all();
return $this->render('words',[
'models'=>$models,
'model'=>$model,
'model1'=>$model1,
'model2'=>$model2,
'model3'=>$model3,
'model4'=>$model4,
'pages'=>$pages,
'model5'=>$model5,
'model6'=>$model6,
'model7'=>$model7,
'model8'=>$model8,
'model9'=>$model9,
'name'=>$name,
]);
}
public function actionOlmosh()
{
$model = Word::find()->count();
$model1 = Word::find()->where(['turkum'=>1])->count();
$model2 = Word::find()->where(['turkum'=>2])->count();
$model3 = Word::find()->where(['turkum'=>3])->count();
$model4 = Word::find()->where(['turkum'=>4])->count();
$model5 = Word::find()->where(['turkum'=>5])->count();
$model6 = Word::find()->where(['turkum'=>6])->count();
$model7 = Word::find()->where(['turkum'=>7])->count();
$model8 = Word::find()->where(['turkum'=>8])->count();
$model9 = Word::find()->where(['turkum'=>9])->count();
Word::updateAll(['turkum'=>'9'],['turkum'=>"Modal. s"]);
$name = Word::find()->where(['turkum'=>6])->one();
$models = Word::find()->where(['turkum'=>6]);
$pages = new Pagination(['totalCount' => $models->count(), 'pageSize' => 12]);
$pages->pageSizeParam = false;
$models = $models->offset($pages->offset)->limit($pages->limit)->all();
return $this->render('words',[
'models'=>$models,
'model'=>$model,
'model1'=>$model1,
'model2'=>$model2,
'model3'=>$model3,
'model4'=>$model4,
'pages'=>$pages,
'model5'=>$model5,
'model6'=>$model6,
'model7'=>$model7,
'model8'=>$model8,
'model9'=>$model9,
'name'=>$name,
]);
}
Do'stlaringiz bilan baham: |