* @link http://www.4fb.de * @link http://www.contenido.org * @since file available since contenido release <= 4.6 * * {@internal * created 2003-12-10 * modified 2008-06-26, Frederic Schneider, add security fix * modified 2010-05-20, Murat Purc, removed request check during processing ticket [#CON-307] * * $Id$: * }} * */ if (!defined('CON_FRAMEWORK')) { die('Illegal call'); } if ($doedit == "1") { cInclude("includes","functions.upl.php"); $rootpath = $cfgClient[$client]["path"]["htmlpath"] . $cfgClient[$client]["upload"]; if ($action == "cancel") { header("location:".$sess->url($cfg['path']['contenido_fullhtml']."external/backendedit/front_content.php?area=$tmp_area&idart=$idart&idcat=$idcat&changeview=edit&client=$client")); } else { 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='$upldir' AND filename='$friendlyName'"; $db->query($sql); $db->next_record(); $CMS_LINK = $rootpath . $upldir. $friendlyName; conSaveContentEntry($idartlang, "CMS_IMG", $typenr, $db->f("idupl")); // Note: Not conMakeArticleIndex as img not relevant for the index conGenerateCodeForArtInAllCategories($idart); } } } header("location:".$sess->url($cfgClient[$client]["path"]["htmlpath"]."front_content.php?area=$tmp_area&idart=$idart&idcat=$idcat&changeview=edit")); } } ?> contenido contenido.css">
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 image for container %s"),$typenr); $form->addHeader($header); $upload = new cHTMLUpload("uplfile[]"); $form->add(i18n("Upload image"), $upload); $form->unsetActionButton("submit"); $form->setActionButton("cancel", $cfg["path"]["contenido_fullhtml"]."images/but_cancel.gif", i18n("Discard changes"), "c", "cancel"); $form->setActionButton("submit", $cfg['path']['contenido_fullhtml']."images/but_ok.gif", i18n("Save changes"), "s"); echo $form->render(); ?>