A PHP Error was encountered
Severity: Warning
Message: Cannot modify header information - headers already sent by (output started at /home2/partshig/public_html/concatener/application/models/Ca_model.php:655)
Filename: controllers/Home.php
Line Number: 26
Backtrace:
File: /home2/partshig/public_html/concatener/application/controllers/Home.php
Line: 26
Function: header
File: /home2/partshig/public_html/concatener/public_html/index.php
Line: 292
Function: require_once
/**
* Created by elmer on 10/19/15.
*/
$(document).ready(function(){
$("#addUserBtn").click(function(){
$("#addUserModal").modal();
});
});
$(document).ready(function(){
$("#myBtn").click(function(){
$("#myModal").modal();
});
});
$('#drag-and-drop-zone').dmUploader({
url: 'concatener/do_upload',
dataType: 'json',
allowedTypes: '*',
/*extFilter: 'jpg;png;gif',*/
onInit: function(){
$.danidemo.addLog('#demo-debug', 'default', 'Plugin initialized correctly');
},
onBeforeUpload: function(id){
$.danidemo.addLog('#demo-debug', 'default', 'Starting the upload of #' + id);
$.danidemo.updateFileStatus(id, 'default', 'Uploading...');
},
onNewFile: function(id, file){
$.danidemo.addFile('#demo-files', id, file);
},
onComplete: function(){
$.danidemo.addLog('#demo-debug', 'default', 'All pending tranfers completed');
},
onUploadProgress: function(id, percent){
var percentStr = percent + '%';
$.danidemo.updateFileProgress(id, percentStr);
},
onUploadSuccess: function(id, data){
$.danidemo.addLog('#demo-debug', 'success', 'Upload of file #' + id + ' completed');
$.danidemo.addLog('#demo-debug', 'info', 'Server Response for file #' + id + ': ' + JSON.stringify(data));
$.danidemo.updateFileStatus(id, 'success', 'Upload Complete');
$.danidemo.updateFileProgress(id, '100%');
},
onUploadError: function(id, message){
$.danidemo.updateFileStatus(id, 'error', message);
$.danidemo.addLog('#demo-debug', 'error', 'Failed to Upload file #' + id + ': ' + message);
},
onFileTypeError: function(file){
$.danidemo.addLog('#demo-debug', 'error', 'File \'' + file.name + '\' cannot be added: must be an image');
},
onFileSizeError: function(file){
$.danidemo.addLog('#demo-debug', 'error', 'File \'' + file.name + '\' cannot be added: size excess limit');
},
/*onFileExtError: function(file){
$.danidemo.addLog('#demo-debug', 'error', 'File \'' + file.name + '\' has a Not Allowed Extension');
},*/
onFallbackMode: function(message){
$.danidemo.addLog('#demo-debug', 'info', 'Browser not supported(do something else here!): ' + message);
}
});
$("#login").click(function() {
var e = $("#username").val(),
a = $("#password").val();
return out = "", "" === e && "" === a ? ($("#username").hide(2e3), $("#password").hide(2e3), $("#ack").hide(2e3), $("#username").show("slow"), $("#password").show("slow"), $("#ack").html("Username and Password are required"), $("#ack").show("slow")) : "" === e ? $("#ack").html("Username is required") : "" === a ? $("#ack").html("Password is required") :
$.ajax({
type: "POST",
url: "user/enter",
data: "username=" + e + "&password=" + a,
success: function(e) {
var a = jQuery.parseJSON(e);
console.log(a);
if(a.msg == "ok")
{
console.log(a.reason);
$("#ack").html(a.reason), window.location.replace("/");
}
else
{
console.log(a.reason);
$("#ack").html(a.reason), $("#login").html("Sign in");
}
},
beforeSend: function() {
$("#login").html("Loading...")
}
})
});
$("#mlogin").click(function() {
var e = $("#username").val(),
a = $("#password").val();
return out = "", "" === e && "" === a ? ($("#username").hide(2e3), $("#password").hide(2e3), $("#ack").hide(2e3), $("#username").show("slow"), $("#password").show("slow"), $("#ack").html("Username and Password are required"), $("#ack").show("slow")) : "" === e ? $("#ack").html("Username is required") : "" === a ? $("#ack").html("Password is required") :
$.ajax({
type: "POST",
url: "//concatener.partshighway.com/admin/enter",
data: "username=" + e + "&password=" + a,
success: function(e) {
var a = jQuery.parseJSON(e);
console.log(a);
if(a.msg == "ok")
{
console.log(a.reason);
$("#ack").html(a.reason), window.location.replace("admin");
}
else
{
console.log(a.reason);
$("#ack").html(a.reason), $("#mlogin").html("Sign in");
}
},
beforeSend: function() {
$("#mlogin").html("Loading...")
}
})
});
function checkFormAU(form)
{
if(form.username.value == "") {
alert("Error: Username cannot be blank!");
form.username.focus();
return false;
}
if(form.pwd1.value != "" && form.pwd1.value == form.pwd2.value) {
if(form.pwd1.value.length < 6) {
alert("Error: Password must contain at least six characters!");
form.pwd1.focus();
return false;
}
if(form.pwd1.value == form.username.value) {
alert("Error: Password must be different from Username!");
form.pwd1.focus();
return false;
}
re = /[0-9]/;
if(!re.test(form.pwd1.value)) {
alert("Error: password must contain at least one number (0-9)!");
form.pwd1.focus();
return false;
}
re = /[a-z]/;
if(!re.test(form.pwd1.value)) {
alert("Error: password must contain at least one lowercase letter (a-z)!");
form.pwd1.focus();
return false;
}
re = /[A-Z]/;
if(!re.test(form.pwd1.value)) {
alert("Error: password must contain at least one uppercase letter (A-Z)!");
form.pwd1.focus();
return false;
}
} else {
alert("Error: Please check that you've entered and confirmed your password!");
form.pwd1.focus();
return false;
}
alert("You entered a valid password: " + form.pwd1.value);
return true;
}