49 lines
No EOL
1.2 KiB
HTML
49 lines
No EOL
1.2 KiB
HTML
<script>
|
|
var ajaxURL = baseurl+'/admin_area/ajax';
|
|
|
|
//Update sidebar
|
|
amplify.request.define( "update-sidebar", "ajax", {
|
|
url: ajaxURL+"/widgets.php",
|
|
type: "POST",
|
|
dataType: "json",
|
|
decoder: function( data, status, xhr, success, error ) {
|
|
if ( status === "success" ) {
|
|
success( data );
|
|
} else {
|
|
error( data );
|
|
}
|
|
}
|
|
})
|
|
|
|
//Category Ajax Requests..
|
|
amplify.request.define("categories","ajax",{
|
|
url : ajaxURL+"/categories.php",
|
|
type : "POST",
|
|
dataType : "json",
|
|
decode:function(data,status,xhr,success,error)
|
|
{
|
|
if(status==='success'){
|
|
success(data);
|
|
}else{
|
|
error(data);
|
|
}
|
|
}
|
|
})
|
|
|
|
|
|
//Category Ajax Requests..
|
|
amplify.request.define("videos","ajax",{
|
|
url : ajaxURL+"/videos.php",
|
|
type : "POST",
|
|
dataType : "json",
|
|
decode:function(data,status,xhr,success,error)
|
|
{
|
|
if(status==='success'){
|
|
success(data);
|
|
}else{
|
|
error(data);
|
|
}
|
|
}
|
|
})
|
|
|
|
</script> |