├── PhpMailer ├── LICENSE ├── PHPMailerAutoload.php ├── VERSION ├── class.phpmailer.php ├── class.phpmaileroauth.php ├── class.phpmaileroauthgoogle.php ├── class.pop3.php ├── class.smtp.php ├── composer.json ├── composer.lock ├── examples │ ├── DKIM.phps │ ├── code_generator.phps │ ├── contactform.phps │ ├── contents.html │ ├── contentsutf8.html │ ├── exceptions.phps │ ├── gmail.phps │ ├── gmail_xoauth.phps │ ├── images │ │ ├── phpmailer.png │ │ └── phpmailer_mini.png │ ├── index.html │ ├── mail.phps │ ├── mailing_list.phps │ ├── pop_before_smtp.phps │ ├── scripts │ │ ├── XRegExp.js │ │ ├── shAutoloader.js │ │ ├── shBrushPhp.js │ │ ├── shCore.js │ │ └── shLegacy.js │ ├── send_file_upload.phps │ ├── send_multiple_file_upload.phps │ ├── sendmail.phps │ ├── signed-mail.phps │ ├── smtp.phps │ ├── smtp_check.phps │ ├── smtp_no_auth.phps │ ├── ssl_options.phps │ └── styles │ │ ├── shCore.css │ │ ├── shCoreDefault.css │ │ ├── shCoreDjango.css │ │ ├── shCoreEclipse.css │ │ ├── shCoreEmacs.css │ │ ├── shCoreFadeToGrey.css │ │ ├── shCoreMDUltra.css │ │ ├── shCoreMidnight.css │ │ ├── shCoreRDark.css │ │ ├── shThemeAppleScript.css │ │ ├── shThemeDefault.css │ │ ├── shThemeDjango.css │ │ ├── shThemeEclipse.css │ │ ├── shThemeEmacs.css │ │ ├── shThemeFadeToGrey.css │ │ ├── shThemeMDUltra.css │ │ ├── shThemeMidnight.css │ │ ├── shThemeRDark.css │ │ ├── shThemeVisualStudio.css │ │ └── wrapping.png ├── extras │ ├── EasyPeasyICS.php │ ├── README.md │ ├── htmlfilter.php │ └── ntlm_sasl_client.php ├── get_oauth_token.php ├── language │ ├── lang.rar │ ├── phpmailer.lang-am.php │ └── phpmailer.lang-ar.php └── test ├── README.md ├── app ├── Decoratives │ ├── SALChange.php │ ├── SalaryAmount.php │ ├── SalaryBonus.php │ └── SalaryTax.php ├── config │ └── config.php ├── controllers │ ├── AdminController.class.php │ ├── AdmissionController.class.php │ ├── LoginController.class.php │ ├── LogoutController.class.php │ ├── SendMail.php │ ├── StudentController.class.php │ └── TeacherController.class.php ├── interfaces │ ├── Imanage.php │ └── Inotify.php ├── models │ ├── AdminModel.class.php │ ├── AdmissionModel.class.php │ ├── AssignmentsModel.class.php │ ├── CourseModel.class.php │ ├── Database.class.php │ ├── ExamsModel.class.php │ ├── QuizModel.class.php │ ├── SalaryModel.class.php │ ├── ScheduleModel.class.php │ ├── StudentModel.class1.php │ ├── TeacherModel.class.php │ ├── User.class.php │ └── singleton.php └── views │ ├── AdminView.class.php │ ├── LoginView.php │ ├── StudentView.php │ ├── SupervisiorView.php │ ├── TeacherView.php │ └── inc │ ├── footer.inc.php │ ├── footerind.inc.php │ ├── header.inc.php │ ├── headerind.inc.php │ └── navbar.php ├── documentations ├── Software_Design_Document.docx └── Software_Requirements_Specification.docx ├── overview.png ├── public ├── css │ ├── bootstrap.min.css │ └── style.css ├── index.php └── text └── sql_script.sql /PhpMailer/PHPMailerAutoload.php: -------------------------------------------------------------------------------- 1 | 8 | * @author Jim Jagielski (jimjag) 9 | * @author Andy Prevost (codeworxtech) 10 | * @author Brent R. Matzelle (original founder) 11 | * @copyright 2012 - 2014 Marcus Bointon 12 | * @copyright 2010 - 2012 Jim Jagielski 13 | * @copyright 2004 - 2009 Andy Prevost 14 | * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License 15 | * @note This program is distributed in the hope that it will be useful - WITHOUT 16 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 17 | * FITNESS FOR A PARTICULAR PURPOSE. 18 | */ 19 | 20 | /** 21 | * PHPMailer SPL autoloader. 22 | * @param string $classname The name of the class to load 23 | */ 24 | function PHPMailerAutoload($classname) 25 | { 26 | //Can't use __DIR__ as it's only in PHP 5.3+ 27 | $filename = dirname(__FILE__).DIRECTORY_SEPARATOR.'class.'.strtolower($classname).'.php'; 28 | if (is_readable($filename)) { 29 | require $filename; 30 | } 31 | } 32 | 33 | if (version_compare(PHP_VERSION, '5.1.2', '>=')) { 34 | //SPL autoloading was introduced in PHP 5.1.2 35 | if (version_compare(PHP_VERSION, '5.3.0', '>=')) { 36 | spl_autoload_register('PHPMailerAutoload', true, true); 37 | } else { 38 | spl_autoload_register('PHPMailerAutoload'); 39 | } 40 | } else { 41 | /** 42 | * Fall back to traditional autoload for old PHP versions 43 | * @param string $classname The name of the class to load 44 | */ 45 | function __autoload($classname) 46 | { 47 | PHPMailerAutoload($classname); 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /PhpMailer/VERSION: -------------------------------------------------------------------------------- 1 | 5.2.28 -------------------------------------------------------------------------------- /PhpMailer/class.phpmaileroauthgoogle.php: -------------------------------------------------------------------------------- 1 | 8 | * @author Jim Jagielski (jimjag) 9 | * @author Andy Prevost (codeworxtech) 10 | * @author Brent R. Matzelle (original founder) 11 | * @copyright 2012 - 2014 Marcus Bointon 12 | * @copyright 2010 - 2012 Jim Jagielski 13 | * @copyright 2004 - 2009 Andy Prevost 14 | * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License 15 | * @note This program is distributed in the hope that it will be useful - WITHOUT 16 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 17 | * FITNESS FOR A PARTICULAR PURPOSE. 18 | */ 19 | 20 | /** 21 | * PHPMailerOAuthGoogle - Wrapper for League OAuth2 Google provider. 22 | * @package PHPMailer 23 | * @author @sherryl4george 24 | * @author Marcus Bointon (@Synchro) 25 | * @link https://github.com/thephpleague/oauth2-client 26 | */ 27 | class PHPMailerOAuthGoogle 28 | { 29 | private $oauthUserEmail = ''; 30 | private $oauthRefreshToken = ''; 31 | private $oauthClientId = ''; 32 | private $oauthClientSecret = ''; 33 | 34 | /** 35 | * @param string $UserEmail 36 | * @param string $ClientSecret 37 | * @param string $ClientId 38 | * @param string $RefreshToken 39 | */ 40 | public function __construct( 41 | $UserEmail, 42 | $ClientSecret, 43 | $ClientId, 44 | $RefreshToken 45 | ) { 46 | $this->oauthClientId = $ClientId; 47 | $this->oauthClientSecret = $ClientSecret; 48 | $this->oauthRefreshToken = $RefreshToken; 49 | $this->oauthUserEmail = $UserEmail; 50 | } 51 | 52 | private function getProvider() 53 | { 54 | return new League\OAuth2\Client\Provider\Google([ 55 | 'clientId' => $this->oauthClientId, 56 | 'clientSecret' => $this->oauthClientSecret 57 | ]); 58 | } 59 | 60 | private function getGrant() 61 | { 62 | return new \League\OAuth2\Client\Grant\RefreshToken(); 63 | } 64 | 65 | private function getToken() 66 | { 67 | $provider = $this->getProvider(); 68 | $grant = $this->getGrant(); 69 | return $provider->getAccessToken($grant, ['refresh_token' => $this->oauthRefreshToken]); 70 | } 71 | 72 | public function getOauth64() 73 | { 74 | $token = $this->getToken(); 75 | return base64_encode("user=" . $this->oauthUserEmail . "\001auth=Bearer " . $token . "\001\001"); 76 | } 77 | } 78 | -------------------------------------------------------------------------------- /PhpMailer/composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "phpmailer/phpmailer", 3 | "type": "library", 4 | "description": "PHPMailer is a full-featured email creation and transfer class for PHP", 5 | "authors": [ 6 | { 7 | "name": "Marcus Bointon", 8 | "email": "phpmailer@synchromedia.co.uk" 9 | }, 10 | { 11 | "name": "Jim Jagielski", 12 | "email": "jimjag@gmail.com" 13 | }, 14 | { 15 | "name": "Andy Prevost", 16 | "email": "codeworxtech@users.sourceforge.net" 17 | }, 18 | { 19 | "name": "Brent R. Matzelle" 20 | } 21 | ], 22 | "require": { 23 | "ext-ctype": "*", 24 | "php": ">=5.0.0" 25 | }, 26 | "require-dev": { 27 | "doctrine/annotations": "1.2.*", 28 | "jms/serializer": "0.16.*", 29 | "phpdocumentor/phpdocumentor": "2.*", 30 | "phpunit/phpunit": "4.8.*", 31 | "symfony/debug": "2.8.*", 32 | "symfony/filesystem": "2.8.*", 33 | "symfony/translation": "2.8.*", 34 | "symfony/yaml": "2.8.*", 35 | "zendframework/zend-cache": "2.5.1", 36 | "zendframework/zend-config": "2.5.1", 37 | "zendframework/zend-eventmanager": "2.5.1", 38 | "zendframework/zend-filter": "2.5.1", 39 | "zendframework/zend-i18n": "2.5.1", 40 | "zendframework/zend-json": "2.5.1", 41 | "zendframework/zend-math": "2.5.1", 42 | "zendframework/zend-serializer": "2.5.*", 43 | "zendframework/zend-servicemanager": "2.5.*", 44 | "zendframework/zend-stdlib": "2.5.1" 45 | }, 46 | "suggest": { 47 | "league/oauth2-google": "Needed for Google XOAUTH2 authentication" 48 | }, 49 | "autoload": { 50 | "classmap": [ 51 | "class.phpmailer.php", 52 | "class.phpmaileroauth.php", 53 | "class.phpmaileroauthgoogle.php", 54 | "class.smtp.php", 55 | "class.pop3.php", 56 | "extras/EasyPeasyICS.php", 57 | "extras/ntlm_sasl_client.php" 58 | ] 59 | }, 60 | "license": "LGPL-2.1" 61 | } 62 | -------------------------------------------------------------------------------- /PhpMailer/examples/DKIM.phps: -------------------------------------------------------------------------------- 1 | setFrom('from@example.com', 'First Last'); 16 | //Set an alternative reply-to address 17 | $mail->addReplyTo('replyto@example.com', 'First Last'); 18 | //Set who the message is to be sent to 19 | $mail->addAddress('whoto@example.com', 'John Doe'); 20 | //Set the subject line 21 | $mail->Subject = 'PHPMailer DKIM test'; 22 | //This should be the same as the domain of your From address 23 | $mail->DKIM_domain = 'example.com'; 24 | //Path to your private key file 25 | $mail->DKIM_private = 'dkim_private.pem'; 26 | //Set this to your own selector 27 | $mail->DKIM_selector = 'phpmailer'; 28 | //If your private key has a passphrase, set it here 29 | $mail->DKIM_passphrase = ''; 30 | //The identity you're signing as - usually your From address 31 | $mail->DKIM_identity = $mail->From; 32 | 33 | //send the message, check for errors 34 | if (!$mail->send()) { 35 | echo "Mailer Error: " . $mail->ErrorInfo; 36 | } else { 37 | echo "Message sent!"; 38 | } 39 | -------------------------------------------------------------------------------- /PhpMailer/examples/contactform.phps: -------------------------------------------------------------------------------- 1 | isSMTP(); 18 | $mail->Host = 'localhost'; 19 | $mail->Port = 25; 20 | 21 | //Use a fixed address in your own domain as the from address 22 | //**DO NOT** use the submitter's address here as it will be forgery 23 | //and will cause your messages to fail SPF checks 24 | $mail->setFrom('from@example.com', 'First Last'); 25 | //Send the message to yourself, or whoever should receive contact for submissions 26 | $mail->addAddress('whoto@example.com', 'John Doe'); 27 | //Put the submitter's address in a reply-to header 28 | //This will fail if the address provided is invalid, 29 | //in which case we should ignore the whole request 30 | if ($mail->addReplyTo($_POST['email'], $_POST['name'])) { 31 | $mail->Subject = 'PHPMailer contact form'; 32 | //Keep it simple - don't use HTML 33 | $mail->isHTML(false); 34 | //Build a simple message body 35 | $mail->Body = <<send()) { 42 | //The reason for failing to send will be in $mail->ErrorInfo 43 | //but you shouldn't display errors to users - process the error, log it on your server. 44 | $msg = 'Sorry, something went wrong. Please try again later.'; 45 | } else { 46 | $msg = 'Message sent! Thanks for contacting us.'; 47 | } 48 | } else { 49 | $msg = 'Invalid email address, message ignored.'; 50 | } 51 | } 52 | ?> 53 | 54 | 55 | 56 | 57 | Contact form 58 | 59 | 60 |

Contact us

61 | $msg"; 63 | } ?> 64 |
65 |
66 |
67 |
68 | 69 |
70 | 71 | 72 | -------------------------------------------------------------------------------- /PhpMailer/examples/contents.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AhmedIssa11/School-Management-System/2d295748d0b4959b338c6156501017a22186d034/PhpMailer/examples/contents.html -------------------------------------------------------------------------------- /PhpMailer/examples/contentsutf8.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PHPMailer Test 6 | 7 | 8 |
9 |

This is a test of PHPMailer.

10 |
11 | PHPMailer rocks 12 |
13 |

This example uses HTML.

14 |

Chinese text: 郵件內容為空

15 |

Russian text: Пустое тело сообщения

16 |

Armenian text: Հաղորդագրությունը դատարկ է

17 |

Czech text: Prázdné tělo zprávy

18 |

Emoji: 😂 🦄 💥 📤 📧

19 |
20 | 21 | 22 | -------------------------------------------------------------------------------- /PhpMailer/examples/exceptions.phps: -------------------------------------------------------------------------------- 1 | setFrom('from@example.com', 'First Last'); 14 | //Set an alternative reply-to address 15 | $mail->addReplyTo('replyto@example.com', 'First Last'); 16 | //Set who the message is to be sent to 17 | $mail->addAddress('whoto@example.com', 'John Doe'); 18 | //Set the subject line 19 | $mail->Subject = 'PHPMailer Exceptions test'; 20 | //Read an HTML message body from an external file, convert referenced images to embedded, 21 | //and convert the HTML into a basic plain-text alternative body 22 | $mail->msgHTML(file_get_contents('contents.html'), dirname(__FILE__)); 23 | //Replace the plain text body with one created manually 24 | $mail->AltBody = 'This is a plain-text message body'; 25 | //Attach an image file 26 | $mail->addAttachment('images/phpmailer_mini.png'); 27 | //send the message 28 | //Note that we don't need check the response from this because it will throw an exception if it has trouble 29 | $mail->send(); 30 | echo "Message sent!"; 31 | } catch (phpmailerException $e) { 32 | echo $e->errorMessage(); //Pretty error messages from PHPMailer 33 | } catch (Exception $e) { 34 | echo $e->getMessage(); //Boring error messages from anything else! 35 | } 36 | -------------------------------------------------------------------------------- /PhpMailer/examples/gmail.phps: -------------------------------------------------------------------------------- 1 | isSMTP(); 18 | 19 | //Enable SMTP debugging 20 | // 0 = off (for production use) 21 | // 1 = client messages 22 | // 2 = client and server messages 23 | $mail->SMTPDebug = 2; 24 | 25 | //Ask for HTML-friendly debug output 26 | $mail->Debugoutput = 'html'; 27 | 28 | //Set the hostname of the mail server 29 | $mail->Host = 'smtp.gmail.com'; 30 | // use 31 | // $mail->Host = gethostbyname('smtp.gmail.com'); 32 | // if your network does not support SMTP over IPv6 33 | 34 | //Set the SMTP port number - 587 for authenticated TLS, a.k.a. RFC4409 SMTP submission 35 | $mail->Port = 587; 36 | 37 | //Set the encryption system to use - ssl (deprecated) or tls 38 | $mail->SMTPSecure = 'tls'; 39 | 40 | //Whether to use SMTP authentication 41 | $mail->SMTPAuth = true; 42 | 43 | //Username to use for SMTP authentication - use full email address for gmail 44 | $mail->Username = "username@gmail.com"; 45 | 46 | //Password to use for SMTP authentication 47 | $mail->Password = "yourpassword"; 48 | 49 | //Set who the message is to be sent from 50 | $mail->setFrom('from@example.com', 'First Last'); 51 | 52 | //Set an alternative reply-to address 53 | $mail->addReplyTo('replyto@example.com', 'First Last'); 54 | 55 | //Set who the message is to be sent to 56 | $mail->addAddress('whoto@example.com', 'John Doe'); 57 | 58 | //Set the subject line 59 | $mail->Subject = 'PHPMailer GMail SMTP test'; 60 | 61 | //Read an HTML message body from an external file, convert referenced images to embedded, 62 | //convert HTML into a basic plain-text alternative body 63 | $mail->msgHTML(file_get_contents('contents.html'), dirname(__FILE__)); 64 | 65 | //Replace the plain text body with one created manually 66 | $mail->AltBody = 'This is a plain-text message body'; 67 | 68 | //Attach an image file 69 | $mail->addAttachment('images/phpmailer_mini.png'); 70 | 71 | //send the message, check for errors 72 | if (!$mail->send()) { 73 | echo "Mailer Error: " . $mail->ErrorInfo; 74 | } else { 75 | echo "Message sent!"; 76 | //Section 2: IMAP 77 | //Uncomment these to save your message in the 'Sent Mail' folder. 78 | #if (save_mail($mail)) { 79 | # echo "Message saved!"; 80 | #} 81 | } 82 | 83 | //Section 2: IMAP 84 | //IMAP commands requires the PHP IMAP Extension, found at: https://php.net/manual/en/imap.setup.php 85 | //Function to call which uses the PHP imap_*() functions to save messages: https://php.net/manual/en/book.imap.php 86 | //You can use imap_getmailboxes($imapStream, '/imap/ssl') to get a list of available folders or labels, this can 87 | //be useful if you are trying to get this working on a non-Gmail IMAP server. 88 | function save_mail($mail) { 89 | //You can change 'Sent Mail' to any other folder or tag 90 | $path = "{imap.gmail.com:993/imap/ssl}[Gmail]/Sent Mail"; 91 | 92 | //Tell your server to open an IMAP connection using the same username and password as you used for SMTP 93 | $imapStream = imap_open($path, $mail->Username, $mail->Password); 94 | 95 | $result = imap_append($imapStream, $path, $mail->getSentMIMEMessage()); 96 | imap_close($imapStream); 97 | 98 | return $result; 99 | } 100 | -------------------------------------------------------------------------------- /PhpMailer/examples/gmail_xoauth.phps: -------------------------------------------------------------------------------- 1 | isSMTP(); 21 | 22 | //Enable SMTP debugging 23 | // 0 = off (for production use) 24 | // 1 = client messages 25 | // 2 = client and server messages 26 | $mail->SMTPDebug = 0; 27 | 28 | //Ask for HTML-friendly debug output 29 | $mail->Debugoutput = 'html'; 30 | 31 | //Set the hostname of the mail server 32 | $mail->Host = 'smtp.gmail.com'; 33 | 34 | //Set the SMTP port number - 587 for authenticated TLS, a.k.a. RFC4409 SMTP submission 35 | $mail->Port = 587; 36 | 37 | //Set the encryption system to use - ssl (deprecated) or tls 38 | $mail->SMTPSecure = 'tls'; 39 | 40 | //Whether to use SMTP authentication 41 | $mail->SMTPAuth = true; 42 | 43 | //Set AuthType 44 | $mail->AuthType = 'XOAUTH2'; 45 | 46 | //User Email to use for SMTP authentication - user who gave consent to our app 47 | $mail->oauthUserEmail = "from@gmail.com"; 48 | 49 | //Obtained From Google Developer Console 50 | $mail->oauthClientId = "RANDOMCHARS-----duv1n2.apps.googleusercontent.com"; 51 | 52 | //Obtained From Google Developer Console 53 | $mail->oauthClientSecret = "RANDOMCHARS-----lGyjPcRtvP"; 54 | 55 | //Obtained By running get_oauth_token.php after setting up APP in Google Developer Console. 56 | //Set Redirect URI in Developer Console as [https/http]:////get_oauth_token.php 57 | // eg: http://localhost/phpmail/get_oauth_token.php 58 | $mail->oauthRefreshToken = "RANDOMCHARS-----DWxgOvPT003r-yFUV49TQYag7_Aod7y0"; 59 | 60 | //Set who the message is to be sent from 61 | //For gmail, this generally needs to be the same as the user you logged in as 62 | $mail->setFrom('from@example.com', 'First Last'); 63 | 64 | //Set who the message is to be sent to 65 | $mail->addAddress('whoto@example.com', 'John Doe'); 66 | 67 | //Set the subject line 68 | $mail->Subject = 'PHPMailer GMail SMTP test'; 69 | 70 | //Read an HTML message body from an external file, convert referenced images to embedded, 71 | //convert HTML into a basic plain-text alternative body 72 | $mail->msgHTML(file_get_contents('contents.html'), dirname(__FILE__)); 73 | 74 | //Replace the plain text body with one created manually 75 | $mail->AltBody = 'This is a plain-text message body'; 76 | 77 | //Attach an image file 78 | $mail->addAttachment('images/phpmailer_mini.png'); 79 | 80 | //send the message, check for errors 81 | if (!$mail->send()) { 82 | echo "Mailer Error: " . $mail->ErrorInfo; 83 | } else { 84 | echo "Message sent!"; 85 | } 86 | -------------------------------------------------------------------------------- /PhpMailer/examples/images/phpmailer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AhmedIssa11/School-Management-System/2d295748d0b4959b338c6156501017a22186d034/PhpMailer/examples/images/phpmailer.png -------------------------------------------------------------------------------- /PhpMailer/examples/images/phpmailer_mini.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AhmedIssa11/School-Management-System/2d295748d0b4959b338c6156501017a22186d034/PhpMailer/examples/images/phpmailer_mini.png -------------------------------------------------------------------------------- /PhpMailer/examples/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PHPMailer Examples 6 | 7 | 8 |

PHPMailer code examplesPHPMailer logo

9 |

This folder contains a collection of examples of using PHPMailer.

10 |

About testing email sending

11 |

When working on email sending code you'll find yourself worrying about what might happen if all these test emails got sent to your mailing list. The solution is to use a fake mail server, one that acts just like the real thing, but just doesn't actually send anything out. Some offer web interfaces, feedback, logging, the ability to return specific error codes, all things that are useful for testing error handling, authentication etc. Here's a selection of mail testing tools you might like to try:

12 |
    13 |
  • FakeSMTP, a Java desktop app with the ability to show an SMTP log and save messages to a folder.
  • 14 |
  • FakeEmail, a Python-based fake mail server with a web interface.
  • 15 |
  • smtp-sink, part of the Postfix mail server, so you probably already have this installed. This is used in the Travis-CI configuration to run PHPMailer's unit tests.
  • 16 |
  • smtp4dev, a dummy SMTP server for Windows.
  • 17 |
  • fakesendmail.sh, part of PHPMailer's test setup, this is a shell script that emulates sendmail for testing 'mail' or 'sendmail' methods in PHPMailer.
  • 18 |
  • msglint, not a mail server, the IETF's MIME structure analyser checks the formatting of your messages.
  • 19 |
20 |
21 |

Security note

22 |

Before running these examples you'll need to rename them with '.php' extensions. They are supplied as '.phps' files which will usually be displayed with syntax highlighting by PHP instead of running them. This prevents potential security issues with running potential spam-gateway code if you happen to deploy these code examples on a live site - please don't do that! Similarly, don't leave your passwords in these files as they will be visible to the world!

23 |
24 |

code_generator.phps

25 |

This script is a simple code generator - fill in the form and hit submit, and it will use when you entered to email you a message, and will also generate PHP code using your settings that you can copy and paste to use in your own apps. If you need to get going quickly, this is probably the best place to start.

26 |

mail.phps

27 |

This script is a basic example which creates an email message from an external HTML file, creates a plain text body, sets various addresses, adds an attachment and sends the message. It uses PHP's built-in mail() function which is the simplest to use, but relies on the presence of a local mail server, something which is not usually available on Windows. If you find yourself in that situation, either install a local mail server, or use a remote one and send using SMTP instead.

28 |

exceptions.phps

29 |

The same as the mail example, but shows how to use PHPMailer's optional exceptions for error handling.

30 |

smtp.phps

31 |

A simple example sending using SMTP with authentication.

32 |

smtp_no_auth.phps

33 |

A simple example sending using SMTP without authentication.

34 |

sendmail.phps

35 |

A simple example using sendmail. Sendmail is a program (usually found on Linux/BSD, OS X and other UNIX-alikes) that can be used to submit messages to a local mail server without a lengthy SMTP conversation. It's probably the fastest sending mechanism, but lacks some error reporting features. There are sendmail emulators for most popular mail servers including postfix, qmail, exim etc.

36 |

gmail.phps

37 |

Submitting email via Google's Gmail service is a popular use of PHPMailer. It's much the same as normal SMTP sending, just with some specific settings, namely using TLS encryption, authentication is enabled, and it connects to the SMTP submission port 587 on the smtp.gmail.com host. This example does all that.

38 |

pop_before_smtp.phps

39 |

Before effective SMTP authentication mechanisms were available, it was common for ISPs to use POP-before-SMTP authentication. As it implies, you authenticate using the POP3 protocol (an older protocol now mostly replaced by the far superior IMAP), and then the SMTP server will allow send access from your IP address for a short while, usually 5-15 minutes. PHPMailer includes a POP3 protocol client, so it can carry out this sequence - it's just like a normal SMTP conversation (without authentication), but connects via POP first.

40 |

mailing_list.phps

41 |

This is a somewhat naïve example of sending similar emails to a list of different addresses. It sets up a PHPMailer instance using SMTP, then connects to a MySQL database to retrieve a list of recipients. The code loops over this list, sending email to each person using their info and marks them as sent in the database. It makes use of SMTP keepalive which saves reconnecting and re-authenticating between each message.

42 |
43 |

smtp_check.phps

44 |

This is an example showing how to use the SMTP class by itself (without PHPMailer) to check an SMTP connection.

45 |
46 |

Most of these examples use the 'example.com' domain. This domain is reserved by IANA for illustrative purposes, as documented in RFC 2606. Don't use made-up domains like 'mydomain.com' or 'somedomain.com' in examples as someone, somewhere, probably owns them!

47 | 48 | 49 | -------------------------------------------------------------------------------- /PhpMailer/examples/mail.phps: -------------------------------------------------------------------------------- 1 | setFrom('from@example.com', 'First Last'); 12 | //Set an alternative reply-to address 13 | $mail->addReplyTo('replyto@example.com', 'First Last'); 14 | //Set who the message is to be sent to 15 | $mail->addAddress('whoto@example.com', 'John Doe'); 16 | //Set the subject line 17 | $mail->Subject = 'PHPMailer mail() test'; 18 | //Read an HTML message body from an external file, convert referenced images to embedded, 19 | //convert HTML into a basic plain-text alternative body 20 | $mail->msgHTML(file_get_contents('contents.html'), dirname(__FILE__)); 21 | //Replace the plain text body with one created manually 22 | $mail->AltBody = 'This is a plain-text message body'; 23 | //Attach an image file 24 | $mail->addAttachment('images/phpmailer_mini.png'); 25 | 26 | //send the message, check for errors 27 | if (!$mail->send()) { 28 | echo "Mailer Error: " . $mail->ErrorInfo; 29 | } else { 30 | echo "Message sent!"; 31 | } 32 | -------------------------------------------------------------------------------- /PhpMailer/examples/mailing_list.phps: -------------------------------------------------------------------------------- 1 | isSMTP(); 14 | $mail->Host = 'smtp.example.com'; 15 | $mail->SMTPAuth = true; 16 | $mail->SMTPKeepAlive = true; // SMTP connection will not close after each email sent, reduces SMTP overhead 17 | $mail->Port = 25; 18 | $mail->Username = 'yourname@example.com'; 19 | $mail->Password = 'yourpassword'; 20 | $mail->setFrom('list@example.com', 'List manager'); 21 | $mail->addReplyTo('list@example.com', 'List manager'); 22 | 23 | $mail->Subject = "PHPMailer Simple database mailing list test"; 24 | 25 | //Same body for all messages, so set this before the sending loop 26 | //If you generate a different body for each recipient (e.g. you're using a templating system), 27 | //set it inside the loop 28 | $mail->msgHTML($body); 29 | //msgHTML also sets AltBody, but if you want a custom one, set it afterwards 30 | $mail->AltBody = 'To view the message, please use an HTML compatible email viewer!'; 31 | 32 | //Connect to the database and select the recipients from your mailing list that have not yet been sent to 33 | //You'll need to alter this to match your database 34 | $mysql = mysqli_connect('localhost', 'username', 'password'); 35 | mysqli_select_db($mysql, 'mydb'); 36 | $result = mysqli_query($mysql, 'SELECT full_name, email, photo FROM mailinglist WHERE sent = false'); 37 | 38 | foreach ($result as $row) { //This iterator syntax only works in PHP 5.4+ 39 | $mail->addAddress($row['email'], $row['full_name']); 40 | if (!empty($row['photo'])) { 41 | $mail->addStringAttachment($row['photo'], 'YourPhoto.jpg'); //Assumes the image data is stored in the DB 42 | } 43 | 44 | if (!$mail->send()) { 45 | echo "Mailer Error (" . str_replace("@", "@", $row["email"]) . ') ' . $mail->ErrorInfo . '
'; 46 | break; //Abandon sending 47 | } else { 48 | echo "Message sent to :" . $row['full_name'] . ' (' . str_replace("@", "@", $row['email']) . ')
'; 49 | //Mark it as sent in the DB 50 | mysqli_query( 51 | $mysql, 52 | "UPDATE mailinglist SET sent = true WHERE email = '" . 53 | mysqli_real_escape_string($mysql, $row['email']) . "'" 54 | ); 55 | } 56 | // Clear all addresses and attachments for next loop 57 | $mail->clearAddresses(); 58 | $mail->clearAttachments(); 59 | } 60 | -------------------------------------------------------------------------------- /PhpMailer/examples/pop_before_smtp.phps: -------------------------------------------------------------------------------- 1 | isSMTP(); 18 | //Enable SMTP debugging 19 | // 0 = off (for production use) 20 | // 1 = client messages 21 | // 2 = client and server messages 22 | $mail->SMTPDebug = 2; 23 | //Ask for HTML-friendly debug output 24 | $mail->Debugoutput = 'html'; 25 | //Set the hostname of the mail server 26 | $mail->Host = "mail.example.com"; 27 | //Set the SMTP port number - likely to be 25, 465 or 587 28 | $mail->Port = 25; 29 | //Whether to use SMTP authentication 30 | $mail->SMTPAuth = false; 31 | //Set who the message is to be sent from 32 | $mail->setFrom('from@example.com', 'First Last'); 33 | //Set an alternative reply-to address 34 | $mail->addReplyTo('replyto@example.com', 'First Last'); 35 | //Set who the message is to be sent to 36 | $mail->addAddress('whoto@example.com', 'John Doe'); 37 | //Set the subject line 38 | $mail->Subject = 'PHPMailer POP-before-SMTP test'; 39 | //Read an HTML message body from an external file, convert referenced images to embedded, 40 | //and convert the HTML into a basic plain-text alternative body 41 | $mail->msgHTML(file_get_contents('contents.html'), dirname(__FILE__)); 42 | //Replace the plain text body with one created manually 43 | $mail->AltBody = 'This is a plain-text message body'; 44 | //Attach an image file 45 | $mail->addAttachment('images/phpmailer_mini.png'); 46 | //send the message 47 | //Note that we don't need check the response from this because it will throw an exception if it has trouble 48 | $mail->send(); 49 | echo "Message sent!"; 50 | } catch (phpmailerException $e) { 51 | echo $e->errorMessage(); //Pretty error messages from PHPMailer 52 | } catch (Exception $e) { 53 | echo $e->getMessage(); //Boring error messages from anything else! 54 | } 55 | -------------------------------------------------------------------------------- /PhpMailer/examples/scripts/shAutoloader.js: -------------------------------------------------------------------------------- 1 | (function() { 2 | 3 | var sh = SyntaxHighlighter; 4 | 5 | /** 6 | * Provides functionality to dynamically load only the brushes that a needed to render the current page. 7 | * 8 | * There are two syntaxes that autoload understands. For example: 9 | * 10 | * SyntaxHighlighter.autoloader( 11 | * [ 'applescript', 'Scripts/shBrushAppleScript.js' ], 12 | * [ 'actionscript3', 'as3', 'Scripts/shBrushAS3.js' ] 13 | * ); 14 | * 15 | * or a more easily comprehendable one: 16 | * 17 | * SyntaxHighlighter.autoloader( 18 | * 'applescript Scripts/shBrushAppleScript.js', 19 | * 'actionscript3 as3 Scripts/shBrushAS3.js' 20 | * ); 21 | */ 22 | sh.autoloader = function() 23 | { 24 | var list = arguments, 25 | elements = sh.findElements(), 26 | brushes = {}, 27 | scripts = {}, 28 | all = SyntaxHighlighter.all, 29 | allCalled = false, 30 | allParams = null, 31 | i 32 | ; 33 | 34 | SyntaxHighlighter.all = function(params) 35 | { 36 | allParams = params; 37 | allCalled = true; 38 | }; 39 | 40 | function addBrush(aliases, url) 41 | { 42 | for (var i = 0; i < aliases.length; i++) 43 | brushes[aliases[i]] = url; 44 | }; 45 | 46 | function getAliases(item) 47 | { 48 | return item.pop 49 | ? item 50 | : item.split(/\s+/) 51 | ; 52 | } 53 | 54 | // create table of aliases and script urls 55 | for (i = 0; i < list.length; i++) 56 | { 57 | var aliases = getAliases(list[i]), 58 | url = aliases.pop() 59 | ; 60 | 61 | addBrush(aliases, url); 62 | } 63 | 64 | // dynamically add 6 | 7 | 8 | -------------------------------------------------------------------------------- /app/views/inc/footerind.inc.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /app/views/inc/header.inc.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | <?php echo APPNAME; ?> 14 | 15 | 16 | 17 | 18 | 19 |
20 | -------------------------------------------------------------------------------- /app/views/inc/headerind.inc.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | <?php echo APPNAME; ?> 11 | 12 | 13 | 14 | 15 | 16 |
17 | -------------------------------------------------------------------------------- /app/views/inc/navbar.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /documentations/Software_Design_Document.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AhmedIssa11/School-Management-System/2d295748d0b4959b338c6156501017a22186d034/documentations/Software_Design_Document.docx -------------------------------------------------------------------------------- /documentations/Software_Requirements_Specification.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AhmedIssa11/School-Management-System/2d295748d0b4959b338c6156501017a22186d034/documentations/Software_Requirements_Specification.docx -------------------------------------------------------------------------------- /overview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AhmedIssa11/School-Management-System/2d295748d0b4959b338c6156501017a22186d034/overview.png -------------------------------------------------------------------------------- /public/css/style.css: -------------------------------------------------------------------------------- 1 | @import url(https://fonts.googleapis.com/css?family=Numans); 2 | 3 | table { 4 | font-size:large!important; 5 | border:1px solid #000!important; 6 | margin:0 auto!important; 7 | } 8 | 9 | h1 { 10 | text-align:center!important; 11 | color:#060!important; 12 | font-size:xx-large!important; 13 | font-family:'Gill Sans', 'Gill Sans MT', ' Calibri', 'Trebuchet MS', sans-serif!important; 14 | } 15 | 16 | td { 17 | background-color:#E4F5D4!important; 18 | border:1px solid #000!important; 19 | font-weight:lighter!important; 20 | } 21 | 22 | th,td { 23 | font-weight:700!important; 24 | border:1px solid #000!important; 25 | text-align:center!important; 26 | padding:10px!important; 27 | } 28 | 29 | .form-gap { 30 | padding-top:70px; 31 | } 32 | 33 | .container { 34 | height:100%; 35 | align-content:center; 36 | } 37 | 38 | .card { 39 | height:370px; 40 | margin-top:auto; 41 | margin-bottom:auto; 42 | width:400px; 43 | background-color:rgba(0,0,0,0.5)!important; 44 | } 45 | 46 | .social_icon span { 47 | font-size:60px; 48 | margin-left:10px; 49 | color:#FFC312; 50 | } 51 | 52 | .social_icon span:hover { 53 | color:#FFF; 54 | cursor:pointer; 55 | } 56 | 57 | .social_icon { 58 | position:absolute; 59 | right:20px; 60 | top:-45px; 61 | } 62 | 63 | .input-group-prepend span { 64 | width:50px; 65 | background-color:#FFC312; 66 | color:#000; 67 | border:0!important; 68 | } 69 | 70 | input:focus { 71 | outline:0 0 0 0!important; 72 | box-shadow:0 0 0 0!important; 73 | } 74 | 75 | .remember input { 76 | width:20px; 77 | height:20px; 78 | margin-left:15px; 79 | margin-right:5px; 80 | } 81 | 82 | .login_btn { 83 | color:#000; 84 | background-color:#FFC312; 85 | width:100px; 86 | } 87 | 88 | .login_btn:hover { 89 | color:#000; 90 | background-color:#FFF; 91 | } 92 | 93 | .links a { 94 | margin-left:4px; 95 | } 96 | 97 | .tab { 98 | overflow:hidden; 99 | border:1px solid #ccc; 100 | background-color:#f1f1f1; 101 | } 102 | 103 | .tab button { 104 | background-color:inherit; 105 | float:left; 106 | border:none; 107 | outline:none; 108 | cursor:pointer; 109 | transition:.3s; 110 | font-size:17px; 111 | padding:14px 16px; 112 | } 113 | 114 | .tab button:hover { 115 | background-color:#ddd; 116 | } 117 | 118 | .tab button.active { 119 | background-color:#ccc; 120 | } 121 | 122 | .tabcontent { 123 | display:none; 124 | border:1px solid #ccc; 125 | border-top:none; 126 | padding:6px 12px; 127 | } 128 | 129 | .card-header h3,.remember,.links { 130 | color:#FFF; 131 | } -------------------------------------------------------------------------------- /public/index.php: -------------------------------------------------------------------------------- 1 | getUserID(); 25 | 26 | // echo $student->countStudent(); 27 | 28 | // $x = $student->showStudentDetails(); 29 | // foreach ($x as $user){ 30 | // echo $user['studentId'] . $user['studentName'] . $user['studentEmail'] . '
'; 31 | // } 32 | 33 | // $x = $student->showStudentCourses(2); 34 | // foreach ($x as $user){ 35 | // echo $user['stdid'] . $user['courseName'] . $user['courseCode'] . '
'; 36 | // } 37 | 38 | // $x = $student->showStudentShud(1); 39 | // foreach ($x as $user){ 40 | // echo $user['day'] . $user['Time Slot'] . $user['roomID'] . $user['courseID'] . $user['groupType'] . $user['groupNo'] .'
'; 41 | // } 42 | 43 | // echo $admission->studentLv; 44 | 45 | // $std = new Student(); 46 | // $adm = new Admission($std); 47 | // $adm = new Admin(); 48 | 49 | // $adm->AddTeacher(2000,'ayman ezat'); 50 | 51 | // echo "Hello Wolrd!"; 52 | // $db = new Database(); 53 | // echo "
"; echo print_r($obj); echo "
"; 54 | // echo var_dump(phpinfo()); 55 | ?> -------------------------------------------------------------------------------- /public/text: -------------------------------------------------------------------------------- 1 | 2 | --------------------------------------------------------------------------------