protected virtual XVar getLoggedInRedirectUrl() { if (XVar.Pack(this.myurl)) { return(MVCFunctions.Concat(this.myurl, (XVar.Pack(!XVar.Equals(XVar.Pack(MVCFunctions.strpos((XVar)(this.myurl), new XVar("?"))), XVar.Pack(false))) ? XVar.Pack("&a=login") : XVar.Pack("?a=login")))); } return(MVCFunctions.GetTableLink(new XVar("menu"))); }
public override XVar buildControl(dynamic _param_value, dynamic _param_mode, dynamic _param_fieldNum, dynamic _param_validate, dynamic _param_additionalCtrlParams, dynamic _param_data) { #region pass-by-value parameters dynamic value = XVar.Clone(_param_value); dynamic mode = XVar.Clone(_param_mode); dynamic fieldNum = XVar.Clone(_param_fieldNum); dynamic validate = XVar.Clone(_param_validate); dynamic additionalCtrlParams = XVar.Clone(_param_additionalCtrlParams); dynamic data = XVar.Clone(_param_data); #endregion dynamic nHeight = null, nWidth = null; base.buildControl((XVar)(value), (XVar)(mode), (XVar)(fieldNum), (XVar)(validate), (XVar)(additionalCtrlParams), (XVar)(data)); nWidth = XVar.Clone(this.pageObject.pSetEdit.getNCols((XVar)(this.field))); nHeight = XVar.Clone(this.pageObject.pSetEdit.getNRows((XVar)(this.field))); if (XVar.Pack(this.pageObject.pSetEdit.isUseRTE((XVar)(this.field)))) { dynamic browser = null; value = XVar.Clone(RTESafe((XVar)(value))); browser = new XVar(""); if (MVCFunctions.postvalue("browser") == "ie") { browser = new XVar("&browser=ie"); } MVCFunctions.Echo(MVCFunctions.Concat("<iframe frameborder=\"0\" vspace=\"0\" hspace=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\" id=\"", this.cfield, "\" ", (XVar.Pack((XVar)((XVar)(mode == Constants.MODE_INLINE_EDIT) || (XVar)(mode == Constants.MODE_INLINE_ADD)) && (XVar)(this.is508 == true)) ? XVar.Pack(MVCFunctions.Concat("alt=\"", this.strLabel, "\" ")) : XVar.Pack("")), "name=\"", this.cfield, "\" title=\"Basic rich text editor\" style='")); if (XVar.Pack(!(XVar)(this.pageObject.mobileTemplateMode()))) { MVCFunctions.Echo(MVCFunctions.Concat("width: ", nWidth + 1, "px;")); } MVCFunctions.Echo(MVCFunctions.Concat("height: ", nHeight + 100, "px;'")); MVCFunctions.Echo(MVCFunctions.Concat(" src=\"", MVCFunctions.GetTableLink(new XVar("rte"), new XVar(""), (XVar)(MVCFunctions.Concat("ptype=", this.pageObject.pageType, "&table=", CommonFunctions.GetTableURL((XVar)(this.pageObject.tName)), "&", "id=", this.id, "&", this.iquery, browser, "&", (XVar.Pack((XVar)(mode == Constants.MODE_ADD) || (XVar)(mode == Constants.MODE_INLINE_ADD)) ? XVar.Pack("action=add") : XVar.Pack(""))))), "\">")); MVCFunctions.Echo("</iframe>"); } else { dynamic classString = null, style = null; classString = new XVar(""); style = XVar.Clone(MVCFunctions.Concat("height: ", nHeight, "px;")); if (this.pageObject.getLayoutVersion() == Constants.BOOTSTRAP_LAYOUT) { classString = new XVar(" class=\"form-control\""); if ((XVar)(mode == Constants.MODE_INLINE_EDIT) || (XVar)(mode == Constants.MODE_INLINE_ADD)) { style = MVCFunctions.Concat(style, "width: ", nWidth, "px;"); } } else { if (XVar.Pack(!(XVar)(this.pageObject.mobileTemplateMode()))) { style = MVCFunctions.Concat(style, "width: ", nWidth, "px;"); } } MVCFunctions.Echo(MVCFunctions.Concat("<textarea ", getPlaceholderAttr(), " id=\"", this.cfield, "\" ", classString, " alt=\"", this.strLabel, "\" name=\"", this.cfield, "\" style=\"", style, "\">", MVCFunctions.runner_htmlspecialchars((XVar)(value)), "</textarea>")); } buildControlEnd((XVar)(validate), (XVar)(mode)); return(null); }
public static XVar getMenuNodes_adminarea(dynamic _param_menuNodesObject) { #region pass-by-value parameters dynamic menuNodesObject = XVar.Clone(_param_menuNodesObject); #endregion dynamic menuNode = XVar.Array(); menuNodesObject.menuNodes.InitAndSetArrayItem(XVar.Array(), "adminarea"); menuNode = XVar.Clone(XVar.Array()); menuNode.InitAndSetArrayItem("1", "id"); menuNode.InitAndSetArrayItem("admin_rights", "name"); menuNode.InitAndSetArrayItem("Leaf", "type"); menuNode.InitAndSetArrayItem("admin_rights", "table"); menuNode.InitAndSetArrayItem("", "style"); menuNode.InitAndSetArrayItem("", "params"); menuNode.InitAndSetArrayItem("0", "parent"); menuNode.InitAndSetArrayItem("Text", "nameType"); menuNode.InitAndSetArrayItem("External", "linkType"); menuNode.InitAndSetArrayItem("AdminArea", "pageType"); menuNode.InitAndSetArrayItem("None", "openType"); menuNode.InitAndSetArrayItem("Permisos", "title"); menuNode.InitAndSetArrayItem(MVCFunctions.GetTableLink(new XVar("admin_rights"), new XVar("list")), "href"); menuNodesObject.menuNodes.InitAndSetArrayItem(menuNode, "adminarea", null); menuNode = XVar.Clone(XVar.Array()); menuNode.InitAndSetArrayItem("2", "id"); menuNode.InitAndSetArrayItem("admin_members", "name"); menuNode.InitAndSetArrayItem("Leaf", "type"); menuNode.InitAndSetArrayItem("admin_members", "table"); menuNode.InitAndSetArrayItem("", "style"); menuNode.InitAndSetArrayItem("", "params"); menuNode.InitAndSetArrayItem("0", "parent"); menuNode.InitAndSetArrayItem("Text", "nameType"); menuNode.InitAndSetArrayItem("External", "linkType"); menuNode.InitAndSetArrayItem("AdminArea", "pageType"); menuNode.InitAndSetArrayItem("None", "openType"); menuNode.InitAndSetArrayItem("Asignar usuarios a grupos", "title"); menuNode.InitAndSetArrayItem(MVCFunctions.GetTableLink(new XVar("admin_members"), new XVar("list")), "href"); menuNodesObject.menuNodes.InitAndSetArrayItem(menuNode, "adminarea", null); menuNode = XVar.Clone(XVar.Array()); menuNode.InitAndSetArrayItem("3", "id"); menuNode.InitAndSetArrayItem("admin_users", "name"); menuNode.InitAndSetArrayItem("Leaf", "type"); menuNode.InitAndSetArrayItem("admin_users", "table"); menuNode.InitAndSetArrayItem("", "style"); menuNode.InitAndSetArrayItem("", "params"); menuNode.InitAndSetArrayItem("0", "parent"); menuNode.InitAndSetArrayItem("Text", "nameType"); menuNode.InitAndSetArrayItem("External", "linkType"); menuNode.InitAndSetArrayItem("AdminArea", "pageType"); menuNode.InitAndSetArrayItem("None", "openType"); menuNode.InitAndSetArrayItem("Añadir/Editar usuarios", "title"); menuNode.InitAndSetArrayItem(MVCFunctions.GetTableLink(new XVar("admin_users"), new XVar("list")), "href"); menuNodesObject.menuNodes.InitAndSetArrayItem(menuNode, "adminarea", null); return(null); }
public override XVar showDBValue(dynamic data, dynamic _param_keylink) { #region pass-by-value parameters dynamic keylink = XVar.Clone(_param_keylink); #endregion dynamic fileName = null, fileNameF = null, value = null; if (XVar.Pack(!(XVar)(data[this.field]))) { return(""); } value = new XVar(""); fileName = new XVar("file.jpg"); fileNameF = XVar.Clone(this.container.pSet.getFilenameField((XVar)(this.field))); if ((XVar)(fileNameF) && (XVar)(data[fileNameF])) { fileName = XVar.Clone(data[fileNameF]); } if (XVar.Pack(this.showThumbnails)) { dynamic hrefBegin = null, hrefEnd = null, linkClass = null, smallThumbnailStyle = null, thumbPref = null; thumbPref = XVar.Clone(this.container.pSet.getStrThumbnail((XVar)(this.field))); hrefBegin = XVar.Clone(MVCFunctions.GetTableLink(new XVar("mfhandler"), new XVar(""), (XVar)(MVCFunctions.Concat("filename=", fileName, "&table=", MVCFunctions.RawUrlEncode((XVar)(this.container.pSet._table)))))); hrefEnd = XVar.Clone(MVCFunctions.Concat("&nodisp=1&pageType=", this.container.pageType, keylink, "&rndVal=", MVCFunctions.rand(new XVar(0), new XVar(32768)))); linkClass = new XVar("zoombox"); if ((XVar)(this.thumbWidth) && (XVar)(this.thumbHeight)) { dynamic hasThumbnail = null, thumbFileUrl = null; hasThumbnail = XVar.Clone((XVar)(thumbPref != XVar.Pack("")) && (XVar)(MVCFunctions.strlen((XVar)(data[thumbPref])))); thumbFileUrl = XVar.Clone(MVCFunctions.Concat(hrefBegin, "&field=", (XVar.Pack(hasThumbnail) ? XVar.Pack(MVCFunctions.RawUrlEncode((XVar)(thumbPref))) : XVar.Pack(MVCFunctions.RawUrlEncode((XVar)(this.field)))), hrefEnd)); smallThumbnailStyle = XVar.Clone(getSmallThumbnailStyle((XVar)(thumbFileUrl), (XVar)(hasThumbnail))); linkClass = MVCFunctions.Concat(linkClass, " background-picture"); } value = MVCFunctions.Concat(value, "<a target=_blank href='", hrefBegin, "&field=", MVCFunctions.RawUrlEncode((XVar)(this.field)), hrefEnd, "' class='", linkClass, "' ", smallThumbnailStyle, ">"); value = MVCFunctions.Concat(value, "<img border=0 "); if (XVar.Pack(this.is508)) { value = MVCFunctions.Concat(value, " alt=\"Image from DB\""); } value = MVCFunctions.Concat(value, " src='", hrefBegin, "&field=", MVCFunctions.RawUrlEncode((XVar)(thumbPref)), hrefEnd, "'>"); value = MVCFunctions.Concat(value, "</a>"); } else { value = new XVar("<img class=\"bs-dbimage\" "); if (XVar.Pack(this.is508)) { value = MVCFunctions.Concat(value, " alt=\"Image from DB\""); } value = MVCFunctions.Concat(value, " border=0"); value = MVCFunctions.Concat(value, getImageSizeStyle(new XVar(true)), " src='", MVCFunctions.GetTableLink(new XVar("mfhandler"), new XVar(""), (XVar)(MVCFunctions.Concat("filename=", fileName, "&table=", MVCFunctions.RawUrlEncode((XVar)(this.container.pSet._table)), "&field=", MVCFunctions.RawUrlEncode((XVar)(this.field)), "&nodisp=1", "&pageType=", this.container.pageType, keylink, "&rndVal=", MVCFunctions.rand(new XVar(0), new XVar(32768))))), "'>"); } return(value); }
public UploadHandler(dynamic _param_options = null) { #region default values if (_param_options as Object == null) { _param_options = new XVar(); } #endregion #region pass-by-value parameters dynamic options = XVar.Clone(_param_options); #endregion this.formStamp = new XVar(""); this.pageType = new XVar(""); this.table = new XVar(""); this.field = new XVar(""); this.tkeys = new XVar(""); this.options = XVar.Clone(XVar.Array()); this.options.InitAndSetArrayItem(MVCFunctions.GetTableLink(new XVar("mfhandler")), "script_url"); this.options.InitAndSetArrayItem("files", "param_name"); this.options.InitAndSetArrayItem("DELETE", "delete_type"); this.options.InitAndSetArrayItem(null, "max_totalFile_size"); this.options.InitAndSetArrayItem(null, "max_file_size"); this.options.InitAndSetArrayItem(0, "min_file_size"); this.options.InitAndSetArrayItem(false, "resizeOnUpload"); this.options.InitAndSetArrayItem(".+$", "accept_file_types"); this.options.InitAndSetArrayItem(null, "max_number_of_files"); this.options.InitAndSetArrayItem(null, "max_width"); this.options.InitAndSetArrayItem(null, "max_height"); this.options.InitAndSetArrayItem(1, "min_width"); this.options.InitAndSetArrayItem(1, "min_height"); this.options.InitAndSetArrayItem(XVar.Array(), "image_versions"); if (XVar.Pack(options)) { foreach (KeyValuePair <XVar, dynamic> value in options.GetEnumerator()) { if (XVar.Pack(this.options.KeyExists(value.Key))) { this.options.InitAndSetArrayItem(options[value.Key], value.Key); } } } }
public override XVar showDBValue(dynamic data, dynamic _param_keylink, dynamic _param_html = null) { #region default values if (_param_html as Object == null) { _param_html = new XVar(true); } #endregion #region pass-by-value parameters dynamic keylink = XVar.Clone(_param_keylink); dynamic html = XVar.Clone(_param_html); #endregion dynamic title = null, titleField = null, value = null; value = new XVar(""); title = new XVar(""); titleField = XVar.Clone(this.container.pSet.getAudioTitleField((XVar)(this.field))); if (XVar.Pack(titleField)) { title = XVar.Clone(MVCFunctions.runner_htmlspecialchars((XVar)(data[titleField]))); } if ((XVar)(data[this.field] != null) && (XVar)(this.container.pageType != Constants.PAGE_PRINT)) { dynamic href = null, link = null; if (XVar.Pack(!(XVar)(title))) { title = new XVar("Track.mp3"); } href = XVar.Clone(MVCFunctions.GetTableLink(new XVar("getfile"), new XVar(""), (XVar)(MVCFunctions.Concat("table=", CommonFunctions.GetTableURL((XVar)(this.container.pSet._table)), "&field=", MVCFunctions.RawUrlEncode((XVar)(this.field)), keylink, "&pagename=", MVCFunctions.runner_htmlspecialchars((XVar)(this.container.pSet.pageName())), "&filename=", title)))); link = XVar.Clone(MVCFunctions.Concat("<a title=\"", title, "\" href=\"", href, "\">", title, "</a>")); value = XVar.Clone(MVCFunctions.Concat("<audio controls preload=\"none\" src=\"", href, "\">", link, "</audio>")); } else { value = XVar.Clone(title); } return(value); }
public virtual XVar GetLockInfo(dynamic _param_strtable, dynamic _param_keys, dynamic _param_links, dynamic _param_pageid) { #region pass-by-value parameters dynamic strtable = XVar.Clone(_param_strtable); dynamic keys = XVar.Clone(_param_keys); dynamic links = XVar.Clone(_param_links); dynamic pageid = XVar.Clone(_param_pageid); #endregion dynamic data = XVar.Array(), page = null, qResult = null, skeys = null, where = null; page = XVar.Clone(MVCFunctions.GetTableLink((XVar)(CommonFunctions.GetTableURL((XVar)(strtable))), new XVar("edit"))); skeys = new XVar(""); foreach (KeyValuePair <XVar, dynamic> val in keys.GetEnumerator()) { if (XVar.Pack(MVCFunctions.strlen((XVar)(skeys)))) { skeys = MVCFunctions.Concat(skeys, "&"); } skeys = MVCFunctions.Concat(skeys, MVCFunctions.RawUrlEncode((XVar)(val.Value))); } where = XVar.Clone(MVCFunctions.Concat(this.connection.addFieldWrappers(new XVar("table")), "=", this.connection.prepareString((XVar)(strtable)), " AND ", this.connection.addFieldWrappers(new XVar("keys")), "=", this.connection.prepareString((XVar)(skeys)), " AND ", this.connection.addFieldWrappers(new XVar("sessionid")), "<>'", MVCFunctions.session_id(), "' AND ", this.connection.addFieldWrappers(new XVar("action")), "=1")); qResult = XVar.Clone(query((XVar)(where), (XVar)(MVCFunctions.Concat(this.connection.addFieldWrappers(new XVar("id")), " asc")))); if (XVar.Pack(data = XVar.Clone(qResult.fetchAssoc()))) { dynamic arrDateTime = null, sdate = null, str = null; sdate = XVar.Clone(MVCFunctions.now()); arrDateTime = XVar.Clone(CommonFunctions.db2time((XVar)(data["startdatetime"]))); str = XVar.Clone(MVCFunctions.mysprintf((XVar)(this.LockAdmin), (XVar)(new XVar(0, data["userid"], 1, (XVar)Math.Round((double)(MVCFunctions.secondsPassedFrom((XVar)(data["startdatetime"])) / 60), 2))))); if (XVar.Pack(links)) { str = MVCFunctions.Concat(str, "<a class=\"unlock\" href=\"#\" onclick=\"Runner.pages.PageManager.getAt('", MVCFunctions.runner_htmlspecialchars((XVar)(CommonFunctions.jsreplace((XVar)(strtable)))), "', ", pageid, ").locking.UnlockAdmin('", MVCFunctions.runner_htmlspecialchars((XVar)(CommonFunctions.jsreplace((XVar)(skeys)))), "','", data["sessionid"], "','no');return false;\">", "Desbloquear registro", "</a>"); str = MVCFunctions.Concat(str, "<a class=\"edit\" href=\"#\" onclick=\"Runner.pages.PageManager.getAt('", MVCFunctions.runner_htmlspecialchars((XVar)(CommonFunctions.jsreplace((XVar)(strtable)))), "', ", pageid, ").locking.UnlockAdmin('", MVCFunctions.runner_htmlspecialchars((XVar)(CommonFunctions.jsreplace((XVar)(skeys)))), "','", data["sessionid"], "','yes');return false;\">", "Editar registro", "</a>"); } return(str); } return(""); }
public virtual XVar LogoutAndRedirect(dynamic _param_url = null) { #region default values if (_param_url as Object == null) { _param_url = new XVar(""); } #endregion #region pass-by-value parameters dynamic url = XVar.Clone(_param_url); #endregion Logout(); if (url == XVar.Pack("")) { url = XVar.Clone(MVCFunctions.GetTableLink(new XVar("menu"))); } MVCFunctions.HeaderRedirect((XVar)(MVCFunctions.Concat("", url))); MVCFunctions.ob_flush(); HttpContext.Current.Response.End(); throw new RunnerInlineOutputException(); return(null); }
protected override XVar assignBody() { this.body["begin"] = MVCFunctions.Concat(this.body["begin"], CommonFunctions.GetBaseScriptsForPage(new XVar(false))); this.body["begin"] = MVCFunctions.Concat(this.body["begin"], "<form method=\"post\" action='", MVCFunctions.GetTableLink(new XVar("login")), "' id=\"form", this.id, "\" name=\"form", this.id, "\">\r\n\t\t\t\t\t\t\t\t<input type=\"hidden\" name=\"btnSubmit\" value=\"Login\">"); this.body["end"] = MVCFunctions.Concat(this.body["end"], "</form>"); this.body["end"] = MVCFunctions.Concat(this.body["end"], "<script>"); this.body["end"] = MVCFunctions.Concat(this.body["end"], "window.controlsMap = ", MVCFunctions.my_json_encode((XVar)(this.controlsHTMLMap)), ";"); this.body["end"] = MVCFunctions.Concat(this.body["end"], "window.viewControlsMap = ", MVCFunctions.my_json_encode((XVar)(this.viewControlsHTMLMap)), ";"); this.body["end"] = MVCFunctions.Concat(this.body["end"], "Runner.applyPagesData( ", MVCFunctions.my_json_encode((XVar)(GlobalVars.pagesData)), " );"); this.body["end"] = MVCFunctions.Concat(this.body["end"], "window.settings = ", MVCFunctions.my_json_encode((XVar)(this.jsSettings)), ";</script>"); this.body["end"] = MVCFunctions.Concat(this.body["end"], "<script type=\"text/javascript\" src=\"", MVCFunctions.GetRootPathForResources(new XVar("include/runnerJS/RunnerAll.js")), "\"></script>"); this.body["end"] = MVCFunctions.Concat(this.body["end"], "<script>", PrepareJS(), "</script>"); this.xt.assignbyref(new XVar("body"), (XVar)(this.body)); return(null); }
protected override XVar getShorteningTextAndMoreLink(dynamic _param_value, dynamic _param_cNumberOfChars, dynamic _param_keylink, dynamic _param_isLookup) { #region pass-by-value parameters dynamic value = XVar.Clone(_param_value); dynamic cNumberOfChars = XVar.Clone(_param_cNumberOfChars); dynamic keylink = XVar.Clone(_param_keylink); dynamic isLookup = XVar.Clone(_param_isLookup); #endregion dynamic data = XVar.Array(), isTruncated = null, processedValue = null; data = XVar.Clone(getPocessedHTMLValueData((XVar)(value), (XVar)(cNumberOfChars))); isTruncated = XVar.Clone(data["isTruncated"]); processedValue = XVar.Clone(data["value"]); if (XVar.Pack(this.searchHighlight)) { if (XVar.Pack(isTruncated)) { processedValue = XVar.Clone(highlightTruncatedBeforeMore((XVar)(value), (XVar)(processedValue), (XVar)(cNumberOfChars), (XVar)(data["truncLength"]))); } else { processedValue = XVar.Clone(highlightSearchWord((XVar)(processedValue), new XVar(false), new XVar(""))); } } if (XVar.Pack(isTruncated)) { dynamic dataField = null, link = null, tName = null, var_params = null; tName = XVar.Clone(getContainer().tName); var_params = XVar.Clone(MVCFunctions.Concat("pagetype=", this.container.pSet._viewPage, "&table=", CommonFunctions.GetTableURL((XVar)(tName)), "&field=", MVCFunctions.RawUrlEncode((XVar)(this.field)), keylink)); dataField = XVar.Clone(MVCFunctions.Concat("data-field=\"", MVCFunctions.runner_htmlspecialchars((XVar)(this.field)), "\"")); link = XVar.Clone(MVCFunctions.Concat(" <a href=\"javascript:void(0);\" data-gridlink data-query=\"", MVCFunctions.GetTableLink(new XVar("fulltext")), "?", var_params, "\" ", dataField, ">", "Más", " ...</a>")); processedValue = MVCFunctions.Concat(processedValue, link); } return(processedValue); }
protected virtual XVar setReferer() { dynamic referer = null; referer = XVar.Clone((XVar.Pack((XVar)(MVCFunctions.GetServerVariable("HTTP_REFERER") != "") && (XVar)(MVCFunctions.strpos((XVar)(MVCFunctions.GetServerVariable("HTTP_REFERER")), (XVar)(MVCFunctions.GetTableLink(new XVar("changepwd")))) != MVCFunctions.strlen((XVar)(MVCFunctions.GetServerVariable("HTTP_REFERER"))) - MVCFunctions.strlen((XVar)(MVCFunctions.GetTableLink(new XVar("changepwd")))))) ? XVar.Pack(MVCFunctions.GetServerVariable("HTTP_REFERER")) : XVar.Pack(""))); if (XVar.Pack(!(XVar)(XSession.Session.KeyExists("changepwd_referer")))) { XSession.Session["changepwd_referer"] = (XVar.Pack(referer != XVar.Pack("")) ? XVar.Pack(referer) : XVar.Pack(MVCFunctions.GetTableLink(new XVar("menu")))); } else { if (referer != XVar.Pack("")) { XSession.Session["changepwd_referer"] = referer; } } return(null); }
public override XVar buildControl(dynamic _param_value, dynamic _param_mode, dynamic _param_fieldNum, dynamic _param_validate, dynamic _param_additionalCtrlParams, dynamic _param_data) { #region pass-by-value parameters dynamic value = XVar.Clone(_param_value); dynamic mode = XVar.Clone(_param_mode); dynamic fieldNum = XVar.Clone(_param_fieldNum); dynamic validate = XVar.Clone(_param_validate); dynamic additionalCtrlParams = XVar.Clone(_param_additionalCtrlParams); dynamic data = XVar.Clone(_param_data); #endregion dynamic filesArray = XVar.Array(), jsonValue = null, multiple = null, userFilesArray = XVar.Array(); base.buildControl((XVar)(value), (XVar)(mode), (XVar)(fieldNum), (XVar)(validate), (XVar)(additionalCtrlParams), (XVar)(data)); if ((XVar)(this.pageObject.pageType == Constants.PAGE_SEARCH) || (XVar)(this.pageObject.pageType == Constants.PAGE_LIST)) { dynamic classString = null; classString = new XVar(""); if (XVar.Pack(this.pageObject.isBootstrap())) { classString = new XVar(" class=\"form-control\""); } MVCFunctions.Echo(MVCFunctions.Concat("<input id=\"", this.cfield, "\" ", classString, this.inputStyle, " type=\"text\" ", (XVar.Pack(mode == Constants.MODE_SEARCH) ? XVar.Pack("autocomplete=\"off\" ") : XVar.Pack("")), (XVar.Pack((XVar)((XVar)(mode == Constants.MODE_INLINE_EDIT) || (XVar)(mode == Constants.MODE_INLINE_ADD)) && (XVar)(this.is508 == true)) ? XVar.Pack(MVCFunctions.Concat("alt=\"", this.strLabel, "\" ")) : XVar.Pack("")), "name=\"", this.cfield, "\" ", this.pageObject.pSetEdit.getEditParams((XVar)(this.field)), " value=\"", MVCFunctions.runner_htmlspecialchars((XVar)(value)), "\">")); buildControlEnd((XVar)(validate), (XVar)(mode)); return(null); } if (mode == Constants.MODE_SEARCH) { this.format = new XVar(""); } this.formStamp = XVar.Clone(CommonFunctions.generatePassword(new XVar(15))); initUploadHandler(); this.upload_handler.formStamp = XVar.Clone(this.formStamp); filesArray = XVar.Clone(MVCFunctions.my_json_decode((XVar)(value))); if ((XVar)(!(XVar)(MVCFunctions.is_array((XVar)(filesArray)))) || (XVar)(MVCFunctions.count(filesArray) == 0)) { if (XVar.Pack(!(XVar)(value))) { jsonValue = new XVar("[]"); } else { dynamic uploadedFile = null; uploadedFile = XVar.Clone(this.upload_handler.get_file_object((XVar)(value))); if (XVar.Pack(uploadedFile == null)) { filesArray = XVar.Clone(XVar.Array()); } else { filesArray = XVar.Clone(new XVar(0, MVCFunctions.my_json_decode((XVar)(MVCFunctions.my_json_encode((XVar)(uploadedFile)))))); } } } if (this.pageObject.pageType == Constants.PAGE_EDIT) { if (0 < MVCFunctions.count(this.pageObject.keys)) { dynamic i = null; i = new XVar(1); foreach (KeyValuePair <XVar, dynamic> keyValue in this.pageObject.keys.GetEnumerator()) { this.upload_handler.tkeys = MVCFunctions.Concat(this.upload_handler.tkeys, "&key", i, "=", MVCFunctions.RawUrlEncode((XVar)(keyValue.Value))); i++; } } } XSession.Session[MVCFunctions.Concat("mupload_", this.formStamp)] = XVar.Array(); userFilesArray = XVar.Clone(XVar.Array()); if (XVar.Pack(MVCFunctions.is_array((XVar)(filesArray)))) { foreach (KeyValuePair <XVar, dynamic> file in filesArray.GetEnumerator()) { dynamic sessionArray = XVar.Array(), userFile = XVar.Array(); sessionArray = XVar.Clone(XVar.Array()); sessionArray.InitAndSetArrayItem(file.Value, "file"); sessionArray.InitAndSetArrayItem(true, "fromDB"); sessionArray.InitAndSetArrayItem(false, "deleted"); XSession.Session.InitAndSetArrayItem(sessionArray, MVCFunctions.Concat("mupload_", this.formStamp), file.Value["usrName"]); userFile = XVar.Clone(this.upload_handler.buildUserFile((XVar)(file.Value))); if (XVar.Pack(!(XVar)(userFile["isImg"]))) { userFile.InitAndSetArrayItem(true, "isImg"); userFile.InitAndSetArrayItem(true, "isIco"); userFile.InitAndSetArrayItem(MVCFunctions.Concat(userFile["url"], "&icon=1"), "thumbnail_url"); } userFilesArray.InitAndSetArrayItem(userFile, null); } } jsonValue = XVar.Clone(MVCFunctions.my_json_encode((XVar)(userFilesArray))); multiple = new XVar(""); if ((XVar)(!(XVar)(CommonFunctions.isIOS())) && (XVar)(this.pageObject.pSetEdit.getMaxNumberOfFiles((XVar)(this.field)) != 1)) { multiple = new XVar("multiple "); } MVCFunctions.Echo(MVCFunctions.Concat("\r\n <!-- The file upload form used as target for the file upload widget -->\r\n <form id=\"fileupload_", this.cfieldname, "\" action=\"", MVCFunctions.GetTableLink(new XVar("mfhandler")), "\" method=\"POST\" enctype=\"multipart/form-data\">\r\n \r\n <input type=\"hidden\" name=\"formStamp_", this.cfieldname, "\" id=\"formStamp_", this.cfieldname, "\" value=\"", this.formStamp, "\" />\r\n <input type=\"hidden\" name=\"_action\" value=\"POST\" />\r\n <input type=\"hidden\" id=\"value_", this.cfieldname, "\" name=\"value_", this.cfieldname, "\" value=\"", MVCFunctions.runner_htmlspecialchars((XVar)(jsonValue)), "\" />\r\n \r\n <!-- The fileupload-buttonbar contains buttons to add/delete files and start/cancel the upload -->\r\n <div class=\"fileupload-buttonbar\">\r\n <div class=\"span7\">\r\n <!-- The fileinput-button span is used to style the file input field as button -->\r\n \t\t\t\t<SPAN class=\"btn btn-primary btn-sm fileinput-button\">\r\n\t\t\t\t\t<A class=\"rnr-button filesUpload button\" href=\"#\" ><input class=\"fileinput-button-input\" type=\"file\" name=\"files[]\" value=\"", "Añadir ficheros", "\" ", multiple, " />", "Añadir ficheros", "</A>\r\n\t\t\t\t</SPAN>", "\r\n \r\n </div>\r\n <!-- The global progress information -->\r\n <div class=\"fileupload-progress fade\">\r\n <!-- The global progress bar -->\r\n <div class=\"progress\" role=\"progressbar\" aria-valuemin=\"0\" aria-valuenow=\"0\" aria-valuemax=\"100\">\r\n <div style=\"width:0;\" class=\"bar progress-bar progress-bar-info progress-bar-striped active\" ></div>\r\n </div>\r\n <!-- The extended global progress information -->\r\n <div class=\"progress-extended\"> </div>\r\n </div>\r\n </div>\r\n <!-- The loading indicator is shown during file processing -->\r\n <div class=\"fileupload-loading\"></div>\r\n <!-- The table listing the files available for upload/download -->\r\n <table class=\"mupload-files\"><tbody class=\"files\"></tbody></table>\r\n </form>\r\n ")); if (XVar.Pack(!(XVar)(this.container.globalVals.KeyExists("muploadTemplateIncluded")))) { MVCFunctions.Echo(MVCFunctions.Concat("<script type=\"text/x-tmpl\" id=\"template-download\">{% for (var i=0, file; file=o.files[i]; i++) { %}\r\n <tr class=\"template-download fade\">\r\n {% if (file.error) { %}\r\n <td></td>\r\n <td class=\"name\"><span class=\"text-muted\">{%=file.name%}</span></td>\r\n <td class=\"size\"><span class=\"text-muted\" dir=\"LTR\">{%=o.formatFileSize(file.size)%}</span></td>\r\n <td colspan=2 class=\"error\"><span class=\"text-danger rnr-error\">", "", " {%=locale.fileupload.errors[file.error] || file.error%}</span></td>\r\n {% } else { %}\r\n <td class=\"preview\">{% if (file.thumbnail_url) { %}\r\n <a href=\"{%=file.url%}\" title=\"{%=file.name%}\" rel=\"gallery\" download=\"{%=file.name%}\" \r\n \t{% if (!file.isIco) { %} class=\"zoombox zgallery\" {% } %} \r\n \t><img class=\"mupload-preview-img\" src=\"{%=file.thumbnail_url%}&src=1\"></a>\r\n {% } else { %}\r\n \t{% if (file.isImg) { %}\r\n \t\t<a href=\"{%=file.url%}&nodisp=1\" title=\"{%=file.name%}\" rel=\"gallery\" download=\"{%=file.name%}\" class=\"zoombox zgallery\"><img class=\"mupload-preview-img\" src=\"{%=file.url%}&src=1\"></a>\r\n \t{% } %}\r\n {% } %}</td>\r\n <td class=\"name\">\r\n <a href=\"{%=file.url%}\" title=\"{%=file.name%}\" rel=\"{%=file.thumbnail_url&&'gallery'%}\" download=\"{%=file.name%}\">{%=file.name%}</a>\r\n </td>\r\n <td class=\"size\"><span dir=\"LTR\">{%=o.formatFileSize(file.size)%}</span></td>\r\n\t\t\t<td></td>\r\n\t\t\t<td class=\"delete\">\r\n\t\t\t\t{% if (!file.error) { %}\r\n\t\t\t\t<SPAN class=\"btn btn-xs btn-default delete\" data-type=\"{%=file.delete_type%}\" data-url=\"{%=file.delete_url%}\" data-name=\"{%=file.name%}\">\r\n\t\t\t\t\t<A href=\"#\" >", "Borrar artículos seleccionados", "</A>\r\n\t\t\t\t\t</SPAN>\r\n\t\t\t\t{% } %}\r\n\t\t\t</td>\r\n {% } %}\r\n </tr>\r\n{% } %}\r\n</script>\r\n<script type=\"text/x-tmpl\" id=\"template-upload\">{% for (var i=0, file; file=o.files[i]; i++) { %}\r\n <tr class=\"template-upload fade\">\r\n <td class=\"preview\"><span class=\"fade\"></span></td>\r\n {% if (file.error) { %}\r\n\t\t\t<td class=\"name\"><span class=\"text-muted\">{%=file.name%}</span></td>\r\n\t\t\t<td class=\"size\"><span class=\"text-muted\">{%=o.formatFileSize(file.size)%}</span></td>\r\n <td class=\"error\" colspan=\"2\"><span class=\"text-danger rnr-error\">", "", " {%=locale.fileupload.errors[file.error] || file.error%}</span></td>\r\n {% } else if (o.files.valid && !i) { %}\r\n\t\t\t<td class=\"name\"><span>{%=file.name%}</span></td>\r\n\t\t\t<td class=\"size\"><span>{%=o.formatFileSize(file.size)%}</span></td>\r\n <td>\r\n <div class=\"progress progress-success progress-striped active\" role=\"progressbar\" aria-valuemin=\"0\" \r\n \taria-valuemax=\"100\" aria-valuenow=\"0\"><div class=\"progress-bar bar\" style=\"width:0;\"></div></div>\r\n </td>\r\n {% } else { %}\r\n <td></td>\r\n {% } %}\r\n <td class=\"cancel\">{% if (!i) { %}\r\n \t{% if (!file.error) { %}\r\n \t<SPAN class=\"btn btn-default btn-xs\">\r\n\t\t\t\t<A href=\"#\" >", "Cancelar", "</A>\r\n\t\t\t\t</SPAN>\r\n\t\t\t{% } %}\r\n {% } %}</td>\r\n </tr>\r\n{% } %}</script>")); this.container.globalVals.InitAndSetArrayItem(true, "muploadTemplateIncluded"); } buildControlEnd((XVar)(validate), (XVar)(mode)); return(null); }
public override XVar showDBValue(dynamic data, dynamic _param_keylink, dynamic _param_html = null) { #region default values if (_param_html as Object == null) { _param_html = new XVar(true); } #endregion #region pass-by-value parameters dynamic keylink = XVar.Clone(_param_keylink); dynamic html = XVar.Clone(_param_html); #endregion dynamic fileName = null, fileNameF = null, value = null; value = new XVar(""); if ((XVar)(data[this.field] != null) && (XVar)(this.container.pageType != Constants.PAGE_PRINT)) { dynamic href = null, vHeight = null, vWidth = null, var_type = null, videoId = null; videoId = XVar.Clone(MVCFunctions.Concat("video_", MVCFunctions.GoodFieldName((XVar)(MVCFunctions.runner_htmlspecialchars((XVar)(this.field)))), "_")); videoId = MVCFunctions.Concat(videoId, getContainer().id, "_"); if (getContainer().pageType != Constants.PAGE_ADD) { videoId = MVCFunctions.Concat(videoId, getContainer().recId); } else { videoId = MVCFunctions.Concat(videoId, CommonFunctions.postvalue_number(new XVar("id"))); } var_type = new XVar("video/mp4"); fileName = new XVar("file.mp4"); fileNameF = XVar.Clone(getContainer().pSet.getFilenameField((XVar)(this.field))); if (XVar.Pack(fileNameF)) { fileName = XVar.Clone(data[fileNameF]); if (XVar.Pack(!(XVar)(fileName))) { fileName = new XVar("file.mp4"); } else { var_type = XVar.Clone(CommonFunctions.getContentTypeByExtension((XVar)(MVCFunctions.substr((XVar)(fileName), (XVar)(MVCFunctions.strrpos((XVar)(fileName), new XVar("."))))))); } } href = XVar.Clone(MVCFunctions.GetTableLink(new XVar("mfhandler"), new XVar(""), (XVar)(MVCFunctions.Concat("filename=", fileName, "&table=", MVCFunctions.RawUrlEncode((XVar)(getContainer().pSet._table)), "&field=", MVCFunctions.RawUrlEncode((XVar)(this.field)), "&pageType=", getContainer().pageType, keylink)))); vWidth = XVar.Clone(getContainer().pSet.getVideoWidth((XVar)(this.field))); vHeight = XVar.Clone(getContainer().pSet.getVideoHeight((XVar)(this.field))); if (vWidth == XVar.Pack(0)) { vWidth = new XVar(300); } if (vHeight == XVar.Pack(0)) { vHeight = new XVar(200); } value = MVCFunctions.Concat(value, "\r\n\t\t\t\t<div style=\"width:", vWidth, "px; height:", vHeight, "px;\">\r\n\t\t\t\t<video class=\"projekktor\" width=\"", vWidth, "\" height=\"", vHeight, "\" id=\"", videoId, "\" type=\"", var_type, "\" src=\"", href, "\" >\r\n\t\t\t\t</video></div>"); if (this.pageObject != null) { this.pageObject.controlsMap.InitAndSetArrayItem(videoId, "video", null); } } else { fileNameF = XVar.Clone(getContainer().pSet.getFilenameField((XVar)(this.field))); if (XVar.Pack(fileNameF)) { fileName = XVar.Clone(data[fileNameF]); if (XVar.Pack(!(XVar)(fileName))) { value = XVar.Clone(fileName); } } } return(value); }
public ActionResult menu() { try { dynamic id = null, pageObject = null, redirect = null, var_params = XVar.Array(); XTempl xt; Security.processLogoutRequest(); if (XVar.Pack(!(XVar)(CommonFunctions.isLogged()))) { MVCFunctions.HeaderRedirect(new XVar("login")); return(MVCFunctions.GetBuferContentAndClearBufer()); } if ((XVar)(XSession.Session["MyURL"] == "") || (XVar)(!(XVar)(CommonFunctions.isLoggedAsGuest()))) { Security.saveRedirectURL(); } { TLayout t_layout = null; t_layout = new TLayout(new XVar("menu2"), new XVar("AvenueAvenue"), new XVar("MobileAvenue")); t_layout.version = 2; t_layout.blocks["top"] = XVar.Array(); t_layout.containers["menu"] = XVar.Array(); t_layout.containers["menu"].Add(new XVar("name", "login_menu", "block", "loggedas_block", "substyle", 2)); t_layout.containers["menu"].Add(new XVar("name", "vmenu", "block", "menu_block", "substyle", 1)); t_layout.skins["menu"] = "1"; t_layout.blocks["top"].Add("menu"); GlobalVars.page_layouts["menu"] = t_layout; t_layout.skinsparams = XVar.Array(); t_layout.skinsparams["empty"] = XVar.Array(); t_layout.skinsparams["empty"]["button"] = "button2"; t_layout.skinsparams["menu"] = XVar.Array(); t_layout.skinsparams["menu"]["button"] = "button1"; t_layout.skinsparams["hmenu"] = XVar.Array(); t_layout.skinsparams["hmenu"]["button"] = "button1"; t_layout.skinsparams["undermenu"] = XVar.Array(); t_layout.skinsparams["undermenu"]["button"] = "button1"; t_layout.skinsparams["fields"] = XVar.Array(); t_layout.skinsparams["fields"]["button"] = "button1"; t_layout.skinsparams["form"] = XVar.Array(); t_layout.skinsparams["form"]["button"] = "button1"; t_layout.skinsparams["1"] = XVar.Array(); t_layout.skinsparams["1"]["button"] = "button1"; t_layout.skinsparams["2"] = XVar.Array(); t_layout.skinsparams["2"]["button"] = "button1"; t_layout.skinsparams["3"] = XVar.Array(); t_layout.skinsparams["3"]["button"] = "button1"; } GlobalVars.tableEvents.InitAndSetArrayItem(new eventclass_dbo__ABCVotes(), "dbo._ABCVotes"); GlobalVars.tableEvents.InitAndSetArrayItem(new eventclass_ABC_Voting_My_Voting(), "ABC_Voting_My_Voting"); xt = XVar.UnPackXTempl(new XTempl()); id = XVar.Clone((XVar.Pack(!XVar.Equals(XVar.Pack(MVCFunctions.postvalue(new XVar("id"))), XVar.Pack(""))) ? XVar.Pack(MVCFunctions.postvalue(new XVar("id"))) : XVar.Pack(1))); var_params = XVar.Clone(XVar.Array()); var_params.InitAndSetArrayItem(id, "id"); var_params.InitAndSetArrayItem(xt, "xt"); var_params.InitAndSetArrayItem(Constants.NOT_TABLE_BASED_TNAME, "tName"); var_params.InitAndSetArrayItem(Constants.PAGE_MENU, "pageType"); var_params.InitAndSetArrayItem("menu.cshtml", "templatefile"); var_params.InitAndSetArrayItem(GlobalVars.isGroupSecurity, "isGroupSecurity"); var_params.InitAndSetArrayItem(false, "needSearchClauseObj"); GlobalVars.pageObject = XVar.Clone(new RunnerPage((XVar)(var_params))); GlobalVars.pageObject.init(); GlobalVars.pageObject.commonAssign(); if (XVar.Pack(GlobalVars.globalEvents.exists(new XVar("BeforeProcessMenu")))) { GlobalVars.globalEvents.BeforeProcessMenu((XVar)(GlobalVars.pageObject)); } GlobalVars.pageObject.body["begin"] = MVCFunctions.Concat(GlobalVars.pageObject.body["begin"], CommonFunctions.GetBaseScriptsForPage(new XVar(false))); GlobalVars.pageObject.addCommonJs(); GlobalVars.pageObject.fillSetCntrlMaps(); GlobalVars.pageObject.setLangParams(); xt.assign(new XVar("id"), (XVar)(id)); xt.assign(new XVar("username"), (XVar)(XSession.Session["UserName"])); xt.assign(new XVar("changepwd_link"), (XVar)((XVar)(XSession.Session["AccessLevel"] != Constants.ACCESS_LEVEL_GUEST) && (XVar)(XSession.Session["fromFacebook"] == false))); xt.assign(new XVar("changepwdlink_attrs"), (XVar)(MVCFunctions.Concat("onclick=\"window.location.href='", MVCFunctions.GetTableLink(new XVar("changepwd")), "';return false;\""))); xt.assign(new XVar("logoutlink_attrs"), (XVar)(MVCFunctions.Concat("id=\"logoutButton", id, "\""))); xt.assign(new XVar("guestloginlink_attrs"), (XVar)(MVCFunctions.Concat("id=\"loginButton", id, "\""))); xt.assign(new XVar("loggedas_block"), (XVar)(!(XVar)(CommonFunctions.isLoggedAsGuest()))); xt.assign(new XVar("loggedas_message"), (XVar)(!(XVar)(CommonFunctions.isLoggedAsGuest()))); xt.assign(new XVar("logout_link"), new XVar(true)); xt.assign(new XVar("guestloginbutton"), (XVar)(CommonFunctions.isLoggedAsGuest())); xt.assign(new XVar("logoutbutton"), (XVar)((XVar)(CommonFunctions.isSingleSign()) && (XVar)(!(XVar)(CommonFunctions.isLoggedAsGuest())))); redirect = XVar.Clone(GlobalVars.pageObject.getRedirectForMenuPage()); if (XVar.Pack(redirect)) { MVCFunctions.HeaderRedirect((XVar)(MVCFunctions.Concat("", redirect))); MVCFunctions.Echo(new XVar("")); return(MVCFunctions.GetBuferContentAndClearBufer()); } xt.assign(new XVar("menu_block"), new XVar(true)); if (XVar.Pack(GlobalVars.globalEvents.exists(new XVar("BeforeShowMenu")))) { new Func <XVar>(() => { var GlobalVars_pageObject_templatefile_byref = GlobalVars.pageObject.templatefile; var result = GlobalVars.globalEvents.BeforeShowMenu((XVar)(xt), ref GlobalVars_pageObject_templatefile_byref, (XVar)(GlobalVars.pageObject)); GlobalVars.pageObject.templatefile = GlobalVars_pageObject_templatefile_byref; return(result); }).Invoke(); } GlobalVars.pageObject.body["end"] = MVCFunctions.Concat(GlobalVars.pageObject.body["end"], "<script>"); GlobalVars.pageObject.body["end"] = MVCFunctions.Concat(GlobalVars.pageObject.body["end"], "window.controlsMap = ", MVCFunctions.my_json_encode((XVar)(GlobalVars.pageObject.controlsHTMLMap)), ";"); GlobalVars.pageObject.body["end"] = MVCFunctions.Concat(GlobalVars.pageObject.body["end"], "window.viewControlsMap = ", MVCFunctions.my_json_encode((XVar)(GlobalVars.pageObject.viewControlsHTMLMap)), ";"); GlobalVars.pageObject.body["end"] = MVCFunctions.Concat(GlobalVars.pageObject.body["end"], "Runner.applyPagesData( ", MVCFunctions.my_json_encode((XVar)(GlobalVars.pagesData)), " );"); GlobalVars.pageObject.body["end"] = MVCFunctions.Concat(GlobalVars.pageObject.body["end"], "window.settings = ", MVCFunctions.my_json_encode((XVar)(GlobalVars.pageObject.jsSettings)), ";</script>"); GlobalVars.pageObject.body["end"] = MVCFunctions.Concat(GlobalVars.pageObject.body["end"], "<script type=\"text/javascript\" src=\"", MVCFunctions.GetRootPathForResources(new XVar("include/runnerJS/RunnerAll.js")), "\"></script>"); GlobalVars.pageObject.body["end"] = MVCFunctions.Concat(GlobalVars.pageObject.body["end"], "<script>", GlobalVars.pageObject.PrepareJS(), "</script>"); xt.assignbyref(new XVar("body"), (XVar)(GlobalVars.pageObject.body)); GlobalVars.pageObject.display((XVar)(GlobalVars.pageObject.templatefile)); ViewBag.xt = xt; return(View(xt.GetViewPath())); } catch (RunnerRedirectException ex) { return(Redirect(ex.Message)); } }
public override XVar buildControl(dynamic _param_value, dynamic _param_mode, dynamic _param_fieldNum, dynamic _param_validate, dynamic _param_additionalCtrlParams, dynamic _param_data) { #region pass-by-value parameters dynamic value = XVar.Clone(_param_value); dynamic mode = XVar.Clone(_param_mode); dynamic fieldNum = XVar.Clone(_param_fieldNum); dynamic validate = XVar.Clone(_param_validate); dynamic additionalCtrlParams = XVar.Clone(_param_additionalCtrlParams); dynamic data = XVar.Clone(_param_data); #endregion dynamic disp = null, strfilename = null, strtype = null; base.buildControl((XVar)(value), (XVar)(mode), (XVar)(fieldNum), (XVar)(validate), (XVar)(additionalCtrlParams), (XVar)(data)); disp = new XVar(""); strfilename = new XVar(""); if ((XVar)(mode == Constants.MODE_EDIT) || (XVar)(mode == Constants.MODE_INLINE_EDIT)) { dynamic filename = null, itype = null; value = XVar.Clone(this.connection.stripSlashesBinary((XVar)(value))); itype = XVar.Clone(MVCFunctions.SupposeImageType((XVar)(value))); if (XVar.Pack(itype)) { if (XVar.Pack(this.pageObject.pSetEdit.showThumbnail((XVar)(this.field)))) { disp = new XVar("<a target=_blank"); disp = MVCFunctions.Concat(disp, " href=\"", MVCFunctions.GetTableLink(new XVar("imager"), new XVar(""), (XVar)(MVCFunctions.Concat("table=", CommonFunctions.GetTableURL((XVar)(this.pageObject.tName)), "&", this.iquery, "&rndVal=", MVCFunctions.rand(new XVar(0), new XVar(32768))))), "\" class='zoombox'>"); disp = MVCFunctions.Concat(disp, "<img id=\"image_", MVCFunctions.GoodFieldName((XVar)(this.field)), "_", this.id, "\" name=\"", this.cfield, "\" border=0"); if (XVar.Pack(this.is508)) { disp = MVCFunctions.Concat(disp, " alt=\"Image from DB\""); } disp = MVCFunctions.Concat(disp, " src=\"", MVCFunctions.GetTableLink(new XVar("imager"), new XVar(""), (XVar)(MVCFunctions.Concat("table=", CommonFunctions.GetTableURL((XVar)(this.pageObject.tName)), "&field=", MVCFunctions.RawUrlEncode((XVar)(this.pageObject.pSetEdit.getStrThumbnail((XVar)(this.field)))), "&alt=", MVCFunctions.RawUrlEncode((XVar)(this.field)), this.keylink, "&rndVal=", MVCFunctions.rand(new XVar(0), new XVar(32768))))), "\">"); disp = MVCFunctions.Concat(disp, "</a>"); } else { disp = XVar.Clone(MVCFunctions.Concat("<img id=\"image_", MVCFunctions.GoodFieldName((XVar)(this.field)), "_", this.id, "\" name=\"", this.cfield, "\"")); if (XVar.Pack(this.is508)) { disp = MVCFunctions.Concat(disp, " alt=\"Image from DB\""); } disp = MVCFunctions.Concat(disp, " border=0 src=\"", MVCFunctions.GetTableLink(new XVar("imager"), new XVar(""), (XVar)(MVCFunctions.Concat("table=", CommonFunctions.GetTableURL((XVar)(this.pageObject.tName)), "&", this.iquery, "&src=1&rndVal=", MVCFunctions.rand(new XVar(0), new XVar(32768))))), "\">"); } } else { if (XVar.Pack(MVCFunctions.strlen((XVar)(value)))) { disp = XVar.Clone(MVCFunctions.Concat("<img id=\"image_", MVCFunctions.GoodFieldName((XVar)(this.field)), "_", this.id, "\" name=\"", this.cfield, "\" border=0 ")); if (XVar.Pack(this.is508)) { disp = MVCFunctions.Concat(disp, " alt=\"file\""); } disp = MVCFunctions.Concat(disp, " src=\"", MVCFunctions.GetRootPathForResources(new XVar("images/file.gif")), "\">"); } } if ((XVar)((XVar)(this.format == Constants.EDIT_FORMAT_DATABASE_FILE) && (XVar)(!(XVar)(itype))) && (XVar)(MVCFunctions.strlen((XVar)(value)))) { if (XVar.Pack(!(XVar)(filename = XVar.Clone(data[this.pageObject.pSetEdit.getFilenameField((XVar)(this.field))])))) { filename = new XVar("file.bin"); } disp = XVar.Clone(MVCFunctions.Concat("<a href=\"", MVCFunctions.GetTableLink(new XVar("getfile"), new XVar(""), (XVar)(MVCFunctions.Concat("table=", CommonFunctions.GetTableURL((XVar)(this.pageObject.tName)), "&filename=", MVCFunctions.runner_htmlspecialchars((XVar)(filename)), "&", this.iquery))), "\".>", disp, "</a>")); } if ((XVar)(this.format == Constants.EDIT_FORMAT_DATABASE_FILE) && (XVar)(this.pageObject.pSetEdit.getFilenameField((XVar)(this.field)))) { if (XVar.Pack(!(XVar)(filename = XVar.Clone(data[this.pageObject.pSetEdit.getFilenameField((XVar)(this.field))])))) { filename = new XVar(""); } if (mode == Constants.MODE_INLINE_EDIT) { strfilename = XVar.Clone(MVCFunctions.Concat("<br><label for=\"filename_", this.cfieldname, "\">", "Filename", "</label> <input type=\"text\" ", this.inputStyle, " id=\"filename_", this.cfieldname, "\" name=\"filename_", this.cfieldname, "\" size=\"20\" maxlength=\"50\" value=\"", MVCFunctions.runner_htmlspecialchars((XVar)(filename)), "\">")); } else { strfilename = XVar.Clone(MVCFunctions.Concat("<br><label for=\"filename_", this.cfieldname, "\">", "Filename", "</label> <input type=\"text\" ", this.inputStyle, " id=\"filename_", this.cfieldname, "\" name=\"filename_", this.cfieldname, "\" size=\"20\" maxlength=\"50\" value=\"", MVCFunctions.runner_htmlspecialchars((XVar)(filename)), "\">")); } } if (XVar.Pack(MVCFunctions.strlen((XVar)(value)))) { strtype = XVar.Clone(MVCFunctions.Concat("<br><input id=\"", this.ctype, "_keep\" type=\"Radio\" name=\"", this.ctype, "\" value=\"file0\" checked class=\"rnr-uploadtype\">", "Keep")); if ((XVar)(MVCFunctions.strlen((XVar)(value))) && (XVar)(!(XVar)(this.pageObject.pSetEdit.isRequired((XVar)(this.field))))) { strtype = MVCFunctions.Concat(strtype, "<input id=\"", this.ctype, "_delete\" type=\"Radio\" name=\"", this.ctype, "\" value=\"file1\" class=\"rnr-uploadtype\">", "Delete"); } strtype = MVCFunctions.Concat(strtype, "<input id=\"", this.ctype, "_update\" type=\"Radio\" name=\"", this.ctype, "\" value=\"file2\" class=\"rnr-uploadtype\">", "Update"); } else { strtype = XVar.Clone(MVCFunctions.Concat("<input id=\"", this.ctype, "_update\" type=\"hidden\" name=\"", this.ctype, "\" value=\"file2\" class=\"rnr-uploadtype\">")); } } else { strtype = XVar.Clone(MVCFunctions.Concat("<input id=\"", this.ctype, "\" type=\"hidden\" name=\"", this.ctype, "\" value=\"file2\">")); if ((XVar)(this.format == Constants.EDIT_FORMAT_DATABASE_FILE) && (XVar)(this.pageObject.pSetEdit.getFilenameField((XVar)(this.field)))) { strfilename = XVar.Clone(MVCFunctions.Concat("<br><label for=\"filename_", this.cfieldname, "\">", "Filename", "</label> <input type=\"text\" ", this.inputStyle, " id=\"filename_", this.cfieldname, "\" name=\"filename_", this.cfieldname, "\" size=\"20\" maxlength=\"50\">")); } } if ((XVar)(mode == Constants.MODE_INLINE_EDIT) && (XVar)(this.format == Constants.EDIT_FORMAT_DATABASE_FILE)) { disp = new XVar(""); } MVCFunctions.Echo(MVCFunctions.Concat(disp, strtype)); if ((XVar)((XVar)(mode == Constants.MODE_EDIT) || (XVar)(mode == Constants.MODE_INLINE_EDIT)) && (XVar)(MVCFunctions.strlen((XVar)(value)))) { MVCFunctions.Echo("<br>"); } MVCFunctions.Echo(MVCFunctions.Concat("<input type=\"File\" ", this.inputStyle, " id=\"", this.cfield, "\" ", (XVar.Pack((XVar)((XVar)(mode == Constants.MODE_INLINE_EDIT) || (XVar)(mode == Constants.MODE_INLINE_ADD)) && (XVar)(this.is508)) ? XVar.Pack(MVCFunctions.Concat("alt=\"", this.strLabel, "\" ")) : XVar.Pack("")), " name=\"", this.cfield, "\" >", strfilename)); MVCFunctions.Echo(MVCFunctions.Concat("<input type=\"Hidden\" id=\"notempty_", this.cfieldname, "\" value=\"", (XVar.Pack(MVCFunctions.strlen((XVar)(value))) ? XVar.Pack(1) : XVar.Pack(0)), "\">")); buildControlEnd((XVar)(validate), (XVar)(mode)); return(null); }
public virtual XVar getRedirectForMenuPage() { dynamic i = null, menuNodes = XVar.Array(), redirect = null; if (XVar.Pack(isShowMenu())) { return(""); } redirect = new XVar(""); menuNodes = XVar.Clone(getMenuNodes()); i = new XVar(0); for (; i < MVCFunctions.count(menuNodes); i++) { if (menuNodes[i]["linkType"] == "Internal") { if (XVar.Pack(isUserHaveTablePerm((XVar)(menuNodes[i]["table"]), (XVar)(menuNodes[i]["pageType"])))) { dynamic var_type = null; var_type = XVar.Clone(getPermisType((XVar)(menuNodes[i]["pageType"]))); if (var_type == "A") { redirect = new XVar("add"); } if (var_type == "E") { redirect = new XVar("edit"); } else { if ((XVar)(menuNodes[i]["pageType"] == "list") && (XVar)(var_type == "S")) { redirect = new XVar("list"); } else { if ((XVar)(menuNodes[i]["pageType"] == "report") && (XVar)(var_type == "S")) { redirect = new XVar("report"); } else { if ((XVar)(menuNodes[i]["pageType"] == "chart") && (XVar)(var_type == "S")) { redirect = new XVar("chart"); } else { if ((XVar)(menuNodes[i]["pageType"] == "view") && (XVar)(var_type == "S")) { redirect = new XVar("view"); } else { if ((XVar)(menuNodes[i]["pageType"] == "dashboard") && (XVar)(var_type == "S")) { redirect = new XVar("dashboard"); } } } } } } redirect = XVar.Clone(MVCFunctions.GetTableLink((XVar)(CommonFunctions.GetTableURL((XVar)(menuNodes[i]["table"]))), (XVar)(redirect))); } } } if ((XVar)(this.isDynamicPerm) && (XVar)(CommonFunctions.IsAdmin())) { redirect = XVar.Clone(MVCFunctions.GetTableLink(new XVar("admin_rights"), new XVar("list"))); } if (XVar.Pack(this.isAddWebRep)) { redirect = XVar.Clone(MVCFunctions.GetTableLink(new XVar("webreport"))); } return(redirect); }
public virtual XVar doCommonAssignments() { dynamic rememberPassword = null, rememberbox_checked = null; this.xt.assign(new XVar("id"), (XVar)(this.id)); this.xt.assign(new XVar("loginlink_attrs"), (XVar)(MVCFunctions.Concat("id=\"submitLogin", this.id, "\""))); if ((XVar)((XVar)((XVar)(this.loggedByCredentials) && (XVar)(this.mode == Constants.LOGIN_EMBEDED)) && (XVar)(this.twoFactAuth)) && (XVar)(this.skipSecondStep)) { return(null); } setLangParams(); rememberbox_checked = new XVar(""); if ((XVar)((XVar)(rememberPassword) || (XVar)(MVCFunctions.GetCookie("username"))) || (XVar)(MVCFunctions.GetCookie("password"))) { rememberbox_checked = new XVar(" checked"); } this.xt.assign(new XVar("rememberbox_attrs"), (XVar)(MVCFunctions.Concat((XVar.Pack(this.is508) ? XVar.Pack("id=\"remember_password\" ") : XVar.Pack("")), "name=\"remember_password\" value=\"1\"", rememberbox_checked))); this.xt.assign(new XVar("guestlink_block"), (XVar)((XVar)((XVar)(this.mode == Constants.LOGIN_SIMPLE) && (XVar)(CommonFunctions.guestHasPermissions())) && (XVar)(CommonFunctions.isGuestLoginAvailable()))); this.xt.assign(new XVar("username_label"), new XVar(true)); this.xt.assign(new XVar("password_label"), new XVar(true)); this.xt.assign(new XVar("remember_password_label"), new XVar(true)); if ((XVar)(this.is508) && (XVar)(getLayoutVersion() != Constants.BOOTSTRAP_LAYOUT)) { this.xt.assign_section(new XVar("username_label"), new XVar("<label for=\"username\">"), new XVar("</label>")); this.xt.assign_section(new XVar("password_label"), new XVar("<label for=\"password\">"), new XVar("</label>")); this.xt.assign_section(new XVar("remember_password_label"), new XVar("<label for=\"remember_password\">"), new XVar("</label>")); } if ((XVar)((XVar)(this.message) || (XVar)(this.mode == Constants.LOGIN_POPUP)) || (XVar)(this.twoFactAuth)) { this.xt.assign(new XVar("message_block"), new XVar(true)); if (getLayoutVersion() == Constants.BOOTSTRAP_LAYOUT) { this.xt.assign(new XVar("message"), (XVar)(this.message)); } else { this.xt.assign(new XVar("message"), (XVar)(MVCFunctions.Concat("<div id='login_message' class='message rnr-error'>", this.message, "</div>"))); } if (getLayoutVersion() == Constants.BOOTSTRAP_LAYOUT) { this.xt.assign(new XVar("message_class"), (XVar)((XVar.Pack(this.messageType == Constants.MESSAGE_INFO) ? XVar.Pack("alert-success") : XVar.Pack("alert-danger")))); } if (XVar.Pack(!(XVar)(this.message))) { this.xt.displayBrickHidden(new XVar("message")); } } if (XVar.Pack(MVCFunctions.strlen((XVar)(this.var_pUsername)))) { this.xt.assign(new XVar("username_attrs"), (XVar)(MVCFunctions.Concat((XVar.Pack(this.is508) ? XVar.Pack("id=\"username\" ") : XVar.Pack("")), "value=\"", MVCFunctions.runner_htmlspecialchars((XVar)(this.var_pUsername)), "\""))); } else { if (XVar.Pack(!(XVar)(this.twoFactAuth))) { this.xt.assign(new XVar("username_attrs"), (XVar)(MVCFunctions.Concat((XVar.Pack(this.is508) ? XVar.Pack("id=\"username\" ") : XVar.Pack("")), "value=\"", MVCFunctions.runner_htmlspecialchars((XVar)(MVCFunctions.GetCookie("username"))), "\""))); } } if (XVar.Pack(MVCFunctions.strlen((XVar)(this.var_pPassword)))) { this.xt.assign(new XVar("password_attrs"), (XVar)(MVCFunctions.Concat((XVar.Pack(this.is508) ? XVar.Pack(" id=\"password\"") : XVar.Pack("")), " value=\"", MVCFunctions.runner_htmlspecialchars((XVar)(this.var_pPassword)), "\""))); } else { if (XVar.Pack(!(XVar)(this.twoFactAuth))) { this.xt.assign(new XVar("password_attrs"), (XVar)(MVCFunctions.Concat((XVar.Pack(this.is508) ? XVar.Pack(" id=\"password\"") : XVar.Pack("")), " value=\"", MVCFunctions.runner_htmlspecialchars((XVar)(MVCFunctions.GetCookie("password"))), "\""))); } } if ((XVar)(this.myurl) && (XVar)(XSession.Session["MyUrlAccess"])) { this.xt.assign(new XVar("guestlink_attrs"), (XVar)(MVCFunctions.Concat("href=\"", this.myurl, "\""))); } else { this.xt.assign(new XVar("guestlink_attrs"), (XVar)(MVCFunctions.Concat("href=\"", MVCFunctions.GetTableLink(new XVar("menu")), "\""))); } if ((XVar)((XVar)(this.loggedByCredentials) && (XVar)(this.mode == Constants.LOGIN_EMBEDED)) && (XVar)(this.twoFactAuth)) { doAssignForSecondAuthStep((XVar)(!(XVar)(this.pnoneNotInQuery))); this.xt.displayBrickHidden(new XVar("bsloginregister")); this.xt.displayBrickHidden(new XVar("mesreg")); this.xt.displayBrickHidden(new XVar("mesforgot")); } else { this.xt.assign(new XVar("main_loginfields"), new XVar(true)); this.xt.assign(new XVar("signin_button"), new XVar(true)); } if ((XVar)(this.mode == Constants.LOGIN_POPUP) || (XVar)((XVar)(this.mode == Constants.LOGIN_EMBEDED) && (XVar)(this.twoFactAuth))) { if (XVar.Pack(this.notRedirect)) { this.body["begin"] = MVCFunctions.Concat(this.body["begin"], "<input type=hidden id='notRedirect' value=1>"); this.xt.assign(new XVar("continuebutton_attrs"), new XVar("href=\"#\" style=\"display:none\" id=\"continueButton\"")); this.xt.assign(new XVar("continue_button"), new XVar(true)); } this.xt.assign(new XVar("footer"), new XVar(false)); this.xt.assign(new XVar("header"), new XVar(false)); this.xt.assign(new XVar("body"), (XVar)(this.body)); this.xt.assign(new XVar("registerlink_attrs"), (XVar)(MVCFunctions.Concat("name=\"RegisterPage\" data-table=\"", MVCFunctions.runner_htmlspecialchars((XVar)(GlobalVars.cLoginTable)), "\""))); this.xt.assign(new XVar("forgotpasswordlink_attrs"), new XVar("name=\"ForgotPasswordPage\"")); } return(null); }
public virtual XVar getMenuItemAttributes(dynamic _param_showSubmenu = null) { #region default values if (_param_showSubmenu as Object == null) { _param_showSubmenu = new XVar(true); } #endregion #region pass-by-value parameters dynamic showSubmenu = XVar.Clone(_param_showSubmenu); #endregion dynamic attrs = XVar.Array(); attrs = XVar.Clone(XVar.Array()); if ((XVar)((XVar)(isBootstrap()) && (XVar)(isShowAsGroup())) && (XVar)(showSubmenu)) { if (XVar.Pack(isTreelike())) { attrs.InitAndSetArrayItem("collapse", "data-toggle"); attrs.InitAndSetArrayItem(MVCFunctions.Concat("#submenu", this.id), "data-target"); } else { attrs.InitAndSetArrayItem("dropdown-toggle", "class"); if (XVar.Pack(isDrillDown())) { attrs.InitAndSetArrayItem("dropdown", "data-toggle"); } else { attrs.InitAndSetArrayItem("nested-dropdown", "data-toggle"); } attrs.InitAndSetArrayItem("true", "aria-haspopup"); attrs.InitAndSetArrayItem("false", "aria-expanded"); } } attrs.InitAndSetArrayItem(MVCFunctions.Concat("itemlink", this.id), "id"); attrs.InitAndSetArrayItem(this.title, "itemtitle"); if (this.style != "") { attrs.InitAndSetArrayItem(this.style, "style"); } if (this.openType == "NewWindow") { attrs.InitAndSetArrayItem("external", "rel"); attrs.InitAndSetArrayItem("_blank", "target"); attrs.InitAndSetArrayItem("External", "link"); } if ((XVar)(this.linkType == "Internal") && (XVar)(this.pageType == "WebReports")) { attrs.InitAndSetArrayItem(MVCFunctions.GetTableLink(new XVar("webreport")), "href"); attrs.InitAndSetArrayItem(MVCFunctions.GetTableLink(new XVar("webreport")), "value"); } else { if (this.linkType == "Internal") { dynamic menuIdGetParam = null; menuIdGetParam = new XVar(""); if (1 < this.menuTableMap[this.table][MVCFunctions.strtolower((XVar)(this.pageType))]) { menuIdGetParam = XVar.Clone(MVCFunctions.Concat("menuItemId=", this.id)); } if (XVar.Pack(this.var_params)) { if (XVar.Pack(menuIdGetParam)) { menuIdGetParam = MVCFunctions.Concat(menuIdGetParam, "&", this.var_params); } else { menuIdGetParam = MVCFunctions.Concat(menuIdGetParam, this.var_params); } } attrs.InitAndSetArrayItem(MVCFunctions.GetTableLink((XVar)(CommonFunctions.GetTableURL((XVar)(this.table))), (XVar)(MVCFunctions.strtolower((XVar)(this.pageType))), (XVar)(menuIdGetParam)), "href"); attrs.InitAndSetArrayItem(MVCFunctions.GetTableLink((XVar)(CommonFunctions.GetTableURL((XVar)(this.table))), (XVar)(MVCFunctions.strtolower((XVar)(this.pageType))), (XVar)(menuIdGetParam)), "value"); } else { if (this.linkType == "External") { attrs.InitAndSetArrayItem(this.href, "href"); attrs.InitAndSetArrayItem(this.href, "value"); } } } return(attrs); }
public ActionResult Route() { string tName = "", pType = ""; return(Redirect(MVCFunctions.GetTableLink(tName, pType))); }
public virtual XVar getMenuItemAttributes(dynamic _param_showSubmenu = null) { #region default values if (_param_showSubmenu as Object == null) { _param_showSubmenu = new XVar(true); } #endregion #region pass-by-value parameters dynamic showSubmenu = XVar.Clone(_param_showSubmenu); #endregion dynamic attrs = XVar.Array(); attrs = XVar.Clone(XVar.Array()); if ((XVar)((XVar)(isBootstrap()) && (XVar)(isShowAsGroup())) && (XVar)(showSubmenu)) { if (XVar.Pack(isTreelike())) { attrs.InitAndSetArrayItem("collapse", "data-toggle"); attrs.InitAndSetArrayItem(MVCFunctions.Concat("#submenu", this.id), "data-target"); } else { attrs.InitAndSetArrayItem("dropdown-toggle", "class"); if (XVar.Pack(isDrillDown())) { attrs.InitAndSetArrayItem("dropdown", "data-toggle"); } else { attrs.InitAndSetArrayItem("nested-dropdown", "data-toggle"); } attrs.InitAndSetArrayItem("true", "aria-haspopup"); attrs.InitAndSetArrayItem("false", "aria-expanded"); } } attrs.InitAndSetArrayItem(MVCFunctions.Concat("itemlink", this.id), "id"); attrs.InitAndSetArrayItem(this.title, "itemtitle"); if (this.style != "") { attrs.InitAndSetArrayItem(this.style, "style"); } if (this.openType == "NewWindow") { attrs.InitAndSetArrayItem("external", "rel"); attrs.InitAndSetArrayItem("_blank", "target"); attrs.InitAndSetArrayItem("External", "link"); } if ((XVar)(this.linkType == "Internal") && (XVar)(this.pageType == "WebReports")) { attrs.InitAndSetArrayItem(MVCFunctions.GetTableLink(new XVar("webreport")), "href"); attrs.InitAndSetArrayItem(MVCFunctions.GetTableLink(new XVar("webreport")), "value"); } else { if (this.linkType == "Internal") { dynamic getParams = null, var_params = XVar.Array(); var_params = XVar.Clone(XVar.Array()); if (this.pageId != "") { dynamic defPageId = null, pTypeCheck = null; ProjectSettings pSet; pTypeCheck = XVar.Clone(this.pageType); pSet = XVar.UnPackProjectSettings(new ProjectSettings((XVar)(this.table), (XVar)(this.pageType))); if ((XVar)(pSet.getTableType() == Constants.PAGE_REPORT) && (XVar)(pTypeCheck == "print")) { pTypeCheck = new XVar("rprint"); } defPageId = XVar.Clone(pSet.getDefaultPage((XVar)(pTypeCheck))); if (this.pageId != defPageId) { var_params.InitAndSetArrayItem(MVCFunctions.Concat("page=", this.pageId), null); } } if (1 < this.menuTableMap[this.table][MVCFunctions.strtolower((XVar)(this.pageType))]) { var_params.InitAndSetArrayItem(MVCFunctions.Concat("menuItemId=", this.id), null); } if (XVar.Pack(this.var_params)) { var_params.InitAndSetArrayItem(this.var_params, null); } getParams = XVar.Clone(MVCFunctions.implode(new XVar("&"), (XVar)(var_params))); attrs.InitAndSetArrayItem(MVCFunctions.GetTableLink((XVar)(CommonFunctions.GetTableURL((XVar)(this.table))), (XVar)(MVCFunctions.strtolower((XVar)(this.pageType))), (XVar)(getParams)), "href"); attrs.InitAndSetArrayItem(MVCFunctions.GetTableLink((XVar)(CommonFunctions.GetTableURL((XVar)(this.table))), (XVar)(MVCFunctions.strtolower((XVar)(this.pageType))), (XVar)(getParams)), "value"); } else { if (this.linkType == "External") { attrs.InitAndSetArrayItem(this.href, "href"); attrs.InitAndSetArrayItem(this.href, "value"); } } } return(attrs); }
protected virtual XVar getShorteningTextAndMoreLink(dynamic _param_value, dynamic _param_cNumberOfChars, dynamic _param_keylink, dynamic _param_mode) { #region pass-by-value parameters dynamic value = XVar.Clone(_param_value); dynamic cNumberOfChars = XVar.Clone(_param_cNumberOfChars); dynamic keylink = XVar.Clone(_param_keylink); dynamic mode = XVar.Clone(_param_mode); #endregion dynamic tName = null, truncatedValue = null, var_params = null; truncatedValue = XVar.Clone(CommonFunctions.GetShorteningForLargeText((XVar)(value), (XVar)(cNumberOfChars))); if (XVar.Pack(this.searchHighlight)) { truncatedValue = XVar.Clone(highlightTruncatedBeforeMore((XVar)(value), (XVar)(truncatedValue), (XVar)(cNumberOfChars), (XVar)(cNumberOfChars))); } tName = XVar.Clone(getContainer().tName); var_params = XVar.Clone(MVCFunctions.Concat("pagetype=", this.container.pSet._viewPage, "&table=", CommonFunctions.GetTableURL((XVar)(tName)), "&field=", MVCFunctions.RawUrlEncode((XVar)(this.field)), keylink)); if (mode == Constants.LIST_DASHBOARD) { var_params = MVCFunctions.Concat(var_params, "&mode=", mode); } if (mode == Constants.LIST_LOOKUP) { var_params = MVCFunctions.Concat(var_params, "&maintable=", this.pageObject.mainTable, "&mainfield=", this.pageObject.mainField); } return(MVCFunctions.Concat(truncatedValue, " <a href=\"javascript:void(0);\" data-gridlink data-query=\"", MVCFunctions.GetTableLink(new XVar("fulltext"), new XVar(""), (XVar)(var_params)), "\">", "More", " ...</a>")); }
protected virtual XVar doCommonAssignments() { setLangParams(); this.xt.assign(new XVar("id"), (XVar)(this.id)); this.xt.assign(new XVar("menu_block"), new XVar(true)); this.xt.assign(new XVar("username"), (XVar)(XSession.Session["UserName"])); this.xt.assign(new XVar("changepwd_link"), (XVar)((XVar)(XSession.Session["AccessLevel"] != Constants.ACCESS_LEVEL_GUEST) && (XVar)(XSession.Session["fromFacebook"] == false))); this.xt.assign(new XVar("changepwdlink_attrs"), (XVar)(MVCFunctions.Concat("onclick=\"window.location.href='", MVCFunctions.GetTableLink(new XVar("changepwd")), "';return false;\""))); this.xt.assign(new XVar("logoutlink_attrs"), (XVar)(MVCFunctions.Concat("id=\"logoutButton", this.id, "\""))); this.xt.assign(new XVar("guestloginlink_attrs"), (XVar)(MVCFunctions.Concat("id=\"loginButton", this.id, "\""))); this.xt.assign(new XVar("loggedas_block"), (XVar)(!(XVar)(CommonFunctions.isLoggedAsGuest()))); this.xt.assign(new XVar("loggedas_message"), (XVar)(!(XVar)(CommonFunctions.isLoggedAsGuest()))); this.xt.assign(new XVar("logout_link"), new XVar(true)); this.xt.assign(new XVar("guestloginbutton"), (XVar)(CommonFunctions.isLoggedAsGuest())); this.xt.assign(new XVar("logoutbutton"), (XVar)((XVar)(CommonFunctions.isSingleSign()) && (XVar)(!(XVar)(CommonFunctions.isLoggedAsGuest())))); if (XVar.Pack(CommonFunctions.IsAdmin())) { this.xt.assign(new XVar("adminarea_link"), new XVar(true)); } assignBody(); return(null); }