Skip to content
This repository was archived by the owner on Jul 10, 2020. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
509a963
Updated Documentation and comments in code
itcyborg May 27, 2018
0d11987
Update issue templates
itcyborg May 27, 2018
16ae449
Updated Documentation and comments in code
itcyborg Jun 4, 2018
e0a24cf
included theme
itcyborg Jun 5, 2018
b143c14
included theme
itcyborg Jun 5, 2018
40c7489
updates
itcyborg Jun 12, 2018
19180d0
started working on logic pages and controllers
itcyborg Jun 12, 2018
f256442
update
Rachaelkathini Jun 13, 2018
d1cc96f
Merge branch 'dev' of https://github.com/itcyborg/core into dev
Rachaelkathini Jun 13, 2018
278e18b
Merge remote-tracking branch 'origin/dev' into dev
itcyborg Jun 12, 2018
05df59c
Commit before trying latte
itcyborg Jul 6, 2018
1073c93
Added a new templating engine, latte .
itcyborg Jul 6, 2018
0a90b51
Updates
itcyborg Jul 10, 2018
e8117a2
Updated Documentation and comments in code
itcyborg Aug 30, 2018
bd5b237
commit
Rachaelkathini Aug 30, 2018
af70138
Merge branch 'dev' of https://github.com/itcyborg/core into dev
Rachaelkathini Aug 30, 2018
544ae66
stable update
itcyborg Aug 30, 2018
0e6b9ee
commit
Rachaelkathini Aug 30, 2018
5fc4354
stable update
itcyborg Aug 31, 2018
7defaa8
commit
Rachaelkathini Aug 31, 2018
3be9223
Merge remote-tracking branch 'origin/dev' into dev
itcyborg Aug 31, 2018
f57f369
commit
Rachaelkathini Aug 31, 2018
a106dc5
Merge remote-tracking branch 'origin/dev' into dev
itcyborg Aug 31, 2018
0aee354
More updates
itcyborg Sep 3, 2018
aded455
Added a way to create users throught the User class. User::create()
itcyborg Sep 5, 2018
de3ef3a
Most of the logic is working
itcyborg Sep 7, 2018
2725f4c
commit
Rachaelkathini Sep 11, 2018
3eeab1f
Merge remote-tracking branch 'origin/dev' into dev
Rachaelkathini Sep 11, 2018
83f43e4
Bump phpmailer/phpmailer from 6.0.5 to 6.0.6
dependabot[bot] May 6, 2020
ba3e13e
Merge pull request #9 from itcyborg/dependabot/composer/phpmailer/php…
itcyborg May 6, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
35 changes: 35 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
name: Bug report
about: Create a report to help us improve

---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Desktop (please complete the following information):**
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]

**Smartphone (please complete the following information):**
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]

**Additional context**
Add any other context about the problem here.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,12 @@

Storage/

Config/

vendor/

*.bat

test\.php

git
git
63 changes: 42 additions & 21 deletions App/Controllers/AboutController.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

use Core\Database\DB\DB;
use Core\Exceptions\ExceptionsHandler;
use Core\Notifications\Notifications;
use Core\Requests\Request;
use Core\Storage\Storage;
use PHPMailer\PHPMailer\PHPMailer;

