- Updated formatting and structure of functions in edit_contact.inc.php for better readability and consistency. - Added comments to clarify the purpose of certain code sections, especially regarding mandant handling. - Removed the deprecated phpinfo.php file to clean up the codebase.
50 lines
2.8 KiB
PHP
50 lines
2.8 KiB
PHP
<?php
|
|
$translation = \DynCom\mysyde\common\classes\Registry::get("translation");
|
|
$formname = "form_line_filegallery_list_" . $fieldSetup['id'];
|
|
$inputname = "input_id";
|
|
$input_page_id = (isset($_REQUEST["input_page_id"]) ? $_REQUEST["input_page_id"] : "");
|
|
$input_collection_id = (isset($_REQUEST["input_collection_id"]) ? $_REQUEST["input_collection_id"] : "");
|
|
?>
|
|
<script>
|
|
function loadNewFileGallery(){
|
|
console.log($(this));
|
|
saveCollection(false)
|
|
setTimeout(function(){
|
|
loadCard('new_line_filegallery', true);
|
|
}, 2000);
|
|
}
|
|
</script>
|
|
<form id="<?= $formname ?>" name="<?= $formname ?>" method="post">
|
|
<input type="hidden" class="selected_linklist_row" name="input_line_id" value="" />
|
|
<input type="hidden" name="input_page_id" value="<?php echo $input_page_id; ?>" />
|
|
<input type="hidden" name="input_collection_id" value="<?php echo $input_collection_id; ?>" />
|
|
<input type="hidden" name="collection_setup_content_id" value="<?php echo $fieldSetup['id']; ?>" />
|
|
<input type="hidden" name="collection_modul_input_<?php echo $fieldSetup['id']; ?>" value="filegallery" />
|
|
<input type="hidden" id="module_input_filegallery_<?= $fieldSetup['id']; ?>" name="module_input_filegallery_<?= $fieldSetup['id']; ?>" value="" />
|
|
|
|
<ul class="toolbar_menu">
|
|
<?= button("new", $translation->get("new"), $formname, "openGallery('module_input_filegallery_".$fieldSetup['id']."', 'null', 'collection', 'multi')", "", FALSE); ?>
|
|
<?= button("up", $translation->get("go_up"), $formname, "loadCard('moveup_line_filegallery')", "", FALSE); ?>
|
|
<?= button("down", $translation->get("go_down"), $formname, "loadCard('movedown_line_filegallery')", "", FALSE); ?>
|
|
|
|
</ul>
|
|
|
|
<?
|
|
|
|
$query = "SELECT * FROM main_collection_link WHERE main_collection_id = " . $collectionData['id'] . " AND main_collection_setup_content_id = " . $fieldSetup['id'];
|
|
$result = @mysqli_query($GLOBALS['mysql_con'], $query);
|
|
$num_rows = @mysqli_num_rows($result);
|
|
if ($num_rows == 0) {
|
|
echo "<div class=\"infobox\">" . $translation->get("no_rows_found") . "</div></form>";
|
|
return;
|
|
}
|
|
|
|
$row = @mysqli_fetch_array($result, 1);
|
|
|
|
$query = "SELECT id, description AS '" . $translation->get("description") . "', filename AS '" . $translation->get("filename") . "' FROM filegallery_line WHERE header_id = " . $row['main_sitepart_header_id'] . " ORDER BY sorting ASC";
|
|
if ($result = @mysqli_query($GLOBALS['mysql_con'], $query)) {
|
|
$format = array('option', 'text', 'text');
|
|
linklist($result, $formname, $format, "input_line_id", "edit_line_filegallery", TRUE, "update_sortorder_filegallery", "loadCard('delete_line_filegallery', false, '{$translation->get('delete_line_confirm')}')", TRUE);
|
|
}
|
|
?>
|
|
</form>
|