-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Conflicts: WebApp/services.php
- Loading branch information
Showing
28 changed files
with
544 additions
and
264 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 |
---|---|---|
@@ -1,2 +1,3 @@ | ||
MMEX_New_Transaction.db | ||
configuration_user.php | ||
/WebApp/attachments/Transaction*.* |
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
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,43 @@ | ||
<?php | ||
require_once "functions.php"; | ||
session_start(); | ||
security::redirect_if_not_loggedin(); | ||
|
||
$Guid = costant::desktop_guid(); | ||
|
||
if (isset($_GET["DeleteAttach"])) | ||
{ | ||
attachments::delete_attachment_by_name($_GET["DeleteAttach"]); | ||
} | ||
|
||
if (isset($_FILES['UploadedAttachments']) && isset($_POST["Attachment_TrId"])) | ||
{ | ||
$TrNumber = (int)$_POST['Attachment_TrId']; | ||
$FileName = $_FILES['UploadedAttachments']['name']; | ||
$FileExtension = substr($FileName,strpos($FileName,".")+1,strlen($FileName)); | ||
$NewFileName = "Transaction_".$TrNumber."_Attach".(attachments::get_number_of_attachments($TrNumber)+1).".".$FileExtension; | ||
move_uploaded_file ($_FILES['UploadedAttachments']['tmp_name'], "attachments/".$NewFileName); | ||
echo $NewFileName; | ||
} | ||
|
||
if (isset($_GET["AttachmentsTable"])) | ||
{ | ||
$TrId = $_GET["AttachmentsTable"]; | ||
$Attachments = attachments::get_attachments_filename_array($TrId,true); | ||
echo "<table class = 'table'>"; | ||
echo "<tbody>"; | ||
for ($i = 0; $i < sizeof($Attachments); $i++) | ||
{ | ||
echo "<tr>"; | ||
$File = $Attachments[$i]; | ||
design::table_cell(substr($File,strpos($File,"Attach"),strlen($File)),""); | ||
design::table_cell("<a href='services.php?guid=${Guid}&download_attachment=${File}'> | ||
<span class='glyphicon glyphicon-download-alt'> </span> Open</a>","text_align_right"); | ||
design::table_cell("<a href='#' onclick='attachment_delete(\"${File}\",${TrId});return false;'> | ||
<span class='glyphicon glyphicon-remove'> </span> Delete</a>","text_align_right"); | ||
echo "</tr>"; | ||
} | ||
echo "</tbody>"; | ||
echo "</table>"; | ||
} | ||
?> |
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 @@ | ||
Folder for attachments. Do not delete! |
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,10 @@ | ||
####################################### | ||
## htaccess for block important file ## | ||
####################################### | ||
|
||
# Block folder list | ||
Options All -Indexes | ||
|
||
# Block entire folder | ||
Order deny,allow | ||
Deny from all |
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
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
Oops, something went wrong.