diff --git a/activites/Admin/Admin.php b/activities/Admin/Admin.php similarity index 92% rename from activites/Admin/Admin.php rename to activities/Admin/Admin.php index d665b35..1450f2a 100644 --- a/activites/Admin/Admin.php +++ b/activities/Admin/Admin.php @@ -28,8 +28,7 @@ class Admin{ } - // saveImage($_FILES['image'], 'post-image', 'logo'); - // saveImage($_FILES['image'], 'post-image'); + protected function saveImage($image, $imagePath, $imageName = null) { @@ -63,7 +62,7 @@ class Admin{ } - // removeImage('/public/image/hassan.png/'); + protected function removeImage($path) { // $path = trim($this->basePath, '/ ') . '/' . trim($path, '/ '); diff --git a/activites/Admin/Banner.php b/activities/Admin/Banner.php similarity index 100% rename from activites/Admin/Banner.php rename to activities/Admin/Banner.php diff --git a/activites/Admin/Category.php b/activities/Admin/Category.php similarity index 100% rename from activites/Admin/Category.php rename to activities/Admin/Category.php diff --git a/activites/Admin/Comment.php b/activities/Admin/Comment.php similarity index 100% rename from activites/Admin/Comment.php rename to activities/Admin/Comment.php diff --git a/activites/Admin/Dashboard.php b/activities/Admin/Dashboard.php similarity index 99% rename from activites/Admin/Dashboard.php rename to activities/Admin/Dashboard.php index 2e6411c..da2e0b7 100644 --- a/activites/Admin/Dashboard.php +++ b/activities/Admin/Dashboard.php @@ -13,7 +13,6 @@ class Dashboard extends Admin $db = new DataBase(); $postCount = $db->select('SELECT COUNT(*) FROM `posts` ;')->fetch(); $postsViews = $db->select('SELECT SUM(view) FROM `posts` ;')->fetch(); - $commentsCount = $db->select('SELECT COUNT(*) FROM `comments` ;')->fetch(); $commentsUnseenCount = $db->select("SELECT COUNT(*) FROM `comments` WHERE `status` = 'unseen' ;")->fetch(); $commentsApprovedCount = $db->select("SELECT COUNT(*) FROM `comments` WHERE `status` = 'approved' ;")->fetch(); diff --git a/activites/Admin/Menu.php b/activities/Admin/Menu.php similarity index 100% rename from activites/Admin/Menu.php rename to activities/Admin/Menu.php diff --git a/activites/Admin/Post.php b/activities/Admin/Post.php similarity index 100% rename from activites/Admin/Post.php rename to activities/Admin/Post.php diff --git a/activites/Admin/User.php b/activities/Admin/User.php similarity index 100% rename from activites/Admin/User.php rename to activities/Admin/User.php diff --git a/activites/Admin/WebSetting.php b/activities/Admin/WebSetting.php similarity index 100% rename from activites/Admin/WebSetting.php rename to activities/Admin/WebSetting.php diff --git a/activites/Auth/Auth.php b/activities/Auth/Auth.php similarity index 90% rename from activites/Auth/Auth.php rename to activities/Auth/Auth.php index 2e3bdc4..8297e92 100644 --- a/activites/Auth/Auth.php +++ b/activities/Auth/Auth.php @@ -30,15 +30,15 @@ class Auth{ return bin2hex(openssl_random_pseudo_bytes(32)); } - public function activationMessage($username, $verifyToken) - { - $message = ' -

فعال سازی حساب کاربری

-

' . $username . 'عزیز برای فعال سازی حساب کاربری خود لطفا روی لینک زیر کلیک نمایید

-
فعال سازی حساب کاربری
- '; - return $message; - } +// public function activationMessage($username, $verifyToken) +// { +// $message = ' +//

فعال سازی حساب کاربری

+//

' . $username . 'عزیز برای فعال سازی حساب کاربری خود لطفا روی لینک زیر کلیک نمایید

