Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
322 changed files
with
76,746 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
php_flag display_errors Off |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<?php | ||
/** | ||
* @author Alexander Rein <a.rein@be-clever-ag.de>, beclever werbeagentur AG <support@be-clever-ag.de> | ||
* @copyright (c) 2016, Alexander Rein | ||
*/ | ||
require_once('./config/mainconf.php'); | ||
require_once("./process/script_access.php"); | ||
require_once('./process/user_auth.php'); | ||
require_once($PATH_classes . "/class.KeyHandler.php"); | ||
require_once($PATH_classes . "/Smarty/libs/Smarty.class.php"); | ||
require_once($PATH_classes . "/class.Customize.php"); | ||
require_once($PATH_l10n . "/locallang.php"); | ||
|
||
$msg_error = isset($_SESSION['ERROR']) ? $_SESSION['ERROR'] : ""; | ||
$msg_success = isset($_SESSION['SUCCESS']) ? $_SESSION['SUCCESS'] : ""; | ||
unset($_SESSION['ERROR'], $_SESSION['SUCCESS']); | ||
|
||
$Customize = new Customize(); | ||
$productname = $Customize->get_settings('product_name'); | ||
|
||
$smarty = new Smarty; | ||
$smarty->assign("msg_error", $msg_error); | ||
$smarty->assign("msg_success", $msg_success); | ||
$smarty->assign("LOCAL", $LOCAL); | ||
$smarty->assign("product_name", $productname); | ||
if (!empty($_SESSION)) | ||
$smarty->assign("product_name", $_SESSION); | ||
if (!empty($_COOKIE)) | ||
$smarty->assign("COOKIE", $_COOKIE); | ||
$smarty->display('layout/template/account.tpl'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
<?php | ||
/** | ||
* @author Alexander Rein <a.rein@be-clever-ag.de>, beclever werbeagentur AG <support@be-clever-ag.de> | ||
* @copyright (c) 2016, Alexander Rein | ||
*/ | ||
require_once('./../../config/mainconf.php'); | ||
require_once($PATH_classes . "/class.Customize.php"); | ||
|
||
$Customize = new Customize(); | ||
$settings = $Customize->get_settings(); | ||
$values = array(); | ||
foreach ($settings as $set) { | ||
$values[$set['title']] = $set['value']; | ||
} | ||
$logo = empty($values["logo"]) ? "" : $values["logo"]; | ||
$product_name = empty($values["product_name"]) ? "" : $values["product_name"]; | ||
$pimary_color = empty($values["pimary_color"]) ? "" : $values["pimary_color"]; | ||
$secondary_color = empty($values["secondary_color"]) ? "" : $values["secondary_color"]; | ||
?> | ||
<!-- Subscription Type --> | ||
|
||
<div id="type"> | ||
<form method="post" action="process/customisation.php" class="ajax"> | ||
<input type="hidden" name="action" value="save" /> | ||
<table class="list ui-widget ui-widget-content"> | ||
<tr> | ||
<th>Product name</th> | ||
<td> | ||
<input placeholder="Product name" class="text" type="text" maxlength="255" name="product_name" value="<?= $product_name ?>" /> | ||
</td> | ||
<td> | ||
</td> | ||
</tr> | ||
<tr> | ||
<th>Logo</th> | ||
<td> | ||
<input class="text" type="file" maxlength="5" name="logo" /> | ||
</td> | ||
<td> | ||
<?= $logo ?> | ||
</td> | ||
</tr> | ||
<tr> | ||
<th>Primary color</th> | ||
<td> | ||
<input placeholder="Primary color" class="text" type="text" maxlength="255" name="pimary_color" value="<?= $pimary_color ?>" /> | ||
</td> | ||
<td style="background-color: <?= $pimary_color ?>"> | ||
</td> | ||
</tr> | ||
<tr> | ||
<th>Secondary color</th> | ||
<td> | ||
<input placeholder="Secondary color" class="text" type="text" maxlength="255" name="secondary_color" value="<?= $secondary_color ?>" /> | ||
</td> | ||
<td style="background-color: <?= $secondary_color ?>"> | ||
</td> | ||
</tr> | ||
<tr> | ||
<th></th> | ||
<td colspan="2"> | ||
<button class="button_save" type="submit" value="">Save</button> | ||
</td> | ||
</tr> | ||
</table> | ||
|
||
</form> | ||
</div> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,101 @@ | ||
<?php | ||
/** | ||
* @author Alexander Rein <a.rein@be-clever-ag.de>, beclever werbeagentur AG <support@be-clever-ag.de> | ||
* @copyright (c) 2016, Alexander Rein | ||
*/ | ||
require_once('./../../config/mainconf.php'); | ||
require_once($PATH_classes . "/class.KeyHandler.php"); | ||
|
||
$keyHandler = new KeyHandler(); | ||
$types = $keyHandler->get_type(); | ||
$keySum = $keyHandler->get_key_summary(); | ||
?> | ||
|
||
<!-- Subscription Key --> | ||
|
||
<div id="key"> | ||
<form method="post" action="process/key.php" class="ajax keyForm"> | ||
<input type="hidden" name="action" value="add" /> | ||
<select name="type" class="select small"> | ||
<option value="0">++ Type ++</option> | ||
<? foreach ($types as $type) { ?> | ||
<option value="<?= $type["tID"] ?>"><?= $type["short"] ?></option> | ||
<? } ?> | ||
</select> | ||
<div class="slider-container"> | ||
<label for="duration">Duration (months):</label> | ||
<input type="text" id="duration" name="duration" readonly style="border:0; font-weight:bold;"> | ||
<div id="slider-duration"></div> | ||
</div> | ||
<input placeholder="Platform" class="text" type="text" name="platform" value="" /> | ||
<select name="contract" class="select wide"> | ||
<option value="">++ Contract Type ++</option> | ||
<option value="AGB1">AGB1</option> | ||
<option value="EVBIT-UebA">EVBIT-UebA</option> | ||
</select> | ||
<hr class="vert"/> | ||
<select name="number" class="select small"> | ||
<option value="0">++ Number ++</option> | ||
<option value="1">1</option> | ||
<option value="5">5</option> | ||
<option value="10">10</option> | ||
<option value="50">50</option> | ||
<option value="100">100</option> | ||
<option value="500">500</option> | ||
<option value="1000">1,000</option> | ||
<option value="5000">5,000</option> | ||
</select> | ||
<button class="button_add" type="submit">Generate</button> | ||
</form> | ||
<? if (!empty($keySum)) { ?> | ||
<h3>Summary</h3> | ||
<table class="list ui-widget ui-widget-content"> | ||
<thead> | ||
<tr class="ui-widget-header"> | ||
<th>Type</th> | ||
<th>Platform</th> | ||
<th>Contract</th> | ||
<th>Total</th> | ||
<th>Used</th> | ||
<th> | ||
<form method="post" action="process/key.php" target="_blank"> | ||
<input type="hidden" name="action" value="csv" /> | ||
<button class="button_download" type="submit">Download CSV</button> | ||
</form> | ||
</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
<? | ||
foreach ($keySum as $keyS) { | ||
$type = $keyHandler->get_type($keyS["tID"]); | ||
?> | ||
<tr> | ||
<td><?= $type["short"] ?><?= $keyS["duration"] ?></td> | ||
<td><?= $keyS["platform"] ?></td> | ||
<td><?= $keyS["contract"] ?></td> | ||
<td><?= $keyS["total"] ?></td> | ||
<td><?= $keyS["used"] ?></td> | ||
<td> | ||
<form method="post" action="process/key.php" class="ajax keyForm"> | ||
<input type="hidden" name="action" value="export" /> | ||
<input type="hidden" name="tID" value="<?= $keyS["tID"] ?>" /> | ||
<input type="hidden" name="duration" value="<?= $keyS["duration"] ?>" /> | ||
<input type="hidden" name="platform" value="<?= $keyS["platform"] ?>" /> | ||
<select name="export" class="submit wide"> | ||
<option value="0">++ Select export ++</option> | ||
<option value="all">All</option> | ||
<option value="unused">Unused</option> | ||
<option value="used">Used</option> | ||
</select> | ||
</form> | ||
</td> | ||
</tr> | ||
<? } ?> | ||
</tbody> | ||
</table> | ||
<? } ?> | ||
|
||
<div id="keylist" class="dialog" title="Subscription Keys"> | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,120 @@ | ||
<?php | ||
/** | ||
* @author Alexander Rein <a.rein@be-clever-ag.de>, beclever werbeagentur AG <support@be-clever-ag.de> | ||
* @copyright (c) 2016, Alexander Rein | ||
*/ | ||
require_once('./../../config/mainconf.php'); | ||
require_once($PATH_classes . '/class.Subscription.php'); | ||
|
||
$subscription = new Subscription(); | ||
$allSub = $subscription->get_all_subscription_user_info(FALSE); | ||
if (is_array($allSub)) { | ||
$currSub = array(); | ||
$expSub = array(); | ||
foreach ($allSub as $sub) { | ||
if (strtotime($sub["exp_time"]) > time()) { | ||
$currSub[] = $sub; | ||
} else { | ||
$expSub[] = $sub; | ||
} | ||
} | ||
} | ||
?> | ||
|
||
<!-- Subscription Overview --> | ||
<div id="subscription"> | ||
<div class="accordion"> | ||
<? if (!empty($currSub)) { ?> | ||
<h3>Current subscriptions</h3> | ||
<div> | ||
<table class="dataTable subscription table list ui-widget ui-widget-content"> | ||
<thead> | ||
<tr> | ||
<td class="th">ID</td> | ||
<td class="th">Key</td> | ||
<td class="th">User</td> | ||
<td class="th">Organization</td> | ||
<td class="th">Create Date</td> | ||
<td class="th">Expire Date</td> | ||
<td class="th">Active</td> | ||
<td class="th"></td> | ||
<td class="th"></td> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
<? foreach ($currSub as $sub) { ?> | ||
<tr> | ||
<td><?= $sub["sID"] ?></td> | ||
<td class="key"><?= $sub["username"] ?></td> | ||
<td><?= implode(" ", array($sub["firstname"], $sub["lastname"])) ?></td> | ||
<td><?= $sub["organization"] ?></td> | ||
<td><?= date("Y/m/d", strtotime($sub["create_time"])) ?></td> | ||
<td><?= date("Y/m/d", strtotime($sub["exp_time"])) ?></td> | ||
<? if ($sub["active"] === 1) { ?> | ||
<td class="td tooltip highlight-green" title="Active"><span class='ui-icon ui-icon-check'>Active</span></td> | ||
<? } else { ?> | ||
<td class="td tooltip highlight-red" title="Inactive"><span class='ui-icon ui-icon-cancel'>Inactive</span></td> | ||
<? } ?> | ||
<td><a class="ajax button_edit" href="process/subscription.php?rel=<?= $sub["sID"] ?>" data-target="#edit-subscription-dialog" title="Edit subscription #<?= $sub["sID"] ?>">Edit</a></span> | ||
<? if (empty($sub["password"])) { ?> | ||
<td class="td tooltip" title="Password not set yet"><span class='ui-icon ui-icon-alert' style='margin-right: .3em;'>Password not set yet</span></td> | ||
<? } else { ?> | ||
<td></td> | ||
<? } ?> | ||
</tr> | ||
<? } ?> | ||
</tbody> | ||
</table> | ||
</div> | ||
<? } ?> | ||
<? if (!empty($expSub)) { ?> | ||
<h3>Expired subscriptions</h3> | ||
<div> | ||
<table class="dataTable subscription table list ui-widget ui-widget-content"> | ||
<thead> | ||
<tr> | ||
<td class="th">ID</td> | ||
<td class="th">Key</td> | ||
<td class="th">User</td> | ||
<td class="th">Organization</td> | ||
<td class="th">Create Date</td> | ||
<td class="th">Expire Date</td> | ||
<td class="th">Active</td> | ||
<td class="th"></td> | ||
<td class="th"></td> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
<? foreach ($expSub as $sub) { ?> | ||
<tr> | ||
<td><?= $sub["sID"] ?></td> | ||
<td class="key"><?= $sub["username"] ?></td> | ||
<td><?= implode(" ", array($sub["firstname"], $sub["lastname"])) ?></td> | ||
<td><?= $sub["organization"] ?></td> | ||
<td><?= date("Y/m/d", strtotime($sub["create_time"])) ?></td> | ||
<td><?= date("Y/m/d", strtotime($sub["exp_time"])) ?></td> | ||
<? if ($sub["active"] === 1) { ?> | ||
<td class="td tooltip highlight-green" title="Active"><span class='ui-icon ui-icon-check'>Active</span></td> | ||
<? } else { ?> | ||
<td class="td tooltip highlight-red" title="Inactive"><span class='ui-icon ui-icon-cancel'>Inactive</span></td> | ||
<? } ?> | ||
<td><a class="ajax button_edit" href="process/subscription.php?rel=<?= $sub["sID"] ?>" data-target="#edit-subscription-dialog" title="Edit subscription #<?= $sub["sID"] ?>">Edit</a></span> | ||
<? if (empty($sub["password"])) { ?> | ||
<td class="td tooltip" title="Password not set yet"><span class='ui-icon ui-icon-alert' style='margin-right: .3em;'>Password not set yet</span></td> | ||
<? } else { ?> | ||
<td></td> | ||
<? } ?> | ||
</tr> | ||
<? } ?> | ||
</tbody> | ||
</table> | ||
</div> | ||
<? } ?> | ||
</div> | ||
<div id="delete-subscription-dialog" class="confirmation"> | ||
<p><span class="ui-icon ui-icon-alert" style="float:left; margin:0 7px 20px 0;"></span>The subsciption will be permanently deleted and cannot be recovered.<br/>Are you sure?</p> | ||
</div> | ||
<div id="edit-subscription-dialog" class="dialog-edit"> | ||
|
||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
<?php | ||
/** | ||
* @author Alexander Rein <a.rein@be-clever-ag.de>, beclever werbeagentur AG <support@be-clever-ag.de> | ||
* @copyright (c) 2016, Alexander Rein | ||
*/ | ||
require_once('./../../config/mainconf.php'); | ||
require_once($PATH_classes . "/class.KeyHandler.php"); | ||
|
||
$keyHandler = new KeyHandler(); | ||
$typeList = $keyHandler->get_type(); | ||
?> | ||
<!-- Subscription Type --> | ||
|
||
<div id="type"> | ||
<form method="post" action="process/type.php" class="ajax typeForm"> | ||
<input type="hidden" name="action" value="" /> | ||
<input placeholder="Short name" title="Short name of subscription type" size="10" class="text" type="text" maxlength="5" name="short" value="" /> | ||
<input placeholder="Path to download server" class="text" type="text" maxlength="255" name="path" value="" /> | ||
<input placeholder="Description" class="text" type="text" maxlength="255" name="description" value="" /> | ||
<button class="button_add" type="submit" value="add">Add</button> | ||
</form> | ||
<br/> | ||
<? if (!empty($typeList)) { ?> | ||
<table class="list ui-widget ui-widget-content"> | ||
<? foreach ($typeList as $type) { ?> | ||
<tr> | ||
<td> | ||
<form method="post" action="process/type.php" class="ajax typeForm tr"> | ||
<input type="hidden" name="tID" value="<?= $type["tID"] ?>" /> | ||
<input type="hidden" name="action" value="" /> | ||
<input disabled="disabled" title="Short name of subscription type" size="10" class="text" type="text" maxlength="5" name="short" value="<?= $type["short"] ?>" /> | ||
<input placeholder="Path to download server" class="text" type="text" maxlength="255" name="path" value="<?= $type["path"] ?>" /> | ||
<input placeholder="Description" class="text" type="text" maxlength="255" name="description" value="<?= $type["description"] ?>" /> | ||
<button class="button_edit" type="submit" value="update">Update</button> | ||
<button class="button_delete confirm" type="submit" value="delete" data-target="#delete-key-dialog">Delete</button> | ||
</form> | ||
</td> | ||
</tr> | ||
<? } ?> | ||
</table> | ||
<? } ?> | ||
|
||
<div id="delete-key-dialog" class="confirmation" title="Are you sure you want to delete this type?"> | ||
<p><span class="ui-icon ui-icon-alert" style="float:left; margin:0 7px 20px 0;"></span>These type and all corresponding keys (if any) will be permanently deleted and cannot be recovered. Are you sure?</p> | ||
</div> | ||
</div> | ||
|
Oops, something went wrong.