Skip to content
This repository has been archived by the owner on May 9, 2020. It is now read-only.
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: Tecdiary/ppp
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 1.0.1
Choose a base ref
...
head repository: Tecdiary/ppp
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref

Commits on Aug 4, 2017

  1. Create LICENSE

    MianSaleem authored Aug 4, 2017
    Copy the full SHA
    64c6d47 View commit details
  2. Copy the full SHA
    6829813 View commit details
  3. Create CONTRIBUTING.md

    MianSaleem authored Aug 4, 2017
    Copy the full SHA
    b399075 View commit details
  4. Copy the full SHA
    89e0d3b View commit details
  5. Updating namespace

    MianSaleem committed Aug 4, 2017
    Copy the full SHA
    1f6442b View commit details
  6. Updating app

    MianSaleem committed Aug 4, 2017
    Copy the full SHA
    c5bb451 View commit details

Commits on Aug 7, 2017

  1. Copy the full SHA
    2fcf3df View commit details

Commits on Aug 8, 2017

  1. Update Readme

    MianSaleem committed Aug 8, 2017
    Copy the full SHA
    ba1e59c View commit details
  2. Update Readme

    MianSaleem committed Aug 8, 2017
    Copy the full SHA
    3538014 View commit details
  3. Update Readme

    MianSaleem committed Aug 8, 2017
    Copy the full SHA
    9ba35e4 View commit details
  4. Update Readme

    MianSaleem committed Aug 8, 2017
    Copy the full SHA
    5e835af View commit details
  5. Update Readme

    MianSaleem committed Aug 8, 2017
    Copy the full SHA
    412977c View commit details

Commits on Aug 10, 2017

  1. Update Readme

    MianSaleem committed Aug 10, 2017
    Copy the full SHA
    d4914d4 View commit details

Commits on Aug 25, 2017

  1. Adding print image option

    MianSaleem committed Aug 25, 2017
    Copy the full SHA
    896e235 View commit details

Commits on Feb 2, 2018

  1. Delete LICENSE

    MianSaleem authored Feb 2, 2018
    Copy the full SHA
    eaa2ef9 View commit details
  2. Create LICENSE

    MianSaleem authored Feb 2, 2018
    Copy the full SHA
    9df9155 View commit details

Commits on Apr 26, 2018

  1. Update README.md

    MianSaleem authored Apr 26, 2018
    Copy the full SHA
    18e9e80 View commit details

Commits on Aug 23, 2018

  1. Update database path

    MianSaleem committed Aug 23, 2018
    Copy the full SHA
    64fda86 View commit details
  2. Copy the full SHA
    7d7f8fa View commit details
  3. Fix error

    MianSaleem committed Aug 23, 2018
    Copy the full SHA
    1f98db7 View commit details

Commits on Jan 24, 2019

  1. Add img folder

    MianSaleem committed Jan 24, 2019
    Copy the full SHA
    73af4b2 View commit details

Commits on Jan 25, 2019

  1. Copy the full SHA
    5ef0134 View commit details
Showing with 697 additions and 346 deletions.
  1. +2 −1 .gitignore
  2. +46 −0 CODE_OF_CONDUCT.md
  3. +16 −0 CONTRIBUTING.md
  4. +21 −0 LICENSE
  5. +18 −4 README.md
  6. +7 −2 app/add_printer.php
  7. +1 −1 app/css/style.css
  8. +7 −2 app/index.php
  9. +8 −6 app/js/script.js
  10. +7 −2 app/printers.php
  11. +2 −2 composer.json
  12. +65 −54 composer.lock
  13. +19 −9 database/data.json
  14. 0 img/index.html
  15. +3 −165 index.php
  16. +229 −97 lib/Escpos.php
  17. +245 −0 server.php
  18. +1 −1 server.sh
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -3,7 +3,8 @@
# =========================

/vendor

