read-only for certain database records

Hello friends …

I’m trying to set read only those records that do not comply with the code that I’m coming to the screen where I have the calendar but I have not succeeded.

I’ve been leading me by example but I can not localhost/practicas_php/dhtmlxSc … event.html CONSEG …

I have something so far

});

     scheduler.attachEvent ("ondblclick", function (event_id, native_event_object) {
        var obj = scheduler.getEvent (event_id);

co_cli var = “<? php echo $ _GET [" cl "];?>”;
if (obj.c_co_cli! = co_cli) {
readonly: true
return! this.getEvent (id). readonly;

}
});

I hope you can help
regards