// // ------------------------------------------------------------------------- // // Original Author: James Knickelbein // Author Website : http://www.journeymilwaukee.com // Licence Type : GPL // ------------------------------------------------------------------------- // include_once("header.php"); include_once(XOOPS_ROOT_PATH."/class/fileupload.php"); include_once(XOOPS_ROOT_PATH."/class/module.errorhandler.php"); include_once(XOOPS_ROOT_PATH."/class/xoopsform/formdhtmltextarea.php"); $eh = new ErrorHandler(); $mytree = new XoopsTree($db->prefix("adresses_cat"), "cid", "pid"); if ( !empty($_POST['submit']) ) { if (!$xoopsUser) { redirect_header(XOOPS_URL."/user.php", 2, _MUSTREGISTERFIRST); exit(); } else { $modifysubmitter = $xoopsUser->uid(); } $lid = intval($_POST["lid"]); $cid = intval($_POST["cid"]); $homepage = formatURL($myts->makeTboxData4Save($_POST["homepage"])); $url = $myts->makeTboxData4Save($_POST["url"]); $title = $myts->makeTboxData4Save($_POST["title"]); $adres = $myts->makeTboxData4Save($_POST['adres']); $zip = $myts->makeTboxData4Save($_POST['zip']); $city = $myts->makeTboxData4Save($_POST['city']); $country = $myts->makeTboxData4Save($_POST['country']); $phone = $myts->makeTboxData4Save($_POST['phone']); $mobile = $myts->makeTboxData4Save($_POST['mobile']); $fax = $myts->makeTboxData4Save($_POST['fax']); $email = $myts->makeTboxData4Save($_POST['email']); $opentime = $myts->makeTboxData4Save($_POST['opentime']); $description = $myts->makeTboxData4Save($_POST["filedesc"]); $banner = $myts->makeTboxData4Save($_POST['banner']); $logourl = formatURL($myts->makeTboxData4Save($_POST['logourl'])); // Check if Title exist if ( empty($title) ) { $eh->show("2001"); } // Check if Adres exist if ( empty($adres) ) { $eh->show("1004"); } // Check if City exist if ( empty($city) ) { $eh->show("1005"); } // Check if Zip exist if ( empty($zip) ) { $eh->show("1007"); } // Check if Country exist if ( empty($country) ) { $eh->show("2002"); } // Check if Description exist if ( empty($description) ) { $eh->show("1008"); } if ( ($adressesConfig['allow_upload'] == 1) && !empty($_FILES['download']['name']) ) { $upload = new fileupload(); $upload->set_upload_dir("./cache/files/", 'download'); $upload->set_accepted($adressesConfig['accepted_files'], 'download'); $upload->set_overwrite(1, 'download'); $result = $upload->upload(); if ($result['download']['filename']) { $url = $result['download']['filename']; $size = $result['download']['size']; } else { redirect_header("modfile.php?lid=$lid", 3, $upload->errors()); exit(); } } //* Uitgeschakeld *// // Check if URL exist //if ( empty($url) ) { // $eh->show("1016"); //} $newid = $db->genId($db->prefix("adresses_mod")."_requestid_seq"); $sql = " INSERT INTO ".$db->prefix("adresses_mod")." SET requestid=$newid, lid=$lid, cid=$cid, title='$title', url='$url', homepage='$homepage', adres='$adres', zip='$zip', city='$city', country='$country', phone='$phone', mobile='$mobile', fax='$fax', email='$email', opentime='$opentime', banner='$banner', logourl='$logourl', description='$description', modifysubmitter=$modifysubmitter"; $db->query($sql) or $eh->show("0013"); redirect_header("index.php", 2, _MD_THANKSFORINFO); exit(); } else { $lid = intval($_GET['lid']); if (!$xoopsUser) { redirect_header(XOOPS_URL."/user.php", 2, _MUSTREGISTERFIRST); exit(); } include_once(XOOPS_ROOT_PATH."/header.php"); OpenTable(); echo ""._MI_MYADRESSES_NAME.""; echo ""._REQUESTMODIFICATION."

"; $result = $db->query("SELECT cid, title, description, url, homepage, adres, zip, city, country, phone, mobile, fax, email, opentime, banner, logourl, submitter FROM ".$db->prefix("adresses_adresses")." WHERE lid=".$lid." AND status>0"); list($cid, $title, $description, $url, $homepage, $adres, $zip, $city, $country, $phone, $mobile, $fax, $email, $opentime, $banner, $logourl, $submitter) = $db->fetchRow($result); $title = $myts->makeTboxData4Edit($title); $url = $myts->makeTboxData4Edit($url); $homepage = $myts->makeTboxData4Edit($homepage); $adres = $myts->makeTboxData4Edit($adres); $zip = $myts->makeTboxData4Edit($zip); $city = $myts->makeTboxData4Edit($city); $country = $myts->makeTboxData4Edit($country); $phone = $myts->makeTboxData4Edit($phone); $mobile = $myts->makeTboxData4Edit($mobile); $fax = $myts->makeTboxData4Edit($fax); $email = $myts->makeTboxData4Edit($email); $opentime = $myts->makeTboxData4Edit($opentime); $description = $myts->makeTboxData4Edit($description); $banner = $myts->makeTboxData4Edit($banner); $logourl = $myts->makeTboxData4Edit($logourl); //** VANAF HIER NOG BEWERKEN !! **// ?>
makeMySelBox("title", "title", $cid);?>
render(); ?>