├── LESSON 10 - الدرس └── index.php ├── LESSON 11 - الدرس ├── codershiyar.sql └── index.php ├── LESSON 11-2 - الدرس └── index.php ├── LESSON 12 - الدرس ├── files │ ├── course.sql │ ├── download (3).jfif │ └── download (4).jfif ├── index.php └── view.php ├── LESSON 14 - 13 - الدرس └── index.php ├── LESSON 15 - الدرس └── index.php ├── LESSON 16 - الدرس ├── edit.php ├── index.php └── products.sql ├── LESSON 17 - الدرس ├── index.php └── users.sql ├── LESSON 18 - الدرس ├── index.php └── products.sql ├── LESSON 19 - الدرس └── app │ ├── index.php │ └── register.php ├── LESSON 20 - الدرس └── app │ ├── active.php │ ├── composer.json │ ├── composer.lock │ ├── index.php │ ├── mail.php │ ├── mailer │ ├── autoload.php │ ├── composer │ │ ├── ClassLoader.php │ │ ├── LICENSE │ │ ├── autoload_classmap.php │ │ ├── autoload_namespaces.php │ │ ├── autoload_psr4.php │ │ ├── autoload_real.php │ │ ├── autoload_static.php │ │ └── installed.json │ └── phpmailer │ │ └── phpmailer │ │ ├── COMMITMENT │ │ ├── LICENSE │ │ ├── README.md │ │ ├── SECURITY.md │ │ ├── VERSION │ │ ├── composer.json │ │ ├── get_oauth_token.php │ │ ├── language │ │ ├── phpmailer.lang-af.php │ │ ├── phpmailer.lang-ar.php │ │ ├── phpmailer.lang-az.php │ │ ├── phpmailer.lang-ba.php │ │ ├── phpmailer.lang-be.php │ │ ├── phpmailer.lang-bg.php │ │ ├── phpmailer.lang-ca.php │ │ ├── phpmailer.lang-ch.php │ │ ├── phpmailer.lang-cs.php │ │ ├── phpmailer.lang-da.php │ │ ├── phpmailer.lang-de.php │ │ ├── phpmailer.lang-el.php │ │ ├── phpmailer.lang-eo.php │ │ ├── phpmailer.lang-es.php │ │ ├── phpmailer.lang-et.php │ │ ├── phpmailer.lang-fa.php │ │ ├── phpmailer.lang-fi.php │ │ ├── phpmailer.lang-fo.php │ │ ├── phpmailer.lang-fr.php │ │ ├── phpmailer.lang-gl.php │ │ ├── phpmailer.lang-he.php │ │ ├── phpmailer.lang-hi.php │ │ ├── phpmailer.lang-hr.php │ │ ├── phpmailer.lang-hu.php │ │ ├── phpmailer.lang-hy.php │ │ ├── phpmailer.lang-id.php │ │ ├── phpmailer.lang-it.php │ │ ├── phpmailer.lang-ja.php │ │ ├── phpmailer.lang-ka.php │ │ ├── phpmailer.lang-ko.php │ │ ├── phpmailer.lang-lt.php │ │ ├── phpmailer.lang-lv.php │ │ ├── phpmailer.lang-mg.php │ │ ├── phpmailer.lang-ms.php │ │ ├── phpmailer.lang-nb.php │ │ ├── phpmailer.lang-nl.php │ │ ├── phpmailer.lang-pl.php │ │ ├── phpmailer.lang-pt.php │ │ ├── phpmailer.lang-pt_br.php │ │ ├── phpmailer.lang-ro.php │ │ ├── phpmailer.lang-ru.php │ │ ├── phpmailer.lang-sk.php │ │ ├── phpmailer.lang-sl.php │ │ ├── phpmailer.lang-sr.php │ │ ├── phpmailer.lang-sv.php │ │ ├── phpmailer.lang-tl.php │ │ ├── phpmailer.lang-tr.php │ │ ├── phpmailer.lang-uk.php │ │ ├── phpmailer.lang-vi.php │ │ ├── phpmailer.lang-zh.php │ │ └── phpmailer.lang-zh_cn.php │ │ └── src │ │ ├── Exception.php │ │ ├── OAuth.php │ │ ├── PHPMailer.php │ │ ├── POP3.php │ │ └── SMTP.php │ └── register.php ├── LESSON 21 - الدرس └── app │ ├── active.php │ ├── composer.json │ ├── composer.lock │ ├── index.php │ ├── login.php │ ├── mail.php │ ├── mailer │ ├── autoload.php │ ├── composer │ │ ├── ClassLoader.php │ │ ├── LICENSE │ │ ├── autoload_classmap.php │ │ ├── autoload_namespaces.php │ │ ├── autoload_psr4.php │ │ ├── autoload_real.php │ │ ├── autoload_static.php │ │ └── installed.json │ └── phpmailer │ │ └── phpmailer │ │ ├── COMMITMENT │ │ ├── LICENSE │ │ ├── README.md │ │ ├── SECURITY.md │ │ ├── VERSION │ │ ├── composer.json │ │ ├── get_oauth_token.php │ │ ├── language │ │ ├── phpmailer.lang-af.php │ │ ├── phpmailer.lang-ar.php │ │ ├── phpmailer.lang-az.php │ │ ├── phpmailer.lang-ba.php │ │ ├── phpmailer.lang-be.php │ │ ├── phpmailer.lang-bg.php │ │ ├── phpmailer.lang-ca.php │ │ ├── phpmailer.lang-ch.php │ │ ├── phpmailer.lang-cs.php │ │ ├── phpmailer.lang-da.php │ │ ├── phpmailer.lang-de.php │ │ ├── phpmailer.lang-el.php │ │ ├── phpmailer.lang-eo.php │ │ ├── phpmailer.lang-es.php │ │ ├── phpmailer.lang-et.php │ │ ├── phpmailer.lang-fa.php │ │ ├── phpmailer.lang-fi.php │ │ ├── phpmailer.lang-fo.php │ │ ├── phpmailer.lang-fr.php │ │ ├── phpmailer.lang-gl.php │ │ ├── phpmailer.lang-he.php │ │ ├── phpmailer.lang-hi.php │ │ ├── phpmailer.lang-hr.php │ │ ├── phpmailer.lang-hu.php │ │ ├── phpmailer.lang-hy.php │ │ ├── phpmailer.lang-id.php │ │ ├── phpmailer.lang-it.php │ │ ├── phpmailer.lang-ja.php │ │ ├── phpmailer.lang-ka.php │ │ ├── phpmailer.lang-ko.php │ │ ├── phpmailer.lang-lt.php │ │ ├── phpmailer.lang-lv.php │ │ ├── phpmailer.lang-mg.php │ │ ├── phpmailer.lang-ms.php │ │ ├── phpmailer.lang-nb.php │ │ ├── phpmailer.lang-nl.php │ │ ├── phpmailer.lang-pl.php │ │ ├── phpmailer.lang-pt.php │ │ ├── phpmailer.lang-pt_br.php │ │ ├── phpmailer.lang-ro.php │ │ ├── phpmailer.lang-ru.php │ │ ├── phpmailer.lang-sk.php │ │ ├── phpmailer.lang-sl.php │ │ ├── phpmailer.lang-sr.php │ │ ├── phpmailer.lang-sv.php │ │ ├── phpmailer.lang-tl.php │ │ ├── phpmailer.lang-tr.php │ │ ├── phpmailer.lang-uk.php │ │ ├── phpmailer.lang-vi.php │ │ ├── phpmailer.lang-zh.php │ │ └── phpmailer.lang-zh_cn.php │ │ └── src │ │ ├── Exception.php │ │ ├── OAuth.php │ │ ├── PHPMailer.php │ │ ├── POP3.php │ │ └── SMTP.php │ └── register.php ├── LESSON 22 - الدرس └── app │ ├── active.php │ ├── admin │ └── index.php │ ├── composer.json │ ├── composer.lock │ ├── index.php │ ├── login.php │ ├── mail.php │ ├── mailer │ ├── autoload.php │ ├── composer │ │ ├── ClassLoader.php │ │ ├── LICENSE │ │ ├── autoload_classmap.php │ │ ├── autoload_namespaces.php │ │ ├── autoload_psr4.php │ │ ├── autoload_real.php │ │ ├── autoload_static.php │ │ └── installed.json │ └── phpmailer │ │ └── phpmailer │ │ ├── COMMITMENT │ │ ├── LICENSE │ │ ├── README.md │ │ ├── SECURITY.md │ │ ├── VERSION │ │ ├── composer.json │ │ ├── get_oauth_token.php │ │ ├── language │ │ ├── phpmailer.lang-af.php │ │ ├── phpmailer.lang-ar.php │ │ ├── phpmailer.lang-az.php │ │ ├── phpmailer.lang-ba.php │ │ ├── phpmailer.lang-be.php │ │ ├── phpmailer.lang-bg.php │ │ ├── phpmailer.lang-ca.php │ │ ├── phpmailer.lang-ch.php │ │ ├── phpmailer.lang-cs.php │ │ ├── phpmailer.lang-da.php │ │ ├── phpmailer.lang-de.php │ │ ├── phpmailer.lang-el.php │ │ ├── phpmailer.lang-eo.php │ │ ├── phpmailer.lang-es.php │ │ ├── phpmailer.lang-et.php │ │ ├── phpmailer.lang-fa.php │ │ ├── phpmailer.lang-fi.php │ │ ├── phpmailer.lang-fo.php │ │ ├── phpmailer.lang-fr.php │ │ ├── phpmailer.lang-gl.php │ │ ├── phpmailer.lang-he.php │ │ ├── phpmailer.lang-hi.php │ │ ├── phpmailer.lang-hr.php │ │ ├── phpmailer.lang-hu.php │ │ ├── phpmailer.lang-hy.php │ │ ├── phpmailer.lang-id.php │ │ ├── phpmailer.lang-it.php │ │ ├── phpmailer.lang-ja.php │ │ ├── phpmailer.lang-ka.php │ │ ├── phpmailer.lang-ko.php │ │ ├── phpmailer.lang-lt.php │ │ ├── phpmailer.lang-lv.php │ │ ├── phpmailer.lang-mg.php │ │ ├── phpmailer.lang-ms.php │ │ ├── phpmailer.lang-nb.php │ │ ├── phpmailer.lang-nl.php │ │ ├── phpmailer.lang-pl.php │ │ ├── phpmailer.lang-pt.php │ │ ├── phpmailer.lang-pt_br.php │ │ ├── phpmailer.lang-ro.php │ │ ├── phpmailer.lang-ru.php │ │ ├── phpmailer.lang-sk.php │ │ ├── phpmailer.lang-sl.php │ │ ├── phpmailer.lang-sr.php │ │ ├── phpmailer.lang-sv.php │ │ ├── phpmailer.lang-tl.php │ │ ├── phpmailer.lang-tr.php │ │ ├── phpmailer.lang-uk.php │ │ ├── phpmailer.lang-vi.php │ │ ├── phpmailer.lang-zh.php │ │ └── phpmailer.lang-zh_cn.php │ │ └── src │ │ ├── Exception.php │ │ ├── OAuth.php │ │ ├── PHPMailer.php │ │ ├── POP3.php │ │ └── SMTP.php │ ├── register.php │ ├── super-admin │ └── index.php │ └── user │ └── index.php ├── LESSON 23 - الدرس └── app │ ├── active.php │ ├── admin │ └── index.php │ ├── composer.json │ ├── composer.lock │ ├── index.php │ ├── login.php │ ├── mail.php │ ├── mailer │ ├── autoload.php │ ├── composer │ │ ├── ClassLoader.php │ │ ├── LICENSE │ │ ├── autoload_classmap.php │ │ ├── autoload_namespaces.php │ │ ├── autoload_psr4.php │ │ ├── autoload_real.php │ │ ├── autoload_static.php │ │ └── installed.json │ └── phpmailer │ │ └── phpmailer │ │ ├── COMMITMENT │ │ ├── LICENSE │ │ ├── README.md │ │ ├── SECURITY.md │ │ ├── VERSION │ │ ├── composer.json │ │ ├── get_oauth_token.php │ │ ├── language │ │ ├── phpmailer.lang-af.php │ │ ├── phpmailer.lang-ar.php │ │ ├── phpmailer.lang-az.php │ │ ├── phpmailer.lang-ba.php │ │ ├── phpmailer.lang-be.php │ │ ├── phpmailer.lang-bg.php │ │ ├── phpmailer.lang-ca.php │ │ ├── phpmailer.lang-ch.php │ │ ├── phpmailer.lang-cs.php │ │ ├── phpmailer.lang-da.php │ │ ├── phpmailer.lang-de.php │ │ ├── phpmailer.lang-el.php │ │ ├── phpmailer.lang-eo.php │ │ ├── phpmailer.lang-es.php │ │ ├── phpmailer.lang-et.php │ │ ├── phpmailer.lang-fa.php │ │ ├── phpmailer.lang-fi.php │ │ ├── phpmailer.lang-fo.php │ │ ├── phpmailer.lang-fr.php │ │ ├── phpmailer.lang-gl.php │ │ ├── phpmailer.lang-he.php │ │ ├── phpmailer.lang-hi.php │ │ ├── phpmailer.lang-hr.php │ │ ├── phpmailer.lang-hu.php │ │ ├── phpmailer.lang-hy.php │ │ ├── phpmailer.lang-id.php │ │ ├── phpmailer.lang-it.php │ │ ├── phpmailer.lang-ja.php │ │ ├── phpmailer.lang-ka.php │ │ ├── phpmailer.lang-ko.php │ │ ├── phpmailer.lang-lt.php │ │ ├── phpmailer.lang-lv.php │ │ ├── phpmailer.lang-mg.php │ │ ├── phpmailer.lang-ms.php │ │ ├── phpmailer.lang-nb.php │ │ ├── phpmailer.lang-nl.php │ │ ├── phpmailer.lang-pl.php │ │ ├── phpmailer.lang-pt.php │ │ ├── phpmailer.lang-pt_br.php │ │ ├── phpmailer.lang-ro.php │ │ ├── phpmailer.lang-ru.php │ │ ├── phpmailer.lang-sk.php │ │ ├── phpmailer.lang-sl.php │ │ ├── phpmailer.lang-sr.php │ │ ├── phpmailer.lang-sv.php │ │ ├── phpmailer.lang-tl.php │ │ ├── phpmailer.lang-tr.php │ │ ├── phpmailer.lang-uk.php │ │ ├── phpmailer.lang-vi.php │ │ ├── phpmailer.lang-zh.php │ │ └── phpmailer.lang-zh_cn.php │ │ └── src │ │ ├── Exception.php │ │ ├── OAuth.php │ │ ├── PHPMailer.php │ │ ├── POP3.php │ │ └── SMTP.php │ ├── register.php │ ├── super-admin │ └── index.php │ └── user │ └── index.php ├── LESSON 24 25 - الدرس └── app │ ├── active.php │ ├── admin │ └── index.php │ ├── composer.json │ ├── composer.lock │ ├── img │ └── logo.jpg │ ├── index.php │ ├── login.php │ ├── mail.php │ ├── mailer │ ├── autoload.php │ ├── composer │ │ ├── ClassLoader.php │ │ ├── LICENSE │ │ ├── autoload_classmap.php │ │ ├── autoload_namespaces.php │ │ ├── autoload_psr4.php │ │ ├── autoload_real.php │ │ ├── autoload_static.php │ │ └── installed.json │ └── phpmailer │ │ └── phpmailer │ │ ├── COMMITMENT │ │ ├── LICENSE │ │ ├── README.md │ │ ├── SECURITY.md │ │ ├── VERSION │ │ ├── composer.json │ │ ├── get_oauth_token.php │ │ ├── language │ │ ├── phpmailer.lang-af.php │ │ ├── phpmailer.lang-ar.php │ │ ├── phpmailer.lang-az.php │ │ ├── phpmailer.lang-ba.php │ │ ├── phpmailer.lang-be.php │ │ ├── phpmailer.lang-bg.php │ │ ├── phpmailer.lang-ca.php │ │ ├── phpmailer.lang-ch.php │ │ ├── phpmailer.lang-cs.php │ │ ├── phpmailer.lang-da.php │ │ ├── phpmailer.lang-de.php │ │ ├── phpmailer.lang-el.php │ │ ├── phpmailer.lang-eo.php │ │ ├── phpmailer.lang-es.php │ │ ├── phpmailer.lang-et.php │ │ ├── phpmailer.lang-fa.php │ │ ├── phpmailer.lang-fi.php │ │ ├── phpmailer.lang-fo.php │ │ ├── phpmailer.lang-fr.php │ │ ├── phpmailer.lang-gl.php │ │ ├── phpmailer.lang-he.php │ │ ├── phpmailer.lang-hi.php │ │ ├── phpmailer.lang-hr.php │ │ ├── phpmailer.lang-hu.php │ │ ├── phpmailer.lang-hy.php │ │ ├── phpmailer.lang-id.php │ │ ├── phpmailer.lang-it.php │ │ ├── phpmailer.lang-ja.php │ │ ├── phpmailer.lang-ka.php │ │ ├── phpmailer.lang-ko.php │ │ ├── phpmailer.lang-lt.php │ │ ├── phpmailer.lang-lv.php │ │ ├── phpmailer.lang-mg.php │ │ ├── phpmailer.lang-ms.php │ │ ├── phpmailer.lang-nb.php │ │ ├── phpmailer.lang-nl.php │ │ ├── phpmailer.lang-pl.php │ │ ├── phpmailer.lang-pt.php │ │ ├── phpmailer.lang-pt_br.php │ │ ├── phpmailer.lang-ro.php │ │ ├── phpmailer.lang-ru.php │ │ ├── phpmailer.lang-sk.php │ │ ├── phpmailer.lang-sl.php │ │ ├── phpmailer.lang-sr.php │ │ ├── phpmailer.lang-sv.php │ │ ├── phpmailer.lang-tl.php │ │ ├── phpmailer.lang-tr.php │ │ ├── phpmailer.lang-uk.php │ │ ├── phpmailer.lang-vi.php │ │ ├── phpmailer.lang-zh.php │ │ └── phpmailer.lang-zh_cn.php │ │ └── src │ │ ├── Exception.php │ │ ├── OAuth.php │ │ ├── PHPMailer.php │ │ ├── POP3.php │ │ └── SMTP.php │ ├── nav.php │ ├── register.php │ ├── super-admin │ └── index.php │ └── user │ └── index.php ├── LESSON 26 27 - الدرس └── app │ ├── active.php │ ├── admin │ ├── index.php │ └── profile.php │ ├── composer.json │ ├── composer.lock │ ├── img │ └── logo.jpg │ ├── index.php │ ├── login.php │ ├── mail.php │ ├── mailer │ ├── autoload.php │ ├── composer │ │ ├── ClassLoader.php │ │ ├── LICENSE │ │ ├── autoload_classmap.php │ │ ├── autoload_namespaces.php │ │ ├── autoload_psr4.php │ │ ├── autoload_real.php │ │ ├── autoload_static.php │ │ └── installed.json │ └── phpmailer │ │ └── phpmailer │ │ ├── COMMITMENT │ │ ├── LICENSE │ │ ├── README.md │ │ ├── SECURITY.md │ │ ├── VERSION │ │ ├── composer.json │ │ ├── get_oauth_token.php │ │ ├── language │ │ ├── phpmailer.lang-af.php │ │ ├── phpmailer.lang-ar.php │ │ ├── phpmailer.lang-az.php │ │ ├── phpmailer.lang-ba.php │ │ ├── phpmailer.lang-be.php │ │ ├── phpmailer.lang-bg.php │ │ ├── phpmailer.lang-ca.php │ │ ├── phpmailer.lang-ch.php │ │ ├── phpmailer.lang-cs.php │ │ ├── phpmailer.lang-da.php │ │ ├── phpmailer.lang-de.php │ │ ├── phpmailer.lang-el.php │ │ ├── phpmailer.lang-eo.php │ │ ├── phpmailer.lang-es.php │ │ ├── phpmailer.lang-et.php │ │ ├── phpmailer.lang-fa.php │ │ ├── phpmailer.lang-fi.php │ │ ├── phpmailer.lang-fo.php │ │ ├── phpmailer.lang-fr.php │ │ ├── phpmailer.lang-gl.php │ │ ├── phpmailer.lang-he.php │ │ ├── phpmailer.lang-hi.php │ │ ├── phpmailer.lang-hr.php │ │ ├── phpmailer.lang-hu.php │ │ ├── phpmailer.lang-hy.php │ │ ├── phpmailer.lang-id.php │ │ ├── phpmailer.lang-it.php │ │ ├── phpmailer.lang-ja.php │ │ ├── phpmailer.lang-ka.php │ │ ├── phpmailer.lang-ko.php │ │ ├── phpmailer.lang-lt.php │ │ ├── phpmailer.lang-lv.php │ │ ├── phpmailer.lang-mg.php │ │ ├── phpmailer.lang-ms.php │ │ ├── phpmailer.lang-nb.php │ │ ├── phpmailer.lang-nl.php │ │ ├── phpmailer.lang-pl.php │ │ ├── phpmailer.lang-pt.php │ │ ├── phpmailer.lang-pt_br.php │ │ ├── phpmailer.lang-ro.php │ │ ├── phpmailer.lang-ru.php │ │ ├── phpmailer.lang-sk.php │ │ ├── phpmailer.lang-sl.php │ │ ├── phpmailer.lang-sr.php │ │ ├── phpmailer.lang-sv.php │ │ ├── phpmailer.lang-tl.php │ │ ├── phpmailer.lang-tr.php │ │ ├── phpmailer.lang-uk.php │ │ ├── phpmailer.lang-vi.php │ │ ├── phpmailer.lang-zh.php │ │ └── phpmailer.lang-zh_cn.php │ │ └── src │ │ ├── Exception.php │ │ ├── OAuth.php │ │ ├── PHPMailer.php │ │ ├── POP3.php │ │ └── SMTP.php │ ├── nav.php │ ├── register.php │ ├── super-admin │ ├── index.php │ └── profile.php │ └── user │ ├── index.php │ └── profile.php ├── LESSON 28 29 - الدرس └── app │ ├── active.php │ ├── admin │ ├── index.php │ └── profile.php │ ├── composer.json │ ├── composer.lock │ ├── img │ └── logo.jpg │ ├── index.php │ ├── login.php │ ├── mail.php │ ├── mailer │ ├── autoload.php │ ├── composer │ │ ├── ClassLoader.php │ │ ├── LICENSE │ │ ├── autoload_classmap.php │ │ ├── autoload_namespaces.php │ │ ├── autoload_psr4.php │ │ ├── autoload_real.php │ │ ├── autoload_static.php │ │ └── installed.json │ └── phpmailer │ │ └── phpmailer │ │ ├── COMMITMENT │ │ ├── LICENSE │ │ ├── README.md │ │ ├── SECURITY.md │ │ ├── VERSION │ │ ├── composer.json │ │ ├── get_oauth_token.php │ │ ├── language │ │ ├── phpmailer.lang-af.php │ │ ├── phpmailer.lang-ar.php │ │ ├── phpmailer.lang-az.php │ │ ├── phpmailer.lang-ba.php │ │ ├── phpmailer.lang-be.php │ │ ├── phpmailer.lang-bg.php │ │ ├── phpmailer.lang-ca.php │ │ ├── phpmailer.lang-ch.php │ │ ├── phpmailer.lang-cs.php │ │ ├── phpmailer.lang-da.php │ │ ├── phpmailer.lang-de.php │ │ ├── phpmailer.lang-el.php │ │ ├── phpmailer.lang-eo.php │ │ ├── phpmailer.lang-es.php │ │ ├── phpmailer.lang-et.php │ │ ├── phpmailer.lang-fa.php │ │ ├── phpmailer.lang-fi.php │ │ ├── phpmailer.lang-fo.php │ │ ├── phpmailer.lang-fr.php │ │ ├── phpmailer.lang-gl.php │ │ ├── phpmailer.lang-he.php │ │ ├── phpmailer.lang-hi.php │ │ ├── phpmailer.lang-hr.php │ │ ├── phpmailer.lang-hu.php │ │ ├── phpmailer.lang-hy.php │ │ ├── phpmailer.lang-id.php │ │ ├── phpmailer.lang-it.php │ │ ├── phpmailer.lang-ja.php │ │ ├── phpmailer.lang-ka.php │ │ ├── phpmailer.lang-ko.php │ │ ├── phpmailer.lang-lt.php │ │ ├── phpmailer.lang-lv.php │ │ ├── phpmailer.lang-mg.php │ │ ├── phpmailer.lang-ms.php │ │ ├── phpmailer.lang-nb.php │ │ ├── phpmailer.lang-nl.php │ │ ├── phpmailer.lang-pl.php │ │ ├── phpmailer.lang-pt.php │ │ ├── phpmailer.lang-pt_br.php │ │ ├── phpmailer.lang-ro.php │ │ ├── phpmailer.lang-ru.php │ │ ├── phpmailer.lang-sk.php │ │ ├── phpmailer.lang-sl.php │ │ ├── phpmailer.lang-sr.php │ │ ├── phpmailer.lang-sv.php │ │ ├── phpmailer.lang-tl.php │ │ ├── phpmailer.lang-tr.php │ │ ├── phpmailer.lang-uk.php │ │ ├── phpmailer.lang-vi.php │ │ ├── phpmailer.lang-zh.php │ │ └── phpmailer.lang-zh_cn.php │ │ └── src │ │ ├── Exception.php │ │ ├── OAuth.php │ │ ├── PHPMailer.php │ │ ├── POP3.php │ │ └── SMTP.php │ ├── nav.php │ ├── register.php │ ├── reset.php │ ├── super-admin │ ├── index.php │ └── profile.php │ └── user │ ├── index.php │ └── profile.php ├── LESSON 3 - الدرس └── index.php ├── LESSON 30 - الدرس ├── login.php └── register.php ├── LESSON 31 - الدرس ├── admin │ ├── index.php │ ├── profile.php │ ├── search.php │ └── todolist.php ├── super-admin │ ├── index.php │ ├── profile.php │ └── todolist.php └── user │ ├── index.php │ ├── profile.php │ └── todolist.php ├── LESSON 33 32 - الدرس ├── admin │ ├── index.php │ ├── profile.php │ ├── search.php │ └── todolist.php ├── super-admin │ ├── index.php │ ├── profile.php │ └── todolist.php └── user │ ├── index.php │ ├── profile.php │ └── todolist.php ├── LESSON 34 - الدرس └── admin │ ├── index.php │ ├── profile.php │ └── search.php ├── LESSON 35 - الدرس ├── index.php └── search.php ├── LESSON 36 - الدرس ├── admin │ ├── editUser.php │ ├── index.php │ ├── profile.php │ ├── search.php │ └── todolist.php ├── super-admin │ ├── index.php │ ├── profile.php │ └── todolist.php └── user │ ├── index.php │ ├── profile.php │ └── todolist.php ├── LESSON 37 - الدرس └── app │ ├── active.php │ ├── admin │ ├── editUser.php │ ├── index.php │ ├── profile.php │ ├── search.php │ └── todolist.php │ ├── composer.json │ ├── composer.lock │ ├── connectToDatabase.php │ ├── img │ └── logo.jpg │ ├── index.php │ ├── login.php │ ├── mail.php │ ├── mailer │ ├── autoload.php │ ├── composer │ │ ├── ClassLoader.php │ │ ├── LICENSE │ │ ├── autoload_classmap.php │ │ ├── autoload_namespaces.php │ │ ├── autoload_psr4.php │ │ ├── autoload_real.php │ │ ├── autoload_static.php │ │ └── installed.json │ └── phpmailer │ │ └── phpmailer │ │ ├── COMMITMENT │ │ ├── LICENSE │ │ ├── README.md │ │ ├── SECURITY.md │ │ ├── VERSION │ │ ├── composer.json │ │ ├── get_oauth_token.php │ │ ├── language │ │ ├── phpmailer.lang-af.php │ │ ├── phpmailer.lang-ar.php │ │ ├── phpmailer.lang-az.php │ │ ├── phpmailer.lang-ba.php │ │ ├── phpmailer.lang-be.php │ │ ├── phpmailer.lang-bg.php │ │ ├── phpmailer.lang-ca.php │ │ ├── phpmailer.lang-ch.php │ │ ├── phpmailer.lang-cs.php │ │ ├── phpmailer.lang-da.php │ │ ├── phpmailer.lang-de.php │ │ ├── phpmailer.lang-el.php │ │ ├── phpmailer.lang-eo.php │ │ ├── phpmailer.lang-es.php │ │ ├── phpmailer.lang-et.php │ │ ├── phpmailer.lang-fa.php │ │ ├── phpmailer.lang-fi.php │ │ ├── phpmailer.lang-fo.php │ │ ├── phpmailer.lang-fr.php │ │ ├── phpmailer.lang-gl.php │ │ ├── phpmailer.lang-he.php │ │ ├── phpmailer.lang-hi.php │ │ ├── phpmailer.lang-hr.php │ │ ├── phpmailer.lang-hu.php │ │ ├── phpmailer.lang-hy.php │ │ ├── phpmailer.lang-id.php │ │ ├── phpmailer.lang-it.php │ │ ├── phpmailer.lang-ja.php │ │ ├── phpmailer.lang-ka.php │ │ ├── phpmailer.lang-ko.php │ │ ├── phpmailer.lang-lt.php │ │ ├── phpmailer.lang-lv.php │ │ ├── phpmailer.lang-mg.php │ │ ├── phpmailer.lang-ms.php │ │ ├── phpmailer.lang-nb.php │ │ ├── phpmailer.lang-nl.php │ │ ├── phpmailer.lang-pl.php │ │ ├── phpmailer.lang-pt.php │ │ ├── phpmailer.lang-pt_br.php │ │ ├── phpmailer.lang-ro.php │ │ ├── phpmailer.lang-ru.php │ │ ├── phpmailer.lang-sk.php │ │ ├── phpmailer.lang-sl.php │ │ ├── phpmailer.lang-sr.php │ │ ├── phpmailer.lang-sv.php │ │ ├── phpmailer.lang-tl.php │ │ ├── phpmailer.lang-tr.php │ │ ├── phpmailer.lang-uk.php │ │ ├── phpmailer.lang-vi.php │ │ ├── phpmailer.lang-zh.php │ │ └── phpmailer.lang-zh_cn.php │ │ └── src │ │ ├── Exception.php │ │ ├── OAuth.php │ │ ├── PHPMailer.php │ │ ├── POP3.php │ │ └── SMTP.php │ ├── nav.php │ ├── register.php │ ├── reset.php │ ├── super-admin │ ├── index.php │ ├── profile.php │ └── todolist.php │ └── user │ ├── index.php │ ├── profile.php │ └── todolist.php ├── LESSON 4 - الدرس └── codes.txt ├── LESSON 40 - الدرس └── index.php ├── LESSON 41 - الدرس └── php mysql api get │ ├── app.html │ └── index.php ├── LESSON 42 - الدرس └── php mysql api post │ ├── app.html │ └── index.php ├── LESSON 5 - الدرس └── index.php ├── LESSON 6 - الدرس └── index.php ├── LESSON 7 - الدرس └── index.php ├── LESSON 8 - الدرس └── index.php └── LESSON 9 - الدرس └── index.php /LESSON 10 - الدرس/index.php: -------------------------------------------------------------------------------- 1 | 2 | prepare("SELECT * FROM users"); 8 | 9 | $sql->execute(); 10 | 11 | echo $sql->columnCount(); 12 | 13 | ?> 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /LESSON 11 - الدرس/index.php: -------------------------------------------------------------------------------- 1 | prepare("INSERT INTO files(name,type,position) VALUES(:name,:type,:position)"); 14 | $uploadFile->bindParam("name",$fileName); 15 | $uploadFile->bindParam("type",$fileType); 16 | $uploadFile->bindParam("position",$position); 17 | if($uploadFile->execute()){ 18 | echo 'تم رفع ملف بنجاح'; 19 | }else{ 20 | echo 'فشل رفع ملف'; 21 | } 22 | } 23 | ?> 24 | 25 |
26 | 27 | 28 |
-------------------------------------------------------------------------------- /LESSON 11-2 - الدرس/index.php: -------------------------------------------------------------------------------- 1 | prepare("SELECT * FROM post "); 6 | $getData->execute(); 7 | 8 | var_dump($getData->errorInfo()); 9 | 10 | foreach ($getData as $data) { 11 | echo "
" . $data["content"] . "
"; 12 | } 13 | -------------------------------------------------------------------------------- /LESSON 12 - الدرس/files/download (3).jfif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codershiyar/php-mysql/7a3cf68326491ce64064e1f4de231385ad45efce/LESSON 12 - الدرس/files/download (3).jfif -------------------------------------------------------------------------------- /LESSON 12 - الدرس/files/download (4).jfif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codershiyar/php-mysql/7a3cf68326491ce64064e1f4de231385ad45efce/LESSON 12 - الدرس/files/download (4).jfif -------------------------------------------------------------------------------- /LESSON 12 - الدرس/index.php: -------------------------------------------------------------------------------- 1 | prepare("INSERT INTO files(name,type,position) VALUES(:name,:type,:position)"); 14 | $uploadFile->bindParam("name",$fileName); 15 | $uploadFile->bindParam("type",$fileType); 16 | $uploadFile->bindParam("position",$position); 17 | if($uploadFile->execute()){ 18 | echo 'تم رفع ملف بنجاح'; 19 | }else{ 20 | echo 'فشل رفع ملف'; 21 | } 22 | } 23 | ?> 24 | 25 |
26 | 27 | 28 |
-------------------------------------------------------------------------------- /LESSON 12 - الدرس/view.php: -------------------------------------------------------------------------------- 1 | prepare("SELECT * FROM files"); 7 | $files->execute(); 8 | foreach($files AS $file ){ 9 | echo "".$file["name"]."
"; 10 | } 11 | ?> 12 | 13 | -------------------------------------------------------------------------------- /LESSON 14 - 13 - الدرس/index.php: -------------------------------------------------------------------------------- 1 | prepare("SELECT * FROM files WHERE fileType = 'image/jpeg' "); 7 | $myFiles->execute(); 8 | 9 | foreach($myFiles AS $data){ 10 | $getFile = "data:" . $data['fileType'] . ";base64,".base64_encode($data['file']); 11 | echo "" .$data['fileName'] . "
"; 12 | echo ''; 13 | 14 | } 15 | 16 | if(isset($_POST['upload'])){ 17 | $fileName = $_FILES['file']["name"]; 18 | $fileType = $_FILES['file']["type"]; 19 | $fileData = file_get_contents( $_FILES['file']["tmp_name"]); 20 | 21 | $addFile = $database->prepare("INSERT INTO files(file,fileName,fileType) 22 | VALUES(:file ,:fileName,:fileType)"); 23 | 24 | $addFile->bindParam("file",$fileData); 25 | $addFile->bindParam("fileName",$fileName); 26 | $addFile->bindParam("fileType",$fileType); 27 | 28 | if($addFile->execute()){ 29 | echo 'تم حفظ ملف'; 30 | }else{ 31 | echo 'فشل تخزين ملف'; 32 | } 33 | 34 | } 35 | 36 | 37 | 38 | ?> 39 | 40 |
41 | 42 | 43 | 44 | 45 |
-------------------------------------------------------------------------------- /LESSON 15 - الدرس/index.php: -------------------------------------------------------------------------------- 1 | 2 | prepare("SELECT * FROM products"); 10 | $getItems->execute(); 11 | 12 | foreach($getItems AS $data){ 13 | echo '
14 |
منتج - ' . $data['Id']. '
15 |
16 |
' . $data['Name'] . '
17 |

' .$data['Price']. '

18 |
19 | 20 |
21 |
'; 22 | 23 | 24 | } 25 | 26 | if(isset($_POST['remove'])){ 27 | $removeProduct = $database->prepare("DELETE FROM products WHERE Id = :id "); 28 | $getId = $_POST['remove']; 29 | $removeProduct->bindParam("id",$getId); 30 | 31 | if($removeProduct->execute()){ 32 | echo 'تم حذف بنجاح'; 33 | header("Location: index.php"); 34 | }else{ 35 | echo 'فشل حذف'; 36 | } 37 | } 38 | ?> 39 | 40 | 41 | -------------------------------------------------------------------------------- /LESSON 16 - الدرس/edit.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | prepare("SELECT * FROM products WHERE Id = :id"); 12 | $getProduct->bindParam("id",$_GET['edit']); 13 | $getProduct->execute(); 14 | foreach($getProduct AS $data){ 15 | echo ' 16 |
17 | 18 | Name: 19 | Price: 20 | 21 | عودة 22 | 23 |
24 | '; 25 | } 26 | 27 | if(isset($_POST['update'])){ 28 | $update = $database->prepare("UPDATE products 29 | SET Name = :Name , Price = :Price WHERE Id = :Id"); 30 | $update->bindParam("Name",$_POST['Name']); 31 | $update->bindParam("Price",$_POST['Price']); 32 | $update->bindParam("Id",$_POST['update']); 33 | $update->execute(); 34 | header("Location: edit.php?edit=" . $_POST['update']); 35 | } 36 | 37 | } 38 | ?> -------------------------------------------------------------------------------- /LESSON 16 - الدرس/index.php: -------------------------------------------------------------------------------- 1 | 2 | prepare("DELETE FROM files WHERE Id = 2"); 8 | $removeItem->execute(); 9 | 10 | $getItems = $database->prepare("SELECT * FROM products"); 11 | $getItems->execute(); 12 | 13 | foreach($getItems AS $data){ 14 | echo '
15 |
منتج - ' . $data['Id']. '
16 |
17 |
' . $data['Name'] . '
18 |

' .$data['Price']. '

19 |
20 | 21 | 22 | تعديل 23 | 24 | 25 |
26 |
'; 27 | 28 | 29 | } 30 | 31 | if(isset($_POST['remove'])){ 32 | $removeProduct = $database->prepare("DELETE FROM products WHERE Id = :id "); 33 | $getId = $_POST['remove']; 34 | $removeProduct->bindParam("id",$getId); 35 | 36 | if($removeProduct->execute()){ 37 | echo 'تم حذف بنجاح'; 38 | header("Location: index.php"); 39 | }else{ 40 | echo 'فشل حذف'; 41 | } 42 | } 43 | ?> 44 | 45 | 46 | -------------------------------------------------------------------------------- /LESSON 17 - الدرس/index.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | prepare("SELECT * FROM users WHERE name LIKE :value 10 | OR Country LIKE :value OR Password LIKE :value"); 11 | $SEARCH_VALUE = "%".$_GET['search']."%"; 12 | 13 | $SEARCH->bindParam("value",$SEARCH_VALUE); 14 | $SEARCH->execute(); 15 | 16 | foreach($SEARCH AS $data){ 17 | 18 | echo '
19 |
' .$data['name'] .'
20 |
21 |
' .$data['Country'] .'
22 |

' .$data['Age'] .'

23 |
24 |
25 | '; 26 | 27 | } 28 | } 29 | ?> 30 | 31 | 32 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /LESSON 18 - الدرس/index.php: -------------------------------------------------------------------------------- 1 | 2 | prepare("SELECT * FROM products WHERE Price 9 | BETWEEN :startNumber AND :endNumber"); 10 | $products->bindParam("startNumber",$_GET['startNumber']); 11 | $products->bindParam("endNumber",$_GET['endNumber']); 12 | 13 | $products->execute(); 14 | foreach( $products AS $myProducts){ 15 | echo '
16 |
' . $myProducts['Name'] .'
17 |
18 |
' . $myProducts['Price'] .' السعر
19 | 20 |
21 |
'; 22 | } 23 | }else{ 24 | $products = $database->prepare("SELECT * FROM products"); 25 | $products->execute(); 26 | foreach( $products AS $myProducts){ 27 | echo '
28 |
' . $myProducts['Name'] .'
29 |
30 |
' . $myProducts['Price'] .' السعر
31 | 32 |
33 |
'; 34 | 35 | } 36 | } 37 | ?> 38 | 39 | 40 |
41 | 42 | 43 | 44 | 45 |
46 | -------------------------------------------------------------------------------- /LESSON 19 - الدرس/app/index.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codershiyar/php-mysql/7a3cf68326491ce64064e1f4de231385ad45efce/LESSON 19 - الدرس/app/index.php -------------------------------------------------------------------------------- /LESSON 20 - الدرس/app/active.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | prepare("SELECT SECURITY_CODE FROM users WHERE SECURITY_CODE = :SECURITY_CODE"); 12 | $checkCode->bindParam("SECURITY_CODE",$_GET['code']); 13 | $checkCode->execute(); 14 | if($checkCode->rowCount()>0){ 15 | 16 | $update = $database->prepare("UPDATE users SET SECURITY_CODE = :NEWSECURITY_CODE , 17 | ACTIVATED=true WHERE SECURITY_CODE = :SECURITY_CODE"); 18 | $securityCode = md5(date("h:i:s")); 19 | $update->bindParam("NEWSECURITY_CODE",$securityCode); 20 | $update->bindParam("SECURITY_CODE",$_GET['code']); 21 | 22 | 23 | if($update->execute()){ 24 | echo ''; 27 | echo 'تسجيل دخول'; 28 | } 29 | }else{ 30 | echo ''; 33 | } 34 | 35 | } 36 | ?> -------------------------------------------------------------------------------- /LESSON 20 - الدرس/app/composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "require": { 3 | "phpmailer/phpmailer": "^6.1" 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /LESSON 20 - الدرس/app/index.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codershiyar/php-mysql/7a3cf68326491ce64064e1f4de231385ad45efce/LESSON 20 - الدرس/app/index.php -------------------------------------------------------------------------------- /LESSON 20 - الدرس/app/mail.php: -------------------------------------------------------------------------------- 1 | SMTPDebug = SMTP::DEBUG_SERVER; // Enable verbose debug output 16 | $mail->isSMTP(); // Send using SMTP 17 | $mail->Host = 'smtp.gmail.com'; // Set the SMTP server to send through 18 | $mail->SMTPAuth = true; // Enable SMTP authentication 19 | $mail->Username = 'ايميلك'; // SMTP username 20 | $mail->Password = 'كلمة مرور'; // SMTP password 21 | $mail->SMTPSecure = 'ssl'; // Enable TLS encryption; `PHPMailer::ENCRYPTION_SMTPS` encouraged 22 | $mail->Port = 465; // TCP port to connect to, use 465 for `PHPMailer::ENCRYPTION_SMTPS` above 23 | 24 | // Content 25 | $mail->isHTML(true); 26 | $mail->CharSet = "UTF-8"; -------------------------------------------------------------------------------- /LESSON 20 - الدرس/app/mailer/autoload.php: -------------------------------------------------------------------------------- 1 | array($vendorDir . '/phpmailer/phpmailer/src'), 10 | ); 11 | -------------------------------------------------------------------------------- /LESSON 20 - الدرس/app/mailer/composer/autoload_static.php: -------------------------------------------------------------------------------- 1 | 11 | array ( 12 | 'PHPMailer\\PHPMailer\\' => 20, 13 | ), 14 | ); 15 | 16 | public static $prefixDirsPsr4 = array ( 17 | 'PHPMailer\\PHPMailer\\' => 18 | array ( 19 | 0 => __DIR__ . '/..' . '/phpmailer/phpmailer/src', 20 | ), 21 | ); 22 | 23 | public static function getInitializer(ClassLoader $loader) 24 | { 25 | return \Closure::bind(function () use ($loader) { 26 | $loader->prefixLengthsPsr4 = ComposerStaticInitb7d6377ee324d8c3f56c6d308c8f812a::$prefixLengthsPsr4; 27 | $loader->prefixDirsPsr4 = ComposerStaticInitb7d6377ee324d8c3f56c6d308c8f812a::$prefixDirsPsr4; 28 | 29 | }, null, ClassLoader::class); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /LESSON 20 - الدرس/app/mailer/phpmailer/phpmailer/VERSION: -------------------------------------------------------------------------------- 1 | 6.1.7 -------------------------------------------------------------------------------- /LESSON 20 - الدرس/app/mailer/phpmailer/phpmailer/language/phpmailer.lang-af.php: -------------------------------------------------------------------------------- 1 | 6 | */ 7 | 8 | $PHPMAILER_LANG['authenticate'] = 'SMTP 错误:身份验证失败。'; 9 | $PHPMAILER_LANG['connect_host'] = 'SMTP 错误: 不能连接SMTP主机。'; 10 | $PHPMAILER_LANG['data_not_accepted'] = 'SMTP 错误: 数据不可接受。'; 11 | //$PHPMAILER_LANG['empty_message'] = 'Message body empty'; 12 | $PHPMAILER_LANG['encoding'] = '未知编码:'; 13 | $PHPMAILER_LANG['execute'] = '不能执行: '; 14 | $PHPMAILER_LANG['file_access'] = '不能访问文件:'; 15 | $PHPMAILER_LANG['file_open'] = '文件错误:不能打开文件:'; 16 | $PHPMAILER_LANG['from_failed'] = '下面的发送地址邮件发送失败了: '; 17 | $PHPMAILER_LANG['instantiate'] = '不能实现mail方法。'; 18 | //$PHPMAILER_LANG['invalid_address'] = 'Invalid address: '; 19 | $PHPMAILER_LANG['mailer_not_supported'] = ' 您所选择的发送邮件的方法并不支持。'; 20 | $PHPMAILER_LANG['provide_address'] = '您必须提供至少一个 收信人的email地址。'; 21 | $PHPMAILER_LANG['recipients_failed'] = 'SMTP 错误: 下面的 收件人失败了: '; 22 | //$PHPMAILER_LANG['signing'] = 'Signing Error: '; 23 | //$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() failed.'; 24 | //$PHPMAILER_LANG['smtp_error'] = 'SMTP server error: '; 25 | //$PHPMAILER_LANG['variable_set'] = 'Cannot set or reset variable: '; 26 | //$PHPMAILER_LANG['extension_missing'] = 'Extension missing: '; 27 | -------------------------------------------------------------------------------- /LESSON 20 - الدرس/app/mailer/phpmailer/phpmailer/language/phpmailer.lang-he.php: -------------------------------------------------------------------------------- 1 | 6 | */ 7 | 8 | $PHPMAILER_LANG['authenticate'] = 'שגיאת SMTP: פעולת האימות נכשלה.'; 9 | $PHPMAILER_LANG['connect_host'] = 'שגיאת SMTP: לא הצלחתי להתחבר לשרת SMTP.'; 10 | $PHPMAILER_LANG['data_not_accepted'] = 'שגיאת SMTP: מידע לא התקבל.'; 11 | $PHPMAILER_LANG['empty_message'] = 'גוף ההודעה ריק'; 12 | $PHPMAILER_LANG['invalid_address'] = 'כתובת שגויה: '; 13 | $PHPMAILER_LANG['encoding'] = 'קידוד לא מוכר: '; 14 | $PHPMAILER_LANG['execute'] = 'לא הצלחתי להפעיל את: '; 15 | $PHPMAILER_LANG['file_access'] = 'לא ניתן לגשת לקובץ: '; 16 | $PHPMAILER_LANG['file_open'] = 'שגיאת קובץ: לא ניתן לגשת לקובץ: '; 17 | $PHPMAILER_LANG['from_failed'] = 'כתובות הנמענים הבאות נכשלו: '; 18 | $PHPMAILER_LANG['instantiate'] = 'לא הצלחתי להפעיל את פונקציית המייל.'; 19 | $PHPMAILER_LANG['mailer_not_supported'] = ' אינה נתמכת.'; 20 | $PHPMAILER_LANG['provide_address'] = 'חובה לספק לפחות כתובת אחת של מקבל המייל.'; 21 | $PHPMAILER_LANG['recipients_failed'] = 'שגיאת SMTP: הנמענים הבאים נכשלו: '; 22 | $PHPMAILER_LANG['signing'] = 'שגיאת חתימה: '; 23 | $PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() failed.'; 24 | $PHPMAILER_LANG['smtp_error'] = 'שגיאת שרת SMTP: '; 25 | $PHPMAILER_LANG['variable_set'] = 'לא ניתן לקבוע או לשנות את המשתנה: '; 26 | //$PHPMAILER_LANG['extension_missing'] = 'Extension missing: '; 27 | -------------------------------------------------------------------------------- /LESSON 20 - الدرس/app/mailer/phpmailer/phpmailer/language/phpmailer.lang-ja.php: -------------------------------------------------------------------------------- 1 | 6 | * @author Yoshi Sakai 7 | */ 8 | 9 | $PHPMAILER_LANG['authenticate'] = 'SMTPエラー: 認証できませんでした。'; 10 | $PHPMAILER_LANG['connect_host'] = 'SMTPエラー: SMTPホストに接続できませんでした。'; 11 | $PHPMAILER_LANG['data_not_accepted'] = 'SMTPエラー: データが受け付けられませんでした。'; 12 | //$PHPMAILER_LANG['empty_message'] = 'Message body empty'; 13 | $PHPMAILER_LANG['encoding'] = '不明なエンコーディング: '; 14 | $PHPMAILER_LANG['execute'] = '実行できませんでした: '; 15 | $PHPMAILER_LANG['file_access'] = 'ファイルにアクセスできません: '; 16 | $PHPMAILER_LANG['file_open'] = 'ファイルエラー: ファイルを開けません: '; 17 | $PHPMAILER_LANG['from_failed'] = 'Fromアドレスを登録する際にエラーが発生しました: '; 18 | $PHPMAILER_LANG['instantiate'] = 'メール関数が正常に動作しませんでした。'; 19 | //$PHPMAILER_LANG['invalid_address'] = 'Invalid address: '; 20 | $PHPMAILER_LANG['provide_address'] = '少なくとも1つメールアドレスを 指定する必要があります。'; 21 | $PHPMAILER_LANG['mailer_not_supported'] = ' メーラーがサポートされていません。'; 22 | $PHPMAILER_LANG['recipients_failed'] = 'SMTPエラー: 次の受信者アドレスに 間違いがあります: '; 23 | //$PHPMAILER_LANG['signing'] = 'Signing Error: '; 24 | //$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() failed.'; 25 | //$PHPMAILER_LANG['smtp_error'] = 'SMTP server error: '; 26 | //$PHPMAILER_LANG['variable_set'] = 'Cannot set or reset variable: '; 27 | //$PHPMAILER_LANG['extension_missing'] = 'Extension missing: '; 28 | -------------------------------------------------------------------------------- /LESSON 20 - الدرس/app/mailer/phpmailer/phpmailer/language/phpmailer.lang-ko.php: -------------------------------------------------------------------------------- 1 | 6 | */ 7 | 8 | $PHPMAILER_LANG['authenticate'] = 'SMTP 오류: 인증할 수 없습니다.'; 9 | $PHPMAILER_LANG['connect_host'] = 'SMTP 오류: SMTP 호스트에 접속할 수 없습니다.'; 10 | $PHPMAILER_LANG['data_not_accepted'] = 'SMTP 오류: 데이터가 받아들여지지 않았습니다.'; 11 | $PHPMAILER_LANG['empty_message'] = '메세지 내용이 없습니다'; 12 | $PHPMAILER_LANG['encoding'] = '알 수 없는 인코딩: '; 13 | $PHPMAILER_LANG['execute'] = '실행 불가: '; 14 | $PHPMAILER_LANG['file_access'] = '파일 접근 불가: '; 15 | $PHPMAILER_LANG['file_open'] = '파일 오류: 파일을 열 수 없습니다: '; 16 | $PHPMAILER_LANG['from_failed'] = '다음 From 주소에서 오류가 발생했습니다: '; 17 | $PHPMAILER_LANG['instantiate'] = 'mail 함수를 인스턴스화할 수 없습니다'; 18 | $PHPMAILER_LANG['invalid_address'] = '잘못된 주소: '; 19 | $PHPMAILER_LANG['mailer_not_supported'] = ' 메일러는 지원되지 않습니다.'; 20 | $PHPMAILER_LANG['provide_address'] = '적어도 한 개 이상의 수신자 메일 주소를 제공해야 합니다.'; 21 | $PHPMAILER_LANG['recipients_failed'] = 'SMTP 오류: 다음 수신자에서 오류가 발생했습니다: '; 22 | $PHPMAILER_LANG['signing'] = '서명 오류: '; 23 | $PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP 연결을 실패하였습니다.'; 24 | $PHPMAILER_LANG['smtp_error'] = 'SMTP 서버 오류: '; 25 | $PHPMAILER_LANG['variable_set'] = '변수 설정 및 초기화 불가: '; 26 | $PHPMAILER_LANG['extension_missing'] = '확장자 없음: '; 27 | -------------------------------------------------------------------------------- /LESSON 20 - الدرس/app/mailer/phpmailer/phpmailer/language/phpmailer.lang-nb.php: -------------------------------------------------------------------------------- 1 | 6 | * @author Peter Dave Hello <@PeterDaveHello/> 7 | * @author Jason Chiang 8 | */ 9 | 10 | $PHPMAILER_LANG['authenticate'] = 'SMTP 錯誤:登入失敗。'; 11 | $PHPMAILER_LANG['connect_host'] = 'SMTP 錯誤:無法連線到 SMTP 主機。'; 12 | $PHPMAILER_LANG['data_not_accepted'] = 'SMTP 錯誤:無法接受的資料。'; 13 | $PHPMAILER_LANG['empty_message'] = '郵件內容為空'; 14 | $PHPMAILER_LANG['encoding'] = '未知編碼: '; 15 | $PHPMAILER_LANG['execute'] = '無法執行:'; 16 | $PHPMAILER_LANG['file_access'] = '無法存取檔案:'; 17 | $PHPMAILER_LANG['file_open'] = '檔案錯誤:無法開啟檔案:'; 18 | $PHPMAILER_LANG['from_failed'] = '發送地址錯誤:'; 19 | $PHPMAILER_LANG['instantiate'] = '未知函數呼叫。'; 20 | $PHPMAILER_LANG['invalid_address'] = '因為電子郵件地址無效,無法傳送: '; 21 | $PHPMAILER_LANG['mailer_not_supported'] = '不支援的發信客戶端。'; 22 | $PHPMAILER_LANG['provide_address'] = '必須提供至少一個收件人地址。'; 23 | $PHPMAILER_LANG['recipients_failed'] = 'SMTP 錯誤:以下收件人地址錯誤:'; 24 | $PHPMAILER_LANG['signing'] = '電子簽章錯誤: '; 25 | $PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP 連線失敗'; 26 | $PHPMAILER_LANG['smtp_error'] = 'SMTP 伺服器錯誤: '; 27 | $PHPMAILER_LANG['variable_set'] = '無法設定或重設變數: '; 28 | $PHPMAILER_LANG['extension_missing'] = '遺失模組 Extension: '; 29 | -------------------------------------------------------------------------------- /LESSON 20 - الدرس/app/mailer/phpmailer/phpmailer/language/phpmailer.lang-zh_cn.php: -------------------------------------------------------------------------------- 1 | 6 | * @author young 7 | * @author Teddysun 8 | */ 9 | 10 | $PHPMAILER_LANG['authenticate'] = 'SMTP 错误:登录失败。'; 11 | $PHPMAILER_LANG['connect_host'] = 'SMTP 错误:无法连接到 SMTP 主机。'; 12 | $PHPMAILER_LANG['data_not_accepted'] = 'SMTP 错误:数据不被接受。'; 13 | $PHPMAILER_LANG['empty_message'] = '邮件正文为空。'; 14 | $PHPMAILER_LANG['encoding'] = '未知编码:'; 15 | $PHPMAILER_LANG['execute'] = '无法执行:'; 16 | $PHPMAILER_LANG['file_access'] = '无法访问文件:'; 17 | $PHPMAILER_LANG['file_open'] = '文件错误:无法打开文件:'; 18 | $PHPMAILER_LANG['from_failed'] = '发送地址错误:'; 19 | $PHPMAILER_LANG['instantiate'] = '未知函数调用。'; 20 | $PHPMAILER_LANG['invalid_address'] = '发送失败,电子邮箱地址是无效的:'; 21 | $PHPMAILER_LANG['mailer_not_supported'] = '发信客户端不被支持。'; 22 | $PHPMAILER_LANG['provide_address'] = '必须提供至少一个收件人地址。'; 23 | $PHPMAILER_LANG['recipients_failed'] = 'SMTP 错误:收件人地址错误:'; 24 | $PHPMAILER_LANG['signing'] = '登录失败:'; 25 | $PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP服务器连接失败。'; 26 | $PHPMAILER_LANG['smtp_error'] = 'SMTP服务器出错:'; 27 | $PHPMAILER_LANG['variable_set'] = '无法设置或重置变量:'; 28 | $PHPMAILER_LANG['extension_missing'] = '丢失模块 Extension:'; 29 | -------------------------------------------------------------------------------- /LESSON 20 - الدرس/app/mailer/phpmailer/phpmailer/src/Exception.php: -------------------------------------------------------------------------------- 1 | 9 | * @author Jim Jagielski (jimjag) 10 | * @author Andy Prevost (codeworxtech) 11 | * @author Brent R. Matzelle (original founder) 12 | * @copyright 2012 - 2017 Marcus Bointon 13 | * @copyright 2010 - 2012 Jim Jagielski 14 | * @copyright 2004 - 2009 Andy Prevost 15 | * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License 16 | * @note This program is distributed in the hope that it will be useful - WITHOUT 17 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 18 | * FITNESS FOR A PARTICULAR PURPOSE. 19 | */ 20 | 21 | namespace PHPMailer\PHPMailer; 22 | 23 | /** 24 | * PHPMailer exception handler. 25 | * 26 | * @author Marcus Bointon 27 | */ 28 | class Exception extends \Exception 29 | { 30 | /** 31 | * Prettify error message output. 32 | * 33 | * @return string 34 | */ 35 | public function errorMessage() 36 | { 37 | return '' . htmlspecialchars($this->getMessage()) . "
\n"; 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /LESSON 21 - الدرس/app/active.php: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 | prepare("SELECT SECURITY_CODE FROM users WHERE SECURITY_CODE = :SECURITY_CODE"); 14 | $checkCode->bindParam("SECURITY_CODE",$_GET['code']); 15 | $checkCode->execute(); 16 | if($checkCode->rowCount()>0){ 17 | 18 | $update = $database->prepare("UPDATE users SET SECURITY_CODE = :NEWSECURITY_CODE , 19 | ACTIVATED=true WHERE SECURITY_CODE = :SECURITY_CODE"); 20 | $securityCode = md5(date("h:i:s")); 21 | $update->bindParam("NEWSECURITY_CODE",$securityCode); 22 | $update->bindParam("SECURITY_CODE",$_GET['code']); 23 | 24 | 25 | if($update->execute()){ 26 | echo ''; 29 | echo 'تسجيل دخول'; 30 | } 31 | }else{ 32 | echo ''; 35 | } 36 | 37 | } 38 | ?> 39 | 40 | 41 |
-------------------------------------------------------------------------------- /LESSON 21 - الدرس/app/composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "require": { 3 | "phpmailer/phpmailer": "^6.1" 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /LESSON 21 - الدرس/app/index.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codershiyar/php-mysql/7a3cf68326491ce64064e1f4de231385ad45efce/LESSON 21 - الدرس/app/index.php -------------------------------------------------------------------------------- /LESSON 21 - الدرس/app/mail.php: -------------------------------------------------------------------------------- 1 | SMTPDebug = SMTP::DEBUG_SERVER; // Enable verbose debug output 16 | $mail->isSMTP(); // Send using SMTP 17 | $mail->Host = 'smtp.gmail.com'; // Set the SMTP server to send through 18 | $mail->SMTPAuth = true; // Enable SMTP authentication 19 | $mail->Username = 'ضع بريد الكتروني خاص بك'; // SMTP username 20 | $mail->Password = 'ضع كلمة مرور خاص بك'; // SMTP password 21 | $mail->SMTPSecure = 'ssl'; // Enable TLS encryption; `PHPMailer::ENCRYPTION_SMTPS` encouraged 22 | $mail->Port = 465; // TCP port to connect to, use 465 for `PHPMailer::ENCRYPTION_SMTPS` above 23 | 24 | // Content 25 | $mail->isHTML(true); 26 | $mail->CharSet = "UTF-8"; -------------------------------------------------------------------------------- /LESSON 21 - الدرس/app/mailer/autoload.php: -------------------------------------------------------------------------------- 1 | array($vendorDir . '/phpmailer/phpmailer/src'), 10 | ); 11 | -------------------------------------------------------------------------------- /LESSON 21 - الدرس/app/mailer/composer/autoload_static.php: -------------------------------------------------------------------------------- 1 | 11 | array ( 12 | 'PHPMailer\\PHPMailer\\' => 20, 13 | ), 14 | ); 15 | 16 | public static $prefixDirsPsr4 = array ( 17 | 'PHPMailer\\PHPMailer\\' => 18 | array ( 19 | 0 => __DIR__ . '/..' . '/phpmailer/phpmailer/src', 20 | ), 21 | ); 22 | 23 | public static function getInitializer(ClassLoader $loader) 24 | { 25 | return \Closure::bind(function () use ($loader) { 26 | $loader->prefixLengthsPsr4 = ComposerStaticInitb7d6377ee324d8c3f56c6d308c8f812a::$prefixLengthsPsr4; 27 | $loader->prefixDirsPsr4 = ComposerStaticInitb7d6377ee324d8c3f56c6d308c8f812a::$prefixDirsPsr4; 28 | 29 | }, null, ClassLoader::class); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /LESSON 21 - الدرس/app/mailer/phpmailer/phpmailer/VERSION: -------------------------------------------------------------------------------- 1 | 6.1.7 -------------------------------------------------------------------------------- /LESSON 21 - الدرس/app/mailer/phpmailer/phpmailer/language/phpmailer.lang-af.php: -------------------------------------------------------------------------------- 1 | 6 | */ 7 | 8 | $PHPMAILER_LANG['authenticate'] = 'SMTP 错误:身份验证失败。'; 9 | $PHPMAILER_LANG['connect_host'] = 'SMTP 错误: 不能连接SMTP主机。'; 10 | $PHPMAILER_LANG['data_not_accepted'] = 'SMTP 错误: 数据不可接受。'; 11 | //$PHPMAILER_LANG['empty_message'] = 'Message body empty'; 12 | $PHPMAILER_LANG['encoding'] = '未知编码:'; 13 | $PHPMAILER_LANG['execute'] = '不能执行: '; 14 | $PHPMAILER_LANG['file_access'] = '不能访问文件:'; 15 | $PHPMAILER_LANG['file_open'] = '文件错误:不能打开文件:'; 16 | $PHPMAILER_LANG['from_failed'] = '下面的发送地址邮件发送失败了: '; 17 | $PHPMAILER_LANG['instantiate'] = '不能实现mail方法。'; 18 | //$PHPMAILER_LANG['invalid_address'] = 'Invalid address: '; 19 | $PHPMAILER_LANG['mailer_not_supported'] = ' 您所选择的发送邮件的方法并不支持。'; 20 | $PHPMAILER_LANG['provide_address'] = '您必须提供至少一个 收信人的email地址。'; 21 | $PHPMAILER_LANG['recipients_failed'] = 'SMTP 错误: 下面的 收件人失败了: '; 22 | //$PHPMAILER_LANG['signing'] = 'Signing Error: '; 23 | //$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() failed.'; 24 | //$PHPMAILER_LANG['smtp_error'] = 'SMTP server error: '; 25 | //$PHPMAILER_LANG['variable_set'] = 'Cannot set or reset variable: '; 26 | //$PHPMAILER_LANG['extension_missing'] = 'Extension missing: '; 27 | -------------------------------------------------------------------------------- /LESSON 21 - الدرس/app/mailer/phpmailer/phpmailer/language/phpmailer.lang-he.php: -------------------------------------------------------------------------------- 1 | 6 | */ 7 | 8 | $PHPMAILER_LANG['authenticate'] = 'שגיאת SMTP: פעולת האימות נכשלה.'; 9 | $PHPMAILER_LANG['connect_host'] = 'שגיאת SMTP: לא הצלחתי להתחבר לשרת SMTP.'; 10 | $PHPMAILER_LANG['data_not_accepted'] = 'שגיאת SMTP: מידע לא התקבל.'; 11 | $PHPMAILER_LANG['empty_message'] = 'גוף ההודעה ריק'; 12 | $PHPMAILER_LANG['invalid_address'] = 'כתובת שגויה: '; 13 | $PHPMAILER_LANG['encoding'] = 'קידוד לא מוכר: '; 14 | $PHPMAILER_LANG['execute'] = 'לא הצלחתי להפעיל את: '; 15 | $PHPMAILER_LANG['file_access'] = 'לא ניתן לגשת לקובץ: '; 16 | $PHPMAILER_LANG['file_open'] = 'שגיאת קובץ: לא ניתן לגשת לקובץ: '; 17 | $PHPMAILER_LANG['from_failed'] = 'כתובות הנמענים הבאות נכשלו: '; 18 | $PHPMAILER_LANG['instantiate'] = 'לא הצלחתי להפעיל את פונקציית המייל.'; 19 | $PHPMAILER_LANG['mailer_not_supported'] = ' אינה נתמכת.'; 20 | $PHPMAILER_LANG['provide_address'] = 'חובה לספק לפחות כתובת אחת של מקבל המייל.'; 21 | $PHPMAILER_LANG['recipients_failed'] = 'שגיאת SMTP: הנמענים הבאים נכשלו: '; 22 | $PHPMAILER_LANG['signing'] = 'שגיאת חתימה: '; 23 | $PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() failed.'; 24 | $PHPMAILER_LANG['smtp_error'] = 'שגיאת שרת SMTP: '; 25 | $PHPMAILER_LANG['variable_set'] = 'לא ניתן לקבוע או לשנות את המשתנה: '; 26 | //$PHPMAILER_LANG['extension_missing'] = 'Extension missing: '; 27 | -------------------------------------------------------------------------------- /LESSON 21 - الدرس/app/mailer/phpmailer/phpmailer/language/phpmailer.lang-ja.php: -------------------------------------------------------------------------------- 1 | 6 | * @author Yoshi Sakai 7 | */ 8 | 9 | $PHPMAILER_LANG['authenticate'] = 'SMTPエラー: 認証できませんでした。'; 10 | $PHPMAILER_LANG['connect_host'] = 'SMTPエラー: SMTPホストに接続できませんでした。'; 11 | $PHPMAILER_LANG['data_not_accepted'] = 'SMTPエラー: データが受け付けられませんでした。'; 12 | //$PHPMAILER_LANG['empty_message'] = 'Message body empty'; 13 | $PHPMAILER_LANG['encoding'] = '不明なエンコーディング: '; 14 | $PHPMAILER_LANG['execute'] = '実行できませんでした: '; 15 | $PHPMAILER_LANG['file_access'] = 'ファイルにアクセスできません: '; 16 | $PHPMAILER_LANG['file_open'] = 'ファイルエラー: ファイルを開けません: '; 17 | $PHPMAILER_LANG['from_failed'] = 'Fromアドレスを登録する際にエラーが発生しました: '; 18 | $PHPMAILER_LANG['instantiate'] = 'メール関数が正常に動作しませんでした。'; 19 | //$PHPMAILER_LANG['invalid_address'] = 'Invalid address: '; 20 | $PHPMAILER_LANG['provide_address'] = '少なくとも1つメールアドレスを 指定する必要があります。'; 21 | $PHPMAILER_LANG['mailer_not_supported'] = ' メーラーがサポートされていません。'; 22 | $PHPMAILER_LANG['recipients_failed'] = 'SMTPエラー: 次の受信者アドレスに 間違いがあります: '; 23 | //$PHPMAILER_LANG['signing'] = 'Signing Error: '; 24 | //$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() failed.'; 25 | //$PHPMAILER_LANG['smtp_error'] = 'SMTP server error: '; 26 | //$PHPMAILER_LANG['variable_set'] = 'Cannot set or reset variable: '; 27 | //$PHPMAILER_LANG['extension_missing'] = 'Extension missing: '; 28 | -------------------------------------------------------------------------------- /LESSON 21 - الدرس/app/mailer/phpmailer/phpmailer/language/phpmailer.lang-ko.php: -------------------------------------------------------------------------------- 1 | 6 | */ 7 | 8 | $PHPMAILER_LANG['authenticate'] = 'SMTP 오류: 인증할 수 없습니다.'; 9 | $PHPMAILER_LANG['connect_host'] = 'SMTP 오류: SMTP 호스트에 접속할 수 없습니다.'; 10 | $PHPMAILER_LANG['data_not_accepted'] = 'SMTP 오류: 데이터가 받아들여지지 않았습니다.'; 11 | $PHPMAILER_LANG['empty_message'] = '메세지 내용이 없습니다'; 12 | $PHPMAILER_LANG['encoding'] = '알 수 없는 인코딩: '; 13 | $PHPMAILER_LANG['execute'] = '실행 불가: '; 14 | $PHPMAILER_LANG['file_access'] = '파일 접근 불가: '; 15 | $PHPMAILER_LANG['file_open'] = '파일 오류: 파일을 열 수 없습니다: '; 16 | $PHPMAILER_LANG['from_failed'] = '다음 From 주소에서 오류가 발생했습니다: '; 17 | $PHPMAILER_LANG['instantiate'] = 'mail 함수를 인스턴스화할 수 없습니다'; 18 | $PHPMAILER_LANG['invalid_address'] = '잘못된 주소: '; 19 | $PHPMAILER_LANG['mailer_not_supported'] = ' 메일러는 지원되지 않습니다.'; 20 | $PHPMAILER_LANG['provide_address'] = '적어도 한 개 이상의 수신자 메일 주소를 제공해야 합니다.'; 21 | $PHPMAILER_LANG['recipients_failed'] = 'SMTP 오류: 다음 수신자에서 오류가 발생했습니다: '; 22 | $PHPMAILER_LANG['signing'] = '서명 오류: '; 23 | $PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP 연결을 실패하였습니다.'; 24 | $PHPMAILER_LANG['smtp_error'] = 'SMTP 서버 오류: '; 25 | $PHPMAILER_LANG['variable_set'] = '변수 설정 및 초기화 불가: '; 26 | $PHPMAILER_LANG['extension_missing'] = '확장자 없음: '; 27 | -------------------------------------------------------------------------------- /LESSON 21 - الدرس/app/mailer/phpmailer/phpmailer/language/phpmailer.lang-nb.php: -------------------------------------------------------------------------------- 1 | 6 | * @author Peter Dave Hello <@PeterDaveHello/> 7 | * @author Jason Chiang 8 | */ 9 | 10 | $PHPMAILER_LANG['authenticate'] = 'SMTP 錯誤:登入失敗。'; 11 | $PHPMAILER_LANG['connect_host'] = 'SMTP 錯誤:無法連線到 SMTP 主機。'; 12 | $PHPMAILER_LANG['data_not_accepted'] = 'SMTP 錯誤:無法接受的資料。'; 13 | $PHPMAILER_LANG['empty_message'] = '郵件內容為空'; 14 | $PHPMAILER_LANG['encoding'] = '未知編碼: '; 15 | $PHPMAILER_LANG['execute'] = '無法執行:'; 16 | $PHPMAILER_LANG['file_access'] = '無法存取檔案:'; 17 | $PHPMAILER_LANG['file_open'] = '檔案錯誤:無法開啟檔案:'; 18 | $PHPMAILER_LANG['from_failed'] = '發送地址錯誤:'; 19 | $PHPMAILER_LANG['instantiate'] = '未知函數呼叫。'; 20 | $PHPMAILER_LANG['invalid_address'] = '因為電子郵件地址無效,無法傳送: '; 21 | $PHPMAILER_LANG['mailer_not_supported'] = '不支援的發信客戶端。'; 22 | $PHPMAILER_LANG['provide_address'] = '必須提供至少一個收件人地址。'; 23 | $PHPMAILER_LANG['recipients_failed'] = 'SMTP 錯誤:以下收件人地址錯誤:'; 24 | $PHPMAILER_LANG['signing'] = '電子簽章錯誤: '; 25 | $PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP 連線失敗'; 26 | $PHPMAILER_LANG['smtp_error'] = 'SMTP 伺服器錯誤: '; 27 | $PHPMAILER_LANG['variable_set'] = '無法設定或重設變數: '; 28 | $PHPMAILER_LANG['extension_missing'] = '遺失模組 Extension: '; 29 | -------------------------------------------------------------------------------- /LESSON 21 - الدرس/app/mailer/phpmailer/phpmailer/language/phpmailer.lang-zh_cn.php: -------------------------------------------------------------------------------- 1 | 6 | * @author young 7 | * @author Teddysun 8 | */ 9 | 10 | $PHPMAILER_LANG['authenticate'] = 'SMTP 错误:登录失败。'; 11 | $PHPMAILER_LANG['connect_host'] = 'SMTP 错误:无法连接到 SMTP 主机。'; 12 | $PHPMAILER_LANG['data_not_accepted'] = 'SMTP 错误:数据不被接受。'; 13 | $PHPMAILER_LANG['empty_message'] = '邮件正文为空。'; 14 | $PHPMAILER_LANG['encoding'] = '未知编码:'; 15 | $PHPMAILER_LANG['execute'] = '无法执行:'; 16 | $PHPMAILER_LANG['file_access'] = '无法访问文件:'; 17 | $PHPMAILER_LANG['file_open'] = '文件错误:无法打开文件:'; 18 | $PHPMAILER_LANG['from_failed'] = '发送地址错误:'; 19 | $PHPMAILER_LANG['instantiate'] = '未知函数调用。'; 20 | $PHPMAILER_LANG['invalid_address'] = '发送失败,电子邮箱地址是无效的:'; 21 | $PHPMAILER_LANG['mailer_not_supported'] = '发信客户端不被支持。'; 22 | $PHPMAILER_LANG['provide_address'] = '必须提供至少一个收件人地址。'; 23 | $PHPMAILER_LANG['recipients_failed'] = 'SMTP 错误:收件人地址错误:'; 24 | $PHPMAILER_LANG['signing'] = '登录失败:'; 25 | $PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP服务器连接失败。'; 26 | $PHPMAILER_LANG['smtp_error'] = 'SMTP服务器出错:'; 27 | $PHPMAILER_LANG['variable_set'] = '无法设置或重置变量:'; 28 | $PHPMAILER_LANG['extension_missing'] = '丢失模块 Extension:'; 29 | -------------------------------------------------------------------------------- /LESSON 21 - الدرس/app/mailer/phpmailer/phpmailer/src/Exception.php: -------------------------------------------------------------------------------- 1 | 9 | * @author Jim Jagielski (jimjag) 10 | * @author Andy Prevost (codeworxtech) 11 | * @author Brent R. Matzelle (original founder) 12 | * @copyright 2012 - 2017 Marcus Bointon 13 | * @copyright 2010 - 2012 Jim Jagielski 14 | * @copyright 2004 - 2009 Andy Prevost 15 | * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License 16 | * @note This program is distributed in the hope that it will be useful - WITHOUT 17 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 18 | * FITNESS FOR A PARTICULAR PURPOSE. 19 | */ 20 | 21 | namespace PHPMailer\PHPMailer; 22 | 23 | /** 24 | * PHPMailer exception handler. 25 | * 26 | * @author Marcus Bointon 27 | */ 28 | class Exception extends \Exception 29 | { 30 | /** 31 | * Prettify error message output. 32 | * 33 | * @return string 34 | */ 35 | public function errorMessage() 36 | { 37 | return '' . htmlspecialchars($this->getMessage()) . "
\n"; 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /LESSON 22 - الدرس/app/active.php: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 | prepare("SELECT SECURITY_CODE FROM users WHERE SECURITY_CODE = :SECURITY_CODE"); 13 | $checkCode->bindParam("SECURITY_CODE",$_GET['code']); 14 | $checkCode->execute(); 15 | if($checkCode->rowCount()>0){ 16 | 17 | $update = $database->prepare("UPDATE users SET SECURITY_CODE = :NEWSECURITY_CODE , 18 | ACTIVATED=true WHERE SECURITY_CODE = :SECURITY_CODE"); 19 | $securityCode = md5(date("h:i:s")); 20 | $update->bindParam("NEWSECURITY_CODE",$securityCode); 21 | $update->bindParam("SECURITY_CODE",$_GET['code']); 22 | 23 | 24 | if($update->execute()){ 25 | echo ''; 28 | echo 'تسجيل دخول'; 29 | } 30 | }else{ 31 | echo ''; 34 | } 35 | 36 | } 37 | ?> 38 | 39 | 40 |
-------------------------------------------------------------------------------- /LESSON 22 - الدرس/app/admin/index.php: -------------------------------------------------------------------------------- 1 | ROLE === "ADMIN"){ 5 | echo 'Welcome ' .$_SESSION['user']->NAME ; 6 | }else{ 7 | header("location:http://localhost/App/login.php",true); 8 | die(""); 9 | } 10 | }else{ 11 | header("location:http://localhost/App/login.php",true); 12 | die(""); 13 | } 14 | ?> -------------------------------------------------------------------------------- /LESSON 22 - الدرس/app/composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "require": { 3 | "phpmailer/phpmailer": "^6.1" 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /LESSON 22 - الدرس/app/index.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codershiyar/php-mysql/7a3cf68326491ce64064e1f4de231385ad45efce/LESSON 22 - الدرس/app/index.php -------------------------------------------------------------------------------- /LESSON 22 - الدرس/app/mail.php: -------------------------------------------------------------------------------- 1 | SMTPDebug = SMTP::DEBUG_SERVER; // Enable verbose debug output 16 | $mail->isSMTP(); // Send using SMTP 17 | $mail->Host = 'smtp.gmail.com'; // Set the SMTP server to send through 18 | $mail->SMTPAuth = true; // Enable SMTP authentication 19 | $mail->Username = ' '; // SMTP username 20 | $mail->Password = ' '; // SMTP password 21 | $mail->SMTPSecure = 'ssl'; // Enable TLS encryption; `PHPMailer::ENCRYPTION_SMTPS` encouraged 22 | $mail->Port = 465; // TCP port to connect to, use 465 for `PHPMailer::ENCRYPTION_SMTPS` above 23 | 24 | // Content 25 | $mail->isHTML(true); 26 | $mail->CharSet = "UTF-8"; -------------------------------------------------------------------------------- /LESSON 22 - الدرس/app/mailer/autoload.php: -------------------------------------------------------------------------------- 1 | array($vendorDir . '/phpmailer/phpmailer/src'), 10 | ); 11 | -------------------------------------------------------------------------------- /LESSON 22 - الدرس/app/mailer/composer/autoload_static.php: -------------------------------------------------------------------------------- 1 | 11 | array ( 12 | 'PHPMailer\\PHPMailer\\' => 20, 13 | ), 14 | ); 15 | 16 | public static $prefixDirsPsr4 = array ( 17 | 'PHPMailer\\PHPMailer\\' => 18 | array ( 19 | 0 => __DIR__ . '/..' . '/phpmailer/phpmailer/src', 20 | ), 21 | ); 22 | 23 | public static function getInitializer(ClassLoader $loader) 24 | { 25 | return \Closure::bind(function () use ($loader) { 26 | $loader->prefixLengthsPsr4 = ComposerStaticInitb7d6377ee324d8c3f56c6d308c8f812a::$prefixLengthsPsr4; 27 | $loader->prefixDirsPsr4 = ComposerStaticInitb7d6377ee324d8c3f56c6d308c8f812a::$prefixDirsPsr4; 28 | 29 | }, null, ClassLoader::class); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /LESSON 22 - الدرس/app/mailer/phpmailer/phpmailer/VERSION: -------------------------------------------------------------------------------- 1 | 6.1.7 -------------------------------------------------------------------------------- /LESSON 22 - الدرس/app/mailer/phpmailer/phpmailer/language/phpmailer.lang-af.php: -------------------------------------------------------------------------------- 1 | 6 | */ 7 | 8 | $PHPMAILER_LANG['authenticate'] = 'SMTP 错误:身份验证失败。'; 9 | $PHPMAILER_LANG['connect_host'] = 'SMTP 错误: 不能连接SMTP主机。'; 10 | $PHPMAILER_LANG['data_not_accepted'] = 'SMTP 错误: 数据不可接受。'; 11 | //$PHPMAILER_LANG['empty_message'] = 'Message body empty'; 12 | $PHPMAILER_LANG['encoding'] = '未知编码:'; 13 | $PHPMAILER_LANG['execute'] = '不能执行: '; 14 | $PHPMAILER_LANG['file_access'] = '不能访问文件:'; 15 | $PHPMAILER_LANG['file_open'] = '文件错误:不能打开文件:'; 16 | $PHPMAILER_LANG['from_failed'] = '下面的发送地址邮件发送失败了: '; 17 | $PHPMAILER_LANG['instantiate'] = '不能实现mail方法。'; 18 | //$PHPMAILER_LANG['invalid_address'] = 'Invalid address: '; 19 | $PHPMAILER_LANG['mailer_not_supported'] = ' 您所选择的发送邮件的方法并不支持。'; 20 | $PHPMAILER_LANG['provide_address'] = '您必须提供至少一个 收信人的email地址。'; 21 | $PHPMAILER_LANG['recipients_failed'] = 'SMTP 错误: 下面的 收件人失败了: '; 22 | //$PHPMAILER_LANG['signing'] = 'Signing Error: '; 23 | //$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() failed.'; 24 | //$PHPMAILER_LANG['smtp_error'] = 'SMTP server error: '; 25 | //$PHPMAILER_LANG['variable_set'] = 'Cannot set or reset variable: '; 26 | //$PHPMAILER_LANG['extension_missing'] = 'Extension missing: '; 27 | -------------------------------------------------------------------------------- /LESSON 22 - الدرس/app/mailer/phpmailer/phpmailer/language/phpmailer.lang-he.php: -------------------------------------------------------------------------------- 1 | 6 | */ 7 | 8 | $PHPMAILER_LANG['authenticate'] = 'שגיאת SMTP: פעולת האימות נכשלה.'; 9 | $PHPMAILER_LANG['connect_host'] = 'שגיאת SMTP: לא הצלחתי להתחבר לשרת SMTP.'; 10 | $PHPMAILER_LANG['data_not_accepted'] = 'שגיאת SMTP: מידע לא התקבל.'; 11 | $PHPMAILER_LANG['empty_message'] = 'גוף ההודעה ריק'; 12 | $PHPMAILER_LANG['invalid_address'] = 'כתובת שגויה: '; 13 | $PHPMAILER_LANG['encoding'] = 'קידוד לא מוכר: '; 14 | $PHPMAILER_LANG['execute'] = 'לא הצלחתי להפעיל את: '; 15 | $PHPMAILER_LANG['file_access'] = 'לא ניתן לגשת לקובץ: '; 16 | $PHPMAILER_LANG['file_open'] = 'שגיאת קובץ: לא ניתן לגשת לקובץ: '; 17 | $PHPMAILER_LANG['from_failed'] = 'כתובות הנמענים הבאות נכשלו: '; 18 | $PHPMAILER_LANG['instantiate'] = 'לא הצלחתי להפעיל את פונקציית המייל.'; 19 | $PHPMAILER_LANG['mailer_not_supported'] = ' אינה נתמכת.'; 20 | $PHPMAILER_LANG['provide_address'] = 'חובה לספק לפחות כתובת אחת של מקבל המייל.'; 21 | $PHPMAILER_LANG['recipients_failed'] = 'שגיאת SMTP: הנמענים הבאים נכשלו: '; 22 | $PHPMAILER_LANG['signing'] = 'שגיאת חתימה: '; 23 | $PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() failed.'; 24 | $PHPMAILER_LANG['smtp_error'] = 'שגיאת שרת SMTP: '; 25 | $PHPMAILER_LANG['variable_set'] = 'לא ניתן לקבוע או לשנות את המשתנה: '; 26 | //$PHPMAILER_LANG['extension_missing'] = 'Extension missing: '; 27 | -------------------------------------------------------------------------------- /LESSON 22 - الدرس/app/mailer/phpmailer/phpmailer/language/phpmailer.lang-ja.php: -------------------------------------------------------------------------------- 1 | 6 | * @author Yoshi Sakai 7 | */ 8 | 9 | $PHPMAILER_LANG['authenticate'] = 'SMTPエラー: 認証できませんでした。'; 10 | $PHPMAILER_LANG['connect_host'] = 'SMTPエラー: SMTPホストに接続できませんでした。'; 11 | $PHPMAILER_LANG['data_not_accepted'] = 'SMTPエラー: データが受け付けられませんでした。'; 12 | //$PHPMAILER_LANG['empty_message'] = 'Message body empty'; 13 | $PHPMAILER_LANG['encoding'] = '不明なエンコーディング: '; 14 | $PHPMAILER_LANG['execute'] = '実行できませんでした: '; 15 | $PHPMAILER_LANG['file_access'] = 'ファイルにアクセスできません: '; 16 | $PHPMAILER_LANG['file_open'] = 'ファイルエラー: ファイルを開けません: '; 17 | $PHPMAILER_LANG['from_failed'] = 'Fromアドレスを登録する際にエラーが発生しました: '; 18 | $PHPMAILER_LANG['instantiate'] = 'メール関数が正常に動作しませんでした。'; 19 | //$PHPMAILER_LANG['invalid_address'] = 'Invalid address: '; 20 | $PHPMAILER_LANG['provide_address'] = '少なくとも1つメールアドレスを 指定する必要があります。'; 21 | $PHPMAILER_LANG['mailer_not_supported'] = ' メーラーがサポートされていません。'; 22 | $PHPMAILER_LANG['recipients_failed'] = 'SMTPエラー: 次の受信者アドレスに 間違いがあります: '; 23 | //$PHPMAILER_LANG['signing'] = 'Signing Error: '; 24 | //$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() failed.'; 25 | //$PHPMAILER_LANG['smtp_error'] = 'SMTP server error: '; 26 | //$PHPMAILER_LANG['variable_set'] = 'Cannot set or reset variable: '; 27 | //$PHPMAILER_LANG['extension_missing'] = 'Extension missing: '; 28 | -------------------------------------------------------------------------------- /LESSON 22 - الدرس/app/mailer/phpmailer/phpmailer/language/phpmailer.lang-ko.php: -------------------------------------------------------------------------------- 1 | 6 | */ 7 | 8 | $PHPMAILER_LANG['authenticate'] = 'SMTP 오류: 인증할 수 없습니다.'; 9 | $PHPMAILER_LANG['connect_host'] = 'SMTP 오류: SMTP 호스트에 접속할 수 없습니다.'; 10 | $PHPMAILER_LANG['data_not_accepted'] = 'SMTP 오류: 데이터가 받아들여지지 않았습니다.'; 11 | $PHPMAILER_LANG['empty_message'] = '메세지 내용이 없습니다'; 12 | $PHPMAILER_LANG['encoding'] = '알 수 없는 인코딩: '; 13 | $PHPMAILER_LANG['execute'] = '실행 불가: '; 14 | $PHPMAILER_LANG['file_access'] = '파일 접근 불가: '; 15 | $PHPMAILER_LANG['file_open'] = '파일 오류: 파일을 열 수 없습니다: '; 16 | $PHPMAILER_LANG['from_failed'] = '다음 From 주소에서 오류가 발생했습니다: '; 17 | $PHPMAILER_LANG['instantiate'] = 'mail 함수를 인스턴스화할 수 없습니다'; 18 | $PHPMAILER_LANG['invalid_address'] = '잘못된 주소: '; 19 | $PHPMAILER_LANG['mailer_not_supported'] = ' 메일러는 지원되지 않습니다.'; 20 | $PHPMAILER_LANG['provide_address'] = '적어도 한 개 이상의 수신자 메일 주소를 제공해야 합니다.'; 21 | $PHPMAILER_LANG['recipients_failed'] = 'SMTP 오류: 다음 수신자에서 오류가 발생했습니다: '; 22 | $PHPMAILER_LANG['signing'] = '서명 오류: '; 23 | $PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP 연결을 실패하였습니다.'; 24 | $PHPMAILER_LANG['smtp_error'] = 'SMTP 서버 오류: '; 25 | $PHPMAILER_LANG['variable_set'] = '변수 설정 및 초기화 불가: '; 26 | $PHPMAILER_LANG['extension_missing'] = '확장자 없음: '; 27 | -------------------------------------------------------------------------------- /LESSON 22 - الدرس/app/mailer/phpmailer/phpmailer/language/phpmailer.lang-nb.php: -------------------------------------------------------------------------------- 1 | 6 | * @author Peter Dave Hello <@PeterDaveHello/> 7 | * @author Jason Chiang 8 | */ 9 | 10 | $PHPMAILER_LANG['authenticate'] = 'SMTP 錯誤:登入失敗。'; 11 | $PHPMAILER_LANG['connect_host'] = 'SMTP 錯誤:無法連線到 SMTP 主機。'; 12 | $PHPMAILER_LANG['data_not_accepted'] = 'SMTP 錯誤:無法接受的資料。'; 13 | $PHPMAILER_LANG['empty_message'] = '郵件內容為空'; 14 | $PHPMAILER_LANG['encoding'] = '未知編碼: '; 15 | $PHPMAILER_LANG['execute'] = '無法執行:'; 16 | $PHPMAILER_LANG['file_access'] = '無法存取檔案:'; 17 | $PHPMAILER_LANG['file_open'] = '檔案錯誤:無法開啟檔案:'; 18 | $PHPMAILER_LANG['from_failed'] = '發送地址錯誤:'; 19 | $PHPMAILER_LANG['instantiate'] = '未知函數呼叫。'; 20 | $PHPMAILER_LANG['invalid_address'] = '因為電子郵件地址無效,無法傳送: '; 21 | $PHPMAILER_LANG['mailer_not_supported'] = '不支援的發信客戶端。'; 22 | $PHPMAILER_LANG['provide_address'] = '必須提供至少一個收件人地址。'; 23 | $PHPMAILER_LANG['recipients_failed'] = 'SMTP 錯誤:以下收件人地址錯誤:'; 24 | $PHPMAILER_LANG['signing'] = '電子簽章錯誤: '; 25 | $PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP 連線失敗'; 26 | $PHPMAILER_LANG['smtp_error'] = 'SMTP 伺服器錯誤: '; 27 | $PHPMAILER_LANG['variable_set'] = '無法設定或重設變數: '; 28 | $PHPMAILER_LANG['extension_missing'] = '遺失模組 Extension: '; 29 | -------------------------------------------------------------------------------- /LESSON 22 - الدرس/app/mailer/phpmailer/phpmailer/language/phpmailer.lang-zh_cn.php: -------------------------------------------------------------------------------- 1 | 6 | * @author young 7 | * @author Teddysun 8 | */ 9 | 10 | $PHPMAILER_LANG['authenticate'] = 'SMTP 错误:登录失败。'; 11 | $PHPMAILER_LANG['connect_host'] = 'SMTP 错误:无法连接到 SMTP 主机。'; 12 | $PHPMAILER_LANG['data_not_accepted'] = 'SMTP 错误:数据不被接受。'; 13 | $PHPMAILER_LANG['empty_message'] = '邮件正文为空。'; 14 | $PHPMAILER_LANG['encoding'] = '未知编码:'; 15 | $PHPMAILER_LANG['execute'] = '无法执行:'; 16 | $PHPMAILER_LANG['file_access'] = '无法访问文件:'; 17 | $PHPMAILER_LANG['file_open'] = '文件错误:无法打开文件:'; 18 | $PHPMAILER_LANG['from_failed'] = '发送地址错误:'; 19 | $PHPMAILER_LANG['instantiate'] = '未知函数调用。'; 20 | $PHPMAILER_LANG['invalid_address'] = '发送失败,电子邮箱地址是无效的:'; 21 | $PHPMAILER_LANG['mailer_not_supported'] = '发信客户端不被支持。'; 22 | $PHPMAILER_LANG['provide_address'] = '必须提供至少一个收件人地址。'; 23 | $PHPMAILER_LANG['recipients_failed'] = 'SMTP 错误:收件人地址错误:'; 24 | $PHPMAILER_LANG['signing'] = '登录失败:'; 25 | $PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP服务器连接失败。'; 26 | $PHPMAILER_LANG['smtp_error'] = 'SMTP服务器出错:'; 27 | $PHPMAILER_LANG['variable_set'] = '无法设置或重置变量:'; 28 | $PHPMAILER_LANG['extension_missing'] = '丢失模块 Extension:'; 29 | -------------------------------------------------------------------------------- /LESSON 22 - الدرس/app/mailer/phpmailer/phpmailer/src/Exception.php: -------------------------------------------------------------------------------- 1 | 9 | * @author Jim Jagielski (jimjag) 10 | * @author Andy Prevost (codeworxtech) 11 | * @author Brent R. Matzelle (original founder) 12 | * @copyright 2012 - 2017 Marcus Bointon 13 | * @copyright 2010 - 2012 Jim Jagielski 14 | * @copyright 2004 - 2009 Andy Prevost 15 | * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License 16 | * @note This program is distributed in the hope that it will be useful - WITHOUT 17 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 18 | * FITNESS FOR A PARTICULAR PURPOSE. 19 | */ 20 | 21 | namespace PHPMailer\PHPMailer; 22 | 23 | /** 24 | * PHPMailer exception handler. 25 | * 26 | * @author Marcus Bointon 27 | */ 28 | class Exception extends \Exception 29 | { 30 | /** 31 | * Prettify error message output. 32 | * 33 | * @return string 34 | */ 35 | public function errorMessage() 36 | { 37 | return '' . htmlspecialchars($this->getMessage()) . "
\n"; 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /LESSON 22 - الدرس/app/super-admin/index.php: -------------------------------------------------------------------------------- 1 | ROLE === "SUPER-ADMIN"){ 5 | echo 'Welcome ' .$_SESSION['user']->NAME ; 6 | }else{ 7 | header("location:http://localhost/App/login.php",true); 8 | die(""); 9 | } 10 | }else{ 11 | header("location:http://localhost/App/login.php",true); 12 | die(""); 13 | } 14 | ?> -------------------------------------------------------------------------------- /LESSON 22 - الدرس/app/user/index.php: -------------------------------------------------------------------------------- 1 | ROLE === "USER"){ 5 | echo 'Welcome ' .$_SESSION['user']->NAME ; 6 | }else{ 7 | header("location:http://localhost/App/login.php",true); 8 | die(""); 9 | } 10 | }else{ 11 | header("location:http://localhost/App/login.php",true); 12 | die(""); 13 | } 14 | ?> -------------------------------------------------------------------------------- /LESSON 23 - الدرس/app/active.php: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 | prepare("SELECT SECURITY_CODE FROM users WHERE SECURITY_CODE = :SECURITY_CODE"); 13 | $checkCode->bindParam("SECURITY_CODE",$_GET['code']); 14 | $checkCode->execute(); 15 | if($checkCode->rowCount()>0){ 16 | 17 | $update = $database->prepare("UPDATE users SET SECURITY_CODE = :NEWSECURITY_CODE , 18 | ACTIVATED=true WHERE SECURITY_CODE = :SECURITY_CODE"); 19 | $securityCode = md5(date("h:i:s")); 20 | $update->bindParam("NEWSECURITY_CODE",$securityCode); 21 | $update->bindParam("SECURITY_CODE",$_GET['code']); 22 | 23 | 24 | if($update->execute()){ 25 | echo ''; 28 | echo 'تسجيل دخول'; 29 | } 30 | }else{ 31 | echo ''; 34 | } 35 | 36 | } 37 | ?> 38 | 39 | 40 |
-------------------------------------------------------------------------------- /LESSON 23 - الدرس/app/admin/index.php: -------------------------------------------------------------------------------- 1 | 2 | ROLE === "ADMIN"){ 6 | echo 'Welcome ' .$_SESSION['user']->NAME ; 7 | echo "
"; 8 | 9 | }else{ 10 | header("location:http://localhost/App/login.php",true); 11 | die(""); 12 | } 13 | }else{ 14 | header("location:http://localhost/App/login.php",true); 15 | die(""); 16 | } 17 | 18 | 19 | if(isset($_GET['logout'])){ 20 | session_unset(); 21 | session_destroy(); 22 | header("location:http://localhost/App/login.php",true); 23 | } 24 | 25 | ?> -------------------------------------------------------------------------------- /LESSON 23 - الدرس/app/composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "require": { 3 | "phpmailer/phpmailer": "^6.1" 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /LESSON 23 - الدرس/app/index.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codershiyar/php-mysql/7a3cf68326491ce64064e1f4de231385ad45efce/LESSON 23 - الدرس/app/index.php -------------------------------------------------------------------------------- /LESSON 23 - الدرس/app/mail.php: -------------------------------------------------------------------------------- 1 | SMTPDebug = SMTP::DEBUG_SERVER; // Enable verbose debug output 16 | $mail->isSMTP(); // Send using SMTP 17 | $mail->Host = 'smtp.gmail.com'; // Set the SMTP server to send through 18 | $mail->SMTPAuth = true; // Enable SMTP authentication 19 | $mail->Username = ' '; // SMTP username 20 | $mail->Password = ' '; // SMTP password 21 | $mail->SMTPSecure = 'ssl'; // Enable TLS encryption; `PHPMailer::ENCRYPTION_SMTPS` encouraged 22 | $mail->Port = 465; // TCP port to connect to, use 465 for `PHPMailer::ENCRYPTION_SMTPS` above 23 | 24 | // Content 25 | $mail->isHTML(true); 26 | $mail->CharSet = "UTF-8"; -------------------------------------------------------------------------------- /LESSON 23 - الدرس/app/mailer/autoload.php: -------------------------------------------------------------------------------- 1 | array($vendorDir . '/phpmailer/phpmailer/src'), 10 | ); 11 | -------------------------------------------------------------------------------- /LESSON 23 - الدرس/app/mailer/composer/autoload_static.php: -------------------------------------------------------------------------------- 1 | 11 | array ( 12 | 'PHPMailer\\PHPMailer\\' => 20, 13 | ), 14 | ); 15 | 16 | public static $prefixDirsPsr4 = array ( 17 | 'PHPMailer\\PHPMailer\\' => 18 | array ( 19 | 0 => __DIR__ . '/..' . '/phpmailer/phpmailer/src', 20 | ), 21 | ); 22 | 23 | public static function getInitializer(ClassLoader $loader) 24 | { 25 | return \Closure::bind(function () use ($loader) { 26 | $loader->prefixLengthsPsr4 = ComposerStaticInitb7d6377ee324d8c3f56c6d308c8f812a::$prefixLengthsPsr4; 27 | $loader->prefixDirsPsr4 = ComposerStaticInitb7d6377ee324d8c3f56c6d308c8f812a::$prefixDirsPsr4; 28 | 29 | }, null, ClassLoader::class); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /LESSON 23 - الدرس/app/mailer/phpmailer/phpmailer/VERSION: -------------------------------------------------------------------------------- 1 | 6.1.7 -------------------------------------------------------------------------------- /LESSON 23 - الدرس/app/mailer/phpmailer/phpmailer/language/phpmailer.lang-af.php: -------------------------------------------------------------------------------- 1 | 6 | */ 7 | 8 | $PHPMAILER_LANG['authenticate'] = 'SMTP 错误:身份验证失败。'; 9 | $PHPMAILER_LANG['connect_host'] = 'SMTP 错误: 不能连接SMTP主机。'; 10 | $PHPMAILER_LANG['data_not_accepted'] = 'SMTP 错误: 数据不可接受。'; 11 | //$PHPMAILER_LANG['empty_message'] = 'Message body empty'; 12 | $PHPMAILER_LANG['encoding'] = '未知编码:'; 13 | $PHPMAILER_LANG['execute'] = '不能执行: '; 14 | $PHPMAILER_LANG['file_access'] = '不能访问文件:'; 15 | $PHPMAILER_LANG['file_open'] = '文件错误:不能打开文件:'; 16 | $PHPMAILER_LANG['from_failed'] = '下面的发送地址邮件发送失败了: '; 17 | $PHPMAILER_LANG['instantiate'] = '不能实现mail方法。'; 18 | //$PHPMAILER_LANG['invalid_address'] = 'Invalid address: '; 19 | $PHPMAILER_LANG['mailer_not_supported'] = ' 您所选择的发送邮件的方法并不支持。'; 20 | $PHPMAILER_LANG['provide_address'] = '您必须提供至少一个 收信人的email地址。'; 21 | $PHPMAILER_LANG['recipients_failed'] = 'SMTP 错误: 下面的 收件人失败了: '; 22 | //$PHPMAILER_LANG['signing'] = 'Signing Error: '; 23 | //$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() failed.'; 24 | //$PHPMAILER_LANG['smtp_error'] = 'SMTP server error: '; 25 | //$PHPMAILER_LANG['variable_set'] = 'Cannot set or reset variable: '; 26 | //$PHPMAILER_LANG['extension_missing'] = 'Extension missing: '; 27 | -------------------------------------------------------------------------------- /LESSON 23 - الدرس/app/mailer/phpmailer/phpmailer/language/phpmailer.lang-he.php: -------------------------------------------------------------------------------- 1 | 6 | */ 7 | 8 | $PHPMAILER_LANG['authenticate'] = 'שגיאת SMTP: פעולת האימות נכשלה.'; 9 | $PHPMAILER_LANG['connect_host'] = 'שגיאת SMTP: לא הצלחתי להתחבר לשרת SMTP.'; 10 | $PHPMAILER_LANG['data_not_accepted'] = 'שגיאת SMTP: מידע לא התקבל.'; 11 | $PHPMAILER_LANG['empty_message'] = 'גוף ההודעה ריק'; 12 | $PHPMAILER_LANG['invalid_address'] = 'כתובת שגויה: '; 13 | $PHPMAILER_LANG['encoding'] = 'קידוד לא מוכר: '; 14 | $PHPMAILER_LANG['execute'] = 'לא הצלחתי להפעיל את: '; 15 | $PHPMAILER_LANG['file_access'] = 'לא ניתן לגשת לקובץ: '; 16 | $PHPMAILER_LANG['file_open'] = 'שגיאת קובץ: לא ניתן לגשת לקובץ: '; 17 | $PHPMAILER_LANG['from_failed'] = 'כתובות הנמענים הבאות נכשלו: '; 18 | $PHPMAILER_LANG['instantiate'] = 'לא הצלחתי להפעיל את פונקציית המייל.'; 19 | $PHPMAILER_LANG['mailer_not_supported'] = ' אינה נתמכת.'; 20 | $PHPMAILER_LANG['provide_address'] = 'חובה לספק לפחות כתובת אחת של מקבל המייל.'; 21 | $PHPMAILER_LANG['recipients_failed'] = 'שגיאת SMTP: הנמענים הבאים נכשלו: '; 22 | $PHPMAILER_LANG['signing'] = 'שגיאת חתימה: '; 23 | $PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() failed.'; 24 | $PHPMAILER_LANG['smtp_error'] = 'שגיאת שרת SMTP: '; 25 | $PHPMAILER_LANG['variable_set'] = 'לא ניתן לקבוע או לשנות את המשתנה: '; 26 | //$PHPMAILER_LANG['extension_missing'] = 'Extension missing: '; 27 | -------------------------------------------------------------------------------- /LESSON 23 - الدرس/app/mailer/phpmailer/phpmailer/language/phpmailer.lang-ja.php: -------------------------------------------------------------------------------- 1 | 6 | * @author Yoshi Sakai 7 | */ 8 | 9 | $PHPMAILER_LANG['authenticate'] = 'SMTPエラー: 認証できませんでした。'; 10 | $PHPMAILER_LANG['connect_host'] = 'SMTPエラー: SMTPホストに接続できませんでした。'; 11 | $PHPMAILER_LANG['data_not_accepted'] = 'SMTPエラー: データが受け付けられませんでした。'; 12 | //$PHPMAILER_LANG['empty_message'] = 'Message body empty'; 13 | $PHPMAILER_LANG['encoding'] = '不明なエンコーディング: '; 14 | $PHPMAILER_LANG['execute'] = '実行できませんでした: '; 15 | $PHPMAILER_LANG['file_access'] = 'ファイルにアクセスできません: '; 16 | $PHPMAILER_LANG['file_open'] = 'ファイルエラー: ファイルを開けません: '; 17 | $PHPMAILER_LANG['from_failed'] = 'Fromアドレスを登録する際にエラーが発生しました: '; 18 | $PHPMAILER_LANG['instantiate'] = 'メール関数が正常に動作しませんでした。'; 19 | //$PHPMAILER_LANG['invalid_address'] = 'Invalid address: '; 20 | $PHPMAILER_LANG['provide_address'] = '少なくとも1つメールアドレスを 指定する必要があります。'; 21 | $PHPMAILER_LANG['mailer_not_supported'] = ' メーラーがサポートされていません。'; 22 | $PHPMAILER_LANG['recipients_failed'] = 'SMTPエラー: 次の受信者アドレスに 間違いがあります: '; 23 | //$PHPMAILER_LANG['signing'] = 'Signing Error: '; 24 | //$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() failed.'; 25 | //$PHPMAILER_LANG['smtp_error'] = 'SMTP server error: '; 26 | //$PHPMAILER_LANG['variable_set'] = 'Cannot set or reset variable: '; 27 | //$PHPMAILER_LANG['extension_missing'] = 'Extension missing: '; 28 | -------------------------------------------------------------------------------- /LESSON 23 - الدرس/app/mailer/phpmailer/phpmailer/language/phpmailer.lang-ko.php: -------------------------------------------------------------------------------- 1 | 6 | */ 7 | 8 | $PHPMAILER_LANG['authenticate'] = 'SMTP 오류: 인증할 수 없습니다.'; 9 | $PHPMAILER_LANG['connect_host'] = 'SMTP 오류: SMTP 호스트에 접속할 수 없습니다.'; 10 | $PHPMAILER_LANG['data_not_accepted'] = 'SMTP 오류: 데이터가 받아들여지지 않았습니다.'; 11 | $PHPMAILER_LANG['empty_message'] = '메세지 내용이 없습니다'; 12 | $PHPMAILER_LANG['encoding'] = '알 수 없는 인코딩: '; 13 | $PHPMAILER_LANG['execute'] = '실행 불가: '; 14 | $PHPMAILER_LANG['file_access'] = '파일 접근 불가: '; 15 | $PHPMAILER_LANG['file_open'] = '파일 오류: 파일을 열 수 없습니다: '; 16 | $PHPMAILER_LANG['from_failed'] = '다음 From 주소에서 오류가 발생했습니다: '; 17 | $PHPMAILER_LANG['instantiate'] = 'mail 함수를 인스턴스화할 수 없습니다'; 18 | $PHPMAILER_LANG['invalid_address'] = '잘못된 주소: '; 19 | $PHPMAILER_LANG['mailer_not_supported'] = ' 메일러는 지원되지 않습니다.'; 20 | $PHPMAILER_LANG['provide_address'] = '적어도 한 개 이상의 수신자 메일 주소를 제공해야 합니다.'; 21 | $PHPMAILER_LANG['recipients_failed'] = 'SMTP 오류: 다음 수신자에서 오류가 발생했습니다: '; 22 | $PHPMAILER_LANG['signing'] = '서명 오류: '; 23 | $PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP 연결을 실패하였습니다.'; 24 | $PHPMAILER_LANG['smtp_error'] = 'SMTP 서버 오류: '; 25 | $PHPMAILER_LANG['variable_set'] = '변수 설정 및 초기화 불가: '; 26 | $PHPMAILER_LANG['extension_missing'] = '확장자 없음: '; 27 | -------------------------------------------------------------------------------- /LESSON 23 - الدرس/app/mailer/phpmailer/phpmailer/language/phpmailer.lang-nb.php: -------------------------------------------------------------------------------- 1 | 6 | * @author Peter Dave Hello <@PeterDaveHello/> 7 | * @author Jason Chiang 8 | */ 9 | 10 | $PHPMAILER_LANG['authenticate'] = 'SMTP 錯誤:登入失敗。'; 11 | $PHPMAILER_LANG['connect_host'] = 'SMTP 錯誤:無法連線到 SMTP 主機。'; 12 | $PHPMAILER_LANG['data_not_accepted'] = 'SMTP 錯誤:無法接受的資料。'; 13 | $PHPMAILER_LANG['empty_message'] = '郵件內容為空'; 14 | $PHPMAILER_LANG['encoding'] = '未知編碼: '; 15 | $PHPMAILER_LANG['execute'] = '無法執行:'; 16 | $PHPMAILER_LANG['file_access'] = '無法存取檔案:'; 17 | $PHPMAILER_LANG['file_open'] = '檔案錯誤:無法開啟檔案:'; 18 | $PHPMAILER_LANG['from_failed'] = '發送地址錯誤:'; 19 | $PHPMAILER_LANG['instantiate'] = '未知函數呼叫。'; 20 | $PHPMAILER_LANG['invalid_address'] = '因為電子郵件地址無效,無法傳送: '; 21 | $PHPMAILER_LANG['mailer_not_supported'] = '不支援的發信客戶端。'; 22 | $PHPMAILER_LANG['provide_address'] = '必須提供至少一個收件人地址。'; 23 | $PHPMAILER_LANG['recipients_failed'] = 'SMTP 錯誤:以下收件人地址錯誤:'; 24 | $PHPMAILER_LANG['signing'] = '電子簽章錯誤: '; 25 | $PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP 連線失敗'; 26 | $PHPMAILER_LANG['smtp_error'] = 'SMTP 伺服器錯誤: '; 27 | $PHPMAILER_LANG['variable_set'] = '無法設定或重設變數: '; 28 | $PHPMAILER_LANG['extension_missing'] = '遺失模組 Extension: '; 29 | -------------------------------------------------------------------------------- /LESSON 23 - الدرس/app/mailer/phpmailer/phpmailer/language/phpmailer.lang-zh_cn.php: -------------------------------------------------------------------------------- 1 | 6 | * @author young 7 | * @author Teddysun 8 | */ 9 | 10 | $PHPMAILER_LANG['authenticate'] = 'SMTP 错误:登录失败。'; 11 | $PHPMAILER_LANG['connect_host'] = 'SMTP 错误:无法连接到 SMTP 主机。'; 12 | $PHPMAILER_LANG['data_not_accepted'] = 'SMTP 错误:数据不被接受。'; 13 | $PHPMAILER_LANG['empty_message'] = '邮件正文为空。'; 14 | $PHPMAILER_LANG['encoding'] = '未知编码:'; 15 | $PHPMAILER_LANG['execute'] = '无法执行:'; 16 | $PHPMAILER_LANG['file_access'] = '无法访问文件:'; 17 | $PHPMAILER_LANG['file_open'] = '文件错误:无法打开文件:'; 18 | $PHPMAILER_LANG['from_failed'] = '发送地址错误:'; 19 | $PHPMAILER_LANG['instantiate'] = '未知函数调用。'; 20 | $PHPMAILER_LANG['invalid_address'] = '发送失败,电子邮箱地址是无效的:'; 21 | $PHPMAILER_LANG['mailer_not_supported'] = '发信客户端不被支持。'; 22 | $PHPMAILER_LANG['provide_address'] = '必须提供至少一个收件人地址。'; 23 | $PHPMAILER_LANG['recipients_failed'] = 'SMTP 错误:收件人地址错误:'; 24 | $PHPMAILER_LANG['signing'] = '登录失败:'; 25 | $PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP服务器连接失败。'; 26 | $PHPMAILER_LANG['smtp_error'] = 'SMTP服务器出错:'; 27 | $PHPMAILER_LANG['variable_set'] = '无法设置或重置变量:'; 28 | $PHPMAILER_LANG['extension_missing'] = '丢失模块 Extension:'; 29 | -------------------------------------------------------------------------------- /LESSON 23 - الدرس/app/mailer/phpmailer/phpmailer/src/Exception.php: -------------------------------------------------------------------------------- 1 | 9 | * @author Jim Jagielski (jimjag) 10 | * @author Andy Prevost (codeworxtech) 11 | * @author Brent R. Matzelle (original founder) 12 | * @copyright 2012 - 2017 Marcus Bointon 13 | * @copyright 2010 - 2012 Jim Jagielski 14 | * @copyright 2004 - 2009 Andy Prevost 15 | * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License 16 | * @note This program is distributed in the hope that it will be useful - WITHOUT 17 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 18 | * FITNESS FOR A PARTICULAR PURPOSE. 19 | */ 20 | 21 | namespace PHPMailer\PHPMailer; 22 | 23 | /** 24 | * PHPMailer exception handler. 25 | * 26 | * @author Marcus Bointon 27 | */ 28 | class Exception extends \Exception 29 | { 30 | /** 31 | * Prettify error message output. 32 | * 33 | * @return string 34 | */ 35 | public function errorMessage() 36 | { 37 | return '' . htmlspecialchars($this->getMessage()) . "
\n"; 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /LESSON 23 - الدرس/app/super-admin/index.php: -------------------------------------------------------------------------------- 1 | ROLE === "SUPER-ADMIN"){ 5 | echo 'Welcome ' .$_SESSION['user']->NAME ; 6 | echo "
"; 7 | 8 | }else{ 9 | header("location:http://localhost/App/login.php",true); 10 | die(""); 11 | } 12 | }else{ 13 | header("location:http://localhost/App/login.php",true); 14 | die(""); 15 | } 16 | 17 | if(isset($_GET['logout'])){ 18 | session_unset(); 19 | session_destroy(); 20 | header("location:http://localhost/App/login.php",true); 21 | } 22 | ?> -------------------------------------------------------------------------------- /LESSON 23 - الدرس/app/user/index.php: -------------------------------------------------------------------------------- 1 | 2 | ROLE === "USER"){ 6 | echo 'Welcome ' .$_SESSION['user']->NAME ; 7 | echo "
"; 8 | }else{ 9 | header("location:http://localhost/App/login.php",true); 10 | die(""); 11 | } 12 | }else{ 13 | header("location:http://localhost/App/login.php",true); 14 | die(""); 15 | } 16 | 17 | if(isset($_GET['logout'])){ 18 | session_unset(); 19 | session_destroy(); 20 | header("location:http://localhost/App/login.php",true); 21 | } 22 | ?> -------------------------------------------------------------------------------- /LESSON 24 25 - الدرس/app/active.php: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 | prepare("SELECT SECURITY_CODE FROM users WHERE SECURITY_CODE = :SECURITY_CODE"); 13 | $checkCode->bindParam("SECURITY_CODE",$_GET['code']); 14 | $checkCode->execute(); 15 | if($checkCode->rowCount()>0){ 16 | 17 | $update = $database->prepare("UPDATE users SET SECURITY_CODE = :NEWSECURITY_CODE , 18 | ACTIVATED=true WHERE SECURITY_CODE = :SECURITY_CODE"); 19 | $securityCode = md5(date("h:i:s")); 20 | $update->bindParam("NEWSECURITY_CODE",$securityCode); 21 | $update->bindParam("SECURITY_CODE",$_GET['code']); 22 | 23 | 24 | if($update->execute()){ 25 | echo ''; 28 | echo 'تسجيل دخول'; 29 | } 30 | }else{ 31 | echo ''; 34 | } 35 | 36 | } 37 | ?> 38 | 39 | 40 |
-------------------------------------------------------------------------------- /LESSON 24 25 - الدرس/app/admin/index.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Home 7 | 8 | 9 | 10 | 11 | 12 | 21 | 22 |
23 | 24 | 25 | ROLE === "ADMIN"){ 29 | echo '
Welcome ' .$_SESSION['user']->NAME . "
"; 30 | echo "
"; 31 | }else{ 32 | header("location:http://localhost/App/login.php",true); 33 | die(""); 34 | } 35 | }else{ 36 | header("location:http://localhost/App/login.php",true); 37 | die(""); 38 | } 39 | 40 | if(isset($_GET['logout'])){ 41 | session_unset(); 42 | session_destroy(); 43 | header("location:http://localhost/App/login.php",true); 44 | } 45 | ?> 46 |
47 | 48 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /LESSON 24 25 - الدرس/app/composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "require": { 3 | "phpmailer/phpmailer": "^6.1" 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /LESSON 24 25 - الدرس/app/img/logo.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codershiyar/php-mysql/7a3cf68326491ce64064e1f4de231385ad45efce/LESSON 24 25 - الدرس/app/img/logo.jpg -------------------------------------------------------------------------------- /LESSON 24 25 - الدرس/app/index.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Coder Shiyar 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /LESSON 24 25 - الدرس/app/mail.php: -------------------------------------------------------------------------------- 1 | SMTPDebug = SMTP::DEBUG_SERVER; // Enable verbose debug output 16 | $mail->isSMTP(); // Send using SMTP 17 | $mail->Host = 'smtp.gmail.com'; // Set the SMTP server to send through 18 | $mail->SMTPAuth = true; // Enable SMTP authentication 19 | $mail->Username = ' '; // SMTP username 20 | $mail->Password = ' '; // SMTP password 21 | $mail->SMTPSecure = 'ssl'; // Enable TLS encryption; `PHPMailer::ENCRYPTION_SMTPS` encouraged 22 | $mail->Port = 465; // TCP port to connect to, use 465 for `PHPMailer::ENCRYPTION_SMTPS` above 23 | 24 | // Content 25 | $mail->isHTML(true); 26 | $mail->CharSet = "UTF-8"; -------------------------------------------------------------------------------- /LESSON 24 25 - الدرس/app/mailer/autoload.php: -------------------------------------------------------------------------------- 1 | array($vendorDir . '/phpmailer/phpmailer/src'), 10 | ); 11 | -------------------------------------------------------------------------------- /LESSON 24 25 - الدرس/app/mailer/composer/autoload_static.php: -------------------------------------------------------------------------------- 1 | 11 | array ( 12 | 'PHPMailer\\PHPMailer\\' => 20, 13 | ), 14 | ); 15 | 16 | public static $prefixDirsPsr4 = array ( 17 | 'PHPMailer\\PHPMailer\\' => 18 | array ( 19 | 0 => __DIR__ . '/..' . '/phpmailer/phpmailer/src', 20 | ), 21 | ); 22 | 23 | public static function getInitializer(ClassLoader $loader) 24 | { 25 | return \Closure::bind(function () use ($loader) { 26 | $loader->prefixLengthsPsr4 = ComposerStaticInitb7d6377ee324d8c3f56c6d308c8f812a::$prefixLengthsPsr4; 27 | $loader->prefixDirsPsr4 = ComposerStaticInitb7d6377ee324d8c3f56c6d308c8f812a::$prefixDirsPsr4; 28 | 29 | }, null, ClassLoader::class); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /LESSON 24 25 - الدرس/app/mailer/phpmailer/phpmailer/VERSION: -------------------------------------------------------------------------------- 1 | 6.1.7 -------------------------------------------------------------------------------- /LESSON 24 25 - الدرس/app/mailer/phpmailer/phpmailer/language/phpmailer.lang-af.php: -------------------------------------------------------------------------------- 1 | 6 | */ 7 | 8 | $PHPMAILER_LANG['authenticate'] = 'SMTP 错误:身份验证失败。'; 9 | $PHPMAILER_LANG['connect_host'] = 'SMTP 错误: 不能连接SMTP主机。'; 10 | $PHPMAILER_LANG['data_not_accepted'] = 'SMTP 错误: 数据不可接受。'; 11 | //$PHPMAILER_LANG['empty_message'] = 'Message body empty'; 12 | $PHPMAILER_LANG['encoding'] = '未知编码:'; 13 | $PHPMAILER_LANG['execute'] = '不能执行: '; 14 | $PHPMAILER_LANG['file_access'] = '不能访问文件:'; 15 | $PHPMAILER_LANG['file_open'] = '文件错误:不能打开文件:'; 16 | $PHPMAILER_LANG['from_failed'] = '下面的发送地址邮件发送失败了: '; 17 | $PHPMAILER_LANG['instantiate'] = '不能实现mail方法。'; 18 | //$PHPMAILER_LANG['invalid_address'] = 'Invalid address: '; 19 | $PHPMAILER_LANG['mailer_not_supported'] = ' 您所选择的发送邮件的方法并不支持。'; 20 | $PHPMAILER_LANG['provide_address'] = '您必须提供至少一个 收信人的email地址。'; 21 | $PHPMAILER_LANG['recipients_failed'] = 'SMTP 错误: 下面的 收件人失败了: '; 22 | //$PHPMAILER_LANG['signing'] = 'Signing Error: '; 23 | //$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() failed.'; 24 | //$PHPMAILER_LANG['smtp_error'] = 'SMTP server error: '; 25 | //$PHPMAILER_LANG['variable_set'] = 'Cannot set or reset variable: '; 26 | //$PHPMAILER_LANG['extension_missing'] = 'Extension missing: '; 27 | -------------------------------------------------------------------------------- /LESSON 24 25 - الدرس/app/mailer/phpmailer/phpmailer/language/phpmailer.lang-he.php: -------------------------------------------------------------------------------- 1 | 6 | */ 7 | 8 | $PHPMAILER_LANG['authenticate'] = 'שגיאת SMTP: פעולת האימות נכשלה.'; 9 | $PHPMAILER_LANG['connect_host'] = 'שגיאת SMTP: לא הצלחתי להתחבר לשרת SMTP.'; 10 | $PHPMAILER_LANG['data_not_accepted'] = 'שגיאת SMTP: מידע לא התקבל.'; 11 | $PHPMAILER_LANG['empty_message'] = 'גוף ההודעה ריק'; 12 | $PHPMAILER_LANG['invalid_address'] = 'כתובת שגויה: '; 13 | $PHPMAILER_LANG['encoding'] = 'קידוד לא מוכר: '; 14 | $PHPMAILER_LANG['execute'] = 'לא הצלחתי להפעיל את: '; 15 | $PHPMAILER_LANG['file_access'] = 'לא ניתן לגשת לקובץ: '; 16 | $PHPMAILER_LANG['file_open'] = 'שגיאת קובץ: לא ניתן לגשת לקובץ: '; 17 | $PHPMAILER_LANG['from_failed'] = 'כתובות הנמענים הבאות נכשלו: '; 18 | $PHPMAILER_LANG['instantiate'] = 'לא הצלחתי להפעיל את פונקציית המייל.'; 19 | $PHPMAILER_LANG['mailer_not_supported'] = ' אינה נתמכת.'; 20 | $PHPMAILER_LANG['provide_address'] = 'חובה לספק לפחות כתובת אחת של מקבל המייל.'; 21 | $PHPMAILER_LANG['recipients_failed'] = 'שגיאת SMTP: הנמענים הבאים נכשלו: '; 22 | $PHPMAILER_LANG['signing'] = 'שגיאת חתימה: '; 23 | $PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() failed.'; 24 | $PHPMAILER_LANG['smtp_error'] = 'שגיאת שרת SMTP: '; 25 | $PHPMAILER_LANG['variable_set'] = 'לא ניתן לקבוע או לשנות את המשתנה: '; 26 | //$PHPMAILER_LANG['extension_missing'] = 'Extension missing: '; 27 | -------------------------------------------------------------------------------- /LESSON 24 25 - الدرس/app/mailer/phpmailer/phpmailer/language/phpmailer.lang-ja.php: -------------------------------------------------------------------------------- 1 | 6 | * @author Yoshi Sakai 7 | */ 8 | 9 | $PHPMAILER_LANG['authenticate'] = 'SMTPエラー: 認証できませんでした。'; 10 | $PHPMAILER_LANG['connect_host'] = 'SMTPエラー: SMTPホストに接続できませんでした。'; 11 | $PHPMAILER_LANG['data_not_accepted'] = 'SMTPエラー: データが受け付けられませんでした。'; 12 | //$PHPMAILER_LANG['empty_message'] = 'Message body empty'; 13 | $PHPMAILER_LANG['encoding'] = '不明なエンコーディング: '; 14 | $PHPMAILER_LANG['execute'] = '実行できませんでした: '; 15 | $PHPMAILER_LANG['file_access'] = 'ファイルにアクセスできません: '; 16 | $PHPMAILER_LANG['file_open'] = 'ファイルエラー: ファイルを開けません: '; 17 | $PHPMAILER_LANG['from_failed'] = 'Fromアドレスを登録する際にエラーが発生しました: '; 18 | $PHPMAILER_LANG['instantiate'] = 'メール関数が正常に動作しませんでした。'; 19 | //$PHPMAILER_LANG['invalid_address'] = 'Invalid address: '; 20 | $PHPMAILER_LANG['provide_address'] = '少なくとも1つメールアドレスを 指定する必要があります。'; 21 | $PHPMAILER_LANG['mailer_not_supported'] = ' メーラーがサポートされていません。'; 22 | $PHPMAILER_LANG['recipients_failed'] = 'SMTPエラー: 次の受信者アドレスに 間違いがあります: '; 23 | //$PHPMAILER_LANG['signing'] = 'Signing Error: '; 24 | //$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() failed.'; 25 | //$PHPMAILER_LANG['smtp_error'] = 'SMTP server error: '; 26 | //$PHPMAILER_LANG['variable_set'] = 'Cannot set or reset variable: '; 27 | //$PHPMAILER_LANG['extension_missing'] = 'Extension missing: '; 28 | -------------------------------------------------------------------------------- /LESSON 24 25 - الدرس/app/mailer/phpmailer/phpmailer/language/phpmailer.lang-ko.php: -------------------------------------------------------------------------------- 1 | 6 | */ 7 | 8 | $PHPMAILER_LANG['authenticate'] = 'SMTP 오류: 인증할 수 없습니다.'; 9 | $PHPMAILER_LANG['connect_host'] = 'SMTP 오류: SMTP 호스트에 접속할 수 없습니다.'; 10 | $PHPMAILER_LANG['data_not_accepted'] = 'SMTP 오류: 데이터가 받아들여지지 않았습니다.'; 11 | $PHPMAILER_LANG['empty_message'] = '메세지 내용이 없습니다'; 12 | $PHPMAILER_LANG['encoding'] = '알 수 없는 인코딩: '; 13 | $PHPMAILER_LANG['execute'] = '실행 불가: '; 14 | $PHPMAILER_LANG['file_access'] = '파일 접근 불가: '; 15 | $PHPMAILER_LANG['file_open'] = '파일 오류: 파일을 열 수 없습니다: '; 16 | $PHPMAILER_LANG['from_failed'] = '다음 From 주소에서 오류가 발생했습니다: '; 17 | $PHPMAILER_LANG['instantiate'] = 'mail 함수를 인스턴스화할 수 없습니다'; 18 | $PHPMAILER_LANG['invalid_address'] = '잘못된 주소: '; 19 | $PHPMAILER_LANG['mailer_not_supported'] = ' 메일러는 지원되지 않습니다.'; 20 | $PHPMAILER_LANG['provide_address'] = '적어도 한 개 이상의 수신자 메일 주소를 제공해야 합니다.'; 21 | $PHPMAILER_LANG['recipients_failed'] = 'SMTP 오류: 다음 수신자에서 오류가 발생했습니다: '; 22 | $PHPMAILER_LANG['signing'] = '서명 오류: '; 23 | $PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP 연결을 실패하였습니다.'; 24 | $PHPMAILER_LANG['smtp_error'] = 'SMTP 서버 오류: '; 25 | $PHPMAILER_LANG['variable_set'] = '변수 설정 및 초기화 불가: '; 26 | $PHPMAILER_LANG['extension_missing'] = '확장자 없음: '; 27 | -------------------------------------------------------------------------------- /LESSON 24 25 - الدرس/app/mailer/phpmailer/phpmailer/language/phpmailer.lang-nb.php: -------------------------------------------------------------------------------- 1 | 6 | * @author Peter Dave Hello <@PeterDaveHello/> 7 | * @author Jason Chiang 8 | */ 9 | 10 | $PHPMAILER_LANG['authenticate'] = 'SMTP 錯誤:登入失敗。'; 11 | $PHPMAILER_LANG['connect_host'] = 'SMTP 錯誤:無法連線到 SMTP 主機。'; 12 | $PHPMAILER_LANG['data_not_accepted'] = 'SMTP 錯誤:無法接受的資料。'; 13 | $PHPMAILER_LANG['empty_message'] = '郵件內容為空'; 14 | $PHPMAILER_LANG['encoding'] = '未知編碼: '; 15 | $PHPMAILER_LANG['execute'] = '無法執行:'; 16 | $PHPMAILER_LANG['file_access'] = '無法存取檔案:'; 17 | $PHPMAILER_LANG['file_open'] = '檔案錯誤:無法開啟檔案:'; 18 | $PHPMAILER_LANG['from_failed'] = '發送地址錯誤:'; 19 | $PHPMAILER_LANG['instantiate'] = '未知函數呼叫。'; 20 | $PHPMAILER_LANG['invalid_address'] = '因為電子郵件地址無效,無法傳送: '; 21 | $PHPMAILER_LANG['mailer_not_supported'] = '不支援的發信客戶端。'; 22 | $PHPMAILER_LANG['provide_address'] = '必須提供至少一個收件人地址。'; 23 | $PHPMAILER_LANG['recipients_failed'] = 'SMTP 錯誤:以下收件人地址錯誤:'; 24 | $PHPMAILER_LANG['signing'] = '電子簽章錯誤: '; 25 | $PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP 連線失敗'; 26 | $PHPMAILER_LANG['smtp_error'] = 'SMTP 伺服器錯誤: '; 27 | $PHPMAILER_LANG['variable_set'] = '無法設定或重設變數: '; 28 | $PHPMAILER_LANG['extension_missing'] = '遺失模組 Extension: '; 29 | -------------------------------------------------------------------------------- /LESSON 24 25 - الدرس/app/mailer/phpmailer/phpmailer/language/phpmailer.lang-zh_cn.php: -------------------------------------------------------------------------------- 1 | 6 | * @author young 7 | * @author Teddysun 8 | */ 9 | 10 | $PHPMAILER_LANG['authenticate'] = 'SMTP 错误:登录失败。'; 11 | $PHPMAILER_LANG['connect_host'] = 'SMTP 错误:无法连接到 SMTP 主机。'; 12 | $PHPMAILER_LANG['data_not_accepted'] = 'SMTP 错误:数据不被接受。'; 13 | $PHPMAILER_LANG['empty_message'] = '邮件正文为空。'; 14 | $PHPMAILER_LANG['encoding'] = '未知编码:'; 15 | $PHPMAILER_LANG['execute'] = '无法执行:'; 16 | $PHPMAILER_LANG['file_access'] = '无法访问文件:'; 17 | $PHPMAILER_LANG['file_open'] = '文件错误:无法打开文件:'; 18 | $PHPMAILER_LANG['from_failed'] = '发送地址错误:'; 19 | $PHPMAILER_LANG['instantiate'] = '未知函数调用。'; 20 | $PHPMAILER_LANG['invalid_address'] = '发送失败,电子邮箱地址是无效的:'; 21 | $PHPMAILER_LANG['mailer_not_supported'] = '发信客户端不被支持。'; 22 | $PHPMAILER_LANG['provide_address'] = '必须提供至少一个收件人地址。'; 23 | $PHPMAILER_LANG['recipients_failed'] = 'SMTP 错误:收件人地址错误:'; 24 | $PHPMAILER_LANG['signing'] = '登录失败:'; 25 | $PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP服务器连接失败。'; 26 | $PHPMAILER_LANG['smtp_error'] = 'SMTP服务器出错:'; 27 | $PHPMAILER_LANG['variable_set'] = '无法设置或重置变量:'; 28 | $PHPMAILER_LANG['extension_missing'] = '丢失模块 Extension:'; 29 | -------------------------------------------------------------------------------- /LESSON 24 25 - الدرس/app/mailer/phpmailer/phpmailer/src/Exception.php: -------------------------------------------------------------------------------- 1 | 9 | * @author Jim Jagielski (jimjag) 10 | * @author Andy Prevost (codeworxtech) 11 | * @author Brent R. Matzelle (original founder) 12 | * @copyright 2012 - 2017 Marcus Bointon 13 | * @copyright 2010 - 2012 Jim Jagielski 14 | * @copyright 2004 - 2009 Andy Prevost 15 | * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License 16 | * @note This program is distributed in the hope that it will be useful - WITHOUT 17 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 18 | * FITNESS FOR A PARTICULAR PURPOSE. 19 | */ 20 | 21 | namespace PHPMailer\PHPMailer; 22 | 23 | /** 24 | * PHPMailer exception handler. 25 | * 26 | * @author Marcus Bointon 27 | */ 28 | class Exception extends \Exception 29 | { 30 | /** 31 | * Prettify error message output. 32 | * 33 | * @return string 34 | */ 35 | public function errorMessage() 36 | { 37 | return '' . htmlspecialchars($this->getMessage()) . "
\n"; 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /LESSON 24 25 - الدرس/app/nav.php: -------------------------------------------------------------------------------- 1 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /LESSON 24 25 - الدرس/app/super-admin/index.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Home 7 | 8 | 9 | 10 | 11 | 12 | 21 | 22 |
23 | 24 | 25 | ROLE === "SUPER-ADMIN"){ 29 | echo '
Welcome ' .$_SESSION['user']->NAME . "
"; 30 | echo "
"; 31 | }else{ 32 | header("location:http://localhost/App/login.php",true); 33 | die(""); 34 | } 35 | }else{ 36 | header("location:http://localhost/App/login.php",true); 37 | die(""); 38 | } 39 | 40 | if(isset($_GET['logout'])){ 41 | session_unset(); 42 | session_destroy(); 43 | header("location:http://localhost/App/login.php",true); 44 | } 45 | ?> 46 |
47 | 48 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /LESSON 24 25 - الدرس/app/user/index.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Home 7 | 8 | 9 | 10 | 11 | 12 | 21 | 22 |
23 | 24 | 25 | ROLE === "USER"){ 29 | echo '
Welcome ' .$_SESSION['user']->NAME . "
"; 30 | echo "
"; 31 | }else{ 32 | header("location:http://localhost/App/login.php",true); 33 | die(""); 34 | } 35 | }else{ 36 | header("location:http://localhost/App/login.php",true); 37 | die(""); 38 | } 39 | 40 | if(isset($_GET['logout'])){ 41 | session_unset(); 42 | session_destroy(); 43 | header("location:http://localhost/App/login.php",true); 44 | } 45 | ?> 46 |
47 | 48 | 49 | -------------------------------------------------------------------------------- /LESSON 26 27 - الدرس/app/active.php: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 | prepare("SELECT SECURITY_CODE FROM users WHERE SECURITY_CODE = :SECURITY_CODE"); 13 | $checkCode->bindParam("SECURITY_CODE",$_GET['code']); 14 | $checkCode->execute(); 15 | if($checkCode->rowCount()>0){ 16 | 17 | $update = $database->prepare("UPDATE users SET SECURITY_CODE = :NEWSECURITY_CODE , 18 | ACTIVATED=true WHERE SECURITY_CODE = :SECURITY_CODE"); 19 | $securityCode = md5(date("h:i:s")); 20 | $update->bindParam("NEWSECURITY_CODE",$securityCode); 21 | $update->bindParam("SECURITY_CODE",$_GET['code']); 22 | 23 | 24 | if($update->execute()){ 25 | echo ''; 28 | echo 'تسجيل دخول'; 29 | } 30 | }else{ 31 | echo ''; 34 | } 35 | 36 | } 37 | ?> 38 | 39 | 40 |
-------------------------------------------------------------------------------- /LESSON 26 27 - الدرس/app/admin/index.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Home 7 | 8 | 9 | 10 | 11 | 12 | 21 | 22 |
23 | 24 | ROLE === "ADMIN"){ 28 | echo '
Welcome ' .$_SESSION['user']->NAME . "
"; 29 | echo 'تعديل ملف الشخصي'; 30 | 31 | echo "
"; 32 | }else{ 33 | header("location:http://localhost/App/login.php",true); 34 | die(""); 35 | } 36 | }else{ 37 | header("location:http://localhost/App/login.php",true); 38 | die(""); 39 | } 40 | 41 | if(isset($_GET['logout'])){ 42 | session_unset(); 43 | session_destroy(); 44 | header("location:http://localhost/App/login.php",true); 45 | } 46 | ?> 47 |
48 | 49 | 50 | 51 | 52 | -------------------------------------------------------------------------------- /LESSON 26 27 - الدرس/app/composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "require": { 3 | "phpmailer/phpmailer": "^6.1" 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /LESSON 26 27 - الدرس/app/img/logo.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codershiyar/php-mysql/7a3cf68326491ce64064e1f4de231385ad45efce/LESSON 26 27 - الدرس/app/img/logo.jpg -------------------------------------------------------------------------------- /LESSON 26 27 - الدرس/app/index.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Coder Shiyar 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /LESSON 26 27 - الدرس/app/mail.php: -------------------------------------------------------------------------------- 1 | SMTPDebug = SMTP::DEBUG_SERVER; // Enable verbose debug output 16 | $mail->isSMTP(); // Send using SMTP 17 | $mail->Host = 'smtp.gmail.com'; // Set the SMTP server to send through 18 | $mail->SMTPAuth = true; // Enable SMTP authentication 19 | $mail->Username = ' '; // SMTP username 20 | $mail->Password = ' '; // SMTP password 21 | $mail->SMTPSecure = 'ssl'; // Enable TLS encryption; `PHPMailer::ENCRYPTION_SMTPS` encouraged 22 | $mail->Port = 465; // TCP port to connect to, use 465 for `PHPMailer::ENCRYPTION_SMTPS` above 23 | 24 | // Content 25 | $mail->isHTML(true); 26 | $mail->CharSet = "UTF-8"; -------------------------------------------------------------------------------- /LESSON 26 27 - الدرس/app/mailer/autoload.php: -------------------------------------------------------------------------------- 1 | array($vendorDir . '/phpmailer/phpmailer/src'), 10 | ); 11 | -------------------------------------------------------------------------------- /LESSON 26 27 - الدرس/app/mailer/composer/autoload_static.php: -------------------------------------------------------------------------------- 1 | 11 | array ( 12 | 'PHPMailer\\PHPMailer\\' => 20, 13 | ), 14 | ); 15 | 16 | public static $prefixDirsPsr4 = array ( 17 | 'PHPMailer\\PHPMailer\\' => 18 | array ( 19 | 0 => __DIR__ . '/..' . '/phpmailer/phpmailer/src', 20 | ), 21 | ); 22 | 23 | public static function getInitializer(ClassLoader $loader) 24 | { 25 | return \Closure::bind(function () use ($loader) { 26 | $loader->prefixLengthsPsr4 = ComposerStaticInitb7d6377ee324d8c3f56c6d308c8f812a::$prefixLengthsPsr4; 27 | $loader->prefixDirsPsr4 = ComposerStaticInitb7d6377ee324d8c3f56c6d308c8f812a::$prefixDirsPsr4; 28 | 29 | }, null, ClassLoader::class); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /LESSON 26 27 - الدرس/app/mailer/phpmailer/phpmailer/VERSION: -------------------------------------------------------------------------------- 1 | 6.1.7 -------------------------------------------------------------------------------- /LESSON 26 27 - الدرس/app/mailer/phpmailer/phpmailer/language/phpmailer.lang-ch.php: -------------------------------------------------------------------------------- 1 | 6 | */ 7 | 8 | $PHPMAILER_LANG['authenticate'] = 'SMTP 错误:身份验证失败。'; 9 | $PHPMAILER_LANG['connect_host'] = 'SMTP 错误: 不能连接SMTP主机。'; 10 | $PHPMAILER_LANG['data_not_accepted'] = 'SMTP 错误: 数据不可接受。'; 11 | //$PHPMAILER_LANG['empty_message'] = 'Message body empty'; 12 | $PHPMAILER_LANG['encoding'] = '未知编码:'; 13 | $PHPMAILER_LANG['execute'] = '不能执行: '; 14 | $PHPMAILER_LANG['file_access'] = '不能访问文件:'; 15 | $PHPMAILER_LANG['file_open'] = '文件错误:不能打开文件:'; 16 | $PHPMAILER_LANG['from_failed'] = '下面的发送地址邮件发送失败了: '; 17 | $PHPMAILER_LANG['instantiate'] = '不能实现mail方法。'; 18 | //$PHPMAILER_LANG['invalid_address'] = 'Invalid address: '; 19 | $PHPMAILER_LANG['mailer_not_supported'] = ' 您所选择的发送邮件的方法并不支持。'; 20 | $PHPMAILER_LANG['provide_address'] = '您必须提供至少一个 收信人的email地址。'; 21 | $PHPMAILER_LANG['recipients_failed'] = 'SMTP 错误: 下面的 收件人失败了: '; 22 | //$PHPMAILER_LANG['signing'] = 'Signing Error: '; 23 | //$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() failed.'; 24 | //$PHPMAILER_LANG['smtp_error'] = 'SMTP server error: '; 25 | //$PHPMAILER_LANG['variable_set'] = 'Cannot set or reset variable: '; 26 | //$PHPMAILER_LANG['extension_missing'] = 'Extension missing: '; 27 | -------------------------------------------------------------------------------- /LESSON 26 27 - الدرس/app/mailer/phpmailer/phpmailer/language/phpmailer.lang-he.php: -------------------------------------------------------------------------------- 1 | 6 | */ 7 | 8 | $PHPMAILER_LANG['authenticate'] = 'שגיאת SMTP: פעולת האימות נכשלה.'; 9 | $PHPMAILER_LANG['connect_host'] = 'שגיאת SMTP: לא הצלחתי להתחבר לשרת SMTP.'; 10 | $PHPMAILER_LANG['data_not_accepted'] = 'שגיאת SMTP: מידע לא התקבל.'; 11 | $PHPMAILER_LANG['empty_message'] = 'גוף ההודעה ריק'; 12 | $PHPMAILER_LANG['invalid_address'] = 'כתובת שגויה: '; 13 | $PHPMAILER_LANG['encoding'] = 'קידוד לא מוכר: '; 14 | $PHPMAILER_LANG['execute'] = 'לא הצלחתי להפעיל את: '; 15 | $PHPMAILER_LANG['file_access'] = 'לא ניתן לגשת לקובץ: '; 16 | $PHPMAILER_LANG['file_open'] = 'שגיאת קובץ: לא ניתן לגשת לקובץ: '; 17 | $PHPMAILER_LANG['from_failed'] = 'כתובות הנמענים הבאות נכשלו: '; 18 | $PHPMAILER_LANG['instantiate'] = 'לא הצלחתי להפעיל את פונקציית המייל.'; 19 | $PHPMAILER_LANG['mailer_not_supported'] = ' אינה נתמכת.'; 20 | $PHPMAILER_LANG['provide_address'] = 'חובה לספק לפחות כתובת אחת של מקבל המייל.'; 21 | $PHPMAILER_LANG['recipients_failed'] = 'שגיאת SMTP: הנמענים הבאים נכשלו: '; 22 | $PHPMAILER_LANG['signing'] = 'שגיאת חתימה: '; 23 | $PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() failed.'; 24 | $PHPMAILER_LANG['smtp_error'] = 'שגיאת שרת SMTP: '; 25 | $PHPMAILER_LANG['variable_set'] = 'לא ניתן לקבוע או לשנות את המשתנה: '; 26 | //$PHPMAILER_LANG['extension_missing'] = 'Extension missing: '; 27 | -------------------------------------------------------------------------------- /LESSON 26 27 - الدرس/app/mailer/phpmailer/phpmailer/language/phpmailer.lang-ja.php: -------------------------------------------------------------------------------- 1 | 6 | * @author Yoshi Sakai 7 | */ 8 | 9 | $PHPMAILER_LANG['authenticate'] = 'SMTPエラー: 認証できませんでした。'; 10 | $PHPMAILER_LANG['connect_host'] = 'SMTPエラー: SMTPホストに接続できませんでした。'; 11 | $PHPMAILER_LANG['data_not_accepted'] = 'SMTPエラー: データが受け付けられませんでした。'; 12 | //$PHPMAILER_LANG['empty_message'] = 'Message body empty'; 13 | $PHPMAILER_LANG['encoding'] = '不明なエンコーディング: '; 14 | $PHPMAILER_LANG['execute'] = '実行できませんでした: '; 15 | $PHPMAILER_LANG['file_access'] = 'ファイルにアクセスできません: '; 16 | $PHPMAILER_LANG['file_open'] = 'ファイルエラー: ファイルを開けません: '; 17 | $PHPMAILER_LANG['from_failed'] = 'Fromアドレスを登録する際にエラーが発生しました: '; 18 | $PHPMAILER_LANG['instantiate'] = 'メール関数が正常に動作しませんでした。'; 19 | //$PHPMAILER_LANG['invalid_address'] = 'Invalid address: '; 20 | $PHPMAILER_LANG['provide_address'] = '少なくとも1つメールアドレスを 指定する必要があります。'; 21 | $PHPMAILER_LANG['mailer_not_supported'] = ' メーラーがサポートされていません。'; 22 | $PHPMAILER_LANG['recipients_failed'] = 'SMTPエラー: 次の受信者アドレスに 間違いがあります: '; 23 | //$PHPMAILER_LANG['signing'] = 'Signing Error: '; 24 | //$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() failed.'; 25 | //$PHPMAILER_LANG['smtp_error'] = 'SMTP server error: '; 26 | //$PHPMAILER_LANG['variable_set'] = 'Cannot set or reset variable: '; 27 | //$PHPMAILER_LANG['extension_missing'] = 'Extension missing: '; 28 | -------------------------------------------------------------------------------- /LESSON 26 27 - الدرس/app/mailer/phpmailer/phpmailer/language/phpmailer.lang-ko.php: -------------------------------------------------------------------------------- 1 | 6 | */ 7 | 8 | $PHPMAILER_LANG['authenticate'] = 'SMTP 오류: 인증할 수 없습니다.'; 9 | $PHPMAILER_LANG['connect_host'] = 'SMTP 오류: SMTP 호스트에 접속할 수 없습니다.'; 10 | $PHPMAILER_LANG['data_not_accepted'] = 'SMTP 오류: 데이터가 받아들여지지 않았습니다.'; 11 | $PHPMAILER_LANG['empty_message'] = '메세지 내용이 없습니다'; 12 | $PHPMAILER_LANG['encoding'] = '알 수 없는 인코딩: '; 13 | $PHPMAILER_LANG['execute'] = '실행 불가: '; 14 | $PHPMAILER_LANG['file_access'] = '파일 접근 불가: '; 15 | $PHPMAILER_LANG['file_open'] = '파일 오류: 파일을 열 수 없습니다: '; 16 | $PHPMAILER_LANG['from_failed'] = '다음 From 주소에서 오류가 발생했습니다: '; 17 | $PHPMAILER_LANG['instantiate'] = 'mail 함수를 인스턴스화할 수 없습니다'; 18 | $PHPMAILER_LANG['invalid_address'] = '잘못된 주소: '; 19 | $PHPMAILER_LANG['mailer_not_supported'] = ' 메일러는 지원되지 않습니다.'; 20 | $PHPMAILER_LANG['provide_address'] = '적어도 한 개 이상의 수신자 메일 주소를 제공해야 합니다.'; 21 | $PHPMAILER_LANG['recipients_failed'] = 'SMTP 오류: 다음 수신자에서 오류가 발생했습니다: '; 22 | $PHPMAILER_LANG['signing'] = '서명 오류: '; 23 | $PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP 연결을 실패하였습니다.'; 24 | $PHPMAILER_LANG['smtp_error'] = 'SMTP 서버 오류: '; 25 | $PHPMAILER_LANG['variable_set'] = '변수 설정 및 초기화 불가: '; 26 | $PHPMAILER_LANG['extension_missing'] = '확장자 없음: '; 27 | -------------------------------------------------------------------------------- /LESSON 26 27 - الدرس/app/mailer/phpmailer/phpmailer/language/phpmailer.lang-nb.php: -------------------------------------------------------------------------------- 1 | 6 | * @author Peter Dave Hello <@PeterDaveHello/> 7 | * @author Jason Chiang 8 | */ 9 | 10 | $PHPMAILER_LANG['authenticate'] = 'SMTP 錯誤:登入失敗。'; 11 | $PHPMAILER_LANG['connect_host'] = 'SMTP 錯誤:無法連線到 SMTP 主機。'; 12 | $PHPMAILER_LANG['data_not_accepted'] = 'SMTP 錯誤:無法接受的資料。'; 13 | $PHPMAILER_LANG['empty_message'] = '郵件內容為空'; 14 | $PHPMAILER_LANG['encoding'] = '未知編碼: '; 15 | $PHPMAILER_LANG['execute'] = '無法執行:'; 16 | $PHPMAILER_LANG['file_access'] = '無法存取檔案:'; 17 | $PHPMAILER_LANG['file_open'] = '檔案錯誤:無法開啟檔案:'; 18 | $PHPMAILER_LANG['from_failed'] = '發送地址錯誤:'; 19 | $PHPMAILER_LANG['instantiate'] = '未知函數呼叫。'; 20 | $PHPMAILER_LANG['invalid_address'] = '因為電子郵件地址無效,無法傳送: '; 21 | $PHPMAILER_LANG['mailer_not_supported'] = '不支援的發信客戶端。'; 22 | $PHPMAILER_LANG['provide_address'] = '必須提供至少一個收件人地址。'; 23 | $PHPMAILER_LANG['recipients_failed'] = 'SMTP 錯誤:以下收件人地址錯誤:'; 24 | $PHPMAILER_LANG['signing'] = '電子簽章錯誤: '; 25 | $PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP 連線失敗'; 26 | $PHPMAILER_LANG['smtp_error'] = 'SMTP 伺服器錯誤: '; 27 | $PHPMAILER_LANG['variable_set'] = '無法設定或重設變數: '; 28 | $PHPMAILER_LANG['extension_missing'] = '遺失模組 Extension: '; 29 | -------------------------------------------------------------------------------- /LESSON 26 27 - الدرس/app/mailer/phpmailer/phpmailer/language/phpmailer.lang-zh_cn.php: -------------------------------------------------------------------------------- 1 | 6 | * @author young 7 | * @author Teddysun 8 | */ 9 | 10 | $PHPMAILER_LANG['authenticate'] = 'SMTP 错误:登录失败。'; 11 | $PHPMAILER_LANG['connect_host'] = 'SMTP 错误:无法连接到 SMTP 主机。'; 12 | $PHPMAILER_LANG['data_not_accepted'] = 'SMTP 错误:数据不被接受。'; 13 | $PHPMAILER_LANG['empty_message'] = '邮件正文为空。'; 14 | $PHPMAILER_LANG['encoding'] = '未知编码:'; 15 | $PHPMAILER_LANG['execute'] = '无法执行:'; 16 | $PHPMAILER_LANG['file_access'] = '无法访问文件:'; 17 | $PHPMAILER_LANG['file_open'] = '文件错误:无法打开文件:'; 18 | $PHPMAILER_LANG['from_failed'] = '发送地址错误:'; 19 | $PHPMAILER_LANG['instantiate'] = '未知函数调用。'; 20 | $PHPMAILER_LANG['invalid_address'] = '发送失败,电子邮箱地址是无效的:'; 21 | $PHPMAILER_LANG['mailer_not_supported'] = '发信客户端不被支持。'; 22 | $PHPMAILER_LANG['provide_address'] = '必须提供至少一个收件人地址。'; 23 | $PHPMAILER_LANG['recipients_failed'] = 'SMTP 错误:收件人地址错误:'; 24 | $PHPMAILER_LANG['signing'] = '登录失败:'; 25 | $PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP服务器连接失败。'; 26 | $PHPMAILER_LANG['smtp_error'] = 'SMTP服务器出错:'; 27 | $PHPMAILER_LANG['variable_set'] = '无法设置或重置变量:'; 28 | $PHPMAILER_LANG['extension_missing'] = '丢失模块 Extension:'; 29 | -------------------------------------------------------------------------------- /LESSON 26 27 - الدرس/app/mailer/phpmailer/phpmailer/src/Exception.php: -------------------------------------------------------------------------------- 1 | 9 | * @author Jim Jagielski (jimjag) 10 | * @author Andy Prevost (codeworxtech) 11 | * @author Brent R. Matzelle (original founder) 12 | * @copyright 2012 - 2017 Marcus Bointon 13 | * @copyright 2010 - 2012 Jim Jagielski 14 | * @copyright 2004 - 2009 Andy Prevost 15 | * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License 16 | * @note This program is distributed in the hope that it will be useful - WITHOUT 17 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 18 | * FITNESS FOR A PARTICULAR PURPOSE. 19 | */ 20 | 21 | namespace PHPMailer\PHPMailer; 22 | 23 | /** 24 | * PHPMailer exception handler. 25 | * 26 | * @author Marcus Bointon 27 | */ 28 | class Exception extends \Exception 29 | { 30 | /** 31 | * Prettify error message output. 32 | * 33 | * @return string 34 | */ 35 | public function errorMessage() 36 | { 37 | return '' . htmlspecialchars($this->getMessage()) . "
\n"; 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /LESSON 26 27 - الدرس/app/nav.php: -------------------------------------------------------------------------------- 1 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /LESSON 26 27 - الدرس/app/super-admin/index.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Home 7 | 8 | 9 | 10 | 11 | 12 | 21 | 22 |
23 | 24 | 25 | ROLE === "SUPER-ADMIN"){ 29 | echo '
Welcome ' .$_SESSION['user']->NAME . "
"; 30 | echo 'تعديل ملف الشخصي'; 31 | 32 | echo "
"; 33 | }else{ 34 | header("location:http://localhost/App/login.php",true); 35 | die(""); 36 | } 37 | }else{ 38 | header("location:http://localhost/App/login.php",true); 39 | die(""); 40 | } 41 | 42 | if(isset($_GET['logout'])){ 43 | session_unset(); 44 | session_destroy(); 45 | header("location:http://localhost/App/login.php",true); 46 | } 47 | ?> 48 |
49 | 50 | 51 | 52 | 53 | -------------------------------------------------------------------------------- /LESSON 26 27 - الدرس/app/user/index.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Home 7 | 8 | 9 | 10 | 11 | 12 | 21 | 22 |
23 | 24 | 25 | ROLE === "USER"){ 29 | echo '
Welcome ' .$_SESSION['user']->NAME . "
"; 30 | echo 'تعديل ملف الشخصي'; 31 | echo "
"; 32 | }else{ 33 | header("location:http://localhost/App/login.php",true); 34 | die(""); 35 | } 36 | }else{ 37 | header("location:http://localhost/App/login.php",true); 38 | die(""); 39 | } 40 | 41 | if(isset($_GET['logout'])){ 42 | session_unset(); 43 | session_destroy(); 44 | header("location:http://localhost/App/login.php",true); 45 | } 46 | ?> 47 |
48 | 49 | 50 | 51 | 52 | -------------------------------------------------------------------------------- /LESSON 28 29 - الدرس/app/active.php: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 | prepare("SELECT SECURITY_CODE FROM users WHERE SECURITY_CODE = :SECURITY_CODE"); 13 | $checkCode->bindParam("SECURITY_CODE",$_GET['code']); 14 | $checkCode->execute(); 15 | if($checkCode->rowCount()>0){ 16 | 17 | $update = $database->prepare("UPDATE users SET SECURITY_CODE = :NEWSECURITY_CODE , 18 | ACTIVATED=true WHERE SECURITY_CODE = :SECURITY_CODE"); 19 | $securityCode = md5(date("h:i:s")); 20 | $update->bindParam("NEWSECURITY_CODE",$securityCode); 21 | $update->bindParam("SECURITY_CODE",$_GET['code']); 22 | 23 | 24 | if($update->execute()){ 25 | echo ''; 28 | echo 'تسجيل دخول'; 29 | } 30 | }else{ 31 | echo ''; 34 | } 35 | 36 | } 37 | ?> 38 | 39 | 40 |
-------------------------------------------------------------------------------- /LESSON 28 29 - الدرس/app/admin/index.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Home 7 | 8 | 9 | 10 | 11 | 12 | 21 | 22 |
23 | 24 | ROLE === "ADMIN"){ 28 | echo '
Welcome ' .$_SESSION['user']->NAME . "
"; 29 | echo ' تعديل ملف الشخصي '; 30 | 31 | echo "
"; 32 | }else{ 33 | header("location:http://localhost/App/login.php",true); 34 | die(""); 35 | } 36 | }else{ 37 | header("location:http://localhost/App/login.php",true); 38 | die(""); 39 | } 40 | 41 | if(isset($_GET['logout'])){ 42 | session_unset(); 43 | session_destroy(); 44 | header("location:http://localhost/App/login.php",true); 45 | } 46 | ?> 47 |
48 | 49 | 50 | 51 | 52 | -------------------------------------------------------------------------------- /LESSON 28 29 - الدرس/app/composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "require": { 3 | "phpmailer/phpmailer": "^6.1" 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /LESSON 28 29 - الدرس/app/img/logo.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codershiyar/php-mysql/7a3cf68326491ce64064e1f4de231385ad45efce/LESSON 28 29 - الدرس/app/img/logo.jpg -------------------------------------------------------------------------------- /LESSON 28 29 - الدرس/app/index.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Coder Shiyar 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /LESSON 28 29 - الدرس/app/mail.php: -------------------------------------------------------------------------------- 1 | SMTPDebug = SMTP::DEBUG_SERVER; // Enable verbose debug output 16 | $mail->isSMTP(); // Send using SMTP 17 | $mail->Host = 'smtp.gmail.com'; // Set the SMTP server to send through 18 | $mail->SMTPAuth = true; // Enable SMTP authentication 19 | $mail->Username = ''; // SMTP username 20 | $mail->Password = ''; // SMTP password 21 | $mail->SMTPSecure = 'ssl'; // Enable TLS encryption; `PHPMailer::ENCRYPTION_SMTPS` encouraged 22 | $mail->Port = 465; // TCP port to connect to, use 465 for `PHPMailer::ENCRYPTION_SMTPS` above 23 | 24 | // Content 25 | $mail->isHTML(true); 26 | $mail->CharSet = "UTF-8"; -------------------------------------------------------------------------------- /LESSON 28 29 - الدرس/app/mailer/autoload.php: -------------------------------------------------------------------------------- 1 | array($vendorDir . '/phpmailer/phpmailer/src'), 10 | ); 11 | -------------------------------------------------------------------------------- /LESSON 28 29 - الدرس/app/mailer/composer/autoload_static.php: -------------------------------------------------------------------------------- 1 | 11 | array ( 12 | 'PHPMailer\\PHPMailer\\' => 20, 13 | ), 14 | ); 15 | 16 | public static $prefixDirsPsr4 = array ( 17 | 'PHPMailer\\PHPMailer\\' => 18 | array ( 19 | 0 => __DIR__ . '/..' . '/phpmailer/phpmailer/src', 20 | ), 21 | ); 22 | 23 | public static function getInitializer(ClassLoader $loader) 24 | { 25 | return \Closure::bind(function () use ($loader) { 26 | $loader->prefixLengthsPsr4 = ComposerStaticInitb7d6377ee324d8c3f56c6d308c8f812a::$prefixLengthsPsr4; 27 | $loader->prefixDirsPsr4 = ComposerStaticInitb7d6377ee324d8c3f56c6d308c8f812a::$prefixDirsPsr4; 28 | 29 | }, null, ClassLoader::class); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /LESSON 28 29 - الدرس/app/mailer/phpmailer/phpmailer/VERSION: -------------------------------------------------------------------------------- 1 | 6.1.7 -------------------------------------------------------------------------------- /LESSON 28 29 - الدرس/app/mailer/phpmailer/phpmailer/language/phpmailer.lang-ch.php: -------------------------------------------------------------------------------- 1 | 6 | */ 7 | 8 | $PHPMAILER_LANG['authenticate'] = 'SMTP 错误:身份验证失败。'; 9 | $PHPMAILER_LANG['connect_host'] = 'SMTP 错误: 不能连接SMTP主机。'; 10 | $PHPMAILER_LANG['data_not_accepted'] = 'SMTP 错误: 数据不可接受。'; 11 | //$PHPMAILER_LANG['empty_message'] = 'Message body empty'; 12 | $PHPMAILER_LANG['encoding'] = '未知编码:'; 13 | $PHPMAILER_LANG['execute'] = '不能执行: '; 14 | $PHPMAILER_LANG['file_access'] = '不能访问文件:'; 15 | $PHPMAILER_LANG['file_open'] = '文件错误:不能打开文件:'; 16 | $PHPMAILER_LANG['from_failed'] = '下面的发送地址邮件发送失败了: '; 17 | $PHPMAILER_LANG['instantiate'] = '不能实现mail方法。'; 18 | //$PHPMAILER_LANG['invalid_address'] = 'Invalid address: '; 19 | $PHPMAILER_LANG['mailer_not_supported'] = ' 您所选择的发送邮件的方法并不支持。'; 20 | $PHPMAILER_LANG['provide_address'] = '您必须提供至少一个 收信人的email地址。'; 21 | $PHPMAILER_LANG['recipients_failed'] = 'SMTP 错误: 下面的 收件人失败了: '; 22 | //$PHPMAILER_LANG['signing'] = 'Signing Error: '; 23 | //$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() failed.'; 24 | //$PHPMAILER_LANG['smtp_error'] = 'SMTP server error: '; 25 | //$PHPMAILER_LANG['variable_set'] = 'Cannot set or reset variable: '; 26 | //$PHPMAILER_LANG['extension_missing'] = 'Extension missing: '; 27 | -------------------------------------------------------------------------------- /LESSON 28 29 - الدرس/app/mailer/phpmailer/phpmailer/language/phpmailer.lang-he.php: -------------------------------------------------------------------------------- 1 | 6 | */ 7 | 8 | $PHPMAILER_LANG['authenticate'] = 'שגיאת SMTP: פעולת האימות נכשלה.'; 9 | $PHPMAILER_LANG['connect_host'] = 'שגיאת SMTP: לא הצלחתי להתחבר לשרת SMTP.'; 10 | $PHPMAILER_LANG['data_not_accepted'] = 'שגיאת SMTP: מידע לא התקבל.'; 11 | $PHPMAILER_LANG['empty_message'] = 'גוף ההודעה ריק'; 12 | $PHPMAILER_LANG['invalid_address'] = 'כתובת שגויה: '; 13 | $PHPMAILER_LANG['encoding'] = 'קידוד לא מוכר: '; 14 | $PHPMAILER_LANG['execute'] = 'לא הצלחתי להפעיל את: '; 15 | $PHPMAILER_LANG['file_access'] = 'לא ניתן לגשת לקובץ: '; 16 | $PHPMAILER_LANG['file_open'] = 'שגיאת קובץ: לא ניתן לגשת לקובץ: '; 17 | $PHPMAILER_LANG['from_failed'] = 'כתובות הנמענים הבאות נכשלו: '; 18 | $PHPMAILER_LANG['instantiate'] = 'לא הצלחתי להפעיל את פונקציית המייל.'; 19 | $PHPMAILER_LANG['mailer_not_supported'] = ' אינה נתמכת.'; 20 | $PHPMAILER_LANG['provide_address'] = 'חובה לספק לפחות כתובת אחת של מקבל המייל.'; 21 | $PHPMAILER_LANG['recipients_failed'] = 'שגיאת SMTP: הנמענים הבאים נכשלו: '; 22 | $PHPMAILER_LANG['signing'] = 'שגיאת חתימה: '; 23 | $PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() failed.'; 24 | $PHPMAILER_LANG['smtp_error'] = 'שגיאת שרת SMTP: '; 25 | $PHPMAILER_LANG['variable_set'] = 'לא ניתן לקבוע או לשנות את המשתנה: '; 26 | //$PHPMAILER_LANG['extension_missing'] = 'Extension missing: '; 27 | -------------------------------------------------------------------------------- /LESSON 28 29 - الدرس/app/mailer/phpmailer/phpmailer/language/phpmailer.lang-ja.php: -------------------------------------------------------------------------------- 1 | 6 | * @author Yoshi Sakai 7 | */ 8 | 9 | $PHPMAILER_LANG['authenticate'] = 'SMTPエラー: 認証できませんでした。'; 10 | $PHPMAILER_LANG['connect_host'] = 'SMTPエラー: SMTPホストに接続できませんでした。'; 11 | $PHPMAILER_LANG['data_not_accepted'] = 'SMTPエラー: データが受け付けられませんでした。'; 12 | //$PHPMAILER_LANG['empty_message'] = 'Message body empty'; 13 | $PHPMAILER_LANG['encoding'] = '不明なエンコーディング: '; 14 | $PHPMAILER_LANG['execute'] = '実行できませんでした: '; 15 | $PHPMAILER_LANG['file_access'] = 'ファイルにアクセスできません: '; 16 | $PHPMAILER_LANG['file_open'] = 'ファイルエラー: ファイルを開けません: '; 17 | $PHPMAILER_LANG['from_failed'] = 'Fromアドレスを登録する際にエラーが発生しました: '; 18 | $PHPMAILER_LANG['instantiate'] = 'メール関数が正常に動作しませんでした。'; 19 | //$PHPMAILER_LANG['invalid_address'] = 'Invalid address: '; 20 | $PHPMAILER_LANG['provide_address'] = '少なくとも1つメールアドレスを 指定する必要があります。'; 21 | $PHPMAILER_LANG['mailer_not_supported'] = ' メーラーがサポートされていません。'; 22 | $PHPMAILER_LANG['recipients_failed'] = 'SMTPエラー: 次の受信者アドレスに 間違いがあります: '; 23 | //$PHPMAILER_LANG['signing'] = 'Signing Error: '; 24 | //$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() failed.'; 25 | //$PHPMAILER_LANG['smtp_error'] = 'SMTP server error: '; 26 | //$PHPMAILER_LANG['variable_set'] = 'Cannot set or reset variable: '; 27 | //$PHPMAILER_LANG['extension_missing'] = 'Extension missing: '; 28 | -------------------------------------------------------------------------------- /LESSON 28 29 - الدرس/app/mailer/phpmailer/phpmailer/language/phpmailer.lang-ko.php: -------------------------------------------------------------------------------- 1 | 6 | */ 7 | 8 | $PHPMAILER_LANG['authenticate'] = 'SMTP 오류: 인증할 수 없습니다.'; 9 | $PHPMAILER_LANG['connect_host'] = 'SMTP 오류: SMTP 호스트에 접속할 수 없습니다.'; 10 | $PHPMAILER_LANG['data_not_accepted'] = 'SMTP 오류: 데이터가 받아들여지지 않았습니다.'; 11 | $PHPMAILER_LANG['empty_message'] = '메세지 내용이 없습니다'; 12 | $PHPMAILER_LANG['encoding'] = '알 수 없는 인코딩: '; 13 | $PHPMAILER_LANG['execute'] = '실행 불가: '; 14 | $PHPMAILER_LANG['file_access'] = '파일 접근 불가: '; 15 | $PHPMAILER_LANG['file_open'] = '파일 오류: 파일을 열 수 없습니다: '; 16 | $PHPMAILER_LANG['from_failed'] = '다음 From 주소에서 오류가 발생했습니다: '; 17 | $PHPMAILER_LANG['instantiate'] = 'mail 함수를 인스턴스화할 수 없습니다'; 18 | $PHPMAILER_LANG['invalid_address'] = '잘못된 주소: '; 19 | $PHPMAILER_LANG['mailer_not_supported'] = ' 메일러는 지원되지 않습니다.'; 20 | $PHPMAILER_LANG['provide_address'] = '적어도 한 개 이상의 수신자 메일 주소를 제공해야 합니다.'; 21 | $PHPMAILER_LANG['recipients_failed'] = 'SMTP 오류: 다음 수신자에서 오류가 발생했습니다: '; 22 | $PHPMAILER_LANG['signing'] = '서명 오류: '; 23 | $PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP 연결을 실패하였습니다.'; 24 | $PHPMAILER_LANG['smtp_error'] = 'SMTP 서버 오류: '; 25 | $PHPMAILER_LANG['variable_set'] = '변수 설정 및 초기화 불가: '; 26 | $PHPMAILER_LANG['extension_missing'] = '확장자 없음: '; 27 | -------------------------------------------------------------------------------- /LESSON 28 29 - الدرس/app/mailer/phpmailer/phpmailer/language/phpmailer.lang-nb.php: -------------------------------------------------------------------------------- 1 | 6 | * @author Peter Dave Hello <@PeterDaveHello/> 7 | * @author Jason Chiang 8 | */ 9 | 10 | $PHPMAILER_LANG['authenticate'] = 'SMTP 錯誤:登入失敗。'; 11 | $PHPMAILER_LANG['connect_host'] = 'SMTP 錯誤:無法連線到 SMTP 主機。'; 12 | $PHPMAILER_LANG['data_not_accepted'] = 'SMTP 錯誤:無法接受的資料。'; 13 | $PHPMAILER_LANG['empty_message'] = '郵件內容為空'; 14 | $PHPMAILER_LANG['encoding'] = '未知編碼: '; 15 | $PHPMAILER_LANG['execute'] = '無法執行:'; 16 | $PHPMAILER_LANG['file_access'] = '無法存取檔案:'; 17 | $PHPMAILER_LANG['file_open'] = '檔案錯誤:無法開啟檔案:'; 18 | $PHPMAILER_LANG['from_failed'] = '發送地址錯誤:'; 19 | $PHPMAILER_LANG['instantiate'] = '未知函數呼叫。'; 20 | $PHPMAILER_LANG['invalid_address'] = '因為電子郵件地址無效,無法傳送: '; 21 | $PHPMAILER_LANG['mailer_not_supported'] = '不支援的發信客戶端。'; 22 | $PHPMAILER_LANG['provide_address'] = '必須提供至少一個收件人地址。'; 23 | $PHPMAILER_LANG['recipients_failed'] = 'SMTP 錯誤:以下收件人地址錯誤:'; 24 | $PHPMAILER_LANG['signing'] = '電子簽章錯誤: '; 25 | $PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP 連線失敗'; 26 | $PHPMAILER_LANG['smtp_error'] = 'SMTP 伺服器錯誤: '; 27 | $PHPMAILER_LANG['variable_set'] = '無法設定或重設變數: '; 28 | $PHPMAILER_LANG['extension_missing'] = '遺失模組 Extension: '; 29 | -------------------------------------------------------------------------------- /LESSON 28 29 - الدرس/app/mailer/phpmailer/phpmailer/language/phpmailer.lang-zh_cn.php: -------------------------------------------------------------------------------- 1 | 6 | * @author young 7 | * @author Teddysun 8 | */ 9 | 10 | $PHPMAILER_LANG['authenticate'] = 'SMTP 错误:登录失败。'; 11 | $PHPMAILER_LANG['connect_host'] = 'SMTP 错误:无法连接到 SMTP 主机。'; 12 | $PHPMAILER_LANG['data_not_accepted'] = 'SMTP 错误:数据不被接受。'; 13 | $PHPMAILER_LANG['empty_message'] = '邮件正文为空。'; 14 | $PHPMAILER_LANG['encoding'] = '未知编码:'; 15 | $PHPMAILER_LANG['execute'] = '无法执行:'; 16 | $PHPMAILER_LANG['file_access'] = '无法访问文件:'; 17 | $PHPMAILER_LANG['file_open'] = '文件错误:无法打开文件:'; 18 | $PHPMAILER_LANG['from_failed'] = '发送地址错误:'; 19 | $PHPMAILER_LANG['instantiate'] = '未知函数调用。'; 20 | $PHPMAILER_LANG['invalid_address'] = '发送失败,电子邮箱地址是无效的:'; 21 | $PHPMAILER_LANG['mailer_not_supported'] = '发信客户端不被支持。'; 22 | $PHPMAILER_LANG['provide_address'] = '必须提供至少一个收件人地址。'; 23 | $PHPMAILER_LANG['recipients_failed'] = 'SMTP 错误:收件人地址错误:'; 24 | $PHPMAILER_LANG['signing'] = '登录失败:'; 25 | $PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP服务器连接失败。'; 26 | $PHPMAILER_LANG['smtp_error'] = 'SMTP服务器出错:'; 27 | $PHPMAILER_LANG['variable_set'] = '无法设置或重置变量:'; 28 | $PHPMAILER_LANG['extension_missing'] = '丢失模块 Extension:'; 29 | -------------------------------------------------------------------------------- /LESSON 28 29 - الدرس/app/mailer/phpmailer/phpmailer/src/Exception.php: -------------------------------------------------------------------------------- 1 | 9 | * @author Jim Jagielski (jimjag) 10 | * @author Andy Prevost (codeworxtech) 11 | * @author Brent R. Matzelle (original founder) 12 | * @copyright 2012 - 2017 Marcus Bointon 13 | * @copyright 2010 - 2012 Jim Jagielski 14 | * @copyright 2004 - 2009 Andy Prevost 15 | * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License 16 | * @note This program is distributed in the hope that it will be useful - WITHOUT 17 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 18 | * FITNESS FOR A PARTICULAR PURPOSE. 19 | */ 20 | 21 | namespace PHPMailer\PHPMailer; 22 | 23 | /** 24 | * PHPMailer exception handler. 25 | * 26 | * @author Marcus Bointon 27 | */ 28 | class Exception extends \Exception 29 | { 30 | /** 31 | * Prettify error message output. 32 | * 33 | * @return string 34 | */ 35 | public function errorMessage() 36 | { 37 | return '' . htmlspecialchars($this->getMessage()) . "
\n"; 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /LESSON 28 29 - الدرس/app/nav.php: -------------------------------------------------------------------------------- 1 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /LESSON 28 29 - الدرس/app/super-admin/index.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Home 7 | 8 | 9 | 10 | 11 | 12 | 21 | 22 |
23 | 24 | 25 | ROLE === "SUPER-ADMIN"){ 29 | echo '
Welcome ' .$_SESSION['user']->NAME . "
"; 30 | echo ' تعديل ملف الشخصي '; 31 | 32 | echo "
"; 33 | }else{ 34 | header("location:http://localhost/App/login.php",true); 35 | die(""); 36 | } 37 | }else{ 38 | header("location:http://localhost/App/login.php",true); 39 | die(""); 40 | } 41 | 42 | if(isset($_GET['logout'])){ 43 | session_unset(); 44 | session_destroy(); 45 | header("location:http://localhost/App/login.php",true); 46 | } 47 | ?> 48 |
49 | 50 | 51 | 52 | 53 | -------------------------------------------------------------------------------- /LESSON 28 29 - الدرس/app/user/index.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Home 7 | 8 | 9 | 10 | 11 | 12 | 21 | 22 |
23 | 24 | 25 | ROLE === "USER"){ 29 | echo '
Welcome ' .$_SESSION['user']->NAME . "
"; 30 | echo ' تعديل ملف الشخصي '; 31 | echo "
"; 32 | }else{ 33 | header("location:http://localhost/App/login.php",true); 34 | die(""); 35 | } 36 | }else{ 37 | header("location:http://localhost/App/login.php",true); 38 | die(""); 39 | } 40 | 41 | if(isset($_GET['logout'])){ 42 | session_unset(); 43 | session_destroy(); 44 | header("location:http://localhost/App/login.php",true); 45 | } 46 | ?> 47 |
48 | 49 | 50 | -------------------------------------------------------------------------------- /LESSON 3 - الدرس/index.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /LESSON 34 - الدرس/admin/index.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Home 7 | 8 | 9 | 10 | 11 | 12 | 21 | 22 |
23 | 24 | ROLE === "ADMIN"){ 28 | echo '
Welcome ' .$_SESSION['user']->NAME . "
"; 29 | echo 'تعديل ملف الشخصي'; 30 | 31 | echo "
"; 32 | }else{ 33 | header("location:http://localhost/App/login.php",true); 34 | die(""); 35 | } 36 | }else{ 37 | header("location:http://localhost/App/login.php",true); 38 | die(""); 39 | } 40 | 41 | if(isset($_GET['logout'])){ 42 | session_unset(); 43 | session_destroy(); 44 | header("location:http://localhost/App/login.php",true); 45 | } 46 | ?> 47 |
48 | 49 | 50 | 51 | 52 | -------------------------------------------------------------------------------- /LESSON 37 - الدرس/app/active.php: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 | prepare("SELECT SECURITY_CODE FROM users WHERE SECURITY_CODE = :SECURITY_CODE"); 13 | $checkCode->bindParam("SECURITY_CODE",$_GET['code']); 14 | $checkCode->execute(); 15 | if($checkCode->rowCount()>0){ 16 | 17 | $update = $database->prepare("UPDATE users SET SECURITY_CODE = :NEWSECURITY_CODE , 18 | ACTIVATED=true WHERE SECURITY_CODE = :SECURITY_CODE"); 19 | $securityCode = md5(date("h:i:s")); 20 | $update->bindParam("NEWSECURITY_CODE",$securityCode); 21 | $update->bindParam("SECURITY_CODE",$_GET['code']); 22 | 23 | 24 | if($update->execute()){ 25 | echo ''; 28 | echo 'تسجيل دخول'; 29 | } 30 | }else{ 31 | echo ''; 34 | } 35 | 36 | } 37 | ?> 38 | 39 | 40 |
-------------------------------------------------------------------------------- /LESSON 37 - الدرس/app/composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "require": { 3 | "phpmailer/phpmailer": "^6.1" 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /LESSON 37 - الدرس/app/connectToDatabase.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /LESSON 37 - الدرس/app/img/logo.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codershiyar/php-mysql/7a3cf68326491ce64064e1f4de231385ad45efce/LESSON 37 - الدرس/app/img/logo.jpg -------------------------------------------------------------------------------- /LESSON 37 - الدرس/app/index.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Coder Shiyar 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /LESSON 37 - الدرس/app/mail.php: -------------------------------------------------------------------------------- 1 | SMTPDebug = SMTP::DEBUG_SERVER; // Enable verbose debug output 16 | $mail->isSMTP(); // Send using SMTP 17 | $mail->Host = 'smtp.gmail.com'; // Set the SMTP server to send through 18 | $mail->SMTPAuth = true; // Enable SMTP authentication 19 | $mail->Username = ' '; // SMTP username 20 | $mail->Password = ' '; // SMTP password 21 | $mail->SMTPSecure = 'ssl'; // Enable TLS encryption; `PHPMailer::ENCRYPTION_SMTPS` encouraged 22 | $mail->Port = 465; // TCP port to connect to, use 465 for `PHPMailer::ENCRYPTION_SMTPS` above 23 | 24 | // Content 25 | $mail->isHTML(true); 26 | $mail->CharSet = "UTF-8"; -------------------------------------------------------------------------------- /LESSON 37 - الدرس/app/mailer/autoload.php: -------------------------------------------------------------------------------- 1 | array($vendorDir . '/phpmailer/phpmailer/src'), 10 | ); 11 | -------------------------------------------------------------------------------- /LESSON 37 - الدرس/app/mailer/composer/autoload_static.php: -------------------------------------------------------------------------------- 1 | 11 | array ( 12 | 'PHPMailer\\PHPMailer\\' => 20, 13 | ), 14 | ); 15 | 16 | public static $prefixDirsPsr4 = array ( 17 | 'PHPMailer\\PHPMailer\\' => 18 | array ( 19 | 0 => __DIR__ . '/..' . '/phpmailer/phpmailer/src', 20 | ), 21 | ); 22 | 23 | public static function getInitializer(ClassLoader $loader) 24 | { 25 | return \Closure::bind(function () use ($loader) { 26 | $loader->prefixLengthsPsr4 = ComposerStaticInitb7d6377ee324d8c3f56c6d308c8f812a::$prefixLengthsPsr4; 27 | $loader->prefixDirsPsr4 = ComposerStaticInitb7d6377ee324d8c3f56c6d308c8f812a::$prefixDirsPsr4; 28 | 29 | }, null, ClassLoader::class); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /LESSON 37 - الدرس/app/mailer/phpmailer/phpmailer/VERSION: -------------------------------------------------------------------------------- 1 | 6.1.7 -------------------------------------------------------------------------------- /LESSON 37 - الدرس/app/mailer/phpmailer/phpmailer/language/phpmailer.lang-ch.php: -------------------------------------------------------------------------------- 1 | 6 | */ 7 | 8 | $PHPMAILER_LANG['authenticate'] = 'SMTP 错误:身份验证失败。'; 9 | $PHPMAILER_LANG['connect_host'] = 'SMTP 错误: 不能连接SMTP主机。'; 10 | $PHPMAILER_LANG['data_not_accepted'] = 'SMTP 错误: 数据不可接受。'; 11 | //$PHPMAILER_LANG['empty_message'] = 'Message body empty'; 12 | $PHPMAILER_LANG['encoding'] = '未知编码:'; 13 | $PHPMAILER_LANG['execute'] = '不能执行: '; 14 | $PHPMAILER_LANG['file_access'] = '不能访问文件:'; 15 | $PHPMAILER_LANG['file_open'] = '文件错误:不能打开文件:'; 16 | $PHPMAILER_LANG['from_failed'] = '下面的发送地址邮件发送失败了: '; 17 | $PHPMAILER_LANG['instantiate'] = '不能实现mail方法。'; 18 | //$PHPMAILER_LANG['invalid_address'] = 'Invalid address: '; 19 | $PHPMAILER_LANG['mailer_not_supported'] = ' 您所选择的发送邮件的方法并不支持。'; 20 | $PHPMAILER_LANG['provide_address'] = '您必须提供至少一个 收信人的email地址。'; 21 | $PHPMAILER_LANG['recipients_failed'] = 'SMTP 错误: 下面的 收件人失败了: '; 22 | //$PHPMAILER_LANG['signing'] = 'Signing Error: '; 23 | //$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() failed.'; 24 | //$PHPMAILER_LANG['smtp_error'] = 'SMTP server error: '; 25 | //$PHPMAILER_LANG['variable_set'] = 'Cannot set or reset variable: '; 26 | //$PHPMAILER_LANG['extension_missing'] = 'Extension missing: '; 27 | -------------------------------------------------------------------------------- /LESSON 37 - الدرس/app/mailer/phpmailer/phpmailer/language/phpmailer.lang-he.php: -------------------------------------------------------------------------------- 1 | 6 | */ 7 | 8 | $PHPMAILER_LANG['authenticate'] = 'שגיאת SMTP: פעולת האימות נכשלה.'; 9 | $PHPMAILER_LANG['connect_host'] = 'שגיאת SMTP: לא הצלחתי להתחבר לשרת SMTP.'; 10 | $PHPMAILER_LANG['data_not_accepted'] = 'שגיאת SMTP: מידע לא התקבל.'; 11 | $PHPMAILER_LANG['empty_message'] = 'גוף ההודעה ריק'; 12 | $PHPMAILER_LANG['invalid_address'] = 'כתובת שגויה: '; 13 | $PHPMAILER_LANG['encoding'] = 'קידוד לא מוכר: '; 14 | $PHPMAILER_LANG['execute'] = 'לא הצלחתי להפעיל את: '; 15 | $PHPMAILER_LANG['file_access'] = 'לא ניתן לגשת לקובץ: '; 16 | $PHPMAILER_LANG['file_open'] = 'שגיאת קובץ: לא ניתן לגשת לקובץ: '; 17 | $PHPMAILER_LANG['from_failed'] = 'כתובות הנמענים הבאות נכשלו: '; 18 | $PHPMAILER_LANG['instantiate'] = 'לא הצלחתי להפעיל את פונקציית המייל.'; 19 | $PHPMAILER_LANG['mailer_not_supported'] = ' אינה נתמכת.'; 20 | $PHPMAILER_LANG['provide_address'] = 'חובה לספק לפחות כתובת אחת של מקבל המייל.'; 21 | $PHPMAILER_LANG['recipients_failed'] = 'שגיאת SMTP: הנמענים הבאים נכשלו: '; 22 | $PHPMAILER_LANG['signing'] = 'שגיאת חתימה: '; 23 | $PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() failed.'; 24 | $PHPMAILER_LANG['smtp_error'] = 'שגיאת שרת SMTP: '; 25 | $PHPMAILER_LANG['variable_set'] = 'לא ניתן לקבוע או לשנות את המשתנה: '; 26 | //$PHPMAILER_LANG['extension_missing'] = 'Extension missing: '; 27 | -------------------------------------------------------------------------------- /LESSON 37 - الدرس/app/mailer/phpmailer/phpmailer/language/phpmailer.lang-ja.php: -------------------------------------------------------------------------------- 1 | 6 | * @author Yoshi Sakai 7 | */ 8 | 9 | $PHPMAILER_LANG['authenticate'] = 'SMTPエラー: 認証できませんでした。'; 10 | $PHPMAILER_LANG['connect_host'] = 'SMTPエラー: SMTPホストに接続できませんでした。'; 11 | $PHPMAILER_LANG['data_not_accepted'] = 'SMTPエラー: データが受け付けられませんでした。'; 12 | //$PHPMAILER_LANG['empty_message'] = 'Message body empty'; 13 | $PHPMAILER_LANG['encoding'] = '不明なエンコーディング: '; 14 | $PHPMAILER_LANG['execute'] = '実行できませんでした: '; 15 | $PHPMAILER_LANG['file_access'] = 'ファイルにアクセスできません: '; 16 | $PHPMAILER_LANG['file_open'] = 'ファイルエラー: ファイルを開けません: '; 17 | $PHPMAILER_LANG['from_failed'] = 'Fromアドレスを登録する際にエラーが発生しました: '; 18 | $PHPMAILER_LANG['instantiate'] = 'メール関数が正常に動作しませんでした。'; 19 | //$PHPMAILER_LANG['invalid_address'] = 'Invalid address: '; 20 | $PHPMAILER_LANG['provide_address'] = '少なくとも1つメールアドレスを 指定する必要があります。'; 21 | $PHPMAILER_LANG['mailer_not_supported'] = ' メーラーがサポートされていません。'; 22 | $PHPMAILER_LANG['recipients_failed'] = 'SMTPエラー: 次の受信者アドレスに 間違いがあります: '; 23 | //$PHPMAILER_LANG['signing'] = 'Signing Error: '; 24 | //$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() failed.'; 25 | //$PHPMAILER_LANG['smtp_error'] = 'SMTP server error: '; 26 | //$PHPMAILER_LANG['variable_set'] = 'Cannot set or reset variable: '; 27 | //$PHPMAILER_LANG['extension_missing'] = 'Extension missing: '; 28 | -------------------------------------------------------------------------------- /LESSON 37 - الدرس/app/mailer/phpmailer/phpmailer/language/phpmailer.lang-ko.php: -------------------------------------------------------------------------------- 1 | 6 | */ 7 | 8 | $PHPMAILER_LANG['authenticate'] = 'SMTP 오류: 인증할 수 없습니다.'; 9 | $PHPMAILER_LANG['connect_host'] = 'SMTP 오류: SMTP 호스트에 접속할 수 없습니다.'; 10 | $PHPMAILER_LANG['data_not_accepted'] = 'SMTP 오류: 데이터가 받아들여지지 않았습니다.'; 11 | $PHPMAILER_LANG['empty_message'] = '메세지 내용이 없습니다'; 12 | $PHPMAILER_LANG['encoding'] = '알 수 없는 인코딩: '; 13 | $PHPMAILER_LANG['execute'] = '실행 불가: '; 14 | $PHPMAILER_LANG['file_access'] = '파일 접근 불가: '; 15 | $PHPMAILER_LANG['file_open'] = '파일 오류: 파일을 열 수 없습니다: '; 16 | $PHPMAILER_LANG['from_failed'] = '다음 From 주소에서 오류가 발생했습니다: '; 17 | $PHPMAILER_LANG['instantiate'] = 'mail 함수를 인스턴스화할 수 없습니다'; 18 | $PHPMAILER_LANG['invalid_address'] = '잘못된 주소: '; 19 | $PHPMAILER_LANG['mailer_not_supported'] = ' 메일러는 지원되지 않습니다.'; 20 | $PHPMAILER_LANG['provide_address'] = '적어도 한 개 이상의 수신자 메일 주소를 제공해야 합니다.'; 21 | $PHPMAILER_LANG['recipients_failed'] = 'SMTP 오류: 다음 수신자에서 오류가 발생했습니다: '; 22 | $PHPMAILER_LANG['signing'] = '서명 오류: '; 23 | $PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP 연결을 실패하였습니다.'; 24 | $PHPMAILER_LANG['smtp_error'] = 'SMTP 서버 오류: '; 25 | $PHPMAILER_LANG['variable_set'] = '변수 설정 및 초기화 불가: '; 26 | $PHPMAILER_LANG['extension_missing'] = '확장자 없음: '; 27 | -------------------------------------------------------------------------------- /LESSON 37 - الدرس/app/mailer/phpmailer/phpmailer/language/phpmailer.lang-nb.php: -------------------------------------------------------------------------------- 1 | 6 | * @author Peter Dave Hello <@PeterDaveHello/> 7 | * @author Jason Chiang 8 | */ 9 | 10 | $PHPMAILER_LANG['authenticate'] = 'SMTP 錯誤:登入失敗。'; 11 | $PHPMAILER_LANG['connect_host'] = 'SMTP 錯誤:無法連線到 SMTP 主機。'; 12 | $PHPMAILER_LANG['data_not_accepted'] = 'SMTP 錯誤:無法接受的資料。'; 13 | $PHPMAILER_LANG['empty_message'] = '郵件內容為空'; 14 | $PHPMAILER_LANG['encoding'] = '未知編碼: '; 15 | $PHPMAILER_LANG['execute'] = '無法執行:'; 16 | $PHPMAILER_LANG['file_access'] = '無法存取檔案:'; 17 | $PHPMAILER_LANG['file_open'] = '檔案錯誤:無法開啟檔案:'; 18 | $PHPMAILER_LANG['from_failed'] = '發送地址錯誤:'; 19 | $PHPMAILER_LANG['instantiate'] = '未知函數呼叫。'; 20 | $PHPMAILER_LANG['invalid_address'] = '因為電子郵件地址無效,無法傳送: '; 21 | $PHPMAILER_LANG['mailer_not_supported'] = '不支援的發信客戶端。'; 22 | $PHPMAILER_LANG['provide_address'] = '必須提供至少一個收件人地址。'; 23 | $PHPMAILER_LANG['recipients_failed'] = 'SMTP 錯誤:以下收件人地址錯誤:'; 24 | $PHPMAILER_LANG['signing'] = '電子簽章錯誤: '; 25 | $PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP 連線失敗'; 26 | $PHPMAILER_LANG['smtp_error'] = 'SMTP 伺服器錯誤: '; 27 | $PHPMAILER_LANG['variable_set'] = '無法設定或重設變數: '; 28 | $PHPMAILER_LANG['extension_missing'] = '遺失模組 Extension: '; 29 | -------------------------------------------------------------------------------- /LESSON 37 - الدرس/app/mailer/phpmailer/phpmailer/language/phpmailer.lang-zh_cn.php: -------------------------------------------------------------------------------- 1 | 6 | * @author young 7 | * @author Teddysun 8 | */ 9 | 10 | $PHPMAILER_LANG['authenticate'] = 'SMTP 错误:登录失败。'; 11 | $PHPMAILER_LANG['connect_host'] = 'SMTP 错误:无法连接到 SMTP 主机。'; 12 | $PHPMAILER_LANG['data_not_accepted'] = 'SMTP 错误:数据不被接受。'; 13 | $PHPMAILER_LANG['empty_message'] = '邮件正文为空。'; 14 | $PHPMAILER_LANG['encoding'] = '未知编码:'; 15 | $PHPMAILER_LANG['execute'] = '无法执行:'; 16 | $PHPMAILER_LANG['file_access'] = '无法访问文件:'; 17 | $PHPMAILER_LANG['file_open'] = '文件错误:无法打开文件:'; 18 | $PHPMAILER_LANG['from_failed'] = '发送地址错误:'; 19 | $PHPMAILER_LANG['instantiate'] = '未知函数调用。'; 20 | $PHPMAILER_LANG['invalid_address'] = '发送失败,电子邮箱地址是无效的:'; 21 | $PHPMAILER_LANG['mailer_not_supported'] = '发信客户端不被支持。'; 22 | $PHPMAILER_LANG['provide_address'] = '必须提供至少一个收件人地址。'; 23 | $PHPMAILER_LANG['recipients_failed'] = 'SMTP 错误:收件人地址错误:'; 24 | $PHPMAILER_LANG['signing'] = '登录失败:'; 25 | $PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP服务器连接失败。'; 26 | $PHPMAILER_LANG['smtp_error'] = 'SMTP服务器出错:'; 27 | $PHPMAILER_LANG['variable_set'] = '无法设置或重置变量:'; 28 | $PHPMAILER_LANG['extension_missing'] = '丢失模块 Extension:'; 29 | -------------------------------------------------------------------------------- /LESSON 37 - الدرس/app/mailer/phpmailer/phpmailer/src/Exception.php: -------------------------------------------------------------------------------- 1 | 9 | * @author Jim Jagielski (jimjag) 10 | * @author Andy Prevost (codeworxtech) 11 | * @author Brent R. Matzelle (original founder) 12 | * @copyright 2012 - 2017 Marcus Bointon 13 | * @copyright 2010 - 2012 Jim Jagielski 14 | * @copyright 2004 - 2009 Andy Prevost 15 | * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License 16 | * @note This program is distributed in the hope that it will be useful - WITHOUT 17 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 18 | * FITNESS FOR A PARTICULAR PURPOSE. 19 | */ 20 | 21 | namespace PHPMailer\PHPMailer; 22 | 23 | /** 24 | * PHPMailer exception handler. 25 | * 26 | * @author Marcus Bointon 27 | */ 28 | class Exception extends \Exception 29 | { 30 | /** 31 | * Prettify error message output. 32 | * 33 | * @return string 34 | */ 35 | public function errorMessage() 36 | { 37 | return '' . htmlspecialchars($this->getMessage()) . "
\n"; 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /LESSON 37 - الدرس/app/nav.php: -------------------------------------------------------------------------------- 1 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /LESSON 4 - الدرس/codes.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /LESSON 41 - الدرس/php mysql api get/app.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Coder Shiyar 7 | 8 | 9 | 10 | 15 | 16 | -------------------------------------------------------------------------------- /LESSON 41 - الدرس/php mysql api get/index.php: -------------------------------------------------------------------------------- 1 | prepare("SELECT * FROM course_release_date "); 12 | $items->execute(); 13 | 14 | if(isset($_GET["key"])){ 15 | if($_GET["key"] == "1234"){ 16 | 17 | $items = $items->fetchAll(PDO::FETCH_ASSOC); 18 | print_r(json_encode($items)); 19 | }else{ 20 | print_r(json_encode(["error" => "كلمة مرور غير صحيحة"])); 21 | } 22 | 23 | }else{ 24 | print_r(json_encode(["error" => "حدث خطا ما"])); 25 | } 26 | 27 | -------------------------------------------------------------------------------- /LESSON 42 - الدرس/php mysql api post/app.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Coder Shiyar 7 | 8 | 9 | 10 | 19 | 20 | -------------------------------------------------------------------------------- /LESSON 42 - الدرس/php mysql api post/index.php: -------------------------------------------------------------------------------- 1 | text) ){ 12 | $username = "root"; 13 | $password = ""; 14 | $database = new PDO("mysql:host=localhost; dbname=codershiyar;charset=utf8;", $username, $password); 15 | 16 | $addData = $database->prepare("INSERT INTO course_release_date(text,time,date) VALUES(:text,CURRENT_TIME,CURRENT_DATE )"); 17 | $addData->bindParam("text",$data->text); 18 | 19 | if($addData->execute()){ 20 | print_r(json_encode(["message"=>"تم اضافة البيانات بنجاح "])); 21 | }else{ 22 | var_dump($addData->errorInfo()); 23 | print_r(json_encode(["error"=>"حدث خطا ما "])); 24 | } 25 | 26 | }else{ 27 | print_r(json_encode(["error"=>"حدث خطا ما "])); 28 | } 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /LESSON 5 - الدرس/index.php: -------------------------------------------------------------------------------- 1 | prepare("CREATE TABLE test2(id int(10), text varchar(255))"); 8 | $sql->execute(); 9 | 10 | ?> -------------------------------------------------------------------------------- /LESSON 8 - الدرس/index.php: -------------------------------------------------------------------------------- 1 | 2 | prepare("SELECT * FROM users WHERE USER_ID = 3 "); 8 | 9 | $getUser->execute(); 10 | 11 | // $getUser = $getUser->fetch(PDO::FETCH_ASSOC); 12 | 13 | // var_dump($getUser ); 14 | // echo "

" . $getUser['EMAIL'] . "

"; 15 | 16 | $getUser = $getUser->fetchObject(); 17 | 18 | echo $getUser->USER_ID; 19 | 20 | // var_dump($getUser); 21 | ?> 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /LESSON 9 - الدرس/index.php: -------------------------------------------------------------------------------- 1 | 2 | prepare("SELECT * FROM users"); 8 | $sql->execute(); 9 | 10 | echo $sql->rowCount(); 11 | 12 | ?> 13 | 14 | 15 | 16 | --------------------------------------------------------------------------------