Add php files
This commit is contained in:
25
include/Smarty/plugins/function.sugar_document.php
Executable file
25
include/Smarty/plugins/function.sugar_document.php
Executable file
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
|
||||
|
||||
function smarty_function_sugar_document($params, &$smarty)
|
||||
{
|
||||
$html='';
|
||||
global $current_user;
|
||||
// if($current_user->is_admin==1){
|
||||
include_once 'include/ECM/EcmDeleteDocument/EcmDeleteDocument.php';
|
||||
$test= new EcmDeleteDocument($params['module'],$params['id']);
|
||||
$html.=' <script src="include/ECM/EcmDeleteDocument/EcmDeleteDocument.js"></script>';
|
||||
if($test->removeIsPossible()!=false){
|
||||
$html.=' <input title="Anuluj[Alt+D]" accesskey="D" class="button"
|
||||
onclick="deleteDocumentAjax();" type="button" name="Delete" value="Usuń">';
|
||||
}
|
||||
$test2= new EcmDeleteDocument($params['module'],$params['id']);
|
||||
if($test2->cancelIsPossible()!=false){
|
||||
$html.='<input title="Anuluj[Alt+D]" accesskey="D" class="button"
|
||||
onclick="cancelDocumentAjax();" type="button" name="Delete" value="Anuluj">';
|
||||
}
|
||||
|
||||
// }
|
||||
return $html;
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user