HEX
Server: nginx/1.22.1
System: Linux VM-16-9-centos 3.10.0-1160.99.1.el7.x86_64 #1 SMP Wed Sep 13 14:19:20 UTC 2023 x86_64
User: www (1001)
PHP: 7.3.31
Disabled: passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv
Upload Files
File: /www/wwwroot/oa.sanjiangapp.com/app/sys/webapp/js/common.js
function popup(width, height)
{
    if(width != 0 && height != 0) $("a.popup").modalTrigger({width:width, height:height});
}

var show = new Array();
var url  = new Array();
function toggleShowapp(webappID, webappName)
{
    if(show[webappID] == undefined)
    {
        height = document.documentElement.clientHeight - 110;
        if(url[webappID] == undefined) url[webappID] = $('#useapp' + webappID).attr('href');
        $('#useapp' + webappID).attr('href', '#iframe' + webappID);
        var html = "<tr id='iframe" + webappID + "'><td><p>" + webappName + "<span class='text-right'><button class='btn' onclick='toggleShowapp(" + webappID + ", \" " + webappName + "\")'>" + packup + "</button></span></p><iframe src='" + url[webappID] + "' height='" + height + "' width='100%' style='border:1px solid #999;'></iframe></td></tr>";
        $('#webapps').parent().parent().after(html);
        show[webappID] = true;
    }
    else if(show[webappID])
    {
        $('#iframe' + webappID).hide();
        show[webappID] = false;
    }
    else
    {
        $('#iframe' + webappID).show();
        show[webappID] = true;
    }
}

function setSize(target)
{
  $('.size').hide();
  $('.customSize').hide();
  if(target == 'popup')
  {
    $('.size').show();
    customSize($('#size').val());
  }
}

function addView(webappID)
{
  $.get(createLink('webapp', 'ajaxAddView', 'webappID=' + webappID));
}

function customSize(value)
{
    $('.customSize').hide();
    if(value == 'custom') $('.customSize').removeClass('hidden').show();
}

$(function()
{
    if($('a.iframe').length)
    {
        $("a.iframe").modalTrigger({width:450, type:'iframe', afterHide:function()
        {
            var selfClose = $.cookie('selfClose');
            if(selfClose != 1) return;
            $(this).replaceWith("<input type='button' value='" + installed + "' disabled='disabled' style='color:gray' class='btn'>");
            $.cookie('selfClose', 0);
        }});
    }

    $("a.webapp").modalTrigger({width:700, type:'iframe', icon: 'th-large'});
    $("a.apiapp").modalTrigger({width:700, type:'iframe', icon: 'th-large'});

    setSize($('#target').val());
    $('#target').change(function(){setSize($(this).val())});
    $('#size').change(function(){customSize($(this).val())});
    $('#modulemenu ul li').removeClass('active');
    if(typeof(module) == "string") $('#modulemenu ul li #submenu' + module).parent().addClass('active');
})

$(document).ready(function()
{
    $(document).on('click', '.webapp-install', function()
    {
        $(this).text(v.lang.doing);
        $.getJSON($(this).attr('data-url'), function(data) 
        {
            if(data.result == 'success')
            {
                if(data.entries) 
                {
                    v.entries = JSON.parse(data.entries);
                    $.refreshDesktop(v.entries, true);
                }
                location.href = data.locate;
                return false;
            }
        });
    });
})