diff --git a/console/controllers/SqlController.php b/console/controllers/SqlController.php index 2aebf0c..4727c5f 100644 --- a/console/controllers/SqlController.php +++ b/console/controllers/SqlController.php @@ -17,6 +17,23 @@ class SqlController extends Controller echo "script completed successfully\n"; } + public function actionAddAva() + { + $model = UserCard::find()->all(); + foreach ($model as $item) { + if(!$item->photo){ + if($item->gender === 1){ + $item->photo = '/profileava/f' . random_int(1, 6) . '.png'; + } + else { + $item->photo = '/profileava/m' . random_int(1, 10) . '.png'; + } + $item->save(); + } + } + echo "script completed successfully\n"; + } + public function actionGenerateUser() { echo UserCard::generateUserForUserCard() . "\n"; diff --git a/frontend/web/profileava/f1.png b/frontend/web/profileava/f1.png new file mode 100644 index 0000000..d04b683 Binary files /dev/null and b/frontend/web/profileava/f1.png differ diff --git a/frontend/web/profileava/f2.png b/frontend/web/profileava/f2.png new file mode 100644 index 0000000..a43308c Binary files /dev/null and b/frontend/web/profileava/f2.png differ diff --git a/frontend/web/profileava/f3.png b/frontend/web/profileava/f3.png new file mode 100644 index 0000000..d2295b5 Binary files /dev/null and b/frontend/web/profileava/f3.png differ diff --git a/frontend/web/profileava/f4.png b/frontend/web/profileava/f4.png new file mode 100644 index 0000000..9b449e2 Binary files /dev/null and b/frontend/web/profileava/f4.png differ diff --git a/frontend/web/profileava/f5.png b/frontend/web/profileava/f5.png new file mode 100644 index 0000000..8f21305 Binary files /dev/null and b/frontend/web/profileava/f5.png differ diff --git a/frontend/web/profileava/f6.png b/frontend/web/profileava/f6.png new file mode 100644 index 0000000..bd3f8f8 Binary files /dev/null and b/frontend/web/profileava/f6.png differ diff --git a/frontend/web/profileava/m1.png b/frontend/web/profileava/m1.png new file mode 100644 index 0000000..b68692f Binary files /dev/null and b/frontend/web/profileava/m1.png differ diff --git a/frontend/web/profileava/m10.png b/frontend/web/profileava/m10.png new file mode 100644 index 0000000..d83d625 Binary files /dev/null and b/frontend/web/profileava/m10.png differ diff --git a/frontend/web/profileava/m2.png b/frontend/web/profileava/m2.png new file mode 100644 index 0000000..2c9d44d Binary files /dev/null and b/frontend/web/profileava/m2.png differ diff --git a/frontend/web/profileava/m3.png b/frontend/web/profileava/m3.png new file mode 100644 index 0000000..9a9b0ac Binary files /dev/null and b/frontend/web/profileava/m3.png differ diff --git a/frontend/web/profileava/m4.png b/frontend/web/profileava/m4.png new file mode 100644 index 0000000..8146227 Binary files /dev/null and b/frontend/web/profileava/m4.png differ diff --git a/frontend/web/profileava/m5.png b/frontend/web/profileava/m5.png new file mode 100644 index 0000000..cf94b7b Binary files /dev/null and b/frontend/web/profileava/m5.png differ diff --git a/frontend/web/profileava/m6.png b/frontend/web/profileava/m6.png new file mode 100644 index 0000000..e1fabb5 Binary files /dev/null and b/frontend/web/profileava/m6.png differ diff --git a/frontend/web/profileava/m7.png b/frontend/web/profileava/m7.png new file mode 100644 index 0000000..17ca4b7 Binary files /dev/null and b/frontend/web/profileava/m7.png differ diff --git a/frontend/web/profileava/m8.png b/frontend/web/profileava/m8.png new file mode 100644 index 0000000..1fd5d40 Binary files /dev/null and b/frontend/web/profileava/m8.png differ diff --git a/frontend/web/profileava/m9.png b/frontend/web/profileava/m9.png new file mode 100644 index 0000000..509453c Binary files /dev/null and b/frontend/web/profileava/m9.png differ