예제 #1
0
            i18n("Restricted");
            ?>
</label>
            <pre><?php 
            i18n("You are not allowed to do that");
            ?>
</pre>
            <button onclick="codiad.modal.unload();return false;"><?php 
            i18n("Close");
            ?>
</button>
            <?php 
        } else {
            require_once 'class.macro.php';
            $macro = new Macro();
            $macrolist = $macro->Load();
            $command = $macrolist[$_GET['id']]['c'];
            if (!Common::isAbsPath($_GET['path'])) {
                $_GET['path'] = WORKSPACE . '/' . $_GET['path'];
            }
            if (is_file($_GET['path'])) {
                $command = str_replace('%FILE%', $_GET['path'], $command);
                $command = str_replace('%FOLDER%', dirname($_GET['path']), $command);
                $command = str_replace('%NAME%', basename($_GET['path']), $command);
            } else {
                $command = str_replace('%FOLDER%', $_GET['path'], $command);
                $command = str_replace('%NAME%', basename($_GET['path']), $command);
            }
            ?>
            <form>
            <label><?php 
예제 #2
0
 *  [root]/license.txt for more. This information must remain intact.
 */
require_once '../../common.php';
require_once 'class.macro.php';
//////////////////////////////////////////////////////////////////
// Verify Session or Key
//////////////////////////////////////////////////////////////////
if (isset($_GET['action']) && $_GET['action'] != 'authenticate') {
    checkSession();
}
$macro = new Macro();
//////////////////////////////////////////////////////////////////
// Load Contextmenu Macros
//////////////////////////////////////////////////////////////////
if ($_GET['action'] == 'init') {
    echo json_encode($macro->Load());
}
//////////////////////////////////////////////////////////////////
// Save Contextmenu Macros
//////////////////////////////////////////////////////////////////
if ($_GET['action'] == 'save') {
    if (checkAccess()) {
        $macro->Save();
    }
}
//////////////////////////////////////////////////////////////////
// Execute Macro
//////////////////////////////////////////////////////////////////
if ($_GET['action'] == 'execute') {
    if (checkAccess()) {
        $macro->id = $_GET['id'];