<?php if (!$arIsNewObject || $this->getdata("arCloseWindow", "none")) { ?> top.window.close(); <?php } else { ?> top.window.location.href='dialog.add.php'; <?php } ?> } else if (top.window.dialogArguments) { arr=new Array(); arr['type']='<?php echo $this->type; ?> '; arr['name']='<?php echo AddCSlashes($this->nlsdata->name, ARESCAPE); ?> '; arr['path']='<?php echo $this->path; ?> '; top.window.returnValue=arr; top.window.close(); } </script> <?php }
return result ? muze.event.pass(event) : muze.event.cancel(event); } function initHandlers() { var wgWizForm = document.getElementById("wgWizForm"); wgWizForm.wgWizSubmitHandler = function() { var lines = document.getElementById("linenumbers") lines.parentNode.removeChild(lines); return true; } <?php $error = $this->getvar("error"); if ($error) { echo "alert(\"" . AddCSlashes($error, ARESCAPE) . "\");\n"; } ?> var area = document.getElementById("template"); muze.event.attach(area, 'click', posHandler, false); muze.event.attach(document.getElementById('wgWizForm'), 'submit', saveCurrentPos, false); muze.event.attach(area, 'keydown', function(evt) { posHandler(evt); return keyHandler(evt, area); }, false); muze.event.attach(area, 'keyup', function(evt) { return keyHandler(evt, area); }, false); muze.event.attach(area, 'keypress', function(evt) { return keyHandler(evt, area); }, false); muze.event.attach(area, 'scroll', function(evt) { return scrollHandler(evt, area); }, false); area.focus(); <?php // set the cursor pos if needed $col = 0;
public static function registerEditable($name) { $context = pobject::getContext(); $me = $context["arCurrentObject"]; $id = self::$editCounter++; $prefix = self::$editPrefix; return array('id' => $prefix . $id, 'content' => ar_html::tag('script', " parent.registerDataField('" . $prefix . $id . "', '" . AddCSlashes($name, ARESCAPE) . "', '" . $me->path . "', '" . $me->id . "' );")); }
?> '); muze.ariadne.registry.set('root', '/'); muze.ariadne.registry.set('store_root', '<?php echo AddCSlashes($this->store->get_config('root'), ARESCAPE); ?> '); // setting session ID for unique naming of windows within one ariadne session. muze.ariadne.registry.set("SessionID","<?php echo AddCSlashes($ARCurrent->session->id, ARESCAPE); ?> "); muze.ariadne.registry.set("path", "<?php echo AddCSlashes($this->path, ARESCAPE); ?> "); muze.ariadne.nls = eval(<?php echo json_encode($JSnls); ?> ); <?php if ($AR->user->data->windowprefs["edit_object_layout"]) { echo "\tmuze.ariadne.registry.set('window_new_layout', 1);\n"; } if ($AR->user->data->windowprefs["edit_object_grants"]) { echo "\tmuze.ariadne.registry.set('window_new_grants', 1);\n"; } ?> </script>
$ARnls->setLanguage($AR->user->data->language); } if (!$arLanguage) { $arLanguage = $nls; } $owner = $this->data->config->owner_name; if (!$owner) { $owner = $this->data->owner_name; } $date = strftime("%m-%d-%Y", $this->data->ctime); $modified = strftime("%m-%d-%Y", $this->data->mtime); $userConfig = $this->loadUserConfig(); $authconfig = $userConfig['authentication']; $mod_user = $this->data->muser; foreach ($authconfig['userdirs'] as $userdir) { $muser = current($this->find($userdir, "login.value='" . AddCSlashes($this->data->muser, ARESCAPE) . "'", "system.get.phtml")); if ($muser) { $mod_user = $muser->nlsdata->name; break; } } $name = $this->nlsdata->name; if (!$ARCurrent->arTypeTree) { $this->call("typetree.ini"); } $icon = $ARCurrent->arTypeIcons[$this->type]['default'] ? $ARCurrent->arTypeIcons[$this->type]['default'] : $this->call("system.get.icon.php"); $iconalt = $this->type; if ($this->implements("pshortcut")) { $overlay_icon = $icon; $overlay_alt = $this->type; $icon = $ARCurrent->arTypeIcons[$this->vtype]['default'] ? $ARCurrent->arTypeIcons[$this->vtype]['default'] : current($this->get($this->data->path, "system.get.icon.php"));
$selectednls = $arLanguage; $selectedlanguage = $ARConfig->nls->list[$arLanguage]; $flagurl = $AR->dir->images . "nls/small/{$selectednls}.gif"; $userConfig = $this->loadUserConfig(); if ($userConfig['defaults']['publish']['publishScenarioDirs']) { $scenarioDir = end($userConfig['defaults']['publish']['publishScenarioDirs']); } else { $scenarioDir = "/system/newspaper/scenarios/"; } ?> <script type="text/javascript"> summary=new Array(); <?php $summaries = $this->ls($scenarioDir, "system.get.summary.phtml"); foreach ($summaries as $key => $summary) { echo "summary['" . key($summary) . "']='" . AddCSlashes(current($summary), ARESCAPE) . "';\n"; } ?> function updatedescription(form) { if (form.scenario.selectedIndex!=-1) { document.getElementById("description_text").innerHTML = summary[form.scenario.options[form.scenario.selectedIndex].value]; } } </script> <fieldset id="selectscenario"> <legend><?php echo $ARnls["scenario"]; ?> </legend> <div class="field"> <select name="scenario" size="6" onChange="updatedescription(this.form)" class="inputline wgWizAutoFocus">
$default = $ARnls; ksort($default); unset($ARnls); foreach ($languages as $language) { $file = $module . $language; echo "Updating " . $file . "\n"; if (!file_exists($file)) { continue; } include $file; $content = "<" . "?php\n\n"; if (file_exists($module . $language . ".head")) { $content .= file_get_contents($module . $language . ".head"); } foreach ($default as $arkey => $arvalue) { $tabs = substr("\t\t\t\t\t\t\t\t", (int) ((strlen($arkey) + 2) / 4)); if (isset($ARnls[$arkey])) { $content .= sprintf("\t%-47s = \"%s\";\n", "\$ARnls[\"{$arkey}\"]", AddCSlashes(stripcslashes($ARnls[$arkey]), NLSESCAPE)); } else { $content .= sprintf("//\t%-47s = \"%s\"; // value from english\n", "\$ARnls[\"{$arkey}\"]", AddCSlashes(stripcslashes($arvalue), NLSESCAPE)); } } unset($ARnls); $filename = $target . $module . $language; // write file $result = file_put_contents($filename, $content); if ($result === false) { die("ERROR: couldn't open {$filename} for writing.\n"); } } }
if (!$custom['inherit']) { $custom['inherit'] = 0; } else { $custom['inherit'] = 1; } if (!$custom['property']) { $custom['property'] = 0; } else { $custom['property'] = 1; } echo "\t\tdest[dest.length]=new Option('" . AddCSlashes($name, ARESCAPE) . "','" . AddCSlashes($name, ARESCAPE) . "');\n"; echo "\t\tcustomlist[customlist.length]=new custom_node(\n"; echo "\t\t\t'" . AddCSlashes($custom["type"], ARESCAPE) . "'," . AddCSlashes($custom["inherit"], ARESCAPE) . ",\n"; echo "\t\t\t'" . AddCSlashes($name, ARESCAPE) . "','" . AddCSlashes($custom["size"], ARESCAPE) . "',\n"; echo "\t\t\t'" . AddCSlashes($custom["grant"], ARESCAPE) . "'," . AddCSlashes($custom["nls"], ARESCAPE) . ",\n"; echo "\t\t\t'" . AddCSlashes($custom["check"], ARESCAPE) . "'," . AddCSlashes($custom["property"], ARESCAPE) . "," . AddCSlashes((int) $custom["containsHTML"], ARESCAPE) . ");\n"; if (!$typelist[$custom["type"]]) { // If the type is not in the list, add it. $typelist[$custom["type"]] = $custom["type"]; } } } ?> if (dest.length==0) { add(); } document.getElementById("nameselect").selectedIndex=dest.length-1; document.getElementById("nameselect").focus(); show(); }
echo "\t\t\t'" . AddCSlashes($customvalue["type"], ARESCAPE) . "',"; if ($customvalue["inherit"] && $customvalue["inherit"] != "false") { echo 1; } else { echo 0; } echo ",\n"; echo "\t\t\t'" . AddCSlashes($name, ARESCAPE) . "','" . AddCSlashes($customvalue["size"], ARESCAPE) . "',\n"; echo "\t\t\t'" . AddCSlashes($customvalue["grant"], ARESCAPE) . "',"; if ($customvalue["nls"] && $customvalue["nls"] != "false") { echo 1; } else { echo 0; } echo ",\n"; echo "\t\t\t'" . AddCSlashes($customvalue["check"], ARESCAPE) . "');\n"; } } } } ?> if (document.wgWizForm['fieldname'].options.length>0) { document.wgWizForm['fieldname'].options[0].selected=true; show(); } document.wgWizForm['fieldname'].focus(); } function save() { if (message=updateCustom(document.wgWizForm.showcustomdata)) { alert(message);
$arLanguage = $nls; } if (isset($data->{$arLanguage})) { $nlsdata = $data->{$arLanguage}; } $icon = $this->call('system.get.icon.php', array('size' => 'small')); ?> <div class='object'><a title="<?php echo htmlspecialchars($nlsdata->name); ?> " href="javascript:top.View('<?php echo $this->path; ?> ','<?php echo str_replace('"', '"', AddCSlashes($nlsdata->name, ARESCAPE)); ?> ');"><img class="icon" src="<?php echo $icon; ?> " alt="<?php echo $this->path; ?> "> <?php if (mb_strlen($nlsdata->name, "utf-8") > 32) { $name = htmlspecialchars(mb_substr($nlsdata->name, 0, 32, "utf-8") . "..."); } else { $name = htmlspecialcharS($nlsdata->name); }
function _registerDataField($name) { $id = edit::registerDataField(); // FIXME: Temporary fix voor older code which still use registerDataField $context = pobject::getContext(); $me = $context["arCurrentObject"]; $prefix = edit::getEditPrefix(); echo "<script> parent.registerDataField('" . $prefix . $id . "','" . AddCSlashes($name, ARESCAPE) . "','" . $me->path . "'\n\t\t\t\t," . $me->id . "); </script>\n"; return $id; }
echo AddCSlashes($browsepath, ARESCAPE); ?> "); <?php if ($AR->user->data->windowprefs["edit_object_layout"]) { echo "\tmuze.ariadne.registry.set('window_new_layout', 1);\n"; } if ($AR->user->data->windowprefs["edit_object_grants"]) { echo "\tmuze.ariadne.registry.set('window_new_grants', 1);\n"; } foreach ((array) $extraroots as $extrapath) { if ($extrapath != $path) { $extrapath_ob = current($this->get($extrapath, "system.get.phtml")); if ($extrapath_ob) { $extrapath_icon = $extrapath_ob->call('system.get.icon.php', array('size' => 'medium')); echo "\tmuze.ariadne.explore.tree.baseNodes.push({'path' : '" . AddCSlashes($extrapath, ARESCAPE) . "', 'name' : '" . AddCSlashes($extrapath_ob->nlsdata->name, ARESCAPE) . "', 'icon' : '" . AddCSlashes($extrapath_icon, ARESCAPE) . "'});"; } } } ?> </script> <script type="text/javascript"> function callback() { var path = muze.ariadne.explore.viewpane.selectedPath; if (!path) { path = muze.ariadne.registry.get("path"); } if (window.opener.muze && window.opener.muze.dialog && window.opener.muze.dialog.hasCallback( window.name, 'submit') ) {
public function quoteValue($value, $settings = array()) { $settings = array_merge($this->settings, $settings); return $settings['quotation'] . AddCSlashes($value, $settings['escape']) . $settings['quotation']; }
<?php $ARCurrent->nolangcheck = true; if (($this->CheckLogin("edit") || $this->CheckLogin("add", ARANYTYPE)) && $this->CheckConfig()) { $this->call("system.save.tempfile.phtml"); if ($this->error) { echo '<div class="error">' . $this->error . '</div>'; echo '<script type="text/javascript">alert("' . AddCSlashes($this->error, ARESCAPE) . '"); </script>'; } foreach ($AR->nls->list as $language => $language_name) { if (!$this->getdata("name", $language)) { if (($file = $this->getdata("file", $language)) && preg_match("|[^\\/\\\\]*\$|", $file, $matches)) { $arFilename = preg_replace("|[^a-z0-9\\./_-]|i", "-", $matches[0]); $_POST[$language]["name"] = $arFilename; } } } $arResult = $wgWizFlow; }