'.N; $dbg.='
'.print_r($_GET,1).'
'; if (array_key_exists('id',$_GET) && preg_match('/^[0-9]+$/',$_GET['id'])===1) { $_GET['id']+=0; if ($account['Level']=='guest' && !in_array($_GET['id'],$account['Insts'])) muoribene('You can’t edit data for an instance you don’t own.',true); $res=mysqli_query($link,'SELECT * FROM Instances WHERE ID='.$_GET['id']) or muoribene(__LINE__.': '.mysqli_error($link),true); if (mysqli_num_rows($res)!=1) muoribene(__LINE__.': There is no instance with ID='.$_GET['ID'].'.',true); $inst=mysqli_fetch_assoc($res); } else { muoribene('Malformed input.',true); } $dbg.='
'.print_r($inst,1).'
'.N; function check($row,$col) { if ($row[$col]>0) return(' checked'); else return(''); } if ($account['Level']!='guest') { require('include/notifs.php'); $notifs=notifs($link); } ?> Mustard - Editing «<?php echo($inst['URI']); ?>» form
 
 
 
 
'.N); ?>
'.N); if ($account['Level']=='guest') echo('
'.$o['desc'].'
'.N); echo('
'.N); if ($o['multi']) { echo(''.N); } echo('
'.N); if (!array_key_exists('edavail',$o) || $o['edavail']) echo('
'.N); if (!array_key_exists('addavail',$o) || $o['addavail']) echo('
'.N); if (!array_key_exists('remavail',$o) || $o['remavail']) echo('
'.N); if (!$o['multi']) echo('
'.N); echo('
'.$o['dida'].'
'.N); } selbox(array( 'desc'=>'If your instance is mainly bound to a particular location (from neighbourhood to country) you can specify it here. You can add up to '.$account['MaxLocalities'].' location[s]. You can edit or remove only the location[s] you added, and only as long as they have not yet been referenced by others. For particular needs don’t hesitate to contact us.', 'multi'=>false, 'dispselid'=>'LocalityID', 'instselid'=>$inst['LocalityID'], 'title'=>'Location', 'searchid'=>'locsearch', 'searchtit'=>'Filter available locations', 'disparr'=>'locselarr', 'regexcbid'=>'locselre', 'dispque'=>'SELECT ID, Name'.$dlang.' FROM Localities ORDER BY NameOrig ASC', 'valcol'=>'ID', 'txtcol'=>'Name'.$dlang)); $o=array( 'desc'=>'Here you can specify the languages which are mostly used on your instance, in order of importance. The list of available languages to choose from should be fairly complete, but if you find out it is not don’t hesitate to contact us. The list of chosen languages is often pre-populated by our crawler, which tries and guess them automatically, but you can always modify it and prevent the crawler from changing it on its next runs by ticking the “Lock this list” checkbox you find under the list.', 'multi'=>true, 'dispselid'=>'DispLangs', 'title'=>'Languages', 'searchid'=>'langsearch', 'searchtit'=>'Filter available languages', 'disparr'=>'langselarr', 'regexcbid'=>'langselre', 'dispque'=>'SELECT ID, CONCAT(Name'.$dlang.'," [",Code,"]") AS Txt FROM Languages WHERE ID NOT IN (SELECT OurLangID FROM InstOurLangs WHERE InstID='.$inst['ID'].') ORDER BY Name'.$dlang.' ASC', 'valcol'=>'ID', 'txtcol'=>'Txt', 'dida'=>'Above: available languages; below: chosen languages', 'chosenselid'=>'ChosenLangs[]', 'chosenque'=>'SELECT OurLangID, CONCAT(Name'.$dlang.'," [",Code,"]") AS Txt FROM InstOurLangs LEFT JOIN Languages ON Languages.ID=OurLangID WHERE InstID='.$inst['ID'].' ORDER BY Pos ASC', 'chosenvalcol'=>'OurLangID'); if ($account['Level']=='guest') { $o['edavail']=false; $o['addavail']=false; $o['remavail']=false; } selbox($o); $lockcheck=check($inst,'OurLangsLock'); if ($account['Level']=='guest' && is_null($inst['LastGuestEdit'])) $lockcheck=' checked'; ?>
>
'Here you can specify the modalities by which your instance is financed, in order of importance. You can add up to '.$account['MaxFinancing'].' modalities to the list of available modalities. You can edit or remove only the modalities you added, and only as long as they have not yet been referenced by others.
For particular needs don’t hesitate to contact us.', 'multi'=>true, 'dispselid'=>'DispFinModes', 'title'=>'Financing modalities', 'searchid'=>'finsearch', 'searchtit'=>'Filter available financing modalities', 'disparr'=>'finselarr', 'regexcbid'=>'finselre', 'dispque'=>'SELECT * FROM Financing WHERE ID NOT IN (SELECT FinID FROM InstFinancing WHERE InstID='.$inst['ID'].') ORDER BY Type ASC', 'valcol'=>'ID', 'txtcol'=>'Type', 'dida'=>'Above: available fin. modes; below: chosen fin. modes', 'chosenselid'=>'ChosenFinModes[]', 'chosenque'=>'SELECT * FROM InstFinancing LEFT JOIN Financing ON Financing.ID=FinID WHERE InstID='.$inst['ID'].' ORDER BY Pos ASC', 'chosenvalcol'=>'FinID')); selbox(array( 'desc'=>'Here you can specify the policies defining which kind of contents are allowed or not allowed on your instance. You can add up to '.$account['MaxPolicies'].' policies to the list of available policies. You can edit or remove only the policies you added, and only as long as they have not yet been referenced by others.
For particular needs don’t hesitate to contact us.', 'multi'=>true, 'dispselid'=>'DispPolicies', 'title'=>'Policies', 'searchid'=>'polsearch', 'searchtit'=>'Filter available policies', 'disparr'=>'polselarr', 'regexcbid'=>'polselre', 'dispque'=>'SELECT * FROM Policies WHERE ID NOT IN (SELECT PolID FROM InstPolicies WHERE InstID='.$inst['ID'].') ORDER BY Name ASC', 'valcol'=>'ID', 'txtcol'=>'Name', 'dida'=>'Above: available policies; below: chosen policies', 'chosenselid'=>'ChosenPolicies[]', 'chosenque'=>'SELECT * FROM InstPolicies LEFT JOIN Policies ON Policies.ID=PolID WHERE InstID='.$inst['ID'].' ORDER BY Pos ASC', 'chosenvalcol'=>'PolID')); selbox(array( 'desc'=>'Here you can specify the “thematic” categories your instance is dedicated to, if any. If your instance isn’t particularly dedicated to any particular topic, please just associate it with the “General” category. You can add '.$account['MaxTags'].' categories to the list of available categories. You can edit or remove only the categories you added, and only as long as they have not yet been referenced by others. For particular needs don’t hesitate to contact us.', 'multi'=>true, 'dispselid'=>'DispTags', 'title'=>'Categories', 'searchid'=>'tagsearch', 'searchtit'=>'Filter available categories', 'disparr'=>'tagselarr', 'regexcbid'=>'tagselre', 'dispque'=>'SELECT * FROM Tags WHERE ID NOT IN (SELECT TagID FROM InstTags WHERE InstID='.$inst['ID'].') ORDER BY Name ASC', 'valcol'=>'ID', 'txtcol'=>'Name', 'dida'=>'Above: available categories; below: chosen categories', 'chosenselid'=>'ChosenTags[]', 'chosenque'=>'SELECT * FROM InstTags LEFT JOIN Tags ON Tags.ID=TagID WHERE InstID='.$inst['ID'].' ORDER BY Pos ASC', 'chosenvalcol'=>'TagID')); ?>