this.formateur = formateur
this.util = util
- this.pageEvent = new PageEvent("admin", this.util)
+ this.pageEvent = new euphorik.PageEvent("admin", this.util)
// le timer qui rappelle periodiquement le rafraichissement des IP bannies
this.timeoutIDmajIPs = null
var dataToSend =
{
- "action" : "put_troll",
+ "header" : { "action" : "put_troll", "version" : euphorik.conf.versionProtocole },
"cookie" : this.client.cookie,
"content" : content
}
- ;; dumpObj(dataToSend)
jQuery.ajax(
{
type: "POST",
data: this.util.jsonVersAction(dataToSend),
success:
function(data)
- {
- ;; dumpObj(data)
-
+ {
if (data["reply"] == "ok")
{
$("#page form#nouveauTroll input.troll").val("")
var dataToSend =
{
- "action" : "list_banned_ips",
+ "header" : { "action" : "list_banned_ips", "version" : euphorik.conf.versionProtocole },
"cookie" : this.client.cookie
}
- ;; dumpObj(dataToSend)
jQuery.ajax(
{
type: "POST",
data: this.util.jsonVersAction(dataToSend),
success:
function(data)
- {
- ;; dumpObj(data)
-
+ {
if (data["reply"] == "list_banned_ips")
{
var XHTML = ""
$(".deban", this).click(
function()
{
- thisPageAdmin.util.messageDialogue("Êtes-vous sur de vouloir débannir l'IP ''" + ip + "'' ?", messageType.question,
+ thisPageAdmin.util.messageDialogue("Êtes-vous sur de vouloir débannir l'IP ''" + ip + "'' ?", euphorik.Util.messageType.question,
{"Oui" : function()
{
thisPageAdmin.deban(ip)
var dataToSend =
{
- "action" : "unban",
+ "header" : { "action" : "unban", "version" : euphorik.conf.versionProtocole },
"cookie" : this.client.cookie,
"ip" : ip
}
- ;; dumpObj(dataToSend)
jQuery.ajax(
{
type: "POST",
success:
function(data)
{
- ;; dumpObj(data)
if(data["reply"] == "error")
- {
thisPageAdmin.util.messageDialogue(data["error_message"])
- }
}
}
)
{
thisTrolls.util.messageDialogue(
"Êtes-vous sur de vouloir supprimer le troll \"" + thisTrolls.trolls[id].content + "\" ?",
- messageType.question,
+ euphorik.Util.messageType.question,
{
"oui" : function()
{
var dataToSend =
{
- "action" : "mod_troll",
+ "header" : { "action" : "mod_troll", "version" : euphorik.conf.versionProtocole },
"cookie" : this.client.cookie,
"troll_id" : id,
"content" : content
}
- ;; dumpObj(dataToSend)
jQuery.ajax(
{
type: "POST",
success:
function(data)
{
- ;; dumpObj(data)
if (data["reply"] == "error")
{
thisTrolls.util.messageDialogue(data["error_message"])
var dataToSend =
{
- "action" : "del_troll",
+ "header" : { "action" : "del_troll", "version" : euphorik.conf.versionProtocole },
"cookie" : this.client.cookie,
"troll_id" : id
}
- ;; dumpObj(dataToSend)
jQuery.ajax(
{
type: "POST",
success:
function(data)
{
- ;; dumpObj(data)
if (data["reply"] == "error")
{
thisTrolls.util.messageDialogue(data["error_message"])