/**
* Created by PhpStorm.
Expand All @@ -21,26 +21,47 @@ public function __construct()

public function hello()
{
dd(DB::add('users', ['name', 'email', 'password'], ['lkld', 'fsddf', 'asdaad']));
preg_match('/\(.*\)/', php_uname(), $match);
dd($match);
// $job=new Job();
// $job->delete('test');
// $res=$job->create('test',1,\Core\App\Bootstrap\App::getDocumentRoot().'/imap.bat');
// dd($res);
Notifications::add(1, 'well done');
Notifications::getNotifications('1');
dd(session_id());
// $config=new Config;
// dd($config->database());
// dd(Config::database());
// dd(DB::all('users'));
// try {
// dd((new Core\Auth\PasswordService)->hasInteger('sdas'));
// } catch (Exception $e) {
// dd($e);
// }
// view('test.html', ['id' => 1,'name'=>'isaac']);
dd(\Core\Database\Migration\Migration::load());
dd(PHPMailer::$validator);
dd(DB::all('users'));
}

function send(){//get the required
$mail=new PHPMailer();
try {
//Server settings
$mail->SMTPDebug = 2; // Enable verbose debug output
$mail->isSMTP(); // Set mailer to use SMTP
$mail->Host = 'smtp1.example.com;smtp2.example.com'; // Specify main and backup SMTP servers
$mail->SMTPAuth = true; // Enable SMTP authentication
$mail->Username = 'user@example.com'; // SMTP username
$mail->Password = 'secret'; // SMTP password
$mail->SMTPSecure = 'tls'; // Enable TLS encryption, `ssl` also accepted
$mail->Port = 587; // TCP port to connect to

//Recipients
$mail->setFrom('from@example.com', 'Mailer');
$mail->addAddress('joe@example.net', 'Joe User'); // Add a recipient
$mail->addAddress('ellen@example.com'); // Name is optional
$mail->addReplyTo('info@example.com', 'Information');
$mail->addCC('cc@example.com');
$mail->addBCC('bcc@example.com');

//Attachments
$mail->addAttachment('/var/tmp/file.tar.gz'); // Add attachments
$mail->addAttachment('/tmp/image.jpg', 'new.jpg'); // Optional name

//Content
$mail->isHTML(true); // Set email format to HTML
$mail->Subject = 'Here is the subject';
$mail->Body = 'This is the HTML message body <b>in bold!</b>';
$mail->AltBody = 'This is the body in plain text for non-HTML mail clients';

$mail->send();
echo 'Message has been sent';
} catch (Exception $e) {
echo 'Message could not be sent. Mailer Error: ', $mail->ErrorInfo;
}
}

public function index()
Expand Down
21 changes: 21 additions & 0 deletions App/Controllers/AuthController.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?php

use Core\Requests\Request;

class AuthController{
public function index()
{

}

public function verify()
{

}

public function reset()
{
$request=new Request();
dd($request->email);
}
}
32 changes: 32 additions & 0 deletions App/Controllers/LoginController.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<?php

use Core\Requests\Request;
use Core\Requests\SanitizeRequest;
use Core\URL\URL;

class LoginController{
public function index()
{
view('auth/login.php');
}

public function login()
{
$request=new Request();
$email=SanitizeRequest::email($request->email);
$password=SanitizeRequest::text($request->password);
$remember=$request->remember;
try {
if (\Core\Auth\Auth::validate($email, $password)) {
$url = URL::getURI('/');
header("location:$url");
} else {
$url = URL::getURI('/');
header("location$url");
}
}catch (\Core\Exceptions\ExceptionsHandler $e){
$url = URL::getURI('/');
header("location:$url");
}
}
}
12 changes: 12 additions & 0 deletions App/Controllers/RegisterController.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?php
class RegisterController{
public function index()
{

}

public function register()
{

}
}
139 changes: 139 additions & 0 deletions App/Controllers/caseController.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,139 @@
<?php

use Core\Auth\Auth;
use Core\Database\DB\DB;
use Core\Exceptions\ExceptionsHandler;
use Core\Requests\Request;
use Core\Requests\SanitizeRequest;

class caseController{
private $auth;
public function __construct()
{
$this->auth=new Auth();
// $this->auth->isLoggedIn();
}

public function index()
{
//use this to display stats in the dashboard
view('cases/index.php');
}

public function new()
{
//create new issue view
$customers=DB::all('customer');
view('cases/addCase.php',['customers'=>$customers]);
}

public function list()
{
$cases=DB::all('cases');
view('cases/listCases.php',['cases'=>$cases]);
}

public function edit($id)
{
//view to edit issue
try {
$request=new Request();
$id = SanitizeRequest::text($id);
$issue=SanitizeRequest::text($request->issue);
$status=SanitizeRequest::text(0);
if($case=DB::find('cases',$id)){

}else{
dd('No records found');
}
view('cases/edit.php');
} catch (ExceptionsHandler $e) {
}
}

public function reports()
{
//view reports
dd(DB::all('cases'));
view('cases/reports.php');
}

public function delete()
{
//delete record
$request=new Request();
$id=$request->caseID;
dd(DB::delete('cases','id',$id));
}

public function add()
{
//save a case
$request=new Request();
try {
$customerID = SanitizeRequest::text($request->customer);
$issue = SanitizeRequest::text($request->issue);
if(DB::add(
'cases',
[
'customerId',
'issue',
'status'
],
[
$customerID,
$issue,
0
]
)){
$customers=DB::all('customer');
return view('cases/addCase.php',['customers'=>$customers,'status'=>200,'msg'=>'Successfully inserted record']);
}
}catch (\Throwable $e){
dd($e->getMessage());
}
}

public function update()
{
//publish updated record
try {
$request=new Request();
$id = SanitizeRequest::text($request->id);
$issue=SanitizeRequest::text($request->issue);
$status=SanitizeRequest::text(0);
if($case=DB::find('cases',$id)){

}else{
dd('No records found');
}
view('cases/edit.php');
} catch (ExceptionsHandler $e) {
}
}

public function solve()
{
try {
$request = new Request();
$caseID = SanitizeRequest::text($request->issueId);
$status=SanitizeRequest::text($request->status);
DB::update(
'cases',
[
'status',
'solved_by'
],
[
$status,
$this->auth->id()
],
'id',
$caseID
);
return true;
}catch (ExceptionsHandler $e){
dd($e->getMessage());
}
}
}
Loading