* @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")); } ?>
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("Link"),formGenerateField ("text", "CMS_LINKextern", $a_link_extern_value, 60, 255)); $form->add(i18n("Description"),""); $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 " |