タイムライン

/

アイドル・アーティストはこちらから登録


Warning: Cannot modify header information - headers already sent by (output started at /home/idol-scheduler/www/nageco/post/view.inc:57) in /home/idol-scheduler/pear/php/HTML/AJAX.php on line 582

Warning: Cannot modify header information - headers already sent by (output started at /home/idol-scheduler/www/nageco/post/view.inc:57) in /home/idol-scheduler/pear/php/HTML/AJAX.php on line 582

Warning: Cannot modify header information - headers already sent by (output started at /home/idol-scheduler/www/nageco/post/view.inc:57) in /home/idol-scheduler/pear/php/HTML/AJAX/Server.php on line 685

Warning: Cannot modify header information - headers already sent by (output started at /home/idol-scheduler/www/nageco/post/view.inc:57) in /home/idol-scheduler/pear/php/HTML/AJAX/Server.php on line 686
/** * Compat functions * @category HTML * @package AJAX * @author Joshua Eichorn * @copyright 2005 Joshua Eichorn * @license http://www.opensource.org/licenses/lgpl-license.php LGPL */ /** * Functions for compatibility with older browsers */ if (!String.fromCharCode && !String.prototype.fromCharCode) { String.prototype.fromCharCode = function(code) { var h = code.toString(16); if (h.length == 1) { h = '0' + h; } return unescape('%' + h); } } if (!String.charCodeAt && !String.prototype.charCodeAt) { String.prototype.charCodeAt = function(index) { var c = this.charAt(index); for (i = 1; i < 256; i++) { if (String.fromCharCode(i) == c) { return i; } } } } if (!Array.splice && !Array.prototype.splice) { Array.prototype.splice = function(s, d) { var max = Math.max, min = Math.min, a = [], // The return value array e, // element i = max(arguments.length - 2, 0), // insert count k = 0, l = this.length, n, // new length v, // delta x; // shift count s = s || 0; if (s < 0) { s += l; } s = max(min(s, l), 0); // start point d = max(min(typeof d == 'number' ? d : l, l - s), 0); // delete count v = i - d; n = l + v; while (k < d) { e = this[s + k]; if (!e) { a[k] = e; } k += 1; } x = l - s - d; if (v < 0) { k = s + i; while (x) { this[k] = this[k - v]; k += 1; x -= 1; } this.length = n; } else if (v > 0) { k = 1; while (x) { this[n - k] = this[l - k]; k += 1; x -= 1; } } for (k = 0; k < i; ++k) { this[s + k] = arguments[k + 2]; } return a; } } if (!Array.push && !Array.prototype.push) { Array.prototype.push = function() { for (var i = 0, startLength = this.length; i < arguments.length; i++) { this[startLength + i] = arguments[i]; } return this.length; } } if (!Array.pop && !Array.prototype.pop) { Array.prototype.pop = function() { return this.splice(this.length - 1, 1)[0]; } } if (window.ActiveXObject && window['DOMParser'] == 'undefined') { window.DOMParser = new function() {}; DOMParser.prototype = { parseFromString: function(str, contentType) { var xmlDocument = new ActiveXObject('Microsoft.XMLDOM'); xmlDocument.loadXML(str); return xmlDocument; } }; window.XMLSerializer = new function() {}; XMLSerializer.prototype = { serializeToString: function(root) { return root.xml || root.outerHTML; } }; } /** * JavaScript library for use with HTML_AJAX * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to: * Free Software Foundation, Inc., * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * @category HTML * @package Ajax * @author Joshua Eichorn * @author Arpad Ray * @author David Coallier * @author Elizabeth Smith * @copyright 2005 Joshua Eichorn, Arpad Ray, David Coallier, Elizabeth Smith * @license http://www.opensource.org/licenses/lgpl-license.php LGPL */ /** * HTML_AJAX static methods, this is the main proxyless api, it also handles global error and event handling */ var HTML_AJAX = { version: '0.5.6', defaultServerUrl: false, defaultEncoding: 'JSON', queues: false, clientPools: {}, httpClient: function(name) { if (name) { if (this.clientPools[name]) { return this.clientPools[name].getClient(); } } return this.clientPools['default'].getClient(); }, makeRequest: function(request) { if (!HTML_AJAX.queues[request.queue]) { var e = new Error('Unknown Queue: '+request.queue); if (HTML_AJAX.onError) { HTML_AJAX.onError(e); return false; } else { throw(e); } } else { var qn = request.queue; var q = HTML_AJAX.queues[qn]; HTML_AJAX.queues[request.queue].addRequest(request); return HTML_AJAX.queues[request.queue].processRequest(); } }, serializerForEncoding: function(encoding) { for(var i in HTML_AJAX.contentTypeMap) { if (encoding == HTML_AJAX.contentTypeMap[i] || encoding == i) { return eval("new HTML_AJAX_Serialize_"+i+";"); } } return new HTML_AJAX_Serialize_Null(); }, fullcall: function(url,encoding,className,method,callback,args, options) { var serializer = HTML_AJAX.serializerForEncoding(encoding); var request = new HTML_AJAX_Request(serializer); if (callback) { request.isAsync = true; } request.requestUrl = url; request.className = className; request.methodName = method; request.callback = callback; request.args = args; if (options) { for(var i in options) { request[i] = options[i]; } if (options.grab) { if (!request.args || !request.args.length) { request.requestType = 'GET'; } } } return HTML_AJAX.makeRequest(request); }, callPhpCallback: function(phpCallback, jsCallback, url) { var args = new Array(); for (var i = 3; i < arguments.length; i++) { args.push(arguments[i]); } if (HTML_AJAX_Util.getType(phpCallback[0]) == 'object') { jsCallback(phpCallback[0][phpCallback[1]](args)); return; } if (!url) { url = HTML_AJAX.defaultServerUrl; } HTML_AJAX.fullcall(url, HTML_AJAX.defaultEncoding, false, false, jsCallback, args, {phpCallback: phpCallback}); }, call: function(className,method,callback) { var args = new Array(); for(var i = 3; i < arguments.length; i++) { args.push(arguments[i]); } return HTML_AJAX.fullcall(HTML_AJAX.defaultServerUrl,HTML_AJAX.defaultEncoding,className,method,callback,args); }, grab: function(url,callback,options) { if (!options) { options = {grab:true}; } else { options['grab'] = true; } return HTML_AJAX.fullcall(url,'Null',false,null,callback, '', options); }, post: function(url,payload,callback,options) { var serializer = 'Null'; if (HTML_AJAX_Util.getType(payload) == 'object') { serializer = 'Urlencoded'; } return HTML_AJAX.fullcall(url,serializer,false,null,callback, payload, options); }, replace: function(id) { var callback = function(result) { HTML_AJAX_Util.setInnerHTML(HTML_AJAX_Util.getElement(id),result); } if (arguments.length == 2) { HTML_AJAX.grab(arguments[1],callback); } else { var args = new Array(); for(var i = 3; i < arguments.length; i++) { args.push(arguments[i]); } HTML_AJAX.fullcall(HTML_AJAX.defaultServerUrl,HTML_AJAX.defaultEncoding,arguments[1],arguments[2],callback,args, {grab:true}); } }, append: function(id) { var callback = function(result) { HTML_AJAX_Util.setInnerHTML(HTML_AJAX_Util.getElement(id),result,'append'); } if (arguments.length == 2) { HTML_AJAX.grab(arguments[1],callback); } else { var args = new Array(); for(var i = 3; i < arguments.length; i++) { args.push(arguments[i]); } HTML_AJAX.fullcall(HTML_AJAX.defaultServerUrl,HTML_AJAX.defaultEncoding,arguments[1],arguments[2],callback,args, {grab:true}); } }, Open: function(request) { }, Load: function(request) { }, /* onError: function(e) { msg = ""; for(var i in e) { msg += i+':'+e[i]+"\n"; } alert(msg); }, */ contentTypeMap: { 'JSON': 'application/json', 'Null': 'text/plain', 'Error': 'application/error', 'PHP': 'application/php-serialized', 'HA' : 'application/html_ajax_action', 'Urlencoded': 'application/x-www-form-urlencoded' }, requestComplete: function(request,error) { for(var i in HTML_AJAX.queues) { if (HTML_AJAX.queues[i].requestComplete) { HTML_AJAX.queues[i].requestComplete(request,error); } } }, formEncode: function(form, array_format) { form = HTML_AJAX_Util.getElement(form); var el, inpType, value, name; var out = (array_format) ? {} : ''; var inputTags = form.getElementsByTagName('INPUT'); var selectTags = form.getElementsByTagName('SELECT'); var buttonTags = form.getElementsByTagName('BUTTON'); var textareaTags = form.getElementsByTagName('TEXTAREA'); var arrayRegex = /(.+)%5B%5D/; var validElement = function (element) { if (!element || !element.getAttribute) { return false; } el = element; name = HTML_AJAX_Util.encodeUrl(el.getAttribute('name')); if (!name) { return false; } if (element.disabled) { return false; } if (!array_format) { value = HTML_AJAX_Util.encodeUrl(el.value); } else { value = el.value; } inpType = el.getAttribute('type'); return true; } inputLoop: for (var i=0; i < inputTags.length; i++) { if (!validElement(inputTags[i])) { continue; } if (inpType == 'checkbox' || inpType == 'radio') { if (!el.checked) { continue inputLoop; } var arr_var = arrayRegex.exec(name); if (array_format && arr_var) { if (!out[arr_var[1]]) { out[arr_var[1]] = new Array(); } out[arr_var[1]].push(value); continue inputLoop; } } if (array_format) { out[name] = value; } else { out += name + '=' + value + '&'; } } // end inputLoop selectLoop: for (var i=0; i 0) { this.addClient(); } } HTML_AJAX_Client_Pool.prototype = { isEmpty: function() { return this._len == 0; }, addClient: function() { if (this.maxClients != 0 && this._len > this.maxClients) { return false; } var key = this._len++; this._clients[key] = new HTML_AJAX_HttpClient(); return this._clients[key]; }, getClient: function () { for (var i = 0; i < this._len; i++) { if (!this._clients[i].callInProgress() && this._clients[i].callbackComplete) { return this._clients[i]; } } var client = this.addClient(); if (client) { return client; } return false; }, removeClient: function (client) { for (var i = 0; i < this._len; i++) { if (!this._clients[i] == client) { this._clients.splice(i, 1); return true; } } return false; }, clear: function () { this._clients = []; this._len = 0; } }; HTML_AJAX.clientPools['default'] = new HTML_AJAX_Client_Pool(0);
Warning: Cannot modify header information - headers already sent by (output started at /home/idol-scheduler/www/nageco/post/view.inc:57) in /home/idol-scheduler/pear/php/HTML/AJAX/Server.php on line 685

Warning: Cannot modify header information - headers already sent by (output started at /home/idol-scheduler/www/nageco/post/view.inc:57) in /home/idol-scheduler/pear/php/HTML/AJAX/Server.php on line 686