<commit_before><?php if(defined("_SECURITY")){
     $acl = new ACL();
     $groups = db_query("SELECT id, name from " . tbname("groups"));
     if($acl -> hasPermission("pages")){
        
         $allThemes = getThemesList();
        
         ?>
<form id="pageform" name="newpageform" action="index.php?action=pages" method="post">
<input type="hidden" name="add" value="add">
<?php csrf_token_html();
         ?>
<strong><?php echo TRANSLATION_PERMALINK;
         ?></strong><br/>
<input type="text" name="system_title" required="true" value="">
<br/><br/>

<strong><?php echo TRANSLATION_PAGE_TITLE;
         ?></strong><br/>
<input type="text" required="true" name="page_title" value="" onkeyup="systemname_vorschlagen(this.value)">
<br/><br/>

<strong><?php echo TRANSLATION_ALTERNATE_TITLE;
         ?></strong><br/>
<input type="text" name="alternate_title" value=""><br/>
<small><?php echo TRANSLATION_ALTERNATE_TITLE_INFO;
         ?></small>
<br/><br/>

<strong><?php echo TRANSLATION_LANGUAGE;
         ?></strong>
<br/>
<select name="language">
<?php
         $languages = getAllLanguages();
         if(!empty($_SESSION["filter_language"])){
             $default_language = $_SESSION["filter_language"];
            
             }
        else{
             $default_language = getconfig("default_language");
             }
        
        
         for($j = 0; $j < count($languages); $j++){
             if($languages[$j] === $default_language){
                 echo "<option value='" . $languages[$j] . "' selected>" . getLanguageNameByCode($languages[$j]) . "</option>";
                 }else{
                 echo "<option value='" . $languages[$j] . "'>" . getLanguageNameByCode($languages[$j]) . "</option>";
                 }
            
            
             }
        
        
         $pages = getAllPages($default_language, "title", false);
         ?>
</select>
<br/><br/>

<strong><?php echo TRANSLATION_CATEGORY;
         ?></strong><br/>
<?php echo categories :: getHTMLSelect()?>
<br/><br/>

<strong><?php echo TRANSLATION_MENU;
         ?></strong> <span style="cursor:help;" onclick="$('div#menu_help').slideToggle()">[?]</span><br/>
<select name="menu" size=1>
<?php
         foreach(getAllMenus() as $menu){
             ?>
<option value="<?php echo $menu?>"><?php echo $menu;
             ?></option>
<?php
            
             }
         ?>
</select>
<div id="menu_help" class="help" style="display:none">
<?php echo nl2br(TRANSLATION_HELP_MENU);
        ?>
</div>   
<br/> <br/>

<strong><?php echo TRANSLATION_POSITION;
         ?></strong> <span style="cursor:help;" onclick="$('div#position_help').slideToggle()">[?]</span><br/>
<input type="text" required="true" name="position" value="0">
<div id="position_help" class="help" style="display:none">
<?php echo nl2br(TRANSLATION_HELP_POSITION);
        ?>
</div>              
<br/>

<strong><?php echo TRANSLATION_PARENT;
         ?></strong><br/>
<select name="parent" size=1>
<option selected="selected" value="NULL">[<?php echo TRANSLATION_NONE;
         ?>]</option>
<?php foreach($pages as $key => $page){
             ?>
	<option value="<?php echo $page["id"];
             ?>">
	<?php echo $page["title"];
             ?> (ID: <?php echo $page["id"];
             ?>)
	</option>
<?php
             }
         ?>
</select>


<br/> <br/>

<script type="text/javascript">
function systemname_vorschlagen(txt){
var systemname=txt.toLowerCase();
systemname=systemname.replace(/ü/g,"ue");
systemname=systemname.replace(/ö/g,"oe");<commit_msg>parent<commit_after><?php if(defined("_SECURITY")){
     $acl = new ACL();
     $groups = db_query("SELECT id, name from " . tbname("groups"));
     if($acl -> hasPermission("pages")){
        
         $allThemes = getThemesList();
        
         ?>
<form id="pageform" name="newpageform" action="index.php?action=pages" method="post">
<input type="hidden" name="add" value="add">
<?php csrf_token_html();
         ?>
<strong><?php echo TRANSLATION_PERMALINK;
         ?></strong><br/>
<input type="text" name="system_title" required="true" value="">
<br/><br/>

<strong><?php echo TRANSLATION_PAGE_TITLE;
         ?></strong><br/>
<input type="text" required="true" name="page_title" value="" onkeyup="systemname_vorschlagen(this.value)">
<br/><br/>

<strong><?php echo TRANSLATION_ALTERNATE_TITLE;
         ?></strong><br/>
<input type="text" name="alternate_title" value=""><br/>
<small><?php echo TRANSLATION_ALTERNATE_TITLE_INFO;
         ?></small>
<br/><br/>

<strong><?php echo TRANSLATION_LANGUAGE;
         ?></strong>
<br/>
<select name="language">
<?php
         $languages = getAllLanguages();
         if(!empty($_SESSION["filter_language"])){
             $default_language = $_SESSION["filter_language"];
            
             }
        else{
             $default_language = getconfig("default_language");
             }
        
        
         for($j = 0; $j < count($languages); $j++){
             if($languages[$j] === $default_language){
                 echo "<option value='" . $languages[$j] . "' selected>" . getLanguageNameByCode($languages[$j]) . "</option>";
                 }else{
                 echo "<option value='" . $languages[$j] . "'>" . getLanguageNameByCode($languages[$j]) . "</option>";
                 }
            
            
             }
        
        
         $pages = getAllPages($default_language, "title", false);
         ?>
</select>
<br/><br/>

<strong><?php echo TRANSLATION_CATEGORY;
         ?></strong><br/>
<?php echo categories :: getHTMLSelect()?>
<br/><br/>

<strong><?php echo TRANSLATION_MENU;
         ?></strong> <span style="cursor:help;" onclick="$('div#menu_help').slideToggle()">[?]</span><br/>
<select name="menu" size=1>
<?php
         foreach(getAllMenus() as $menu){
             ?>
<option value="<?php echo $menu?>"><?php echo $menu;
             ?></option>
<?php
            
             }
         ?>
</select>
<div id="menu_help" class="help" style="display:none">
<?php echo nl2br(TRANSLATION_HELP_MENU);
        ?>
</div>   
<br/> <br/>

<strong><?php echo TRANSLATION_POSITION;
         ?></strong> <span style="cursor:help;" onclick="$('div#position_help').slideToggle()">[?]</span><br/>
<input type="text" required="true" name="position" value="0">
<div id="position_help" class="help" style="display:none">
<?php echo nl2br(TRANSLATION_HELP_POSITION);
        ?>
</div>              
<br/>    
<br/>

<strong><?php echo TRANSLATION_PARENT;
         ?></strong><br/>
<select name="parent" size=1>
<option selected="selected" value="NULL">[<?php echo TRANSLATION_NONE;
         ?>]</option>
<?php foreach($pages as $key => $page){
             ?>
	<option value="<?php echo $page["id"];
             ?>">
	<?php echo $page["title"];
             ?> (ID: <?php echo $page["id"];
             ?>)
	</option>
<?php
             }
         ?>
</select>


<br/> <br/>

<script type="text/javascript">
function systemname_vorschlagen(txt){
var systemname=txt.toLowerCase();
systemname=systemname.replace(/ü/g,"ue");
systemname=systemname.replace(/ö/g,"oe");
{'fraction_non_alphanumeric': 0.20039375615243987, 'fraction_numerical': 0.0016875263675994938, 'mean_word_length': 2.805243445692884, 'pattern_counts': {'":': 0, '<': 202, '<?xml version=': 0, '>': 204, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3602367', 'n_tokens_mistral': 2264, 'n_tokens_neox': 2279, 'n_words': 416}