init
This commit is contained in:
42
module/slideshow/collection_slideshow_cardform.inc.php
Normal file
42
module/slideshow/collection_slideshow_cardform.inc.php
Normal file
@@ -0,0 +1,42 @@
|
||||
<?php
|
||||
$translation = \DynCom\mysyde\common\classes\Registry::get("translation");
|
||||
?>
|
||||
<h2><?php echo $translation->get("slideshow_options"); ?></h2>
|
||||
<?php
|
||||
if (!is_array($sitepart_options) || count($sitepart_options) == 0) {
|
||||
$width = 500;
|
||||
$height = 250;
|
||||
$effect = 'fade';
|
||||
$text_pos = 'bottom';
|
||||
$interval = 4;
|
||||
$text_effect = 'none';
|
||||
$effect_duration = 1;
|
||||
$arrows = "yes";
|
||||
} else {
|
||||
$width = $sitepart_options["collection_setup_width"];
|
||||
$height = $sitepart_options["collection_setup_height"];
|
||||
$effect = $sitepart_options["collection_setup_effect"];
|
||||
$text_pos = $sitepart_options["collection_setup_text_pos"];
|
||||
$interval = $sitepart_options["collection_setup_eff_interval"];
|
||||
$text_effect = $sitepart_options["collection_setup_text_effect"];
|
||||
$effect_duration = $sitepart_options["collection_setup_effect_duration"];
|
||||
$arrows = $sitepart_options["collection_setup_arrows"];
|
||||
}
|
||||
?>
|
||||
|
||||
<table class="cardform" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td>
|
||||
<?php input_select($translation->get("arrows"), "collection_setup_arrows", array(0 => "yes", 1 => "no"), array(0 => $translation->get("display"), 1 => $translation->get("dont_display")), $arrows) ?>
|
||||
<?php input($translation->get("width_px"), "collection_setup_width", "code", $width) ?>
|
||||
<?php input($translation->get("height_px"), "collection_setup_height", "code", $height) ?>
|
||||
<?php input($translation->get("show_duration"), "collection_setup_eff_interval", "code", $interval) ?>
|
||||
</td>
|
||||
<td>
|
||||
<?php input($translation->get("effect_duration"), "collection_setup_effect_duration", "code", $effect_duration) ?>
|
||||
<?php input_select($translation->get("text_effect"), "collection_setup_text_effect", $values = array(0 => 'fixed', 1 => 'slide', 2 => 'fade'), $value_names = array(0 => $translation->get("no_effect"), 1 => $translation->get("fade_in"), 2 => $translation->get("crossfade")), $text_effect) ?>
|
||||
<?php input_select($translation->get("text_position"), "collection_setup_text_pos", $values = array(0 => 'top', 1 => 'bottom'), $value_names = array(0 => $translation->get("top"), 1 => $translation->get("bottom")), $text_pos) ?>
|
||||
<?php input_select($translation->get("transition_effect"), "collection_setup_effect", $values = array(0 => 'none', 1 => 'scroll', 2 => 'fade'), $value_names = array(0 => $translation->get("no_effect"), 1 => $translation->get("fade_out"), 2 => $translation->get("crossfade")), $effect) ?>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
42
module/slideshow/collection_slideshow_line_listform.inc.php
Normal file
42
module/slideshow/collection_slideshow_line_listform.inc.php
Normal file
@@ -0,0 +1,42 @@
|
||||
<?php
|
||||
$translation = \DynCom\mysyde\common\classes\Registry::get("translation");
|
||||
$formname = "form_line_slideshow_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"] : "");
|
||||
?>
|
||||
|
||||
<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']; ?>" />
|
||||
|
||||
<ul class="toolbar_menu">
|
||||
<?= button("new", $translation->get("new"), $formname, "loadCard('new_line_slideshow', true)", "", FALSE); ?>
|
||||
<?= button("edit", $translation->get("edit"), $formname, "loadCard('edit_line_slideshow')", "", FALSE); ?>
|
||||
<?= button("delete", $translation->get("delete"), $formname, "loadCard('delete_line_slideshow', false, '{$translation->get('delete_line_confirm')}')", "", FALSE); ?>
|
||||
<?= button("up", $translation->get("go_up"), $formname, "loadCard('moveup_line_slideshow')", "", FALSE); ?>
|
||||
<?= button("down", $translation->get("go_down"), $formname, "loadCard('movedown_line_slideshow')", "", FALSE); ?>
|
||||
|
||||
</ul>
|
||||
<div class="clearfix"></div>
|
||||
|
||||
<?
|
||||
|
||||
$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, preview AS '" . $translation->get("preview") . "', description AS '" . $translation->get("description") . "', link AS '" . $translation->get("link") . "', headline AS '" . $translation->get("headline") . "', text AS '" . $translation->get("text") . "' FROM slideshow_line WHERE header_id = " . $row['main_sitepart_header_id'] . " ORDER BY sorting ASC";
|
||||
if ($result = @mysqli_query($GLOBALS['mysql_con'], $query)) {
|
||||
linklist($result, $formname, $format, "input_line_id", "edit_line_slideshow", TRUE, "update_sortorder_slideshow");
|
||||
}
|
||||
?>
|
||||
</form>
|
||||
43
module/slideshow/component_slideshow_listform.inc.php
Normal file
43
module/slideshow/component_slideshow_listform.inc.php
Normal file
@@ -0,0 +1,43 @@
|
||||
<?php
|
||||
$translation = \DynCom\mysyde\common\classes\Registry::get("translation");
|
||||
$formname = "form_slideshow_list";
|
||||
$inputname = "input_id";
|
||||
$input_page_id = (isset($_REQUEST["input_page_id"]) ? $_REQUEST["input_page_id"] : "");
|
||||
$input_component_id = (isset($_REQUEST["input_component_id"]) ? $_REQUEST["input_component_id"] : "");
|
||||
?>
|
||||
|
||||
<div id="overlaycrumb">
|
||||
<?php echo $translation->get("assign_slideshows"); ?>
|
||||
<div id="closeoverlay" onclick="disableOverlay();"></div>
|
||||
</div>
|
||||
|
||||
<ul class="toolbar_menu">
|
||||
<?= button("left", $translation->get("back"), $formname, "loadCard('edit_component', true)"); ?>
|
||||
<?= button("link", $translation->get("assoc_with_component"), $formname, "loadCard('assoc_line_component')"); ?>
|
||||
</ul>
|
||||
|
||||
<div class="clearfix"></div>
|
||||
|
||||
<?php
|
||||
if (count($messages)) {
|
||||
echo '<div id="overlayMessages">' . join("\r\n", $messages) . '</div>';
|
||||
}
|
||||
?>
|
||||
|
||||
<form id="<?= $formname ?>" name="<?= $formname ?>" method="post">
|
||||
<input type="hidden" class="selected_linklist_row" name="input_id" value="" />
|
||||
<input type="hidden" name="get_real_page_link_id" value="1" />
|
||||
<input type="hidden" name="input_page_id" value="<?php echo $input_page_id; ?>" />
|
||||
<input type="hidden" name="input_component_id" value="<?php echo $input_component_id; ?>" />
|
||||
<input name="data-sitepartid" type="hidden" value="2">
|
||||
|
||||
<div class="requestLoader"></div>
|
||||
<?
|
||||
$query = "SELECT slideshow_header.id, description AS '" . $translation->get("description") . "', from_unixtime(modified_date, '%d.%m.%Y %H:%i:%s') AS '" . $translation->get("changed_on") . "', main_admin_user.name AS '" . $translation->get("changed_by") . "' from slideshow_header left join main_admin_user ON slideshow_header.modified_user = main_admin_user.id where (main_language_id = " . (int)$GLOBALS["language"]['id'] . " OR all_languages = 1) and collection_header = 0 order by id asc";
|
||||
//echo $query;
|
||||
$format = array('option', 'text', 'text', 'text');
|
||||
if ($result = @mysqli_query($GLOBALS['mysql_con'], $query)) {
|
||||
linklist($result, $formname, $format, "input_id", "assoc_line_component");
|
||||
}
|
||||
?>
|
||||
</form>
|
||||
167
module/slideshow/edit_contactform_line_cardform.inc.php
Normal file
167
module/slideshow/edit_contactform_line_cardform.inc.php
Normal file
@@ -0,0 +1,167 @@
|
||||
<?
|
||||
$formname = "form_line_card";
|
||||
$translation = \DynCom\mysyde\common\classes\Registry::get("translation");
|
||||
$input_page_id = (isset($_REQUEST["input_page_id"]) ? $_REQUEST["input_page_id"] : "");
|
||||
$input_collection_id = (isset($_REQUEST["input_collection_id"]) ? $_REQUEST["input_collection_id"] : "");
|
||||
$collection_setup_content_id = (isset($_REQUEST["collection_setup_content_id"]) ? $_REQUEST["collection_setup_content_id"] : "");
|
||||
$input_component_id = (isset($_REQUEST["input_component_id"]) ? $_REQUEST["input_component_id"] : "");
|
||||
$header_id = (isset($input_line["header_id"]) ? $input_line["header_id"] : "");
|
||||
|
||||
$queryform = "SELECT * FROM contactform_header WHERE id = '" . $header_id . "' LIMIT 1";
|
||||
$result = @mysqli_query($GLOBALS['mysql_con'], $queryform);
|
||||
$contactform = @mysqli_fetch_array($result);
|
||||
$is_multiform = $contactform['is_multistep'];
|
||||
?>
|
||||
|
||||
<div id="overlaycrumb">
|
||||
<?php if ($input_line["id"] == "") {
|
||||
echo $translation->get("new_contactform_field");
|
||||
} else {
|
||||
echo $translation->get("edit_contactform_field");
|
||||
}
|
||||
?>
|
||||
<div id="closeoverlay" onclick="disableOverlay();"></div>
|
||||
</div>
|
||||
|
||||
<ul class="toolbar_menu">
|
||||
<?
|
||||
if (is_collection_edit()) {
|
||||
button("left", $translation->get("overview"), $formname, "loadCard('edit_collection', true)");
|
||||
} else {
|
||||
button("left", $translation->get("overview"), $formname, "loadCard('edit_contactform', true)");
|
||||
}
|
||||
?>
|
||||
<?= button("save", $translation->get("save"), $formname, "loadCard('save_line_contactform', true)"); ?>
|
||||
<?= button("save", $translation->get("save_and_close"), $formname, "jQuery('#save_and_close', jQuery('#" . $formname . "')).val(1);loadCard('save_line_contactform', true)"); ?>
|
||||
<?php
|
||||
if ($input_line["id"] != "") {
|
||||
echo button("delete", $translation->get("delete"), $formname, "loadCard('delete_line_contactform', true, '{$translation->get('delete_contactform_field_confirm')}')");
|
||||
}
|
||||
?>
|
||||
<?= button("reset", $translation->get("restore"), $formname, "?action=edit"); ?>
|
||||
</ul>
|
||||
<div class="clearfix"></div>
|
||||
|
||||
<?php
|
||||
if (count($messages)) {
|
||||
echo '<div id="overlayMessages">' . join("\r\n", $messages) . '</div>';
|
||||
}
|
||||
?>
|
||||
|
||||
<form id="<?= $formname ?>" name="<?= $formname ?>" method="post" enctype="multipart/form-data">
|
||||
<input name="input_line_id" type="hidden" value="<?= $input_line["id"] ?>" />
|
||||
<input name="input_id" type="hidden" value="<?= $header_id; ?>" />
|
||||
<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 $collection_setup_content_id; ?>" />
|
||||
<input type="hidden" name="input_component_id" value="<?php echo $input_component_id; ?>" />
|
||||
<input name="save_and_close" id="save_and_close" type="hidden" value="0" />
|
||||
<input type="hidden" name="linklist_form" value="form_field_contactform_list" />
|
||||
|
||||
|
||||
<table class="cardform" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td>
|
||||
<?php
|
||||
|
||||
if($is_multiform){
|
||||
$section_id = 0;
|
||||
$query = " SELECT * FROM contactform_section WHERE contactform_id = ".$header_id;
|
||||
$result = @mysqli_query($GLOBALS['mysql_con'], $query);
|
||||
|
||||
?>
|
||||
<?php
|
||||
$queryLine = "SELECT * FROM multi_contactform_link WHERE contactform_line_id = '" . $input_line["id"] . "' LIMIT 1";
|
||||
$resultLine = @mysqli_query($GLOBALS['mysql_con'], $queryLine);
|
||||
$input_liner = array();
|
||||
$input_liner['layout_area_id'] = '';
|
||||
if (@mysqli_num_rows($resultLine) == 1) {
|
||||
$input_liner = @mysqli_fetch_array($resultLine);
|
||||
}
|
||||
?>
|
||||
<? layout_class_select($translation->get("layout_area"), "input_layout_area_id", $input_liner['layout_area_id']); ?>
|
||||
<div class="label"><label for="abschnitt">Abschnitt Auswählen</label></div>
|
||||
<div class="input">
|
||||
|
||||
<select class="select" name="section_id" id="section_id">
|
||||
<?php while( $row = mysqli_fetch_array($result)){ ?>
|
||||
<option
|
||||
value="<?= $row['id']?>" <?php if($row['id'] == $input_line['section_id']){ echo 'selected';} ?>><?php echo $row['name'] ?></option>
|
||||
<?php } ?>
|
||||
</select>
|
||||
</div>
|
||||
<div class="label"><label for="abschnitt">Nächste Abschnitt</label></div>
|
||||
<div class="input">
|
||||
|
||||
<select class="select" name="next_section_id" id="next_section_id">
|
||||
<option value="NA" <?php if($input_line['next_section_id'] == 'NA'){ echo 'selected'; } ?>>---</option>
|
||||
<?php $result = @mysqli_query($GLOBALS['mysql_con'], $query); while( $row = mysqli_fetch_array($result)){ ?>
|
||||
<option
|
||||
value="<?= $row['id']?>" <?php if($row['id'] == $input_line['next_section_id']){ echo 'selected';} ?>><?php echo $row['name'] ?></option>
|
||||
<?php } ?>
|
||||
</select>
|
||||
</div>
|
||||
<div class="label"><label for="abschnitt">Bild</label></div>
|
||||
<div class="input">
|
||||
<input type="file" name="field_img">
|
||||
<?php
|
||||
$valFile = '';
|
||||
if($input_line["field_img"] != '' && $input_line["field_img"] != NULL){
|
||||
$valFile = $input_line["field_img"];
|
||||
}
|
||||
?>
|
||||
<input type="hidden" name="field_img_old" value="<?=$valFile;?>">
|
||||
<?php
|
||||
if($input_line["field_img"] != NULL && $input_line["field_img"] != ''){
|
||||
echo "<div class='img_container intranet_user_image'><img class='img-fluid' src='/userdata/collection/resize/".$input_line["field_img"]."'></div>";
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<div class="label"><label for="abschnitt" >Icon</label></div>
|
||||
<div class="input">
|
||||
<input type="text" name="icon" value="<?= $input_line["icon"];?>">
|
||||
</div>
|
||||
|
||||
|
||||
<? } ?>
|
||||
<div class="label"><label for="input_typ">Typ</label></div>
|
||||
<div class="input">
|
||||
<select class="select" name="input_typ" id="input_typ">
|
||||
<option<?= ($input_line["typ"] == 1) ? " selected=\"selected\"" : " "; ?>
|
||||
value="1"><?php echo $translation->get("textfield"); ?></option>
|
||||
<option<?= ($input_line["typ"] == 2) ? " selected=\"selected\"" : " "; ?>
|
||||
value="2"><?php echo $translation->get("textarea"); ?></option>
|
||||
<option<?= ($input_line["typ"] == 3) ? " selected=\"selected\"" : " "; ?>
|
||||
value="3"><?php echo $translation->get("yesno"); ?></option>
|
||||
<option<?= ($input_line["typ"] == 4) ? " selected=\"selected\"" : " "; ?>
|
||||
value="4"><?php echo $translation->get("optionfield"); ?></option>
|
||||
<option<?= ($input_line["typ"] == 5) ? " selected=\"selected\"" : " "; ?>
|
||||
value="5"><?php echo $translation->get("headline"); ?></option>
|
||||
<option<?= ($input_line["typ"] == 6) ? " selected=\"selected\"" : " "; ?>
|
||||
value="6"><?php echo $translation->get("spacerow"); ?></option>
|
||||
<option<?= ($input_line["typ"] == 7) ? " selected=\"selected\"" : " "; ?>
|
||||
value="7"><?php echo $translation->get("title_news"); ?></option>
|
||||
<option<?= ($input_line["typ"] == 8) ? " selected=\"selected\"" : " "; ?>
|
||||
value="8"><?php echo $translation->get("file"); ?></option>
|
||||
<?php if($is_multiform){ ?>
|
||||
<option<?= ($input_line["typ"] == 9) ? " selected=\"selected\"" : " "; ?>
|
||||
value="9"><?php echo $translation->get("checkbox"); ?></option>
|
||||
<option<?= ($input_line["typ"] == 10) ? " selected=\"selected\"" : " "; ?>
|
||||
value="10"><?php echo 'Radio'; ?></option>
|
||||
<?php } ?>
|
||||
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<? input($translation->get("textkey"), "input_code", "text", $input_line["code"], 50) ?>
|
||||
<? input($translation->get("caption"), "input_name", "text", $input_line["name"], 250) ?>
|
||||
<? input($translation->get("caption_in_field"), "input_infield", "checkbox", $input_line["infield"]) ?>
|
||||
<? input($translation->get("mandatory_field"), "input_mandatory", "checkbox", $input_line["mandatory"]) ?>
|
||||
<br />
|
||||
<? input($translation->get("optionvalues"), "input_option_string", "text", $input_line["option_string"], 200) ?>
|
||||
</td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</form>
|
||||
605
module/slideshow/edit_slideshow.inc.php
Normal file
605
module/slideshow/edit_slideshow.inc.php
Normal file
@@ -0,0 +1,605 @@
|
||||
<?
|
||||
|
||||
date_default_timezone_set('Europe/Berlin');
|
||||
require_once("slideshow.config.inc.php");
|
||||
|
||||
$messages = array();
|
||||
$error = FALSE;
|
||||
|
||||
if (isset($custom_action)) {
|
||||
$action = $custom_action;
|
||||
} else {
|
||||
$action = $_REQUEST["action"];
|
||||
}
|
||||
|
||||
switch ($action) {
|
||||
case 'new_slideshow':
|
||||
require_once("edit_slideshow_cardform.inc.php");
|
||||
break;
|
||||
case 'new_contact_slideshow':
|
||||
require_once("edit_slideshow_contact_cardform.inc.php");
|
||||
break;
|
||||
case 'save_slideshow':
|
||||
save_options_slideshow();
|
||||
break;
|
||||
case 'edit_slideshow':
|
||||
edit_slideshow();
|
||||
break;
|
||||
case 'delete_slideshow' :
|
||||
delete_slideshow();
|
||||
break;
|
||||
|
||||
case 'new_line_slideshow':
|
||||
new_line_slideshow();
|
||||
break;
|
||||
case 'edit_line_slideshow':
|
||||
edit_line_slideshow();
|
||||
break;
|
||||
case 'delete_line_slideshow':
|
||||
delete_line_slideshow();
|
||||
break;
|
||||
case 'save_line_slideshow':
|
||||
save_slideshow_entry();
|
||||
break;
|
||||
|
||||
case 'moveup_line_slideshow':
|
||||
moveup_pic_slideshow();
|
||||
edit_slideshow();
|
||||
break;
|
||||
case 'movedown_line_slideshow':
|
||||
movedown_pic_slideshow();
|
||||
edit_slideshow();
|
||||
break;
|
||||
|
||||
case 'update_sortorder_slideshow':
|
||||
update_sortorder_slideshow();
|
||||
break;
|
||||
|
||||
default:
|
||||
require_once("edit_slideshow_listform.inc.php");
|
||||
break;
|
||||
}
|
||||
|
||||
function update_sortorder_slideshow() {
|
||||
$sorting = 1;
|
||||
foreach ($_POST['linklistid'] as $itemId) {
|
||||
$query = "UPDATE slideshow_line SET sorting = " . $sorting . " WHERE id = " . $itemId;
|
||||
@mysqli_query($GLOBALS['mysql_con'], $query);
|
||||
$sorting++;
|
||||
}
|
||||
}
|
||||
|
||||
function new_line_slideshow() {
|
||||
$input_line = array();
|
||||
|
||||
if (is_collection_edit()) {
|
||||
$collection_link = get_collection_link($_REQUEST['input_collection_id'], $_REQUEST['collection_setup_content_id']);
|
||||
if (isset($collection_link['main_sitepart_header_id'])) {
|
||||
$input_line['header_id'] = $collection_link['main_sitepart_header_id'];
|
||||
}
|
||||
} else {
|
||||
$input_line['header_id'] = $_REQUEST['input_id'];
|
||||
}
|
||||
|
||||
require_once("edit_slideshow_line_cardform.inc.php");
|
||||
}
|
||||
|
||||
function edit_slideshow( $_id = "", $messages = array() ) {
|
||||
|
||||
if (is_collection_edit()) {
|
||||
edit_collection();
|
||||
return;
|
||||
}
|
||||
|
||||
if ((int)$_id > 0) {
|
||||
$input_id = $_id;
|
||||
} else {
|
||||
$input_id = $_REQUEST["input_id"];
|
||||
}
|
||||
|
||||
if ($input_id <> '') {
|
||||
|
||||
$query = "SELECT * FROM slideshow_header WHERE id = '" . $input_id . "' LIMIT 1";
|
||||
|
||||
$result = @mysqli_query($GLOBALS['mysql_con'], $query);
|
||||
|
||||
if (@mysqli_num_rows($result) == 1) {
|
||||
|
||||
$input_slideshow = @mysqli_fetch_array($result);
|
||||
if(isset($_REQUEST['input_contactform_id'])){
|
||||
require_once("edit_slideshow_contact_cardform.inc.php");
|
||||
}else{
|
||||
require_once("edit_slideshow_cardform.inc.php");
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
} else {
|
||||
|
||||
require_once("edit_slideshow_cardform.inc.php");
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
function edit_line_slideshow( $_id = "", $messages = array() ) {
|
||||
if ((int)$_id > 0) {
|
||||
$line_id = $_id;
|
||||
} else {
|
||||
$line_id = $_REQUEST["input_line_id"];
|
||||
}
|
||||
|
||||
if ($line_id <> '') {
|
||||
$query = "SELECT * FROM slideshow_line WHERE id = '" . $line_id . "' LIMIT 1";
|
||||
$result = @mysqli_query($GLOBALS['mysql_con'], $query);
|
||||
if (@mysqli_num_rows($result) == 1) {
|
||||
$input_line = @mysqli_fetch_array($result);
|
||||
require_once("edit_slideshow_line_cardform.inc.php");
|
||||
}
|
||||
} else {
|
||||
require_once("edit_slideshow_cardform.inc.php");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function save_options_slideshow() {
|
||||
$translation = \DynCom\mysyde\common\classes\Registry::get("translation");
|
||||
$input_id = "";
|
||||
|
||||
$width = $_POST['slideshow_width'];
|
||||
$height = $_POST['slideshow_height'];
|
||||
$effect = $_POST['slideshow_effect'];
|
||||
$input_all_languages = ($_POST["input_all_languages"] == "on") ? 1 : 0;
|
||||
|
||||
IF ($_POST['slideshow_arrows'] == "yes") {
|
||||
global $arrows;
|
||||
$arrows = "";
|
||||
} ELSE {
|
||||
global $arrows;
|
||||
$arrows = "no";
|
||||
}
|
||||
$eff_interval = $_POST['slideshow_interval'];
|
||||
$effect_duration = $_POST['slideshow_effect_duration'];
|
||||
$text_effect = $_POST['slideshow_text_effect'];
|
||||
$text_pos = $_POST['slideshow_text_pos'];
|
||||
|
||||
//pruefen ob Bild ausgewaehlt
|
||||
if ($_REQUEST["input_id"] <> '') {
|
||||
$insertquery = "UPDATE slideshow_header SET
|
||||
description = '" . mysqli_real_escape_string($GLOBALS['mysql_con'], $_REQUEST["input_description"]) . "',
|
||||
modified_date = " . time() . ",
|
||||
modified_user = " . (int)$GLOBALS["admin_user"]['id'] . ",
|
||||
width = '" . $width . "',
|
||||
height = '" . $height . "',
|
||||
effect = '" . $effect . "',
|
||||
arrows = '" . $arrows . "',
|
||||
eff_interval = '" . $eff_interval . "',
|
||||
effect_duration = '" . $effect_duration . "',
|
||||
text_effect = '" . $text_effect . "',
|
||||
text_pos = '" . $text_pos . "',
|
||||
all_languages = " . $input_all_languages . "
|
||||
WHERE id = " . $_REQUEST["input_id"] . "
|
||||
LIMIT 1";
|
||||
$inserted = FALSE;
|
||||
$input_id = $_REQUEST["input_id"];
|
||||
} else {
|
||||
$insertquery = "INSERT INTO slideshow_header
|
||||
(main_language_id, description, modified_date, modified_user, width, height, effect, arrows, eff_interval, effect_duration, text_effect, text_pos, all_languages)
|
||||
VALUES (
|
||||
" . (int)$GLOBALS["language"]['id'] . ",
|
||||
'" . mysqli_real_escape_string($GLOBALS['mysql_con'], $_REQUEST['input_description']) . "',
|
||||
" . time() . ",
|
||||
" . (int)$GLOBALS["admin_user"]['id'] . ",
|
||||
'" . $width . "',
|
||||
'" . $height . "',
|
||||
'" . $effect . "',
|
||||
'" . $arrows . "',
|
||||
'" . $eff_interval . "',
|
||||
'" . $effect_duration . "',
|
||||
'" . $text_effect . "',
|
||||
'" . $text_pos . "',
|
||||
" . $input_all_languages . "
|
||||
)";
|
||||
$inserted = TRUE;
|
||||
}
|
||||
|
||||
if (($_REQUEST["input_description"] == '')) {
|
||||
$messages[] = "<div class=\"errorbox\">" . $translation->get("error_description") . "</div>\n";
|
||||
$error = TRUE;
|
||||
}
|
||||
|
||||
if (!$error) {
|
||||
$sizeChanged = FALSE;
|
||||
|
||||
$query = "SELECT width, height FROM slideshow_header WHERE id = '" . $input_id."'";
|
||||
$result = @mysqli_query($GLOBALS['mysql_con'], $query);
|
||||
if (@mysqli_num_rows($result) == 1) {
|
||||
$slideshowWidthHeight = @mysqli_fetch_array($result);
|
||||
if ($slideshowWidthHeight['width'] != $width || $slideshowWidthHeight['height'] != $height) {
|
||||
$sizeChanged = TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
@mysqli_query($GLOBALS['mysql_con'], $insertquery);
|
||||
|
||||
if ($inserted == TRUE) {
|
||||
$input_id = mysqli_insert_id($GLOBALS['mysql_con']);
|
||||
$messages[] = '<div class="successbox">' . $translation->get("slideshow_msg_success1") . '</div>';
|
||||
} else {
|
||||
$messages[] = '<div class="successbox">' . $translation->get("slideshow_msg_success2") . '</div>';
|
||||
}
|
||||
|
||||
if ($sizeChanged === TRUE) {
|
||||
$query = "SELECT * FROM slideshow_line WHERE header_id = '" . $input_id . "' ORDER BY sorting DESC";
|
||||
$result = mysqli_query($GLOBALS['mysql_con'], $query);
|
||||
//Wenn neue Größen ungleich gespeicherte Größen -> Lösche alte Bilder, wandle Original in neue Größe und hinterlege
|
||||
WHILE ($row = mysqli_fetch_array($result)) {
|
||||
$filename = $row['filename'];
|
||||
|
||||
if (file_exists(PATH_RESIZE . $filename) && ($row["width"] <> $width || $row["height"] <> $height)) {
|
||||
unlink(PATH_RESIZE . $filename);
|
||||
image_resize(PATH_ORIGINAL_PICTURE . $filename, PATH_RESIZE . $filename, $width, $height, TRUE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
update_sitepart_changes(2, $input_id);
|
||||
|
||||
if (is_page_edit()) {
|
||||
header('EDIT_ERROR: 1'); // verhindern, dass overlay geschlossen wird
|
||||
if (line_already_exists($_REQUEST["input_page_id"], 2, $input_id) === FALSE) {
|
||||
assoc_sitepart(2, $input_id, FALSE);
|
||||
}
|
||||
|
||||
if ($_REQUEST['force_close'] == 1) {
|
||||
edit_content_page();
|
||||
return;
|
||||
}
|
||||
|
||||
edit_slideshow($input_id, $messages);
|
||||
|
||||
} else if(is_contact_edit()){
|
||||
|
||||
header('EDIT_ERROR: 1'); // verhindern, dass overlay geschlossen wird
|
||||
$queryLine = "SELECT id, active FROM multi_contactform_link WHERE main_section_id = '" . (int)$_REQUEST['input_section_id'] . "' AND main_sitepart_id = 2 AND main_sitepart_header_id = '" . $input_id ."' LIMIT 1";
|
||||
$resultLine = @mysqli_query($GLOBALS['mysql_con'],$queryLine);
|
||||
|
||||
if(@mysqli_num_rows($resultLine) >= 1) {
|
||||
$rowLine = @mysqli_fetch_array($resultLine);
|
||||
$active = 0;
|
||||
if(isset($_REQUEST['input_active'])){
|
||||
$active = 1;
|
||||
}
|
||||
$layout_class_defined = '';
|
||||
if(isset($_REQUEST['layout_class_defined'])){
|
||||
$layout_class_defined = $_REQUEST['layout_class_defined'];
|
||||
}
|
||||
$queryUpd = "UPDATE multi_contactform_link SET layout_area_id = ".$_REQUEST['input_layout_area_id']." , active = ".$active.", layout_class_defined = '".$layout_class_defined."' WHERE id = '" . $rowLine['id']."'";
|
||||
|
||||
@mysqli_query($GLOBALS['mysql_con'],$queryUpd);
|
||||
}else{
|
||||
assoc_sitepart(2, $input_id, FALSE);
|
||||
}
|
||||
|
||||
if ($_REQUEST['force_close'] == 1) {
|
||||
edit_contactform();
|
||||
return;
|
||||
}
|
||||
|
||||
edit_slideshow($input_id, $messages);
|
||||
} elseif (is_component_edit()) {
|
||||
header('EDIT_ERROR: 1'); // verhindern, dass overlay geschlossen wird
|
||||
if (line_already_exists($_REQUEST["input_component_id"], 2, $input_id) === FALSE) {
|
||||
assoc_sitepart(2, $input_id, FALSE);
|
||||
}
|
||||
|
||||
if ($_REQUEST['force_close'] == 1) {
|
||||
edit_slideshow("", $messages);
|
||||
return;
|
||||
}
|
||||
|
||||
edit_slideshow($input_id, $messages);
|
||||
} else {
|
||||
edit_slideshow($input_id, $messages);
|
||||
}
|
||||
|
||||
} else {
|
||||
header('EDIT_ERROR: 1');
|
||||
$input_slideshow = array();
|
||||
$input_slideshow["id"] = $_REQUEST["input_id"];
|
||||
$input_slideshow["description"] = $_REQUEST["input_description"];
|
||||
$input_slideshow["width"] = $width;
|
||||
$input_slideshow["height"] = $height;
|
||||
$input_slideshow["effect"] = $effect;
|
||||
$input_slideshow["arrows"] = $arrows;
|
||||
$input_slideshow["eff_interval"] = $eff_interval;
|
||||
$input_slideshow["effect_duration"] = $effect_duration;
|
||||
$input_slideshow["text_effect"] = $text_effect;
|
||||
$input_slideshow["text_pos"] = $text_pos;
|
||||
$input_slideshow["all_languages"] = $input_all_languages;
|
||||
|
||||
require_once("edit_slideshow_cardform.inc.php");
|
||||
}
|
||||
}
|
||||
|
||||
function delete_slideshow() {
|
||||
if ($_REQUEST["input_id"] <> '') {
|
||||
$query = "DELETE FROM slideshow_header WHERE id = '" . $_REQUEST["input_id"] . "' LIMIT 1";
|
||||
@mysqli_query($GLOBALS['mysql_con'], $query);
|
||||
|
||||
$query = "SELECT * FROM slideshow_line WHERE header_id = '" . $_REQUEST["input_id"]."'";
|
||||
if ($result = @mysqli_query($GLOBALS['mysql_con'], $query)) {
|
||||
while ($row = @mysqli_fetch_array($result, 1)) {
|
||||
delete_pictures_slideshow($row['filename']);
|
||||
}
|
||||
}
|
||||
|
||||
$query = "DELETE FROM slideshow_line WHERE header_id = '" . $_REQUEST["input_id"]."'";
|
||||
@mysqli_query($GLOBALS['mysql_con'], $query);
|
||||
|
||||
// zuordnung von Seiten loeschen
|
||||
$query = "DELETE FROM main_page_link WHERE main_sitepart_id = 2 AND main_sitepart_header_id = '" . $_REQUEST["input_id"]."'";
|
||||
@mysqli_query($GLOBALS['mysql_con'], $query);
|
||||
|
||||
// zuordnung von Seiten loeschen
|
||||
$query = "DELETE FROM multi_contactform_link WHERE main_sitepart_id = 2 AND main_sitepart_header_id = '" . $_REQUEST["input_id"]."'";
|
||||
|
||||
@mysqli_query($GLOBALS['mysql_con'], $query);
|
||||
|
||||
update_sitepart_changes(2, $_REQUEST["input_id"], TRUE);
|
||||
}
|
||||
require_once("edit_slideshow_listform.inc.php");
|
||||
}
|
||||
|
||||
function delete_pictures_slideshow( $filename ) {
|
||||
|
||||
if (file_exists(PATH_ORIGINAL_PICTURE . $filename)) {
|
||||
unlink(PATH_ORIGINAL_PICTURE . $filename);
|
||||
}
|
||||
if (file_exists("../.." . PATH_ICON . $filename)) {
|
||||
unlink("../.." . PATH_ICON . $filename);
|
||||
}
|
||||
if (file_exists(PATH_RESIZE . $filename)) {
|
||||
unlink(PATH_RESIZE . $filename);
|
||||
}
|
||||
}
|
||||
|
||||
function delete_line_slideshow() {
|
||||
//pruefen ob Bild ausgewaehlt
|
||||
if ($_REQUEST["input_line_id"] <> '') {
|
||||
$query = "SELECT * FROM slideshow_line WHERE id= '" . $_REQUEST["input_line_id"]."'";
|
||||
$result = mysqli_query($GLOBALS['mysql_con'], $query);
|
||||
//Loeschen der Dateien und des DB-Eintrags wenn Eintrag vorhanden
|
||||
if (mysqli_num_rows($result) > 0) {
|
||||
$row = mysqli_fetch_array($result);
|
||||
delete_pictures_slideshow($row['filename']);
|
||||
$query = "DELETE FROM slideshow_line WHERE id = '" . $_REQUEST["input_line_id"] . "' LIMIT 1";
|
||||
@mysqli_query($GLOBALS['mysql_con'], $query);
|
||||
}
|
||||
}
|
||||
edit_slideshow();
|
||||
}
|
||||
|
||||
/**
|
||||
* save_slideshow_entry() Speichern einzelner Bilder
|
||||
*
|
||||
*/
|
||||
|
||||
function save_slideshow_entry() {
|
||||
|
||||
$translation = \DynCom\mysyde\common\classes\Registry::get("translation");
|
||||
$messages = array();
|
||||
$id = $_REQUEST["input_line_id"];
|
||||
|
||||
// wenn in kollektion, dann die dummy header id auslesen bzw erstmal anlegen
|
||||
if (is_collection_edit() && (!isset($_REQUEST['input_id']) || (int)$_REQUEST['input_id'] == 0)) {
|
||||
// neue dummy slideshow anlegen
|
||||
|
||||
// optionen auslesen
|
||||
$query = "SELECT options FROM main_collection_setup_content WHERE id = '" . $_POST['collection_setup_content_id']."'";
|
||||
$result = mysqli_query($GLOBALS['mysql_con'], $query);
|
||||
$row = mysqli_fetch_array($result);
|
||||
|
||||
$options = unserialize($row['options']);
|
||||
// hinzufuegen zur datenbank
|
||||
$insertquery = "INSERT INTO slideshow_header
|
||||
(main_language_id, description, modified_date, modified_user, width, height, effect, arrows, eff_interval, effect_duration, text_effect, text_pos, collection_header)
|
||||
VALUES (
|
||||
" . $GLOBALS["language"]['id'] . ",
|
||||
'',
|
||||
" . time() . ",
|
||||
" . (int)$GLOBALS["admin_user"]['id'] . ",
|
||||
" . $options['collection_setup_width'] . ",
|
||||
" . $options['collection_setup_height'] . ",
|
||||
'" . $options['collection_setup_effect'] . "',
|
||||
'" . $options['collection_setup_arrows'] . "',
|
||||
'" . $options['collection_setup_eff_interval'] . "',
|
||||
'" . $options['collection_setup_effect_duration'] . "',
|
||||
'" . $options['collection_setup_text_effect'] . "',
|
||||
'" . $options['collection_setup_text_pos'] . "',
|
||||
1
|
||||
)";
|
||||
@mysqli_query($GLOBALS['mysql_con'], $insertquery);
|
||||
$header_id = mysqli_insert_id($GLOBALS['mysql_con']);
|
||||
|
||||
$query = "INSERT INTO main_collection_link (main_collection_id, main_collection_setup_content_id, main_sitepart_header_id, main_sitepart_id)
|
||||
VALUES (
|
||||
'" . $_REQUEST['input_collection_id'] . "',
|
||||
'" . $_REQUEST['collection_setup_content_id'] . "',
|
||||
'" . $header_id . "',
|
||||
2
|
||||
)";
|
||||
mysqli_query($GLOBALS['mysql_con'], $query);
|
||||
} else {
|
||||
$header_id = $_REQUEST['input_id'];
|
||||
}
|
||||
|
||||
$error = FALSE;
|
||||
$checkfile = TRUE;
|
||||
$description = ''; // ist disabled
|
||||
$previewImageString = ''; // in der datenbank fix drin
|
||||
|
||||
//Bildhöhe und -breite aus Tabelle holen oder mit Standardwerten vorbelegen
|
||||
$sql = "SELECT width, height FROM slideshow_header WHERE id = '" . $header_id."'";
|
||||
$result = mysqli_query($GLOBALS['mysql_con'], $sql);
|
||||
$row = mysqli_fetch_array($result);
|
||||
IF (isset($row["height"])) {
|
||||
$height = $row["height"];
|
||||
} ELSE {
|
||||
$height = 250;
|
||||
}
|
||||
IF (isset($row["width"])) {
|
||||
$width = $row["width"];
|
||||
} ELSE {
|
||||
$width = 500;
|
||||
}
|
||||
|
||||
if ($id == '' && (($_REQUEST["input_name"] == '') | ($_REQUEST["input_name"] == ''))) {
|
||||
$messages[] = "<div class=\"errorbox\">" . $translation->get("error_description") . "</div>\n";
|
||||
$error = TRUE;
|
||||
}
|
||||
|
||||
if ($id <> '') {
|
||||
$query = "UPDATE slideshow_line SET description = '" . mysqli_real_escape_string($GLOBALS['mysql_con'], $_REQUEST['input_name']) . "', link = '" . addhttp($_POST['input_link']) . "', headline= '" . mysqli_real_escape_string($GLOBALS['mysql_con'], $_REQUEST['input_headline']) . "', text= '" . mysqli_real_escape_string($GLOBALS['mysql_con'], $_REQUEST['input_text']) . "', text2= '" . mysqli_real_escape_string($GLOBALS['mysql_con'], $_REQUEST['input_text2']) . "' WHERE id = " . $id;
|
||||
$inserted = FALSE;
|
||||
$checkfile = FALSE;
|
||||
$currentFilename = '';
|
||||
$descriptionQuery = "SELECT preview, filename FROM slideshow_line WHERE id = '" . $id."'";
|
||||
$result = @mysqli_query($GLOBALS['mysql_con'], $descriptionQuery);
|
||||
if (@mysqli_num_rows($result) == 1) {
|
||||
$row = @mysqli_fetch_array($result);
|
||||
$previewImageString = $row["preview"];
|
||||
$currentFilename = $row['filename'];
|
||||
}
|
||||
|
||||
} else {
|
||||
$sorting = mysqli_fetch_array(@mysqli_query($GLOBALS['mysql_con'], "SELECT MAX(sorting)+1 AS 'newsorting' FROM slideshow_line WHERE header_id = '" . $header_id."'"));
|
||||
$sorting = ($sorting["newsorting"] <> "") ? $sorting = $sorting["newsorting"] : $sorting = 1;
|
||||
$query = "INSERT INTO slideshow_line (description ,info,header_id,sorting,text,headline,link,text2) VALUES ('" . mysqli_real_escape_string($GLOBALS['mysql_con'], $_REQUEST['input_name']) . "', 'hochgeladen von " . $GLOBALS['admin_user']['name'] . " am " . date('d.m.Y H:i:s') . "','" . $header_id . "','" . $sorting . "','" . mysqli_real_escape_string($GLOBALS['mysql_con'], $_REQUEST['input_text']) . "','" . mysqli_real_escape_string($GLOBALS['mysql_con'], $_REQUEST['input_headline']) . "','" . addhttp($_POST['input_link']) . "','" . mysqli_real_escape_string($GLOBALS['mysql_con'], $_REQUEST['input_text_2']) . "')";
|
||||
$inserted = TRUE;
|
||||
$description = $_POST['input_name'];
|
||||
}
|
||||
|
||||
if ($checkfile === TRUE && empty ($_FILES['input_file']['name'])) {
|
||||
$error = TRUE;
|
||||
$messages[] = "<div class='errorbox'>" . $translation->get("error_slideshow_line1") . "</div>\n";
|
||||
}
|
||||
|
||||
if (!empty ($_FILES['input_file']['name'])) {
|
||||
$erlaubte_endungen = array("jpg", "jpeg", "gif", "png");
|
||||
$filename = strtolower($_FILES['input_file']['name']);
|
||||
$filename_expl = explode(".", $filename);
|
||||
if (!in_array($filename_expl[count($filename_expl) - 1], $erlaubte_endungen)) {
|
||||
$messages[] = "<div class='errorbox'>" . $translation->get("error_slideshow_line2") . "</div>\n";
|
||||
$error = TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
//pruefen ob Datei zum Upload noch vorhanden
|
||||
if ($error === FALSE) {
|
||||
mysqli_query($GLOBALS['mysql_con'], $query);
|
||||
|
||||
if (!empty ($_FILES['input_file']['name'])) {
|
||||
if ($inserted === TRUE) {
|
||||
$query = "SELECT MAX(id) AS id FROM slideshow_line";
|
||||
$result = mysqli_query($GLOBALS['mysql_con'], $query);
|
||||
$row = mysqli_fetch_array($result);
|
||||
$id = $row['id'];
|
||||
}
|
||||
|
||||
$saveFilename = $id . "_" . cleanFilename($_FILES['input_file']['name']);
|
||||
$previewImageString = "<img src=\"" . PATH_ICON . $saveFilename . "?time=" . time() . "\">";
|
||||
|
||||
if ($inserted === FALSE && $currentFilename != $saveFilename) {
|
||||
delete_pictures_slideshow($currentFilename);
|
||||
}
|
||||
|
||||
$query = "UPDATE slideshow_line SET filename = '" . $saveFilename . "', preview = '<img src=\'" . PATH_ICON . $saveFilename . "?TIME=" . time() . "\'>' WHERE id ='" . $id."'";
|
||||
mysqli_query($GLOBALS['mysql_con'], $query);
|
||||
move_uploaded_file($_FILES['input_file']['tmp_name'], PATH_ORIGINAL_PICTURE . $saveFilename);
|
||||
image_resize(PATH_ORIGINAL_PICTURE . $saveFilename, PATH_RESIZE . $saveFilename, $width, $height, TRUE);
|
||||
image_resize(PATH_ORIGINAL_PICTURE . $saveFilename, "../.." . PATH_ICON . $saveFilename, 200, 30, TRUE);
|
||||
}
|
||||
|
||||
if ($inserted == TRUE) {
|
||||
$messages[] = '<div class="successbox">' . $translation->get("slideshowline_msg_success1") . '</div>';
|
||||
} else {
|
||||
$messages[] = '<div class="successbox">' . $translation->get("slideshowline_msg_success2") . '</div>';
|
||||
}
|
||||
|
||||
if ($_REQUEST['save_and_close'] == 1) {
|
||||
edit_slideshow();
|
||||
} else {
|
||||
|
||||
$_REQUEST['input_contactform_id'] = $_REQUEST['input_contactform_id'];
|
||||
$_REQUEST['input_section_id'] = $_REQUEST['input_section_id'];
|
||||
|
||||
edit_line_slideshow($id, $messages);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
// benoetigt fuer ajax calls
|
||||
if ($error === TRUE) {
|
||||
header('EDIT_ERROR: 1');
|
||||
}
|
||||
|
||||
$input_line = array();
|
||||
$input_line["id"] = $_REQUEST["input_line_id"];
|
||||
$input_line["header_id"] = $header_id;
|
||||
$input_line["headline"] = $_REQUEST["input_headline"];
|
||||
$input_line["text"] = $_REQUEST["input_text"];
|
||||
$input_line["text2"] = $_REQUEST["input_text2"];
|
||||
$input_line["link"] = $_REQUEST["input_link"];
|
||||
$input_line["description"] = $_REQUEST['input_name'];
|
||||
$input_line["preview"] = $previewImageString;
|
||||
$_REQUEST['input_contactform_id'] = $_REQUEST['input_contactform_id'];
|
||||
$_REQUEST['input_section_id'] = $_REQUEST['input_section_id'];
|
||||
require_once("edit_slideshow_line_cardform.inc.php");
|
||||
}
|
||||
|
||||
/**
|
||||
* moveup_pic() Bild nach oben
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
function moveup_pic_slideshow() {
|
||||
move_pic_slideshow("<", "DESC", $_POST["input_line_id"]);
|
||||
}
|
||||
|
||||
/**
|
||||
* movedown_pic() Bild nach unten
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
function movedown_pic_slideshow() {
|
||||
move_pic_slideshow(">", "ASC", $_POST["input_line_id"]);
|
||||
}
|
||||
|
||||
/**
|
||||
* move_pic() Soprtierung der Galerieeintraege
|
||||
*
|
||||
* @param mixed $way
|
||||
* @param mixed $order
|
||||
* @param mixed $pic_id
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
function move_pic_slideshow( $way, $order, $pic_id ) {
|
||||
$query = "SELECT * FROM slideshow_line WHERE id = '" . $pic_id . "' LIMIT 1";
|
||||
$result = @mysqli_query($GLOBALS['mysql_con'], $query);
|
||||
if (@mysqli_num_rows($result) == 1) {
|
||||
$curr_pic = @mysqli_fetch_array($result);
|
||||
}
|
||||
$query = "SELECT * FROM slideshow_line WHERE header_id = " . $curr_pic['header_id'] . " AND sorting " . $way . " " . $curr_pic["sorting"] . " ORDER BY sorting " . $order . " LIMIT 1";
|
||||
$result = @mysqli_query($GLOBALS['mysql_con'], $query);
|
||||
if (@mysqli_num_rows($result) == 1) {
|
||||
$change_pic = @mysqli_fetch_array($result);
|
||||
}
|
||||
if (($curr_pic["id"] <> '') && ($change_pic["id"] <> '')) {
|
||||
$query = "UPDATE slideshow_line SET sorting = " . $change_pic["sorting"] . " WHERE id = " . $curr_pic["id"];
|
||||
@mysqli_query($GLOBALS['mysql_con'], $query);
|
||||
$query = "UPDATE slideshow_line SET sorting = " . $curr_pic["sorting"] . " WHERE id = " . $change_pic["id"];
|
||||
@mysqli_query($GLOBALS['mysql_con'], $query);
|
||||
}
|
||||
}
|
||||
114
module/slideshow/edit_slideshow_cardform.inc.php
Normal file
114
module/slideshow/edit_slideshow_cardform.inc.php
Normal file
@@ -0,0 +1,114 @@
|
||||
<?
|
||||
require_once("slideshow.config.inc.php");
|
||||
$formname = "form_slideshow_cardform";
|
||||
$translation = \DynCom\mysyde\common\classes\Registry::get("translation");
|
||||
$inputname = "input_id";
|
||||
$input_page_id = (isset($_REQUEST["input_page_id"]) ? $_REQUEST["input_page_id"] : "");
|
||||
$input_component_id = (isset($_REQUEST["input_component_id"]) ? $_REQUEST["input_component_id"] : "");
|
||||
?>
|
||||
|
||||
<div id="overlaycrumb">
|
||||
<?php if ($input_slideshow["id"] == "") {
|
||||
echo $translation->get("new_slideshow");
|
||||
} else {
|
||||
echo $translation->get("edit_slideshow");
|
||||
}
|
||||
?>
|
||||
<div id="closeoverlay" onclick="disableOverlay();"></div>
|
||||
</div>
|
||||
|
||||
<ul class="toolbar_menu">
|
||||
<?php
|
||||
// Zurueck zur uebersicht
|
||||
if (is_page_edit() || is_component_edit()) {
|
||||
button("left", $translation->get("back"), $formname, "loadCard('edit_content_page', true)");
|
||||
}
|
||||
|
||||
// Speichern button
|
||||
button("save", $translation->get("save"), $formname, "loadCard('save_slideshow', true)");
|
||||
|
||||
// Speichern und schliessen
|
||||
button("save", $translation->get("save_and_close"), $formname, "loadCard('save_slideshow', true, '', true)");
|
||||
?>
|
||||
<li>
|
||||
<ul>
|
||||
<?php
|
||||
// Loeschen button
|
||||
if ($input_slideshow["id"] != "" && is_page_edit() === FALSE && is_component_edit() === FALSE) {
|
||||
echo button("delete", $translation->get("delete"), $formname, "loadCard('delete_slideshow', true, '{$translation->get('delete_slideshow_confirm')}', true)", "", FALSE);
|
||||
}
|
||||
|
||||
// Zuruecksetzen
|
||||
button("reset", $translation->get("restore"), $formname, "?action=edit", "", FALSE);
|
||||
?>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="clearfix"></div>
|
||||
|
||||
<?php
|
||||
if (count($messages)) {
|
||||
echo '<div id="overlayMessages">' . join("\r\n", $messages) . '</div>';
|
||||
}
|
||||
?>
|
||||
|
||||
<form id="<?= $formname ?>" name="<?= $formname ?>" method="post">
|
||||
<input name="input_id" type="hidden" value="<?= $input_slideshow["id"] ?>">
|
||||
<input type="hidden" name="get_real_page_link_id" value="1" />
|
||||
<input type="hidden" name="input_page_id" value="<?php echo $input_page_id; ?>" />
|
||||
<input type="hidden" name="input_component_id" value="<?php echo $input_component_id; ?>" />
|
||||
<input name="data-sitepartid" type="hidden" value="2">
|
||||
|
||||
<?php
|
||||
if (!is_array($input_slideshow)) {
|
||||
$width = 500;
|
||||
$height = 250;
|
||||
$effect = 'fade';
|
||||
$text_pos = 'bottom';
|
||||
$interval = 4;
|
||||
$text_effect = 'none';
|
||||
$effect_duration = 1;
|
||||
$arrows = "yes";
|
||||
} else {
|
||||
$width = $input_slideshow["width"];
|
||||
$height = $input_slideshow["height"];
|
||||
$effect = $input_slideshow["effect"];
|
||||
$text_pos = $input_slideshow["text_pos"];
|
||||
$interval = $input_slideshow["eff_interval"];
|
||||
$text_effect = $input_slideshow["text_effect"];
|
||||
$effect_duration = $input_slideshow["effect_duration"];
|
||||
$arrows = $input_slideshow["arrows"];
|
||||
}
|
||||
?>
|
||||
|
||||
<table class="cardform" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td>
|
||||
<? input($translation->get("description"), "input_description", "text", $input_slideshow["description"], 255) ?>
|
||||
<?php input($translation->get("width_px"), "slideshow_width", "code", $width) ?>
|
||||
<?php input($translation->get("height_px"), "slideshow_height", "code", $height) ?>
|
||||
<?php input($translation->get("show_duration"), "slideshow_interval", "code", $interval) ?>
|
||||
<?php input($translation->get("effect_duration"), "slideshow_effect_duration", "code", $effect_duration) ?>
|
||||
<?php input($translation->get("show_in_all_languages"), "input_all_languages", "checkbox", $input_slideshow["all_languages"]) ?>
|
||||
</td>
|
||||
<td>
|
||||
<?php input_select($translation->get("arrows"), "slideshow_arrows", array(0 => "yes", 1 => "no"), array(0 => $translation->get("display"), 1 => $translation->get("dont_display")), $arrows) ?>
|
||||
<?php input_select($translation->get("text_effect"), "slideshow_text_effect", $values = array(0 => 'fixed', 1 => 'slide', 2 => 'fade'), $value_names = array(0 => $translation->get("no_effect"), 1 => $translation->get("fade_in"), 2 => $translation->get("crossfade")), $text_effect) ?>
|
||||
<?php input_select($translation->get("text_position"), "slideshow_text_pos", $values = array(0 => 'top', 1 => 'bottom'), $value_names = array(0 => $translation->get("top"), 1 => $translation->get("bottom")), $text_pos) ?>
|
||||
<?php input_select($translation->get("transition_effect"), "slideshow_effect", $values = array(0 => 'none', 1 => 'scroll', 2 => 'fade'), $value_names = array(0 => $translation->get("no_effect"), 1 => $translation->get("fade_out"), 2 => $translation->get("crossfade")), $effect) ?>
|
||||
<?php
|
||||
if ($input_slideshow["id"] != "") {
|
||||
show_changed_on($input_slideshow["id"], "slideshow_header");
|
||||
show_changed_by($input_slideshow["id"], "slideshow_header");
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
|
||||
<?
|
||||
if ($input_slideshow['id'] != "") {
|
||||
require_once("edit_slideshow_line_listform.inc.php");
|
||||
}
|
||||
?>
|
||||
133
module/slideshow/edit_slideshow_contact_cardform.inc.php
Normal file
133
module/slideshow/edit_slideshow_contact_cardform.inc.php
Normal file
@@ -0,0 +1,133 @@
|
||||
<?
|
||||
require_once("slideshow.config.inc.php");
|
||||
$formname = "form_slideshow_cardform";
|
||||
$translation = \DynCom\mysyde\common\classes\Registry::get("translation");
|
||||
$inputname = "input_id";
|
||||
$input_page_id = (isset($_REQUEST["input_page_id"]) ? $_REQUEST["input_page_id"] : "");
|
||||
$input_component_id = (isset($_REQUEST["input_component_id"]) ? $_REQUEST["input_component_id"] : "");
|
||||
$input_contactform_id = (isset($_REQUEST["input_contactform_id"]) ? $_REQUEST["input_contactform_id"] : "");
|
||||
$input_section_id = (isset($_REQUEST["input_section_id"]) ? $_REQUEST["input_section_id"] : "");
|
||||
|
||||
?>
|
||||
|
||||
<div id="overlaycrumb">
|
||||
<?php if ($input_slideshow["id"] == "") {
|
||||
echo $translation->get("new_slideshow");
|
||||
} else {
|
||||
echo $translation->get("edit_slideshow");
|
||||
}
|
||||
?>
|
||||
<div id="closeoverlay" onclick="disableOverlay();"></div>
|
||||
</div>
|
||||
|
||||
<ul class="toolbar_menu">
|
||||
<?php
|
||||
// Zurueck zur uebersicht
|
||||
|
||||
button("left", $translation->get("back"), $formname, "loadCard('edit_contactform', true)");
|
||||
|
||||
|
||||
// Speichern button
|
||||
button("save", $translation->get("save"), $formname, "loadCard('save_slideshow', true)");
|
||||
|
||||
?>
|
||||
<li>
|
||||
<ul>
|
||||
<?php
|
||||
// Loeschen button
|
||||
if ($input_slideshow["id"] != "" && is_page_edit() === FALSE && is_component_edit() === FALSE) {
|
||||
echo button("delete", $translation->get("delete"), $formname, "loadCard('delete_slideshow', true, '{$translation->get('delete_slideshow_confirm')}', true)", "", FALSE);
|
||||
}
|
||||
|
||||
// Zuruecksetzen
|
||||
button("reset", $translation->get("restore"), $formname, "?action=edit", "", FALSE);
|
||||
?>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="clearfix"></div>
|
||||
|
||||
<?php
|
||||
if (count($messages)) {
|
||||
echo '<div id="overlayMessages">' . join("\r\n", $messages) . '</div>';
|
||||
}
|
||||
?>
|
||||
|
||||
<form id="<?= $formname ?>" name="<?= $formname ?>" method="post">
|
||||
<input name="input_id" type="hidden" value="<?= $input_slideshow["id"] ?>">
|
||||
<input type="hidden" name="get_real_page_link_id" value="1" />
|
||||
<input type="hidden" name="input_page_id" value="<?php echo $input_page_id; ?>" />
|
||||
<input type="hidden" name="input_component_id" value="<?php echo $input_component_id; ?>" />
|
||||
<input name="data-sitepartid" type="hidden" value="2">
|
||||
|
||||
<input name="input_section_id" type="hidden" value="<?= $input_section_id ?>">
|
||||
|
||||
<input type="hidden" name="input_contactform_id" value="<?= $input_contactform_id;?>">
|
||||
|
||||
<?php
|
||||
if (!is_array($input_slideshow)) {
|
||||
$width = 500;
|
||||
$height = 250;
|
||||
$effect = 'fade';
|
||||
$text_pos = 'bottom';
|
||||
$interval = 4;
|
||||
$text_effect = 'none';
|
||||
$effect_duration = 1;
|
||||
$arrows = "yes";
|
||||
} else {
|
||||
$width = $input_slideshow["width"];
|
||||
$height = $input_slideshow["height"];
|
||||
$effect = $input_slideshow["effect"];
|
||||
$text_pos = $input_slideshow["text_pos"];
|
||||
$interval = $input_slideshow["eff_interval"];
|
||||
$text_effect = $input_slideshow["text_effect"];
|
||||
$effect_duration = $input_slideshow["effect_duration"];
|
||||
$arrows = $input_slideshow["arrows"];
|
||||
}
|
||||
?>
|
||||
|
||||
<table class="cardform" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td>
|
||||
<?php
|
||||
$queryLine = "SELECT * FROM multi_contactform_link WHERE main_sitepart_header_id = '" . $input_slideshow["id"] . "' LIMIT 1";
|
||||
$resultLine = @mysqli_query($GLOBALS['mysql_con'], $queryLine);
|
||||
$input_line = array();
|
||||
$input_line['layout_area_id'] = '';
|
||||
if (@mysqli_num_rows($resultLine) == 1) {
|
||||
$input_line = @mysqli_fetch_array($resultLine);
|
||||
}
|
||||
?>
|
||||
<? layout_class_select($translation->get("layout_area"), "input_layout_area_id", $input_line['layout_area_id']); ?>
|
||||
|
||||
<? input($translation->get("description"), "input_description", "text", $input_slideshow["description"], 255) ?>
|
||||
<?php input($translation->get("width_px"), "slideshow_width", "code", $width) ?>
|
||||
<?php input($translation->get("height_px"), "slideshow_height", "code", $height) ?>
|
||||
<?php input($translation->get("show_duration"), "slideshow_interval", "code", $interval) ?>
|
||||
<?php input($translation->get("effect_duration"), "slideshow_effect_duration", "code", $effect_duration) ?>
|
||||
<?php input($translation->get("show_in_all_languages"), "input_all_languages", "checkbox", $input_slideshow["all_languages"]) ?>
|
||||
<? input($translation->get("active"), "input_active", "checkbox", $input_line['active']); ?>
|
||||
<? input($translation->get("self_definded_class"), "layout_class_defined", "text", $input_line["layout_class_defined"], 50) ?>
|
||||
</td>
|
||||
<td>
|
||||
<?php input_select($translation->get("arrows"), "slideshow_arrows", array(0 => "yes", 1 => "no"), array(0 => $translation->get("display"), 1 => $translation->get("dont_display")), $arrows) ?>
|
||||
<?php input_select($translation->get("text_effect"), "slideshow_text_effect", $values = array(0 => 'fixed', 1 => 'slide', 2 => 'fade'), $value_names = array(0 => $translation->get("no_effect"), 1 => $translation->get("fade_in"), 2 => $translation->get("crossfade")), $text_effect) ?>
|
||||
<?php input_select($translation->get("text_position"), "slideshow_text_pos", $values = array(0 => 'top', 1 => 'bottom'), $value_names = array(0 => $translation->get("top"), 1 => $translation->get("bottom")), $text_pos) ?>
|
||||
<?php input_select($translation->get("transition_effect"), "slideshow_effect", $values = array(0 => 'none', 1 => 'scroll', 2 => 'fade'), $value_names = array(0 => $translation->get("no_effect"), 1 => $translation->get("fade_out"), 2 => $translation->get("crossfade")), $effect) ?>
|
||||
<?php
|
||||
if ($input_slideshow["id"] != "") {
|
||||
show_changed_on($input_slideshow["id"], "slideshow_header");
|
||||
show_changed_by($input_slideshow["id"], "slideshow_header");
|
||||
}
|
||||
?>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
|
||||
<?
|
||||
if ($input_slideshow['id'] != "") {
|
||||
require_once("edit_slideshow_line_listform.inc.php");
|
||||
}
|
||||
?>
|
||||
88
module/slideshow/edit_slideshow_line_cardform.inc.php
Normal file
88
module/slideshow/edit_slideshow_line_cardform.inc.php
Normal file
@@ -0,0 +1,88 @@
|
||||
<?
|
||||
$formname = "form_line_card";
|
||||
$translation = \DynCom\mysyde\common\classes\Registry::get("translation");
|
||||
$input_page_id = (isset($_REQUEST["input_page_id"]) ? $_REQUEST["input_page_id"] : "");
|
||||
$input_collection_id = (isset($_REQUEST["input_collection_id"]) ? $_REQUEST["input_collection_id"] : "");
|
||||
$input_component_id = (isset($_REQUEST["input_component_id"]) ? $_REQUEST["input_component_id"] : "");
|
||||
$collection_setup_content_id = (isset($_REQUEST["collection_setup_content_id"]) ? $_REQUEST["collection_setup_content_id"] : "");
|
||||
$header_id = (isset($input_line["header_id"]) ? $input_line["header_id"] : "");
|
||||
?>
|
||||
|
||||
<div id="overlaycrumb">
|
||||
<?php if ($input_line["id"] == "") {
|
||||
echo $translation->get("new_slideshow_line");
|
||||
} else {
|
||||
echo $translation->get("edit_slideshow_line");
|
||||
}
|
||||
?>
|
||||
<div id="closeoverlay" onclick="disableOverlay();"></div>
|
||||
</div>
|
||||
|
||||
<ul class="toolbar_menu">
|
||||
<?
|
||||
if (is_collection_edit()) {
|
||||
button("left", $translation->get("overview"), $formname, "loadCard('edit_collection', true)");
|
||||
} else {
|
||||
button("left", $translation->get("overview"), $formname, "loadCard('edit_slideshow', true)");
|
||||
}
|
||||
?>
|
||||
<?= button("save", $translation->get("save"), $formname, "loadCard('save_line_slideshow', true)"); ?>
|
||||
<?= button("save", $translation->get("save_and_close"), $formname, "jQuery('#save_and_close', jQuery('#" . $formname . "')).val(1);loadCard('save_line_slideshow', true)"); ?>
|
||||
<?php
|
||||
if ($input_line["id"] != "") {
|
||||
echo button("delete", $translation->get("delete"), $formname, "loadCard('delete_line_slideshow', true, '{$translation->get('delete_line_confirm')}')");
|
||||
}
|
||||
?>
|
||||
<?= button("reset", $translation->get("restore"), $formname, "?action=edit"); ?>
|
||||
</ul>
|
||||
<div class="clearfix"></div>
|
||||
|
||||
<?php
|
||||
if (count($messages)) {
|
||||
echo '<div id="overlayMessages">' . join("\r\n", $messages) . '</div>';
|
||||
}
|
||||
?>
|
||||
|
||||
<form id="<?= $formname ?>" name="<?= $formname ?>" method="post" enctype="multipart/form-data">
|
||||
<input name="input_line_id" type="hidden" value="<?= $input_line["id"] ?>" />
|
||||
<input name="input_id" type="hidden" value="<?= $header_id; ?>" />
|
||||
<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 $collection_setup_content_id; ?>" />
|
||||
<input type="hidden" name="input_component_id" value="<?php echo $input_component_id; ?>" />
|
||||
<input name="save_and_close" id="save_and_close" type="hidden" value="0" />
|
||||
<input type="hidden" name="linklist_form" value="form_line_slideshow_list" />
|
||||
|
||||
<table class="cardform" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td>
|
||||
<? input($translation->get("description"), "input_name", "text", $input_line["description"], 255) ?>
|
||||
<? input($translation->get("link"), "input_link", "text", $input_line["link"], 255) ?>
|
||||
<? input($translation->get("file"), "input_file", "file", $input_line["file"]) ?>
|
||||
</td>
|
||||
<td>
|
||||
<? input($translation->get("image_headline"), "input_headline", "text", $input_line["headline"], 255) ?>
|
||||
<? input($translation->get("image_text"), "input_text", "text", $input_line["text"], 255) ?>
|
||||
<? input($translation->get("image_text2"), "input_text2", "text", $input_line["text2"], 255) ?>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<?php
|
||||
if ($input_line['preview'] != "") {
|
||||
?>
|
||||
<tr>
|
||||
<td>
|
||||
<div class="label"><?php echo $translation->get("preview"); ?></div>
|
||||
<?php echo $input_line['preview']; ?>
|
||||
<input type="hidden" name="preview" value="<?php echo $input_line['preview']; ?>" />
|
||||
</td>
|
||||
<td>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</table>
|
||||
|
||||
</form>
|
||||
32
module/slideshow/edit_slideshow_line_listform.inc.php
Normal file
32
module/slideshow/edit_slideshow_line_listform.inc.php
Normal file
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
$translation = \DynCom\mysyde\common\classes\Registry::get("translation");
|
||||
$formname = "form_line_list";
|
||||
$inputname = "input_id";
|
||||
$input_page_id = (isset($_REQUEST["input_page_id"]) ? $_REQUEST["input_page_id"] : "");
|
||||
$input_component_id = (isset($_REQUEST["input_component_id"]) ? $_REQUEST["input_component_id"] : "");
|
||||
?>
|
||||
|
||||
<form id="<?= $formname ?>" name="<?= $formname ?>" method="post">
|
||||
<input name="input_id" type="hidden" value="<?= $input_id ?>">
|
||||
<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_component_id" value="<?php echo $input_component_id; ?>" />
|
||||
|
||||
<h2><?php echo $translation->get("slideshow_field_headline"); ?></h2>
|
||||
<ul class="toolbar_menu">
|
||||
<?= button("new", $translation->get("new"), $formname, "loadCard('new_line_slideshow', true)", "", FALSE); ?>
|
||||
<?= button("edit", $translation->get("edit"), $formname, "loadCard('edit_line_slideshow')", "", FALSE); ?>
|
||||
<?= button("delete", $translation->get("delete"), $formname, "loadCard('delete_line_slideshow', false, '{$translation->get('delete_line_confirm')}')", "", FALSE); ?>
|
||||
<?= button("up", $translation->get("go_up"), $formname, "loadCard('moveup_line_slideshow')", "", FALSE); ?>
|
||||
<?= button("down", $translation->get("go_down"), $formname, "loadCard('movedown_line_slideshow')", "", FALSE); ?>
|
||||
|
||||
</ul>
|
||||
<div class="clearfix"></div>
|
||||
|
||||
<?
|
||||
$query = "SELECT id, preview AS '" . $translation->get("preview") . "', description AS '" . $translation->get("description") . "', link AS '" . $translation->get("link") . "', headline AS '" . $translation->get("headline") . "', text AS '" . $translation->get("text") . "' FROM slideshow_line WHERE header_id = " . $input_id . " ORDER BY sorting ASC";
|
||||
if ($result = @mysqli_query($GLOBALS['mysql_con'], $query)) {
|
||||
linklist($result, $formname, $format, "input_line_id", "edit_line_slideshow", TRUE, "update_sortorder_slideshow");
|
||||
}
|
||||
?>
|
||||
</form>
|
||||
32
module/slideshow/edit_slideshow_listform.inc.php
Normal file
32
module/slideshow/edit_slideshow_listform.inc.php
Normal file
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
$translation = \DynCom\mysyde\common\classes\Registry::get("translation");
|
||||
$formname = "form_slideshow_list";
|
||||
$inputname = "input_id";
|
||||
?>
|
||||
|
||||
<ul class="toolbar_menu">
|
||||
<?= button("new", $translation->get("new"), $formname, "loadCard('new_slideshow', true)"); ?>
|
||||
<?= button("edit", $translation->get("edit"), $formname, "loadCard('edit_slideshow')"); ?>
|
||||
<?= button("delete", $translation->get("delete"), $formname, "sendRequest('delete_slideshow', false, '{$translation->get('delete_slideshow_confirm')}')"); ?>
|
||||
</ul>
|
||||
|
||||
<div id="mainContent">
|
||||
|
||||
<?php echo current_website_language($site, $language); ?>
|
||||
<h1><?php echo get_translation('left_slideshows'); ?></h1>
|
||||
|
||||
<form id="<?= $formname ?>" name="<?= $formname ?>" method="post">
|
||||
<input type="hidden" class="selected_linklist_row" name="input_id" value="" />
|
||||
|
||||
<div class="requestLoader"></div>
|
||||
<?
|
||||
$query = "SELECT slideshow_header.id, description AS '" . $translation->get("description") . "', from_unixtime(modified_date, '%d.%m.%Y %H:%i:%s') AS '" . $translation->get("changed_on") . "', main_admin_user.name AS '" . $translation->get("changed_by") . "' from slideshow_header left join main_admin_user ON slideshow_header.modified_user = main_admin_user.id where (main_language_id = " . (int)$GLOBALS["language"]['id'] . " OR all_languages = 1) and collection_header = 0 ORDER BY id asc";
|
||||
//echo $query;
|
||||
$format = array('option', 'text', 'text', 'text');
|
||||
if ($result = @mysqli_query($GLOBALS['mysql_con'], $query)) {
|
||||
linklist($result, $formname, $format, "input_id", "edit_slideshow");
|
||||
}
|
||||
?>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
41
module/slideshow/page_slideshow_listform.inc.php
Normal file
41
module/slideshow/page_slideshow_listform.inc.php
Normal file
@@ -0,0 +1,41 @@
|
||||
<?php
|
||||
$translation = \DynCom\mysyde\common\classes\Registry::get("translation");
|
||||
$formname = "form_slideshow_list";
|
||||
$inputname = "input_id";
|
||||
$input_page_id = (isset($_REQUEST["input_page_id"]) ? $_REQUEST["input_page_id"] : "");
|
||||
?>
|
||||
|
||||
<div id="overlaycrumb">
|
||||
<?php echo $translation->get("assign_slideshows"); ?>
|
||||
<div id="closeoverlay" onclick="disableOverlay();"></div>
|
||||
</div>
|
||||
|
||||
<ul class="toolbar_menu">
|
||||
<?= button("left", $translation->get("back"), $formname, "loadCard('edit_content_page', true)"); ?>
|
||||
<?= button("link", $translation->get("assoc_with_page"), $formname, "loadCard('assoc_line_page')"); ?>
|
||||
</ul>
|
||||
|
||||
<div class="clearfix"></div>
|
||||
|
||||
<?php
|
||||
if (count($messages)) {
|
||||
echo '<div id="overlayMessages">' . join("\r\n", $messages) . '</div>';
|
||||
}
|
||||
?>
|
||||
|
||||
<form id="<?= $formname ?>" name="<?= $formname ?>" method="post">
|
||||
<input type="hidden" class="selected_linklist_row" name="input_id" value="" />
|
||||
<input type="hidden" name="get_real_page_link_id" value="1" />
|
||||
<input type="hidden" name="input_page_id" value="<?php echo $input_page_id; ?>" />
|
||||
<input name="data-sitepartid" type="hidden" value="2">
|
||||
|
||||
<div class="requestLoader"></div>
|
||||
<?
|
||||
$query = "SELECT slideshow_header.id, description AS '" . $translation->get("description") . "', from_unixtime(modified_date, '%d.%m.%Y %H:%i:%s') AS '" . $translation->get("changed_on") . "', main_admin_user.name AS '" . $translation->get("changed_by") . "' from slideshow_header left join main_admin_user ON slideshow_header.modified_user = main_admin_user.id where (main_language_id = " . (int)$GLOBALS["language"]['id'] . " OR all_languages = 1) and collection_header = 0 order by id asc";
|
||||
//echo $query;
|
||||
$format = array('option', 'text', 'text', 'text');
|
||||
if ($result = @mysqli_query($GLOBALS['mysql_con'], $query)) {
|
||||
linklist($result, $formname, $format, "input_id", "assoc_line_page");
|
||||
}
|
||||
?>
|
||||
</form>
|
||||
115
module/slideshow/setup_database_slideshow.php
Normal file
115
module/slideshow/setup_database_slideshow.php
Normal file
@@ -0,0 +1,115 @@
|
||||
<?php
|
||||
require_once("../../mysyde/common/common_functions.inc.php");
|
||||
require_once((local_environment()) ? "../../mysyde/dc.config.php" : "../../mysyde/dc-server.config.php");
|
||||
|
||||
|
||||
db_connect();
|
||||
|
||||
mkdir("../../userdata/slideshow", 0777);
|
||||
mkdir("../../userdata/slideshow/original", 0777);
|
||||
mkdir("../../userdata/slideshow/icon", 0777);
|
||||
|
||||
|
||||
$sql_entry = "CREATE TABLE slideshow_entry
|
||||
(
|
||||
id INT NOT NULL AUTO_INCREMENT,
|
||||
PRIMARY KEY(id),
|
||||
preview VARCHAR(250) NOT NULL,
|
||||
description VARCHAR(250) NOT NULL,
|
||||
headline VARCHAR(250),
|
||||
text VARCHAR(250),
|
||||
link VARCHAR(255),
|
||||
info VARCHAR(250),
|
||||
main_navigation_has_sitepart_id INT NOT NULL,
|
||||
sorting INT NOT NULL
|
||||
)";
|
||||
|
||||
$entry_query = mysqli_query($GLOBALS['mysql_con'], $sql_entry);
|
||||
IF (!$entry_query) {
|
||||
echo "* Tabelle slideshow_entry konnte nicht erstellt werden.<br />";
|
||||
} ELSE {
|
||||
echo "* Tabelle slideshow_entry wurde erstellt. (Schritt 1 von 5)<br />";
|
||||
}
|
||||
|
||||
$sql_options = "CREATE TABLE slideshow_options
|
||||
(
|
||||
id INT NOT NULL AUTO_INCREMENT,
|
||||
PRIMARY KEY(id),
|
||||
sitepart_id INT(3) UNIQUE NOT NULL,
|
||||
width INT(4) NOT NULL,
|
||||
height INT(4) NOT NULL,
|
||||
effect VARCHAR(10),
|
||||
arrows VARCHAR(10),
|
||||
eff_interval VARCHAR(4),
|
||||
effect_duration VARCHAR(3),
|
||||
text_effect VARCHAR(10),
|
||||
text_pos VARCHAR(15)
|
||||
)";
|
||||
|
||||
$query_options = mysqli_query($GLOBALS['mysql_con'], $sql_options);
|
||||
IF (!$query_options) {
|
||||
echo "* Tabelle slideshow_options konnte nicht erstellt werden.<br />";
|
||||
} ELSE {
|
||||
echo "* Tabelle slideshow_options wurde erstellt. (Schritt 2 von 5) <br />";
|
||||
}
|
||||
|
||||
$sql_main_modul = "INSERT INTO main_modul (
|
||||
code,
|
||||
name,
|
||||
path,
|
||||
installed
|
||||
) VALUES (
|
||||
'slideshow',
|
||||
'Slideshow',
|
||||
'/module/slideshow/',
|
||||
'1'
|
||||
)";
|
||||
|
||||
$query_modul = mysqli_query($GLOBALS['mysql_con'], $sql_main_modul);
|
||||
IF (!$query_modul) {
|
||||
echo "* main_modul Eintrag konnte nicht erstellt werden.<br />";
|
||||
} ELSE {
|
||||
echo "* main_modul Eintrag erstellt. (Schritt 3 von 5)<br />";
|
||||
}
|
||||
|
||||
$sql2 = "SELECT id FROM main_modul WHERE code = 'slideshow'";
|
||||
$query = mysqli_query($GLOBALS['mysql_con'], $sql2);
|
||||
$result = mysqli_fetch_array($query);
|
||||
$main_modul_id = $result[0];
|
||||
IF (!$main_modul_id) {
|
||||
echo "* main_modul id konnte nicht abgefragt werden.<br />";
|
||||
} ELSE {
|
||||
echo "* main_modul id abgefragt. (Schritt 4 von 5)<br />";
|
||||
}
|
||||
|
||||
$sql_sitepart = "INSERT INTO main_sitepart (
|
||||
main_modul_id,
|
||||
name,
|
||||
description,
|
||||
frontend_include,
|
||||
frontend_start_parameter,
|
||||
admin_include,
|
||||
admin_start_parameter
|
||||
) VALUES (
|
||||
'" . $main_modul_id . "',
|
||||
'Slideshow',
|
||||
'Verwaltet Slideshows',
|
||||
'/module/slideshow/slideshow.php',
|
||||
'slideshow_show',
|
||||
'/module/slideshow/slideshow.php',
|
||||
'slideshow_edit'
|
||||
)";
|
||||
|
||||
$query_sitepart = mysqli_query($GLOBALS['mysql_con'], $sql_sitepart);
|
||||
IF (!$query_sitepart) {
|
||||
echo "* main_sitepart Eintrag konnte nicht erstellt werden. <br />";
|
||||
} ELSE {
|
||||
echo "* main_sitepart Eintrag wurde erstellt. (Schritt 5 von 5)<br />";
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
?>
|
||||
83
module/slideshow/show_slideshow.inc.php
Normal file
83
module/slideshow/show_slideshow.inc.php
Normal file
@@ -0,0 +1,83 @@
|
||||
<?
|
||||
require_once("slideshow.config.inc.php");
|
||||
$query = "SELECT * FROM slideshow_header WHERE id = '" . $sitepart_id."'";
|
||||
$result1 = @mysqli_query($GLOBALS['mysql_con'], $query);
|
||||
$row1 = mysqli_fetch_array($result1);
|
||||
|
||||
$query2 = "SELECT * FROM slideshow_line WHERE header_id = '" . $sitepart_id . "' ORDER BY sorting ASC";
|
||||
$result2 = @mysqli_query($GLOBALS['mysql_con'], $query2);
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function(){
|
||||
$("#a<?=$sitepart_id?>.owl-carousel").owlCarousel(
|
||||
{
|
||||
autoplay:true,
|
||||
autoplayTimeout: <?=$row1['eff_interval'] * 1000?>,
|
||||
loop: true,
|
||||
items: 1,
|
||||
responsiveClass: true,
|
||||
animateOut: 'fadeOut',
|
||||
nav: true,
|
||||
navText: ['', '']
|
||||
}
|
||||
);
|
||||
});
|
||||
</script>
|
||||
<style>
|
||||
.slideshow_box .owl-carousel-item.animated {
|
||||
-webkit-animation-duration : <?=$row1['effect_duration'] / 100?>s ;
|
||||
animation-duration : <?=$row1['effect_duration'] /100?>s ;
|
||||
height: <?echo $row1['height']?>px;
|
||||
}
|
||||
</style>
|
||||
<?php
|
||||
|
||||
|
||||
|
||||
echo "<div class=\"slideshow_box\"><div id=\"a" . $sitepart_id . "\" class=\"owl-carousel\">";
|
||||
WHILE ($row2 = mysqli_fetch_array($result2)) {
|
||||
echo "<div class='owl-carousel-item animated' style=\"background-image:url(".PATH_ORIGINAL_FRONTEND . $row2['filename'].")\">";
|
||||
if($row2['link'] <> "") {
|
||||
echo "<a href=\"" . $row2["link"] . "\">";
|
||||
}
|
||||
?>
|
||||
<?/*<img src="<?=PATH_ORIGINAL_FRONTEND . $row2['filename']?>" />*/?>
|
||||
<div class="slideshow_content container">
|
||||
<? if($row2['headline'] <> "" || $row2['text'] <> "" || $row2['text2'] <> "") { ?>
|
||||
<div class="slideshow_content_inner">
|
||||
<? if($row2['headline'] <> "") { ?>
|
||||
<div class="slideshow_headline">
|
||||
<div class="slideshow_headline_inner">
|
||||
<?=$row2['headline']?>
|
||||
</div>
|
||||
</div>
|
||||
<? }?>
|
||||
<? if($row2['text'] <> "") { ?>
|
||||
<div class="slideshow_text">
|
||||
<div class="slideshow_text_inner">
|
||||
<?=$row2['text']?>
|
||||
</div>
|
||||
</div>
|
||||
<? }?>
|
||||
<? if($row2['text2'] <> "") { ?>
|
||||
<div class="slideshow_text2">
|
||||
<div class="slideshow_text2_inner">
|
||||
<?=$row2['text2']?>
|
||||
</div>
|
||||
</div>
|
||||
<? }?>
|
||||
<? if($row2['link'] <> "") { ?>
|
||||
<div class="slideshow_button">
|
||||
<div class="button"><?=$GLOBALS['tc']['slideshow_button']?></div>
|
||||
</div>
|
||||
<? }?>
|
||||
</div>
|
||||
<? }?>
|
||||
</div>
|
||||
<? if($row2['link'] <> "") {
|
||||
echo "</a>";
|
||||
}
|
||||
echo "</div>";
|
||||
}
|
||||
echo("</div></div>\n");
|
||||
?>
|
||||
8
module/slideshow/slideshow.config.inc.php
Normal file
8
module/slideshow/slideshow.config.inc.php
Normal file
@@ -0,0 +1,8 @@
|
||||
<?
|
||||
//Bildpfade
|
||||
define("PATH_ORIGINAL_PICTURE", "../../userdata/slideshow/original/");
|
||||
define("PATH_RESIZE", "../../userdata/slideshow/resize/");
|
||||
define("PATH_ICON", "/userdata/slideshow/icon/");
|
||||
define("PATH_ORIGINAL_FRONTEND", "/userdata/slideshow/resize/");
|
||||
define("PATH_THUMB_FRONTEND", "/userdata/slideshow/thumbnail/");
|
||||
?>
|
||||
24
module/slideshow/slideshow.php
Normal file
24
module/slideshow/slideshow.php
Normal file
@@ -0,0 +1,24 @@
|
||||
<?
|
||||
/**
|
||||
* slideshow_show() Modulaufruf Frontend
|
||||
*
|
||||
* @param mixed $sitepart
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
function slideshow_show( $sitepart_id ) {
|
||||
require("show_slideshow.inc.php");
|
||||
}
|
||||
|
||||
/**
|
||||
* slideshow_edit() Modulaufruf Backend
|
||||
*
|
||||
* @param mixed $sitepart
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
function slideshow_edit() {
|
||||
require_once('edit_slideshow.inc.php');
|
||||
}
|
||||
|
||||
?>
|
||||
59
module/slideshow/vorschau.php
Normal file
59
module/slideshow/vorschau.php
Normal file
@@ -0,0 +1,59 @@
|
||||
<?
|
||||
require_once("../../mysyde/common/common_functions.inc.php");
|
||||
require_once((local_environment()) ? "../../mysyde/dc.config.php" : "../../mysyde/dc-server.config.php");
|
||||
|
||||
db_connect();
|
||||
extract($_POST);
|
||||
?>
|
||||
<link rel="stylesheet" type="text/css" href="../../plugins/magicslideshow/magicslideshow.css">
|
||||
<!--<style src="../../plugins/magicslideshow/magicslideshow.css" ></style>-->
|
||||
|
||||
<script type="text/javascript">
|
||||
/*<![CDATA[*/
|
||||
MagicSlideshow.extraOptions.preview = {
|
||||
'speed' : <?= $interval ?>,
|
||||
'thumbnail-opacity': 1,
|
||||
'effect' : '<?= $effect ?>',
|
||||
'container-opacity': 0,
|
||||
'width' : <?= $width?>,
|
||||
'height' : <?= $height?>,
|
||||
'effect-duration' : <?= $effect_duration ?>,
|
||||
<?php IF ($arrows <> ''){echo "'arrows': 'no',\n";}?>
|
||||
'text-effect' : '<?= $text_effect ?>',
|
||||
'text-position' : '<?= $text_pos ?>'
|
||||
}
|
||||
/*]]>*/
|
||||
</script>
|
||||
<?
|
||||
require_once("slideshow.config.inc.php");
|
||||
$query = "SELECT * FROM slideshow_entry WHERE main_navigation_has_sitepart_id = '" . $sitepart_id . "' ORDER BY sorting DESC";
|
||||
$result1 = mysqli_query($GLOBALS['mysql_con'], $query);
|
||||
$query2 = "SELECT * FROM slideshow_options WHERE sitepart_id = '" . $sitepart_id . "'";
|
||||
$result2 = mysqli_query($GLOBALS['mysql_con'], $query2);
|
||||
$row2 = mysqli_fetch_array($result2);
|
||||
extract($row2);
|
||||
?>
|
||||
|
||||
<?
|
||||
|
||||
echo "<div id=\"preview\" class=\"MagicSlideshow\">\n";
|
||||
WHILE ($row1 = mysqli_fetch_array($result1)) {
|
||||
|
||||
IF ($row1["link"] <> "") {
|
||||
$link = $row1["link"];
|
||||
} ELSE {
|
||||
$link = "";
|
||||
}
|
||||
|
||||
echo "<a href=\"" . $link . "\">";
|
||||
$img = "\t<img src=\"" . PATH_ORIGINAL_FRONTEND . "resize_" . $row1['id'] . "_" . $row1['description'] . ".jpg\" alt=\"" . $row1['headline'] . "\" />\n";
|
||||
echo $img;
|
||||
|
||||
echo "\t<span>" . $row1['text'] . "</span>\n";
|
||||
echo "</a>\n";
|
||||
|
||||
}
|
||||
echo("\n</div>\n");
|
||||
?>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user