* @license http://www.contenido.org/license/LIZENZ.txt * @link http://www.4fb.de * @link http://www.contenido.org * @since file available since contenido release <= 4.6 * * {@internal * created 2003-05-07 * modified 2008-06-27, Frederic Schneider, add security fix * * $Id$: * }} * */ if(!defined('CON_FRAMEWORK')) { die('Illegal call'); } if ($doedit == "1") { global $cfgClient; global $client; global $_FILES; global $upldir; global $uplfile; global $HTTP_POST_FILES; cInclude("includes","functions.upl.php"); $rootpath = $cfgClient[$client]["path"]["htmlpath"] . $cfgClient[$client]["upload"]; $CMS_LINK = $CMS_LINKextern; if ($CMS_LINKintern) { $CMS_LINK = $CMS_LINKintern; } if($selectpdf){ $CMS_LINK = $rootpath . $selectpdf; } if($selectimg){ $CMS_LINK = $rootpath . $selectimg; } if($selectzip){ $CMS_LINK = $rootpath . $selectzip; } if($selectaudio){ $CMS_LINK = $rootpath . $selectaudio; } if($selectany){ $CMS_LINK = $rootpath . $selectany; } if (count($_FILES) == 1) { foreach ($_FILES['uplfile']['name'] as $key => $value) { if (file_exists($_FILES['uplfile']['tmp_name'][$key])) { $friendlyName = uplCreateFriendlyName($_FILES['uplfile']['name'][$key]); move_uploaded_file($_FILES['uplfile']['tmp_name'][$key], $cfgClient[$client]['upl']['path'].$upldir.$friendlyName); uplSyncDirectory($upldir); if ($path == "") { $path = "/"; } $sql = "SELECT idupl FROM ".$cfg["tab"]["upl"]." WHERE dirname='".Contenido_Security::escapeDB($upldir, $db)."' AND filename='".Contenido_Security::escapeDB($friendlyName, $db)."'"; $db->query($sql); $db->next_record(); $CMS_LINK = $rootpath . $upldir. $friendlyName; } } } conSaveContentEntry ($idartlang, "CMS_LINK", $typenr, $CMS_LINK); conSaveContentEntry ($idartlang, "CMS_LINKDESCR", $typenr, $CMS_LINKDESCR); conSaveContentEntry ($idartlang, "CMS_LINKTARGET", $typenr, $CMS_LINKTARGET); conMakeArticleIndex ($idartlang, $idart); conGenerateCodeForartInAllCategories($idart); Header("Location:".$sess->url($cfg['path']['contenido_fullhtml']."external/backendedit/front_content.php?area=$tmp_area&idart=$idart&idcat=$idcat&changeview=edit&client=$client")); } header("Content-Type: text/html; charset={$encoding[$lang]}"); ?> file selector contenido.css"> "; echo "
spacer.gif" width="10" height="10"> spacer.gif" width="10" height="10"> spacer.gif" width="10" height="10">
setVar("lang",$lang); $form->setVar("typenr",$typenr); $form->setVar("idart",$idart); $form->setVar("idcat",$idcat); $form->setVar("idartlang",$idartlang); $form->setVar("contenido",$sess->id); $form->setVar("action",10); $form->setVar("doedit",1); $form->setVar("type",$type); $form->setVar("changeview","edit"); $form->setVar("CMS_LINK", $a_content["CMS_LINK"][$typenr]); $header = sprintf(i18n("Edit link for container %s"),$typenr); $form->addHeader($header); if (is_numeric($a_content["CMS_LINK"][$typenr])) { $a_link_intern_value = $a_content["CMS_LINK"][$typenr]; $a_link_extern_value = ""; } else { $a_link_intern_value = "0"; $a_link_extern_value = $a_content["CMS_LINK"][$typenr]; } $form->add(i18n("External link"),formGenerateField ("text", "CMS_LINKextern", $a_link_extern_value, 60, 255)); $sql = "SELECT * FROM ".$cfg["tab"]["cat_tree"]." AS a, ".$cfg["tab"]["cat_art"]." AS b, ".$cfg["tab"]["cat"]." AS c, ".$cfg["tab"]["cat_lang"]." AS d, ".$cfg["tab"]["art_lang"]." AS e WHERE a.idcat = b.idcat AND b.idcat = d.idcat AND d.idlang = '".Contenido_Security::toInteger($lang)."' AND b.idart = e.idart AND c.idcat = a.idcat AND c.idclient = '".Contenido_Security::toInteger($client)."' AND e.idlang = '".Contenido_Security::toInteger($lang)."' ORDER BY a.idtree"; $db->query($sql); $intlink .= ""; $form->add(i18n("Internal link"),$intlink); $pdflink.= ""; $form->add(i18n("Link to a document"),$pdflink); $imglink .= ""; $form->add(i18n("Link to an image"),$imglink); $ziplink .= ""; $form->add(i18n("Link to an archive"),$ziplink); $audiolink .= ""; $form->add(i18n("Link to a media file"),$audiolink); $anylink .= ""; $form->add(i18n("Link to any file"),$anylink); cInclude("includes","functions.upl.php"); // Laden der Verzeichnisse und Dateien in separate Arrays $olddir = getcwd(); chdir($cfgClient[$client]['upl']['path'].rawurldecode($path)); $dirlist = uplDirectoryListRecursive($cfgClient[$client]['upl']['path'].rawurldecode($path)); chdir($olddir); $upldirs = '"; $form->add(i18n("Upload file"),$upldirs.''); $form->add(i18n("Description"),""); $linktarget = " "; $form->add(i18n("Target frame"),$linktarget); $newwindow = " "; $newwindow .= " "; $form->add(i18n("Open in new window"),$newwindow); $tmp_area = "con_editcontent"; $form->addCancel($sess->url($cfgClient[$client]["path"]["htmlpath"]."front_content.php?area=$tmp_area&idart=$idart&idcat=$idcat")); echo $form->render(); echo "
"; ?>