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) { ?>