function editLink($lid, $newLink, $newSite) { if (!empty($newLink)) { if (strpos($newLink, "http://") !== 0 && strpos($newLink, "https://") !== 0 && strpos($newLink, "ftp://") !== 0) { $newLink = "http://" . $newLink; } empty($newSite) && ($newSite = $newLink); global $cfg; $oldLink = getLink($lid); $oldSite = getSite($lid); alterLink($lid, $newLink, $newSite); AuditAction($cfg["constants"]["admin"], "Change Link: " . $oldSite . " [" . $oldLink . "] -> " . $newSite . " [" . $newLink . "]"); } header("location: admin.php?op=editLinks"); }
/** * editLink */ function admin_editLink() { global $cfg; $lid = tfb_getRequestVar('lid'); $newLink = tfb_getRequestVarRaw('editLink'); $newSite = tfb_getRequestVarRaw('editSite'); if (!empty($newLink)) { if (strpos($newLink, "http://") !== 0 && strpos($newLink, "https://") !== 0 && strpos($newLink, "ftp://") !== 0) { $newLink = "http://" . $newLink; } empty($newSite) && ($newSite = $newLink); $oldLink = getLink($lid); $oldSite = getSite($lid); alterLink($lid, $newLink, $newSite); AuditAction($cfg["constants"]["admin"], "Change Link: " . addslashes($oldSite) . " [" . addslashes($oldLink) . "] -> " . addslashes($newSite) . " [" . addslashes($newLink) . "]"); } @header("location: admin.php?op=editLinks"); exit; }