Location: PHPKode > projects > DDL CMS > Upload these files to your webspace/admin/instantLEadmin.php
<?php

/**********************************************************
*  ______   ______   ___      _______  ___ ___  _______   *
* |   _  \ |   _  \ |   |    |   _   ||   Y   ||   _   |  *
* |.  |   \|.  |   \|.  |    |.  1___||.      ||   1___|  *
* |.  |    |.  |    |.  |___ |.  |___ |. \_/  ||____   |  *
* |:  1    |:  1    |:  1   ||:  1   ||:  |   ||:  1   |  *
* |::.. . /|::.. . /|::.. . ||::.. . ||::.|:. ||::.. . |  *
* `------' `------' `-------'`-------'`--- ---'`-------'  *
*                                _______        _______   *
*                    .--.--.    |   _   |      |       |  *
*                    |  |  |    |___|   |  __  |___|   |  *
*                     \___/      _(__   | |__|  /  ___/   *
*                               |:  1   |      |:  1  \   *
*                               |::.. . |      |::.. . |  *
*                               `-------'      `-------'  *
*                                                         *
*                                   Script: DDLCMS v3.2   *
*                                 Author: Little Dragon   *
*                              Email: hide@address.com   *
*                        Website: http://www.ddlcms.com   *
*                                                         *
*    Please direct bug reports, suggestions or feedback   *
*                                 to the DDLCMS forums:   *
*                                                         *
*                          http://www.ddlcms.com/forums   *
*                                                         *
*    DDLCMS is a commercial grade content management      *
*    system for DDL site owners. It is provided free      *
*    of charge, provided:                                 *
*                                                         *
*    1. You keep the linkback to http://www.ddlcms.com    *
*       in the footer.                                    *
*                                                         *
*    2. You keep the sponsored links to Sharingzone.net   *
*       on your site.                                     *
*                                                         *
*    By using this script, you agree that you will not    *
*    modify, remove, or replace any encoded parts of      *
*    this script. All encoded parts MUST remain intact    *
*    for your site to remain in good standing.            *
*                                                         *
**********************************************************/

	session_start();
	if(!isset($_SESSION) || !is_array($_SESSION) || !array_key_exists('authuser', $_SESSION))
	{
		$_SESSION = NULL;
		session_destroy();
		header('Location: ' . $site_url . '/admin/');
	}
	define('ADMINDIR', dirname(__FILE__) . '/');
	define('WWWROOT', substr(ADMINDIR, 0, -6));
	define('BASEDIR', substr(WWWROOT, 0, ##BASEDIR##));
	require(BASEDIR . 'funcs.inc');
	require(BASEDIR . 'config.php');
	$instantLE = new config();
	require(ADMINDIR . 'iAdminFuncs.inc');
	require(ADMINDIR . 'adminheader.php');
?>
<!-- LEFT side -->
						<tr>
							<td width="180" style="padding: 0;">
								<div class='sidebartitle'>
									Maintenance
								</div>
								<a href="instantLEadmin.php"> &#149; Instant LE Options</a>
								<br />
								<a href="instantLEadmin.php?action=remove"> &#149; View/Delete Links</a>
								<br />
								<a href="instantLEadmin.php?action=check"> &#149; Check Links</a>
								<br />
								<a href="instantLEadmin.php?action=add"> &#149; Add Link</a>
							</td>
<!-- END LEFT SIDE -->

<!-- BEGIN RIGHT SIDE -->
							<td width="790" align="left" valign="top" class="mainbox">
<?php
	if(isset($_GET) && is_array($_GET) && count($_GET) > 0 && array_key_exists('action', $_GET) && checkURLQuery('instantLEadmin.php', $_GET) === TRUE)
	{
		switch($_GET['action'])
		{
			case 'remove':
				if(isset($_GET) && is_array($_GET) && count($_GET) > 0 && array_key_exists('action', $_GET) && checkURLQuery('instantLEremove.php', $_GET) === TRUE && $_GET['id'] != 0)
				{
					removelink($_GET['id']);
				}
				else
				{
					mainpage('Remove links');
				}
				break;
			case 'check':
				if(isset($_POST) && array_key_exists('action', $_POST))
				{
					check();
				}
				else
				{
?>
<h2>Instant Link Exchange</h2>
<form action="instantLEadmin.php?action=check" method="post">
<p><b>Check reciprocal links</b></p>
<p>Click the below button and the script will check all submitted links to
see if your reciprocal link is still there. If the reciprocal link is not on the
reciprocal links page, submitted link will be removed!</p>
<p><b>This can take a while, please be patient!</b>
<input type="hidden" name="action" value="check">
</p>
<p><input type="submit" value=" Check links "></p>
</form>
<?php
				}
				break;
			case 'add':
				if(isset($_POST) && (count($_POST) == 5 || count($_POST) == 6))
				{
					addlink();
				}
				else
				{
?>
<h2>Instant Link Exchange</h2>
<form action="instantLEadmin.php?action=add" method="post">
<p><b>Add a link</b></p>
<p>Here you can manually add links to your Instant Link Exchange.
This form <b>will NOT</b> check for reciprocal links!</p>
<p>If you don't require a reciprocal link from this website please 
uncheck the Reciprocal URL checkbox!
</p>
<table>
<tr>
<td><b>Owner name:</b></td>
<td><input type="text" name="instantLEname" maxlength="60"></td>
</tr>
<tr>
<td><b>Owner e-mail:</b></td>
<td><input type="text" name="instantLEemail" maxlength="100"></td>
</tr>
<tr>
<td><b>Website title:</b></td>
<td><input type="text" name="instantLEtitle" maxlength="30"></td>
</tr>
<tr>
<td><b>Website URL:<b></td>
<td><input type="text" name="instantLEurl" maxlength="100" value="http://" size="40"></td>
</tr>
<tr>
<td><b>Check reciprocal link:</b></td>
<td><input type="checkbox" name="instantLErecipURL" checked="checked" /></td>
</tr>
<tr>
<td><b>Website description:</td>
<td><input type="text" name="instantLEdescription" maxlength="200" size="50"></td>
</tr>
<tr>
<td><br><br><input type="submit" value=" Add this link " style="width:125px"></td>
</tr>
</table>
</form>
<?php
				}
				break;
		}
	}
	else
	{
		echo '<h2>Instant Link Exchange</h2>';
		echo '<br>' . "\n";
		echo '<b>Instant Link Exchange Options</b>' . "\n";
		if(isset($_POST) && count($_POST) > 0)
		{
			if(isset($_POST) && count($_POST) > 0 && checkPostForm('instantLEeditOptions', $_POST) === TRUE)
			{
				echo '<p>Instant LE settings update was successful.</p>' . "\n";
				dbcom("UPDATE config SET 
					showInstantLE = '{$_POST['showInstantLE']}',
					instantLEnotify = '{$_POST['instantLEnotify']}',
					instantLEmaxLinks = '{$_POST['instantLEmaxLinks']}',
					instantLEclean = '{$_POST['instantLEclean']}',
					instantLEsort = '{$_POST['instantLEsort']}' 
				 	WHERE siteID = '{$_POST['siteID']}';");
			}
			else
			{
				echo '<p>Instant LE settings update failed. Please check the lengths and contents of form fields. <a href="javascript:history.go(-1)">Go back</a> and try again.</p>' . "\n";
			}
		}
		else
		{
			echo '<script type="text/javascript">
			
			function expand(id)
			{
			    var item  = document.getElementById(id);
			
			    if( item.style.visibility == \'hidden\' )
			    {
			        item.style.position   = \'relative\';
			        item.style.visibility = \'visible\';
			        
			    }
			    else
			    {
			        item.style.visibility = \'hidden\';
			        item.style.position   = \'absolute\';
			    }
			
			    return false;
			}
			
			</script>';

			echo '<form action="instantLEadmin.php" method="post">' . "\n";
			echo '<input type="hidden" name="siteID" value="' . $siteID . '" />' . "\n";
			echo '<table border=0 cellpadding=5 cellspacing=0>' . "\n";
			echo '<tr valign=top>' . "\n";
			echo '<td width=200 align=right><span>Show Instant Link Exchange:</span></td>' . "\n";
			if($showInstantLE == 1)
			{
				echo '<td><input type="radio" name="showInstantLE" id="optShowInstantLEyes" value="1" checked="checked" /><label for="optShowInstantLEyes">Yes</label>' . "\n";
				echo '<input type="radio" name="showInstantLE" id="optShowInstantLEno" value="0" /><label for="optShowInstantLEno">No</label>' . "\n";
			}
			else
			{
				echo '<td><input type="radio" name="showInstantLE" id="optShowInstantLEyes" value="1" /><label for="optShowInstantLEyes">Yes</label>' . "\n";
				echo '<input type="radio" name="showInstantLE" id="optShowInstantLEno" value="0" checked="checked" /><label for="optShowInstantLEno">No</label>' . "\n";
			}
			echo '<a href="" onClick="return expand(\'Show_InstantLE_Help\');">[?]</a><br />
<div style="visibility:hidden;position:absolute;font-size:10px;padding:10px" id="Show_InstantLE_Help">
Whether to show the Instant Link Exchange (including the links to sign up).
</div>
</td>' . "\n";
			echo '</tr>' . "\n";
			echo '<tr valign=top>' . "\n";
			echo '<td align=right><span>Instant LE E-mail Notify:</span> </td>' . "\n";
			if($instantLEnotify == 1)
			{
				echo '<td><input type="radio" name="instantLEnotify" id="optInstantLEnotifyYes" value="1" checked="checked" /><label for="optInstantLEnotifyYes">Yes</label>' . "\n";
				echo '<input type="radio" name="instantLEnotify" id="optInstantLEnotifyNo" value="0" /><label for="optInstantLEnotifyNo">No</label>' . "\n";
			}
			else
			{
				echo '<td><input type="radio" name="instantLEnotify" id="optInstantLEnotifyYes" value="1" /><label for="optInstantLEnotifyYes">Yes</label>' . "\n";
				echo '<input type="radio" name="instantLEnotify" id="optInstantLEnotifyNo" value="0" checked="checked" /><label for="optInstantLEnotifyNo">No</label>' . "\n";
			}
			echo '<a href="" onClick="return expand(\'InstantLE_Notify\');">[?]</a><br />
			<div style="visibility:hidden;position:absolute;font-size:10px;padding:10px" id="InstantLE_Notify">
			Whether or not to receive email notification each time someone signs up to your Instant Link Exchange.
			</div></td>' . "\n";
			echo '</tr>' . "\n";
			echo '<tr valign=top>' . "\n";
			echo '<td align=right><span>Instant LE Clean Links:</span> </td>' . "\n";
			if($instantLEclean == 1)
			{
				echo '<td><input type="radio" name="instantLEclean" id="optInstantLEcleanYes" value="1" checked="checked" /><label for="optInstantLEcleanYes">Yes</label>' . "\n";
				echo '<input type="radio" name="instantLEclean" id="optInstantLEcleanNo" value="0" /><label for="optInstantLEcleanNo">No</label>' . "\n";
			}
			else
			{
				echo '<td><input type="radio" name="instantLEclean" id="optInstantLEcleanYes" value="1" /><label for="optInstantLEcleanYes">Yes</label>' . "\n";
				echo '<input type="radio" name="instantLEclean" id="optInstantLEcleanNo" value="0" checked="checked" /><label for="optInstantLEcleanNo">No</label>' . "\n";
			}
			echo '<a href="" onClick="return expand(\'InstantLE_Clean\');">[?]</a><br />
			<div style="visibility:hidden;position:absolute;font-size:10px;padding:10px" id="InstantLE_Clean">
			Whether or not outgoing links should be "clean" (direct). If this option is set to "No", all outgoing links will link out using an onsite redirect (this helps reserve Google Pagerank).
			</div></td>' . "\n";
			echo '</tr>' . "\n";
			echo '<tr valign=top>' . "\n";
			echo '<td align=right><label for="txtInstantLEmaxLinks">Instant LE Maximum Links:</label> </td>' . "\n";
			echo '<td><input type="text" name="instantLEmaxLinks" id="txtInstantLEmaxLinks" value="' . $instantLEmaxLinks . '" maxlength="3" size="15" />' . "\n";
			echo '<a href="" onClick="return expand(\'InstantLE_Max\');">[?]</a><br />
			<div style="visibility:hidden;position:absolute;font-size:10px;padding:10px" id="InstantLE_Max">
			The maximum number of links you want your Instant Link Exchange to hold.
			</div></td>' . "\n";
			echo '</tr>' . "\n";
			echo '<tr valign=top>' . "\n";
			echo '<td align=right><label for="lstInstantLEsort">Instant LE Sort:</label> </td>' . "\n";
			echo '<td><select name="instantLEsort" id="lstInstantLEsort" style="width:125px">' . "\n";
			if($instantLEsort == 'asc')
			{
				echo '<option value="asc" selected="selected"> Alphabetical </option>' . "\n";
			}
			else
			{
				echo '<option value="asc"> Alphabetical </option>' . "\n";
			}
			if($instantLEsort == 'date')
			{
				echo '<option value="date" selected="selected"> By Date </option>' . "\n";
			}
			else
			{
				echo '<option value="date"> By Date </option>' . "\n";
			}
			if($instantLEsort == 'random')
			{
				echo '<option value="random" selected="selected"> Scrambled </option>' . "\n";
			}
			else
			{
				echo '<option value="random"> Scrambled </option>' . "\n";
			}
			echo '</select>' . "\n";
			echo '<a href="" onClick="return expand(\'InstantLE_Sort\');">[?]</a><br />
			<div style="visibility:hidden;position:absolute;font-size:10px;padding:10px" id="InstantLE_Sort">
			The display order you want your Instant Links sorted.
			</div></td>' . "\n";
			echo '</tr>' . "\n";
			echo '<td align=right><br><input type="reset" /></td>' . "\n";
			echo '<td><br><input type="submit" value="Save Options" style="width:125px"/></td>' . "\n";
			echo '</tr>' . "\n";
			echo '</table>' . "\n";
			echo '</form>' . "\n";
		}
	}
?>
							</p>
							</td>
						</tr>
<!-- END RIGHT SIDE -->
<?php
	require(ADMINDIR . 'adminfooter.php');
?>
Return current item: DDL CMS