Links Database
include_once "../iocoma/config.php"; include_once "../iocoma/sources/classes/CDatabase.php"; $db = new CDatabase(); $db->init(); CDatabase::setMain($db); if (isset($_GET['action']) ? $action = $_GET['action'] : $action = ""); if (isset($_POST['action'])) $action = $_POST['action']; if (isset($_GET['no_link']) ? $no_link = $_GET['no_link'] : $no_link = ""); switch ($action) { case "add": ?>You can use this form to submit a link to be added to the links database. Here are a few guidelines about the process:
- You can submit a link for a site other than your own.
- Only submit links that aren't already listed!
- The addition isn't automatic: I review all links personally before adding them. It might take several days before seeing your link added.
- Links that point toward illegal content won't get listed.
- I might edit the description for submitted sites.
- Please try to make your submission as complete as possible.
- Mega Man sites only can apply!
Your link submission failed for the following reasons:
-
$msg_err
Correct the error(s), then try again.
"; } else { $date = time(); //Only add the link if it's a valid submission if ($_SERVER['REQUEST_METHOD'] == "POST" && ( strpos($_SERVER['HTTP_REFERER'], "http://www.interordi.com") !== false || strpos($_SERVER['HTTP_REFERER'], "http://interordi.com") !== false )) { //Save the link submission $query = "INSERT INTO links (name, url, description, logo, date) VALUES ('$name', '$url', '$description', '$logo', '$date')"; $result = CDatabase::main()->query($query); } echo "The link has been submitted. I will check it out, then add it to the proper category if it isn't listed already. Thanks!
"; } break; case "report": //Stop if no link number is given if (!isset($no_link) || empty($no_link)) { echo "An error has occured!
"; exit; } echo "You can report a broken link or a site move here. Please only press the button below if the site is no longer available, or if it changed of URL!
An error has occured!
"; exit; } //Put a report mark for the site $query = "UPDATE links SET report = 1 WHERE no_link = '$no_link'"; $result = CDatabase::main()->query($query); echo "The site has been reported, so I will give it a look. Thank you!
"; break; } ?>