+//
فعال سازی حساب کاربری
+// '; +// return $message; +// } public function sendMail($emailAddress, $subject, $body) { @@ -108,20 +108,21 @@ try { } else{ $randomToken = $this->random(); - $activationMessage = $this->activationMessage($request['username'], $randomToken); - $result = $this->sendMail($request['email'], 'فعال سازی حساب کاربری', $activationMessage); - if($result) - { + // $activationMessage = $this->activationMessage($request['username'], $randomToken); + // $result = $this->sendMail($request['email'], 'فعال سازی حساب کاربری', $activationMessage); + // if($result) + // { $request['verify_token'] = $randomToken; $request['password'] = $this->hash($request['password']); $db->insert('users', array_keys($request), $request); $this->redirect('login'); - } - else{ - flash('register_error', 'ایمیل فعال سازی ارسال نشد'); - $this->redirectBack(); - } + // } + } + + // flash('register_error', 'ایمیل فعال سازی ارسال نشد'); + $this->redirectBack(); + } } diff --git a/activites/Home.php b/activities/Home.php similarity index 100% rename from activites/Home.php rename to activities/Home.php diff --git a/index.php b/index.php index 7036520..fe3b26d 100644 --- a/index.php +++ b/index.php @@ -31,22 +31,18 @@ define('SENDER_NAME', 'Mobina nj'); require_once 'database/Database.php'; require_once 'database/CreateDB.php'; -// $db = new Database\Database(); - -// $db = new CreateDB(); -// $db->run(); //admin require_once 'activities/Admin/Admin.php'; require_once 'activities/Admin/Category.php'; -require_once ("activities/Admin/Dashboard.php"); +require_once 'activities/Admin/Dashboard.php'; require_once 'activities/Admin/Post.php'; require_once 'activities/Admin/Banner.php'; require_once 'activities/Admin/User.php'; require_once 'activities/Admin/Comment.php'; require_once 'activities/Admin/Menu.php'; -require_once ("activities/Admin/WebSetting.php"); +require_once 'activities/Admin/WebSetting.php'; @@ -62,8 +58,6 @@ require_once ("activities/Home.php"); - - //helpers @@ -76,7 +70,7 @@ spl_autoload_register(function($className){ function jalaliDate($date) { - return jDate::forge($date)->format('%A, %d %B %y'); + return jDate::forge($date)->format('%A, %d %B %Y'); } @@ -137,9 +131,6 @@ function uri($reservedUrl, $class, $method, $requestMethod = "GET") $object = new $class; call_user_func_array(array($object, $method), $parameters); - // Category - // $category = new Category; - // $category->index(); exit; } @@ -187,7 +178,7 @@ function dd($vars){ } -// dd('hi'); + function displayError($displayError){ @@ -231,12 +222,6 @@ function flash($name, $value = null) } -// flash('cart', 'محصول با موفقیت به سبد خرید شما اضافه شد'); -// flash('register', 'ثبت نام شما با موفقیت انجام شد'); -// echo flash('cart'); -// echo flash('register'); -// flash('hasaan'); -// flash('cart', 'محصول با موفقیت به سبد خرید شما اضافه شد'); //dashboard diff --git a/public/banner-image/2022-04-12-15-52-33.png b/public/banner-image/2022-04-12-15-52-33.png deleted file mode 100644 index 654ccaa..0000000 Binary files a/public/banner-image/2022-04-12-15-52-33.png and /dev/null differ diff --git a/public/banner-image/2022-09-09-09-21-44.jpeg b/public/banner-image/2022-09-09-09-21-44.jpeg new file mode 100644 index 0000000..ecf1592 Binary files /dev/null and b/public/banner-image/2022-09-09-09-21-44.jpeg differ diff --git a/public/banner-image/2022-09-09-12-21-36.jpeg b/public/banner-image/2022-09-09-12-21-36.jpeg new file mode 100644 index 0000000..3e44ad9 Binary files /dev/null and b/public/banner-image/2022-09-09-12-21-36.jpeg differ diff --git a/public/post-image/2022-04-12-15-21-27.jpeg b/public/post-image/2022-04-12-15-21-27.jpeg deleted file mode 100644 index 2ee5538..0000000 Binary files a/public/post-image/2022-04-12-15-21-27.jpeg and /dev/null differ diff --git a/public/post-image/2022-04-12-15-21-34.jpeg b/public/post-image/2022-04-12-15-21-34.jpeg deleted file mode 100644 index 294a31f..0000000 Binary files a/public/post-image/2022-04-12-15-21-34.jpeg and /dev/null differ diff --git a/public/post-image/2022-04-12-15-21-42.jpeg b/public/post-image/2022-04-12-15-21-42.jpeg deleted file mode 100644 index dea8fb0..0000000 Binary files a/public/post-image/2022-04-12-15-21-42.jpeg and /dev/null differ diff --git a/public/post-image/2022-09-09-09-16-27.png b/public/post-image/2022-09-09-09-16-27.png new file mode 100644 index 0000000..ab6fbfc Binary files /dev/null and b/public/post-image/2022-09-09-09-16-27.png differ diff --git a/public/post-image/2022-09-09-09-20-10.png b/public/post-image/2022-09-09-09-20-10.png new file mode 100644 index 0000000..1c13e1b Binary files /dev/null and b/public/post-image/2022-09-09-09-20-10.png differ diff --git a/public/post-image/2022-09-09-09-20-35.jpeg b/public/post-image/2022-09-09-09-20-35.jpeg new file mode 100644 index 0000000..77618a5 Binary files /dev/null and b/public/post-image/2022-09-09-09-20-35.jpeg differ diff --git a/public/post-image/2022-09-09-09-22-48.jpeg b/public/post-image/2022-09-09-09-22-48.jpeg new file mode 100644 index 0000000..35f4acc Binary files /dev/null and b/public/post-image/2022-09-09-09-22-48.jpeg differ diff --git a/public/post-image/2022-09-09-12-20-49.png b/public/post-image/2022-09-09-12-20-49.png new file mode 100644 index 0000000..83919e4 Binary files /dev/null and b/public/post-image/2022-09-09-12-20-49.png differ diff --git a/public/post-image/2022-09-09-12-51-33.png b/public/post-image/2022-09-09-12-51-33.png new file mode 100644 index 0000000..e994fa0 Binary files /dev/null and b/public/post-image/2022-09-09-12-51-33.png differ diff --git a/public/setting/icon.jpeg b/public/setting/icon.jpeg new file mode 100644 index 0000000..fc3592c Binary files /dev/null and b/public/setting/icon.jpeg differ diff --git a/public/setting/icon.png b/public/setting/icon.png deleted file mode 100644 index 85ec205..0000000 Binary files a/public/setting/icon.png and /dev/null differ diff --git a/public/setting/logo.png b/public/setting/logo.png index f38f57f..83919e4 100644 Binary files a/public/setting/logo.png and b/public/setting/logo.png differ diff --git a/template/admin/banners/index.php b/template/admin/banners/index.php index fbfff5f..3f9a368 100644 --- a/template/admin/banners/index.php +++ b/template/admin/banners/index.php @@ -25,18 +25,11 @@ - + $banner) { ?> - - - - - - - - - - + + + edit delete diff --git a/template/admin/category/index.php b/template/admin/category/index.php index f15f69d..c00b0ad 100644 --- a/template/admin/category/index.php +++ b/template/admin/category/index.php @@ -22,10 +22,10 @@ - + $category) { ?> - + diff --git a/template/admin/comments/index.php b/template/admin/comments/index.php index f011a48..e405a5d 100644 --- a/template/admin/comments/index.php +++ b/template/admin/comments/index.php @@ -25,9 +25,9 @@ - + $comment) { ?> - + diff --git a/template/admin/menus/create.php b/template/admin/menus/create.php index b3fec54..94ce30e 100644 --- a/template/admin/menus/create.php +++ b/template/admin/menus/create.php @@ -30,8 +30,8 @@ require_once BASE_PATH . '/template/admin/layouts/head-tag.php'; + + diff --git a/template/admin/menus/index.php b/template/admin/menus/index.php index 3d5c324..5df7c7d 100644 --- a/template/admin/menus/index.php +++ b/template/admin/menus/index.php @@ -25,10 +25,10 @@ - + $menu) { ?> - + diff --git a/template/admin/post/index.php b/template/admin/post/index.php index c6dee3b..7660a58 100644 --- a/template/admin/post/index.php +++ b/template/admin/post/index.php @@ -28,33 +28,33 @@ - + $post) { ?> - + - + - - + + - + - #breaking_news + #breaking_news - #editor_selected - + #editor_selected + - + - + diff --git a/template/admin/users/index.php b/template/admin/users/index.php index be59a82..8d022ef 100644 --- a/template/admin/users/index.php +++ b/template/admin/users/index.php @@ -24,9 +24,9 @@ - + $user) { ?> - + diff --git a/template/admin/web-setting/set.php b/template/admin/web-setting/set.php index 3c2f835..0ada18e 100644 --- a/template/admin/web-setting/set.php +++ b/template/admin/web-setting/set.php @@ -27,21 +27,26 @@ require_once(BASE_PATH . "/template/admin/layouts/head-tag.php");
- - -
- + + + + +
+ +
- - -
- + + + + +
+
diff --git a/template/app/index.php b/template/app/index.php index e8cdfd0..479c48f 100644 --- a/template/app/index.php +++ b/template/app/index.php @@ -19,12 +19,12 @@
  • -

    +

    diff --git a/template/app/layouts/footer.php b/template/app/layouts/footer.php index 1e8e721..f656d07 100644 --- a/template/app/layouts/footer.php +++ b/template/app/layouts/footer.php @@ -21,18 +21,17 @@ diff --git a/template/app/layouts/header.php b/template/app/layouts/header.php index 3df7327..0d7802e 100644 --- a/template/app/layouts/header.php +++ b/template/app/layouts/header.php @@ -6,8 +6,6 @@ - - @@ -37,18 +35,18 @@
    - @@ -58,12 +56,12 @@
    - +
    diff --git a/template/app/show-post.php b/template/app/show-post.php index 50ebd21..5b18884 100644 --- a/template/app/show-post.php +++ b/template/app/show-post.php @@ -1,7 +1,6 @@ -