img/*.png
logos/
.phpintel
.tags
.tags1
46 changes: 46 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# Contributor Covenant Code of Conduct

## Our Pledge

In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.

## Our Standards

Examples of behavior that contributes to creating a positive environment include:

* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

* The use of sexualized language or imagery and unwelcome sexual attention or advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a professional setting

## Our Responsibilities

Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.

Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.

## Scope

This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at support@tecdiary.com. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.

Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version]

[homepage]: http://contributor-covenant.org
[version]: http://contributor-covenant.org/version/1/4/
16 changes: 16 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Contributing

When contributing to this repository, please first discuss the change you wish to make via issue of this repository before making a change.

Please note we have a code of conduct, please follow it in all your interactions with the project.

## Pull Request Process

1. Ensure any install or build dependencies are removed before the end of the layer when doing a
build.
2. Update the README.md or Wiki with details of changes to the interface, this includes new environment
variables, exposed ports, useful file locations and container parameters.
3. Increase the version numbers in any examples files and the README.md to the new version that this
Pull Request would represent. The versioning scheme we use is [SemVer](http://semver.org/).
4. You may merge the Pull Request in once you have the sign-off of two other developers, or if you
do not have permission to do that, you may request the second reviewer to merge it for you.
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2018 Tecdiary IT Solutions

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
22 changes: 18 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -24,15 +24,29 @@ cd ppp
composer install

# Start server from command line
php index.php
php server.php

# Start app for settings
php -S localhost:8000 -t app/
```

Next time you can simply run `php index.php` in command line OR `server.sh` file to start the server.
Next time you can simply run `php server.php` in command line OR `server.sh` file to start the server.

This app runs at port 6441 ( ws://lcoalhost:6441 ) and listen for the print jobs.
This app runs at port 6441 ( ws://localhost:6441 ) and listen for the print jobs.

***
# Get Windows Installer

**Users having difficulty installing the ppp, can purchase standalone windows installer from link below**

**[PHP POS Print Server (Windows Installer)](http://tecdiary.com/products/php-pos-print-server-windows-installer) http://tecdiary.com/products/php-pos-print-server-windows-installer**

**Get 10% discount with offer code `ppp` (for limited time only).**

It comes with logs feature. The server logs can be viewed or downloaded.

The license is not transfer-able, so please don't install it on test server.
***

### Local printers
Server will try to use the local printers if no printer has been provided.
@@ -43,7 +57,7 @@ You can access local app from your local web server url or just run `php -S loca
- Printers page `printers.php` to list all your printers
- Add Printer page `add_printer.php` to add new printer

The local settings will be saved in `dataabse/data.json` file.
The local settings will be saved in `database/data.json` file.

**Screenshots**

9 changes: 7 additions & 2 deletions app/add_printer.php
Original file line number Diff line number Diff line change
@@ -65,6 +65,11 @@
</a>
</div>
<div class="nav-right">
<?php if (file_exists('./logs.php')) { ?>
<a href="logs.php" class="nav-item">
Logs
</a>
<?php } ?>
<a href="printers.php" class="nav-item">
Printers
</a>
@@ -245,9 +250,9 @@
<footer class="footer">
<div class="container">
<p>
<a class="icon is-pulled-right" href="http://tecdiary.com">
<span class="icon is-pulled-right">
<img src="images/icon.png" alt="">
</a>
</span>
&copy; <?= date('Y'); ?> @ tecdiary.com
</p>
</div>
2 changes: 1 addition & 1 deletion app/css/style.css
Original file line number Diff line number Diff line change
@@ -45,7 +45,7 @@ html, body {
margin-top: -44px;
}

.footer, .footer p, .footer a {
.footer, .footer p, .footer .icon {
height: 44px;
line-height: 44px;
padding: 0;
9 changes: 7 additions & 2 deletions app/index.php
Original file line number Diff line number Diff line change
@@ -44,6 +44,11 @@
</a>
</div>
<div class="nav-right">
<?php if (file_exists('./logs.php')) { ?>
<a href="logs.php" class="nav-item">
Logs
</a>
<?php } ?>
<a href="printers.php" class="nav-item">
Printers
</a>
@@ -159,9 +164,9 @@
<footer class="footer">
<div class="container">
<p>
<a class="icon is-pulled-right" href="http://tecdiary.com">
<span class="icon is-pulled-right">
<img src="images/icon.png" alt="">
</a>
</span>
&copy; <?= date('Y'); ?> @ tecdiary.com
</p>
</div>
14 changes: 8 additions & 6 deletions app/js/script.js
Original file line number Diff line number Diff line change
@@ -52,12 +52,14 @@ checkStatus = function() {

document.addEventListener('DOMContentLoaded', function() {

if (testp = document.querySelector('.test-print')) {
testp.addEventListener('click', function(e) {
e.preventDefault();
var print_id = this.getAttribute('data-printer-id');
printTest(print_id);
});
if (testp = document.querySelectorAll('.test-print')) {
for (var i = 0; i < testp.length; i++) {
testp[i].addEventListener('click', function (e) {
e.preventDefault();
var print_id = this.getAttribute('data-printer-id');
printTest(print_id);
});
}
}

if (type_ele = document.getElementById("type")) {
9 changes: 7 additions & 2 deletions app/printers.php
Original file line number Diff line number Diff line change
@@ -38,6 +38,11 @@
</a>
</div>
<div class="nav-right">
<?php if (file_exists('./logs.php')) { ?>
<a href="logs.php" class="nav-item">
Logs
</a>
<?php } ?>
<a href="printers.php" class="nav-item is-active">
Printers
</a>
@@ -122,9 +127,9 @@
<footer class="footer">
<div class="container">
<p>
<a class="icon is-pulled-right" href="http://tecdiary.com">
<span class="icon is-pulled-right">
<img src="images/icon.png" alt="">
</a>
</span>
&copy; <?= date('Y'); ?> @ tecdiary.com
</p>
</div>
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
@@ -4,7 +4,7 @@
"require": {
"hoa/websocket": "3.16.10.24",
"mike42/escpos-php": "^1.4",
"php": ">=5.3.3"
"php": ">=5.4.0"
},
"homepage": "https://github.com/Tecdiary/ppp",
"license": "MIT",
@@ -16,6 +16,6 @@
}
],
"autoload": {
"psr-4": {"Acme\\Esc\\": "lib/"}
"psr-4": {"Tec\\Ppp\\": "lib/"}
}
}
Loading