MOON
Server: Apache
System: Linux e2e-78-16.ssdcloudindia.net 3.10.0-1160.45.1.el7.x86_64 #1 SMP Wed Oct 13 17:20:51 UTC 2021 x86_64
User: imensosw (1005)
PHP: 7.4.33
Disabled: exec,passthru,shell_exec,system
Upload Files
File: /home/imensosw/public_html/imenso.co/timesheet/js/app.js

if(!_.isObject(app)) {
	alert("Object not found");
}

if(app.dev){
	app.log("DEV MODE ON");
}

app.files = [{
	name:"login",
	file:'login.inc.html'
	},
];

$(document).ready(function(){
	app.setListeners();
	app.init(function(){
		app.startApp();
	});
});


app.setListeners = function() {
	app.setLibListeners();
}

/*app.launchUser = function() {


	app.log("Launching with user ",app.user);

	$.ajax({
        method: "POST",
        url: "api/imensoapi.php",
        dataType: "json",
        data: {
          action: "launchload",
          user: app.user
        }
      })
      .fail(function() {
        alert("There was an error  connecting to the server SR[01]")
      })
      .done(function(resp) {
        if (resp.resp == 'OK') {
          if (resp.error) {
            alert("Transaction error. " + resp.error);
          } else {

			 app.log("User launched");
             app.user = Cookies.getJSON('usertoken');
             $('#userlogout').show();
             $('#userlogin').hide();
            
             if(app.user.acces_level=="admin")
             {
               window.location.href="timesheet";
             }
           // app.getUser();
			      $('#maincontainer').html("");
            
          }
        } else {
          alert("There was an error  connecting to the server SR[02]")
        }
      }); //- ajax

} //- launchUser
*/

app.startApp = function() {
  app.log("Starting");
  /*app.user = Cookies.getJSON('usertoken');
  if (app.user && app.user.token && app.user.token.length > 20) {
	//app.enableAdmin();
  // alert('already login');
  // window.location.href = app.location;
	//app.launchUser();
	} else {
*/
		$("#maincontainer").html(app.templates.login());
	
	// }
}


app.loadTemplates = function() {
	
	app.templates.modal = _.template("<div class='modal fade' tabindex='-1' role='dialog' id='modal'><div class='modal-dialog' role='document'><div class='modal-content'><div class='modal-header'><h5 class='modal-title'><%=title%></h5><button type='button' class='close' data-dismiss='modal' aria-label='Close'><span aria-hidden='true'>&times;</span></button></div><div class='modal-body'><%=content%></div><div style='display:none' class='modal-footer'><button type='button'  class='btn btn-default' data-dismiss='modal'>Close</button></div></div></div></div>");

}
;